/* ============================================================================
   GLORYCK — ELEVATION LAYER  (v1)
   Loaded last. Elevates the existing dark-luxury system without replacing it:
   · atmosphere & depth        · editorial rhythm / section spine
   · typographic drama         · crafted surfaces (cards, panels)
   · cohesive motion language  · refined micro-details
   Pure visual layer. No content or claims are added here.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   0 · TOKENS
   --------------------------------------------------------------------------*/
:root {
    --accent: #d2b47f;
    --accent-strong: #f0d49a;
    --accent-deep: #9c7b48;
    --accent-line: rgba(210, 180, 127, 0.55);
    --glow: rgba(210, 180, 127, 0.14);

    --surface-1: rgba(255, 255, 255, 0.022);
    --surface-2: rgba(255, 255, 255, 0.034);
    --surface-edge: rgba(244, 240, 232, 0.10);
    --surface-edge-strong: rgba(244, 240, 232, 0.16);

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
    --shadow-soft: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
    --shadow-lift: 0 40px 90px -40px rgba(0, 0, 0, 0.95);
}

/* ----------------------------------------------------------------------------
   1 · ATMOSPHERE  —  warm signature glow, depth, grain, vignette
   --------------------------------------------------------------------------*/
.elev-atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    contain: strict;
}
/* primary warm aurora — top-right, slow drift */
.elev-atmosphere::before {
    content: '';
    position: absolute;
    top: -32vh;
    right: -22vw;
    width: 92vw;
    height: 92vh;
    background:
        radial-gradient(closest-side,
            rgba(210, 180, 127, 0.18),
            rgba(210, 180, 127, 0.07) 42%,
            transparent 72%);
    filter: blur(8px);
    animation: elevDrift 26s ease-in-out infinite alternate;
}
/* secondary cool counter-glow — lower-left, anchors depth */
.elev-atmosphere::after {
    content: '';
    position: absolute;
    bottom: -36vh;
    left: -26vw;
    width: 86vw;
    height: 86vh;
    background:
        radial-gradient(closest-side,
            rgba(120, 132, 168, 0.10),
            rgba(80, 90, 120, 0.04) 46%,
            transparent 74%);
    filter: blur(6px);
    animation: elevDrift2 32s ease-in-out infinite alternate;
}
@keyframes elevDrift {
    0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
    100% { transform: translate3d(-5vw, 6vh, 0) scale(1.12); opacity: 1; }
}
@keyframes elevDrift2 {
    0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0.7; }
    100% { transform: translate3d(5vw, -5vh, 0) scale(1.14); opacity: 0.95; }
}

/* global vignette to focus the centre column */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(125% 120% at 50% 18%,
        transparent 52%,
        rgba(0, 0, 0, 0.34) 100%);
}

/* lift the existing grain slightly for a richer film texture */
.grain { opacity: 0.05; mix-blend-mode: overlay; }

/* keep all real content above the atmosphere.
   NOTE: only lift the in-flow containers. .nav-bar / .menu-overlay / .elev-progress
   are already position:fixed with their own z-index — never override that here,
   or the fixed menu-overlay collapses into the flow and pushes the page down. */
main, footer { position: relative; z-index: 1; }

/* ----------------------------------------------------------------------------
   2 · SCROLL PROGRESS + NAV REFINEMENT
   --------------------------------------------------------------------------*/
.elev-progress {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 2px;
    z-index: 600;
    background: transparent;
    pointer-events: none;
}
.elev-progress > i {
    display: block;
    height: 100%;
    width: var(--elev-scroll, 0%);
    background: linear-gradient(90deg, var(--accent-deep), var(--accent-strong));
    box-shadow: 0 0 14px rgba(210, 180, 127, 0.6);
    transition: width 0.12s linear;
}

.nav-bar.scrolled {
    background: linear-gradient(180deg, rgba(6, 6, 6, 0.92), rgba(6, 6, 6, 0.74));
    border-bottom: 1px solid var(--surface-edge);
    box-shadow: 0 18px 50px -30px rgba(0, 0, 0, 0.9);
}
.logo { transition: opacity 0.3s var(--ease-out); }
.logo:hover { opacity: 0.8; }

/* refined CTA in nav — subtle sweep */
.nav-cta { position: relative; overflow: hidden; }
.nav-cta::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.45), transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.6s var(--ease-out);
}
.nav-cta:hover::after { transform: translateX(120%); }

/* ----------------------------------------------------------------------------
   3 · TYPOGRAPHY  —  editorial drama
   --------------------------------------------------------------------------*/
h1, h2, h3, h4 { font-optical-sizing: auto; }

/* hero headline: tighter, with an italic serif accent on the gold line */
.hero-headline {
    font-size: clamp(3rem, 6.1vw, 6.6rem);
    line-height: 0.92;
    letter-spacing: -0.012em !important;
}
.hero-headline span:nth-child(2) {
    font-style: italic;
    font-weight: 600;
    color: var(--accent);
    /* subtle warm sheen on the accent word */
    background: linear-gradient(92deg, var(--accent-strong), var(--accent) 60%, var(--accent-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-sub { font-size: 1.06rem; color: var(--muted); }

/* section headings get more presence + refined italic emphasis spans */
.manifesto-text { font-size: clamp(2rem, 4.2vw, 3.5rem); letter-spacing: -0.01em; }
.why-header h2, .features-header h2, .api-content h2,
.tech-header h2, .about-content h2, .legal-inner h2,
.footer-cta-section h2 {
    font-size: clamp(2rem, 3.2vw, 2.9rem);
    letter-spacing: -0.01em;
    line-height: 1.05;
}
.footer-cta-section h2 { font-size: clamp(2.4rem, 4.4vw, 3.8rem); }

/* shared eyebrow / kicker treatment */
.elev-eyebrow,
.manifesto-title, .why-header .elev-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-body);
    font-size: 0.7rem !important;
    font-weight: 700;
    letter-spacing: 0.28em !important;
    text-transform: uppercase;
    color: var(--accent);
}
.elev-eyebrow::before {
    content: '';
    width: 26px; height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
}
.elev-eyebrow .elev-eyebrow-num { color: var(--accent-strong); opacity: 0.85; }

/* refined section header alignment for centred sections */
.why-header, .features-header, .tech-header { position: relative; }

/* ----------------------------------------------------------------------------
   4 · SECTION RHYTHM / SPINE
   alternate tonal bands so the long scroll breathes
   --------------------------------------------------------------------------*/
.why-section, .tech-section {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 40%),
        #070708;
    border-top: 1px solid var(--surface-edge);
}
.features-section { background: #050505; }

/* hairline section index ticks injected by JS sit at the top-left of a section */
.elev-section-tag {
    position: absolute;
    top: clamp(40px, 6vh, 70px);
    left: 4.5%;
    font: 700 0.66rem var(--font-body);
    letter-spacing: 0.26em !important;
    text-transform: uppercase;
    color: rgba(210, 180, 127, 0.5);
    z-index: 2;
    pointer-events: none;
}
@media (max-width: 900px) { .elev-section-tag { display: none; } }

/* ----------------------------------------------------------------------------
   5 · TRUST / CAPABILITY STRIP  —  more intentional, with dividers + live dot
   --------------------------------------------------------------------------*/
.trust-bar {
    background: linear-gradient(180deg, rgba(10, 10, 11, 0.92), rgba(6, 6, 7, 0.92));
    border-top: 1px solid var(--surface-edge);
    border-bottom: 1px solid var(--surface-edge);
}
.trust-label {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--accent) !important;
    letter-spacing: 0.22em !important;
}
.trust-label::before {
    content: '';
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent-strong);
    box-shadow: 0 0 10px rgba(210, 180, 127, 0.8);
    animation: elevPulse 2.6s ease-in-out infinite;
}
@keyframes elevPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

.trust-items { gap: 0 !important; }
.trust-item {
    position: relative;
    padding: 4px 30px;
    transition: transform 0.35s var(--ease-out);
}
.trust-item + .trust-item::before {
    content: '';
    position: absolute; left: 0; top: 50%;
    transform: translateY(-50%);
    width: 1px; height: 30px;
    background: var(--surface-edge);
}
.trust-item:hover { transform: translateY(-2px); }
.trust-item .trust-num {
    font-family: var(--font-display);
    font-size: 1.5rem !important;
    color: var(--text);
}
.trust-item:hover .trust-num { color: var(--accent-strong); }

/* ----------------------------------------------------------------------------
   6 · CRAFTED SURFACES  —  cards become objects, not flat rectangles
   --------------------------------------------------------------------------*/
.why-card, .feature-card, .stat-item, .legal-item, .about-detail-item {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012) 38%),
        var(--surface-1) !important;
    border: 1px solid var(--surface-edge) !important;
    box-shadow: var(--shadow-soft);
    transition:
        transform 0.5s var(--ease-out),
        border-color 0.5s var(--ease-out),
        box-shadow 0.5s var(--ease-out);
}
/* animated gold top-edge that grows on hover */
.why-card::before, .feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    height: 2px; width: 0;
    background: linear-gradient(90deg, var(--accent-strong), var(--accent), transparent);
    transition: width 0.55s var(--ease-out);
    z-index: 2;
}
/* soft inner glow that fades in on hover */
.why-card::after, .feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 100% at 0% 0%, var(--glow), transparent 55%);
    opacity: 0;
    transition: opacity 0.55s var(--ease-out);
    z-index: -1;
}
.why-card:hover, .feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-line) !important;
    box-shadow: var(--shadow-lift);
}
.why-card:hover::before, .feature-card:hover::before { width: 100%; }
.why-card:hover::after, .feature-card:hover::after { opacity: 1; }

/* refined card index numbers */
.why-icon, .feature-num {
    font-family: var(--font-display) !important;
    color: var(--accent) !important;
}
.why-icon {
    font-size: 2.6rem !important;
    line-height: 1;
    opacity: 0.85;
}
.feature-num {
    letter-spacing: 0.16em !important;
    font-family: var(--font-body) !important;
    font-size: 0.66rem !important;
}
.why-card h3, .feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.45rem !important;
    font-weight: 600;
    letter-spacing: -0.005em;
}
/* title-case serif reads more refined than condensed uppercase serif */
.why-card h3 { text-transform: none !important; }

/* BENTO: feature the first service card across two columns on wide screens */
@media (min-width: 901px) {
    .features-grid { grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; }
    .features-grid .feature-card:first-child {
        grid-column: span 2;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        background:
            linear-gradient(150deg, rgba(210, 180, 127, 0.10), rgba(255, 255, 255, 0.014) 46%),
            var(--surface-1) !important;
        border-color: var(--accent-line) !important;
    }
    .features-grid .feature-card:first-child h3 { font-size: 1.9rem !important; }
    .features-grid .feature-card:first-child p { max-width: 70%; font-size: 1rem; }
}

/* stat tiles in the manifesto */
.stat-item h4 {
    font-family: var(--font-display) !important;
    font-size: 2.8rem !important;
    color: var(--accent-strong) !important;
}
.stat-item:hover { transform: translateY(-4px); border-color: var(--accent-line) !important; }

/* ----------------------------------------------------------------------------
   7 · EDITORIAL VISUAL FRAMING  —  make the canvas scenes read as craft
   --------------------------------------------------------------------------*/
.visual-block {
    position: relative;
    border: 1px solid var(--surface-edge-strong) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 40px 100px -50px rgba(0, 0, 0, 0.95),
        0 0 0 1px rgba(0, 0, 0, 0.4);
    background:
        radial-gradient(120% 120% at 80% 0%, rgba(210, 180, 127, 0.08), transparent 55%),
        linear-gradient(150deg, #121110, #050505) !important;
}
/* faint grid inside the visual frame for a technical, intentional feel */
.visual-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(244, 240, 232, 0.04) 1px, transparent 1px) 0 0 / 100% 38px,
        linear-gradient(90deg, rgba(244, 240, 232, 0.04) 1px, transparent 1px) 0 0 / 38px 100%;
    mask-image: radial-gradient(120% 120% at 50% 40%, black 40%, transparent 78%);
    pointer-events: none;
    z-index: 1;
}
/* corner caption chip — labelled by JS per section */
.editorial-section { position: relative; }
.visual-block .elev-vcap {
    position: absolute;
    left: 16px; bottom: 14px;
    z-index: 3;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 12px;
    border: 1px solid var(--surface-edge);
    background: rgba(5, 5, 5, 0.62);
    backdrop-filter: blur(10px);
    border-radius: 6px;
    font: 700 0.62rem var(--font-body);
    letter-spacing: 0.16em !important;
    text-transform: uppercase;
    color: rgba(244, 240, 232, 0.82);
}
.visual-block .elev-vcap::before {
    content: '';
    width: 6px; height: 6px; border-radius: 50%;
    background: #79d49c;
    box-shadow: 0 0 10px rgba(121, 212, 156, 0.8);
}

/* the outlined → filled "huge text" gets a more dramatic stroke */
.huge-text {
    font-size: clamp(4rem, 9vw, 9rem) !important;
    -webkit-text-stroke: 1px rgba(244, 240, 232, 0.22);
    letter-spacing: -0.02em !important;
}
.huge-text::before { border-right: 2px solid var(--accent-strong); }
.sub-heading-seo { font-size: clamp(1.5rem, 2.4vw, 2.1rem) !important; }

/* ----------------------------------------------------------------------------
   8 · API / TECH / ABOUT / LEGAL refinements
   --------------------------------------------------------------------------*/
.api-endpoints li { transition: padding-left 0.35s var(--ease-out); }
.api-endpoints li:hover { padding-left: 8px; }
.api-endpoints .method {
    border: 1px solid rgba(210, 180, 127, 0.3);
}

/* tech pipeline: connect steps with a refined gradient rail + numbered nodes */
.tech-pipeline { position: relative; }
.tech-step .step-icon {
    font-family: var(--font-display) !important;
    width: 58px; height: 58px;
    margin: 0 auto 18px;
    display: grid; place-items: center;
    border: 1px solid var(--accent-line);
    border-radius: 50%;
    background: radial-gradient(circle at 50% 30%, rgba(210, 180, 127, 0.14), transparent 70%);
    font-size: 1.2rem !important;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.tech-step:hover .step-icon {
    transform: translateY(-4px);
    box-shadow: 0 0 26px -6px rgba(210, 180, 127, 0.5);
}
.tech-step::after {
    background: linear-gradient(90deg, var(--accent-line), transparent) !important;
}

.about-detail-item { border-radius: 8px; padding: 18px 20px !important; }
.about-detail-item:first-child { border-top: 1px solid var(--surface-edge) !important; }
.about-detail-value { font-family: var(--font-display); font-size: 1.15rem !important; }

.legal-item:hover { border-color: var(--accent-line) !important; transform: translateY(-3px); }
.company-stamp {
    background: rgba(210, 180, 127, 0.06);
    transition: background 0.4s var(--ease-out);
}
.company-stamp:hover { background: rgba(210, 180, 127, 0.14); }

/* ----------------------------------------------------------------------------
   9 · FOOTER + FORM
   --------------------------------------------------------------------------*/
.footer-bg-text {
    background: linear-gradient(180deg, rgba(244, 240, 232, 0.05), transparent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.contact-form-wrapper {
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)) !important;
    box-shadow: var(--shadow-lift);
}
.form-input, .form-textarea { transition: border-color 0.3s, background 0.3s, box-shadow 0.3s; }
.form-input:focus, .form-textarea:focus {
    box-shadow: 0 0 0 1px rgba(210, 180, 127, 0.3), 0 0 22px -10px rgba(210, 180, 127, 0.6);
    background: rgba(0, 0, 0, 0.34) !important;
}
.form-submit { position: relative; overflow: hidden; }
.form-submit::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.5), transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.6s var(--ease-out);
}
.form-submit:hover::after { transform: translateX(120%); }

.cap-col li { position: relative; padding-left: 0; transition: color 0.3s, padding-left 0.3s; }
.cap-col li:hover { padding-left: 6px; color: var(--accent-strong); }

/* ----------------------------------------------------------------------------
   10 · MOTION LANGUAGE  —  refined reveals + button/link interactions
   --------------------------------------------------------------------------*/
.reveal {
    opacity: 0;
    transform: translateY(38px);
    filter: blur(8px);
    transition:
        opacity 1.05s var(--ease-out),
        transform 1.05s var(--ease-out),
        filter 1.05s var(--ease-out);
    will-change: opacity, transform;
}
.reveal.active { opacity: 1; transform: none; filter: none; }

/* staggered children within grids */
.why-grid .why-card,
.features-grid .feature-card,
.stat-grid .stat-item { transition-delay: calc(var(--elev-i, 0) * 90ms); }

/* primary hero CTA sweep */
.hero-cta-primary { position: relative; overflow: hidden; }
.hero-cta-primary::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.55), transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.7s var(--ease-out);
}
.hero-cta-primary:hover::after { transform: translateX(120%); }

/* nav + content link underline refinement */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute; left: 0; bottom: -6px;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width 0.35s var(--ease-out);
}
.nav-link:hover::after { width: 100%; }

/* ----------------------------------------------------------------------------
   11 · MICRO-DETAILS
   --------------------------------------------------------------------------*/
::selection { background: rgba(210, 180, 127, 0.28); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }

/* refined scrollbar (WebKit) */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: #050505; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2a2722, #15140f);
    border: 2px solid #050505;
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--accent-deep), #2a2722); }

/* ----------------------------------------------------------------------------
   12 · RESPONSIVE
   --------------------------------------------------------------------------*/
@media (max-width: 900px) {
    .elev-atmosphere::before { width: 130vw; right: -40vw; }
    .trust-item { padding: 4px 0; }
    .trust-item + .trust-item::before { display: none; }
    .features-grid .feature-card:first-child p { max-width: 100%; }
    .footer-cta-section h2 { font-size: clamp(2rem, 8vw, 2.8rem); }
}

/* ----------------------------------------------------------------------------
   13 · REDUCED MOTION
   --------------------------------------------------------------------------*/
@media (prefers-reduced-motion: reduce) {
    .elev-atmosphere::before,
    .elev-atmosphere::after,
    .trust-label::before { animation: none !important; }
    .reveal { transition-duration: 0.4s; filter: none; transform: none; }
    .reveal { opacity: 0; }
    .reveal.active { opacity: 1; }
    .elev-progress > i { transition: none; }
}
