body.debug * {
    outline: 1px solid rgba(255,0,0,0.2) !important;
}

/* =========================================
   58CITI - GLOBAL DESIGN SYSTEM
   ========================================= */

/* Font loaded via <link> in index.html (with preconnect + preload) for better performance.
   The @import was a render-blocking bottleneck. */

:root {
    /* Core palette - refined for premium education/lifestyle (warm neutral, trustworthy) */
    --color-dark: #0F0F0F;
    --color-dark-2: #1A1A1A;
    --color-light: #F5F5F0;
    --color-light-2: #EDEDE6;
    --color-accent: #FAF5E8;      /* Very light sophisticated gold to achieve WCAG AA 4.5:1+ contrast with dark text on buttons */
    --color-accent-hover: #FFFBF0;
    --color-surface: #FFFFFF;
    --color-text-muted: rgba(255, 255, 255, 0.65);
    --color-text-muted-dark: rgba(15, 15, 15, 0.65);

    --font-primary: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

    /* Strict 8-point spacing scale - NO magic numbers in layout */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 40px;
    --space-6: 48px;
    --space-8: 64px;
    --space-10: 80px;
    --space-12: 96px;
    --space-16: 128px;

    /* Radii - consistent */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 9999px;

    /* Elevation - prefer layered color + border over heavy shadows (cheat code) */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 150ms;
    --duration-base: 300ms;
    --duration-slow: 600ms;

    /* Typography — layout font sizes (partner labels, captions) */
    --font-size-xs: 12px;
    --font-size-2xs: 10px;
    --font-size-icon-partner: 36px;
    --font-size-icon-partner-mobile: 28px;
    --letter-spacing-partner: 0.04em;
    --letter-spacing-partner-mobile: 0.03em;
    --line-height-partner-label: 1.25;

    /*
     * Hero layout frame & text allocation (documented tokens for positioning calcs).
     * Wide/narrow pairs track the stepwise hero-bg-layer left + partners max-width rules.
     */
    --frame-site-max: 1280px;
    --frame-hero-narrow: 1024px;
    --hero-text-max: 620px;
    --hero-text-max-narrow: 420px;
    --hero-alloc-text-wide: 650px;
    --hero-alloc-text-narrow: 450px;
    --hero-right-inset: 640px;
    --hero-min-height: 88vh;
    --hero-bg-bleed-y: 8vh;
    --hero-mobile-band-height: 48vh;
    --hero-mobile-band-height-narrow: 38vh;
    /* Mobile hero vertical rhythm (Feedback.01 @390px) */
    --hero-mobile-pad-top: var(--space-12);
    --hero-mobile-pad-bottom: var(--space-6);
    --hero-mobile-content-to-band: var(--space-8);
    --hero-mobile-band-after: var(--space-6);
    /* Mobile hero image — landscape crop from production portrait asset */
    --hero-mobile-image: url('images/hero-bg-mobile-b.webp');
    --hero-mobile-bg-pos: 50% 42%;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

/* Native scrolling for wheel/trackpad (full rubber band supported at edges).
   scroll-behavior helps the smooth navigation actions. */
html, body {
  overscroll-behavior-y: auto;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-dark);
    color: var(--color-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.55;
    overflow-x: hidden;
    position: relative;
}

/* Debug mode for visual QA - toggle with body.debug or ?debug=1 */
body.debug * {
    outline: 1px solid rgba(255, 0, 0, 0.15) !important;
}
body.debug .glass,
body.debug .card,
body.debug .stat-card,
body.debug .service-card {
    outline: 1px solid rgba(0, 200, 255, 0.25) !important;
}

.ambient-glow {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 100vh;
    background: radial-gradient(circle at 15% 25%, rgba(255,255,255,0.025) 0%, transparent 55%);
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4 {
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: var(--space-2);
    display: inline-block;
    color: var(--color-text-muted);
    font-weight: 600;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-dark);
    padding: var(--space-2) var(--space-5);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: transform var(--duration-fast) var(--ease-out),
                background-color var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    background: transparent;
    color: var(--color-light);
    border: 1px solid rgba(255,255,255,0.2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.35);
}

/* =========================================
   GLOBAL LAYOUT STRUCTURE - strict containers + 8px grid
   ========================================= */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

.site-header, section, .site-footer {
    width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background var(--duration-base), border-color var(--duration-base);
}

.site-header.scrolled {
    background: rgba(15, 15, 15, 0.95);
    border-bottom-color: rgba(255,255,255,0.1);
}

section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
}

.site-footer {
    padding-top: var(--space-10);
    padding-bottom: var(--space-6);
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--space-8);
}

.section-header h2 {
    font-size: clamp(1.85rem, 4.2vw, 2.6rem);
    margin-top: var(--space-2);
    line-height: 1.15;
}
.section-desc {
    margin-top: var(--space-3);
    font-size: 0.95rem;
    line-height: 1.6;
    text-wrap: balance;
    opacity: 0.75;
}

@media (max-width: 768px) {
    .container,
    .site-header,
    section,
    .site-footer {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
    .hero-section .container {
        padding-left: var(--space-4) !important;
        padding-right: var(--space-4) !important;
    }
    section { padding-top: var(--space-8); padding-bottom: var(--space-8); }
    .hero-section + .stats-section {
        padding-top: var(--space-6);
    }
    .section-header { margin-bottom: var(--space-6); }
}

/* =========================================
   HEADER & NAVIGATION (premium sticky + mobile)
   ========================================= */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.logo {
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    color: var(--color-light);
    text-decoration: none;
    white-space: nowrap;
    margin-right: var(--space-4);
}
.logo span { font-weight: 400; opacity: 0.65; }

.desktop-nav {
    display: flex;
    gap: var(--space-8);
    align-items: center;
}
.desktop-nav a {
    text-decoration: none;
    color: var(--color-light);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color var(--duration-fast) var(--ease-out);
    position: relative;
    white-space: nowrap;
}
.desktop-nav a:hover { color: var(--color-accent); }
.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width var(--duration-fast) var(--ease-out);
}
.desktop-nav a:hover::after { width: 100%; }

/* Declared window experiment: transient "already here" acknowledgment for no-op nav clicks.
   Gives the user immediate visual confirmation on the control they interacted with,
   without any scroll. Calm, token-respecting, quick. */
.desktop-nav a.nav-ack,
.mobile-nav a.nav-ack {
  color: var(--color-accent) !important;
  transform: translateY(-2px) scale(1.02);
  transition: color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}

/* Extra emphasis on the underline for nav links during ack (makes the flash more noticeable on text items) */
.desktop-nav a.nav-ack::after,
.mobile-nav a:not(.btn-primary).nav-ack::after {
  width: 100% !important;
  height: 1.5px;
}

.nav-cta.nav-ack,
.mobile-nav a.btn-primary.nav-ack {
  transform: scale(0.95) translateY(-2px);
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

/* Logo ack (for #home no-op case). Slightly different treatment to respect logo weight. */
.logo.nav-ack {
  color: var(--color-accent) !important;
  transform: scale(1.04);
  transition: color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.logo.nav-ack span {
  opacity: 0.85;
}

.nav-cta {
    margin-left: var(--space-4);
}

/* Mobile hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--color-light);
    font-size: 1.5rem;
    padding: var(--space-1);
    cursor: pointer;
    z-index: 110;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-dark);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: var(--space-4) var(--space-6);
    flex-direction: column;
    gap: var(--space-1);
    z-index: 90;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    color: var(--color-light);
    text-decoration: none;
    padding: var(--space-2) 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mobile-nav a:not(.btn-primary) {
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    transition: color var(--duration-fast) var(--ease-out);
}
.mobile-nav a:not(.btn-primary):hover { color: var(--color-accent); }
.mobile-nav a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: var(--space-1);
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width var(--duration-fast) var(--ease-out);
}
.mobile-nav a:not(.btn-primary):hover::after { width: 100%; }
.mobile-nav a:last-child { border-bottom: none; }

@media (max-width: 860px) {
    .desktop-nav { display: none; }
    .hamburger { display: block; }
    .nav-cta { display: none; }
}

/* Narrow desktop (just above mobile breakpoint): reduce internal spacing to ensure
   the logo + nav + "WORK WITH US" fit without the button clipping, while keeping
   the outer browser-to-logo and browser-to-button-right gaps equal (both resolve
   to the same padding token). This "algorithmically" prevents the inequality that
   would otherwise occur from overflow as width reduces. */
@media (max-width: 1024px) {
    .desktop-nav { gap: var(--space-6); }
    .logo { margin-right: var(--space-2); }
    .nav-cta { margin-left: var(--space-2); }
}

/* =========================================
   HERO SECTION - robust, fluid, no fragile absolute positioning for core UX
   ========================================= */
.hero-section {
    position: relative;
    min-height: var(--hero-min-height);
    /* display: flex and align-items removed to ensure .container behaves consistently
       with .header-inner (same max-width, margin auto, padding) for edge alignment.
       Vertical centering preserved via other means or padding if needed. */
    padding-top: var(--space-16); /* account for sticky header */
    overflow: hidden;
}

.hero-bg-layer {
    position: absolute;
    top: calc(-1 * var(--hero-bg-bleed-y));
    bottom: calc(-1 * var(--hero-bg-bleed-y));
    /* Frame + text allocation tokens place the image left after copy; right matches inner frame (header button). */
    left: calc((100vw - var(--frame-site-max)) / 2 + var(--space-6) + var(--hero-alloc-text-wide) + var(--space-5));
    right: calc(50vw - var(--hero-right-inset) + var(--space-6));
    /* Optimized WebP (69KB).
       Preloaded via <link rel="preload" as="image" fetchpriority="high"> in index.html
       to improve LCP. */
    background-image: url('images/hero-bg.webp');
    background-image: image-set(
      url('images/hero-bg.webp') type('image/webp')
    );
    background-size: cover;
    background-position: 55% 40%;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.08) 6%, black 18%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.08) 6%, black 18%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative; /* containing block for the .hero-bg-layer (absolute on desktop, relative on mobile) so edges respect the content block */
    z-index: 10;
    max-width: 100%;
}

/* Title text (eyebrow + h1 + p) stays in a readable-width block, strictly
   left-aligned to the logo's left edge via the shared container padding. */
.hero-text {
    max-width: var(--hero-text-max);
}

/* Force the container inside hero to respect the same horizontal constraints
   as the header (max-width 1280px centered with matching padding). This ensures
   the left of .hero-text matches the logo left, across all widths. */
.hero-section .container {
    max-width: var(--frame-site-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--space-6) !important;
    padding-right: var(--space-6) !important;
}

.hero-content h1 {
    font-size: clamp(2.6rem, 6.8vw, 4.25rem);
    margin-bottom: var(--space-4);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.hero-content p {
    font-size: 1.05rem;
    margin-bottom: var(--space-6);
    opacity: 0.82;
    max-width: 92%;
    line-height: 1.65;
}

.glass {
    /* Premium glass on dark: higher opacity + strong blur for "floating" liquid effect (inspired by several video examples) */
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius-pill);
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-surface);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    transition: transform var(--duration-fast) var(--ease-out), background var(--duration-fast), box-shadow var(--duration-fast);
}

.glass:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.glass .check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.55);
    font-size: 0.7rem;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    /* On narrower desktop the shared frame is tighter (container <1280), so reduce
       .hero-text max-width and the "text allocation" in the image calc to keep the
       photo from intruding left while preventing H1/P overlap. The right calc keeps
       the photo right edge respecting the inner right (matching nav button). */
    .hero-text {
        max-width: var(--hero-text-max-narrow);
    }
    .hero-bg-layer {
        left: calc((100vw - var(--frame-hero-narrow)) / 2 + var(--space-6) + var(--hero-alloc-text-narrow) + var(--space-4));
        /* Room for 3 partners is created on the content side (grid + max-width tokens), not by pushing the hero image layer further right. */
        /* right set by the (max-width:1280px) rule below to var(--space-6) so hero right edge matches the nav control right (vw - s6) when frame is not the full 1280 centered box */
        -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.08) 8%, black 20%);
        mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.08) 8%, black 20%);
    }
}

/* For all widths 769px..1280px (where site-header padding is 0 but header frame is full viewport width, not the 1280px centered):
   the target right for visible control ("WORK WITH US" or hamburger) is simply vw - var(--space-6).
   Set hero right inset to s6 so its right edge lines up exactly (for absolute .hero-bg-layer whose cb is full vw).
   (The 1024px media above handles other hero adjustments like left/text/mask for that band; this provides the right for the upper part of the <1280 range.)
*/
@media (max-width: 1280px) and (min-width: 769px) {
    .hero-bg-layer {
        right: var(--space-6);
    }
}

@media (max-width: 768px) {
    .hero-section .container {
        width: 100%;
        max-width: 100%;
    }
    .hero-section {
        min-height: auto;
        padding-top: var(--hero-mobile-pad-top);
        padding-bottom: var(--hero-mobile-pad-bottom);
    }
    .hero-bg-layer {
        /* Mobile: image band is *below* text+partners (layer after the container).
           The band left/right must line up with the header content left/right walls for symmetry.
           Algorithm: at <=768, .site-header/section get s4 pad => their content left=32.
           .header-inner adds s6 pad => effective header content walls at 80 from vp.
           For relative layer (cb content right = vw-32), setting left/right: s6 insets it to start at 32+48=80 and end at (vw-32)-48 = vw-80.
           This exactly matches the target right of the visible control (hamburger) computed as vw-80. */
        position: relative;
        top: auto;
        bottom: auto;
        right: auto;
        height: var(--hero-mobile-band-height);
        margin: 0 0 var(--hero-mobile-band-after) 0;
        left: var(--space-6);
        width: calc(100% - 2 * var(--space-6));
        /* right:auto (default); the width shrink + left inset achieves right edge at target (vw-80) matching hamburger right.
           100% is relative to .hero-section content (which has s4 pad at this breakpoint), + left s6 achieves effective 80 inset from vp on left too. */
        background-image: var(--hero-mobile-image);
        background-position: var(--hero-mobile-bg-pos);
        border-radius: var(--radius-md);
        /* No mask on mobile for clean top edge on the image band and consistency (no sudden vertical shadow). */
        -webkit-mask-image: none;
        mask-image: none;
        z-index: 1;
    }

    .hero-content {
        width: 100%; /* force full width so the container and following image layer take the full frame width (prevents shrink-to-fit from the partners' min-content) */
        max-width: 100%;
        padding-top: 0;
        padding-bottom: var(--hero-mobile-content-to-band);
    }
    .hero-text {
        max-width: 100%; /* on mobile the title can use full available width */
    }
    .hero-content p {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-bg-layer {
        height: var(--hero-mobile-band-height-narrow);
    }
}

/* =========================================
   HERO PARTNERS (promoted trust signals as minimalist font icons)
   Using Material Symbols Outlined for clean, scalable, elegant icons
   (no custom assets, fully styleable with CSS color/size, compatible with hero).
   ========================================= */
.hero-partners {
    margin-top: var(--space-6);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--space-4);
    row-gap: var(--space-6);
    justify-items: center;
    max-width: var(--hero-text-max); /* wide desktop; narrower bands use fluid caps below */
    padding-right: var(--space-2); /* buffer so the 3rd column stays clear of the hero photo fade */
}

.partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    text-align: center;
    min-width: 0; /* allow grid cell to shrink; prevents nowrap labels busting the column width */
    max-width: 100%;
}

.partner-item .material-symbols-outlined {
    font-size: var(--font-size-icon-partner);
    color: var(--color-light);
    line-height: 1;
    font-variation-settings: 'wght' 300;
    transition: color var(--duration-fast) var(--ease-out);
}

.partner-item .material-symbols-outlined:hover {
    color: var(--color-accent);
}

.partner-item > span:not(.material-symbols-outlined) {
    font-size: clamp(var(--font-size-2xs), 2.4vw, var(--font-size-xs));
    font-weight: 500;
    letter-spacing: var(--letter-spacing-partner);
    color: var(--color-text-muted);
    opacity: 0.9;
    line-height: var(--line-height-partner-label);
    text-align: center;
    width: 100%;
    max-width: 100%;
    /* Wrap at word boundaries only (never mid-word); cap at 2 lines so labels stay compact. */
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero-partners {
        margin-top: var(--space-5);
        column-gap: var(--space-3);
        row-gap: var(--space-4);
        max-width: 100%;
        padding-right: 0;
    }
    .partner-item .material-symbols-outlined {
        font-size: var(--font-size-icon-partner-mobile);
    }
    .partner-item > span:not(.material-symbols-outlined) {
        letter-spacing: var(--letter-spacing-partner-mobile);
    }
}

/* Desktop bands: fluid max-width must follow the base .hero-partners rule (cascade order). */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-partners {
        max-width: min(var(--hero-text-max-narrow), calc((100vw - var(--frame-hero-narrow)) / 2 + var(--hero-alloc-text-narrow) + var(--space-4) - var(--space-6) - var(--space-4)));
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .hero-partners {
        max-width: min(var(--hero-text-max), calc((100vw - var(--frame-site-max)) / 2 + var(--hero-alloc-text-wide) + var(--space-5) - var(--space-4)));
    }
}

/* Note: old .partners-section / .partner-logos styles removed as the trust signals
   have been promoted and integrated directly into the hero block (see .hero-partners). */

/* =========================================
   STATS / ABOUT (light section for contrast and breathing)
   ========================================= */
.stats-section {
    background: var(--color-light);
    color: var(--color-dark);
}
.stats-section .eyebrow { color: var(--color-dark); opacity: 0.6; }
.stats-section .section-header h2 {
    color: var(--color-dark);
    font-size: clamp(1.7rem, 3.8vw, 2.35rem);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}
.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-6) var(--space-4);
    text-align: center;
    border: 1px solid rgba(15,15,15,0.06);
    transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.stat-card h3 {
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    margin-bottom: var(--space-2);
    color: var(--color-dark);
    font-weight: 400;
    line-height: 1;
}
.stat-card p {
    font-size: 0.875rem;
    color: var(--color-text-muted-dark);
    line-height: 1.45;
}

@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .stats-grid { grid-template-columns: 1fr; gap: var(--space-4); }
    .stat-card { padding: var(--space-5) var(--space-4); }
}

/* =========================================
   SERVICES - interactive, grouped, premium card
   ========================================= */
.services-layout {
    display: grid;
    /* Avoid magic px for the split; use a sensible proportion that breathes on desktop */
    grid-template-columns: minmax(0, 0.9fr) 1.1fr;
    gap: var(--space-8);
    align-items: center;
}

.services-nav h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.35rem);
    margin-top: var(--space-2);
}
.service-desc {
    opacity: 0.75;
    margin-top: var(--space-3);
    margin-bottom: var(--space-5);
    max-width: 380px;
    font-size: 0.95rem;
    line-height: 1.6;
    text-wrap: balance;
}

.service-list {
    list-style: none;
    margin-top: var(--space-2);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.service-list li {
    padding: var(--space-3);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
}
.service-list li:last-child { border-bottom: none; }
.service-list li:hover { color: var(--color-light); }
.service-list li.active {
    color: var(--color-light);
    background: rgba(255,255,255,0.05);
    box-shadow: inset var(--space-1) 0 0 var(--color-accent);
}
.service-list li .dot {
    width: var(--space-1);
    height: var(--space-1);
    border-radius: 50%;
    background: var(--color-accent);
    flex-shrink: 0;
    margin-top: var(--space-1);
    opacity: 0;
    transition: opacity var(--duration-fast);
}
.service-list li.active .dot { opacity: 1; }
.service-list-label {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}
.service-list-title {
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.3;
}
.service-list li:not(.active) .service-list-title { font-weight: 400; }
.service-list-tagline {
    font-size: var(--font-size-xs);
    line-height: var(--line-height-partner-label);
    letter-spacing: var(--letter-spacing-partner);
    opacity: 0.55;
    transition: opacity var(--duration-fast) var(--ease-out);
}
.service-list li.active .service-list-tagline { opacity: 0.8; }

.service-card {
    position: relative;
    background: var(--color-surface);
    color: var(--color-dark);
    padding: var(--space-8);
    padding-top: calc(var(--space-8) + var(--space-1));
    border: 1px solid rgba(15, 15, 15, 0.06);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    min-height: calc(var(--space-16) * 3);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--space-1);
    background: var(--color-accent);
}
.service-card-intro {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: var(--space-3);
    row-gap: var(--space-1);
    align-items: start;
}
.service-card .icon-wrapper {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
    background: var(--color-accent);
    width: var(--space-5);
    height: var(--space-5);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.service-card .icon-wrapper .material-symbols-outlined {
    font-size: var(--space-3);
    color: var(--color-dark);
    line-height: 1;
}
.service-card h3 {
    grid-column: 2;
    grid-row: 1;
    font-size: 1.55rem;
    margin: 0;
    line-height: 1.2;
    min-width: 0;
}
.service-title-line {
    display: block;
    white-space: nowrap;
}
.service-card-tagline {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    font-size: var(--font-size-xs);
    line-height: var(--line-height-partner-label);
    letter-spacing: var(--letter-spacing-partner);
    color: var(--color-text-muted-dark);
}
.service-highlights {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-height: calc(var(--space-12) + var(--space-4));
    margin: 0;
    padding: 0;
}
.service-highlights li {
    position: relative;
    padding-left: var(--space-3);
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--color-text-muted-dark);
}
.service-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: var(--space-1);
    height: var(--space-1);
    border-radius: 50%;
    background: var(--color-dark);
    opacity: 0.25;
}

@media (max-width: 900px) {
    .services-layout {
        grid-template-columns: 1fr;
        gap: var(--space-6);
        align-items: start;
    }
    .service-desc { max-width: 100%; }
    .service-card {
        padding: var(--space-5);
        padding-top: calc(var(--space-5) + var(--space-1));
    }
    .service-card h3 {
        font-size: clamp(1.28rem, 4.8vw, 1.45rem);
    }
}

/* Stack icon above title only on narrow cards (Feedback.06 fix).
   At 768–900px the layout is single-column but the card is still wide enough
   for the side-by-side intro grid used on desktop (Feedback.05/07). */
@media (max-width: 520px) {
    .service-card-intro {
        grid-template-columns: 1fr;
        row-gap: var(--space-2);
    }
    .service-card .icon-wrapper {
        grid-column: 1;
        grid-row: 1;
    }
    .service-card h3 {
        grid-column: 1;
        grid-row: 2;
    }
    .service-card-tagline {
        grid-column: 1;
        grid-row: 3;
    }
}

/* =========================================
   TESTIMONIALS (grid, not single card)
   ========================================= */
.testimonials-section {
    background: var(--color-light);
    color: var(--color-dark);
    padding-bottom: var(--space-10);
}
.testimonials-section .eyebrow { color: var(--color-dark); opacity: 0.6; }
.testimonials-section .section-desc { color: var(--color-text-muted-dark); }

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}

.test-card {
    position: relative;
    background: var(--color-surface);
    padding: var(--space-6);
    padding-top: calc(var(--space-6) + var(--space-1));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 15, 15, 0.06);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    overflow: hidden;
    transition: transform var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
}
.test-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--space-1);
    background: var(--color-accent);
    opacity: 0.65;
}
.test-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 15, 15, 0.1);
    box-shadow: var(--shadow-md);
}
.stars {
    display: flex;
    gap: var(--space-1);
    line-height: 1;
}
.stars-icon {
    font-size: var(--space-3);
    color: color-mix(in srgb, var(--color-dark) 42%, #B8860B);
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
}
.test-card blockquote {
    margin: 0;
}
.test-card blockquote p {
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0;
    color: var(--color-dark);
}
.test-card blockquote p::before {
    content: '\201C';
}
.test-card blockquote p::after {
    content: '\201D';
}
.author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-2);
    padding-top: var(--space-3);
    border-top: 1px solid rgba(15, 15, 15, 0.06);
}
.avatar {
    width: var(--space-5);
    height: var(--space-5);
    background: var(--color-accent);
    border-radius: 50%;
    flex-shrink: 0;
    font-size: var(--font-size-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-dark);
    font-weight: 600;
}

.avatar-lw { background: var(--color-accent); color: var(--color-dark); }
.avatar-hr { background: var(--color-dark); color: var(--color-light); }
.avatar-am { background: var(--color-light-2); color: var(--color-dark); }

/* Mobile nav CTA to avoid inline style */
.mobile-nav a.btn-primary {
    margin-top: var(--space-3);
    display: block;
    text-align: center;
    color: var(--color-dark);
    background: var(--color-accent);
}
.author-title {
    font-size: 0.8rem;
    color: var(--color-text-muted-dark);
}

@media (max-width: 1023px) {
    .testimonial-grid { grid-template-columns: 1fr; }
}

/* =========================================
   FAQ
   ========================================= */
.faq-section {
    background: var(--color-dark-2);
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.faq-section .section-desc {
    color: var(--color-text-muted);
}
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    max-width: 820px;
    margin: 0 auto;
}
.faq-item {
    position: relative;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out);
}
.faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--space-1);
    background: var(--color-accent);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-out);
    pointer-events: none;
}
.faq-item:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.035);
}
.faq-item.active {
    border-color: rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.05);
}
.faq-item.active::before {
    opacity: 0.45;
}
.faq-heading {
    margin: 0;
}
.faq-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-4);
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.faq-question-text {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.5;
    color: var(--color-light);
}
.faq-toggle {
    flex-shrink: 0;
    font-size: 1.35rem;
    font-weight: 300;
    line-height: 1;
    color: var(--color-text-muted);
    transition: transform var(--duration-base) var(--ease-in-out),
                color var(--duration-fast) var(--ease-out);
}
.faq-item.active .faq-toggle {
    color: var(--color-accent);
}
.faq-answer {
    overflow: hidden;
}
.faq-answer p {
    margin: 0;
    padding: 0 var(--space-4) var(--space-4);
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--color-text-muted);
}

/* =========================================
   FOOTER + CONTACT FORM
   ========================================= */
.site-footer {
    background: var(--color-dark-2);
    border-top: 1px solid rgba(255,255,255,0.06);
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: var(--space-8);
    align-items: start;
}

.contact-intro {
    max-width: 520px;
}

.contact-intro h2 {
    font-size: clamp(1.9rem, 4vw, 2.65rem);
    margin-top: var(--space-2);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.contact-desc {
    text-align: left;
    margin-top: var(--space-3);
    color: var(--color-text-muted);
}

.contact-form-card {
    position: relative;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    overflow: hidden;
}

.contact-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--space-1);
    background: var(--color-accent);
    opacity: 0.45;
    pointer-events: none;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.form-field label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: var(--letter-spacing-partner);
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.form-field input,
.form-field textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--color-light);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    line-height: 1.5;
    padding: var(--space-3);
    border-radius: var(--radius-sm);
    transition: border-color var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-field input:hover,
.form-field textarea:hover {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.065);
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 0 1px rgba(250, 245, 232, 0.2);
}

.form-field textarea {
    min-height: var(--space-10);
    resize: vertical;
}

.contact-submit {
    align-self: flex-start;
    margin-top: var(--space-1);
    padding: var(--space-3) var(--space-5);
}

.form-status {
    font-size: 0.875rem;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    display: none;
}

.form-status.pending,
.form-status.error {
    display: block;
    color: var(--color-text-muted);
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
}

.form-status.error {
    color: var(--color-accent);
    border-color: rgba(250, 245, 232, 0.25);
}

.form-status.success {
    display: block;
    background: rgba(250, 245, 232, 0.1);
    color: var(--color-accent);
    border: 1px solid rgba(250, 245, 232, 0.28);
}

.footer-legal {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 900px) {
    .contact-layout { grid-template-columns: 1fr; }
    .contact-intro { max-width: none; }
}



/* =========================================
   PROCESS / JOURNEY (consistent with design system)
   ========================================= */
.process-section {
    color: var(--color-light);
    background: var(--color-dark-2);
}
.process-section .section-desc {
    color: var(--color-text-muted);
}
.process-track {
    position: relative;
}
.process-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    align-items: start;
    position: relative;
    z-index: 1;
}
.process-step {
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: transform var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                background var(--duration-fast) var(--ease-out);
    overflow: hidden;
}
.process-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--space-1);
    background: var(--color-accent);
    opacity: 0.45;
}
.process-step:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.045);
}
.process-step-marker {
    position: relative;
    z-index: 1;
    width: var(--space-4);
    height: var(--space-4);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.14);
    background: var(--color-dark-2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
    flex-shrink: 0;
}
.step-num {
    font-size: var(--font-size-xs);
    color: var(--color-accent);
    font-weight: 600;
    letter-spacing: var(--letter-spacing-partner);
    line-height: 1;
}
.process-step h3 {
    font-size: 1.05rem;
    font-weight: 500;
    margin: 0 0 var(--space-1);
    color: var(--color-light);
    line-height: 1.3;
}
.process-step-tagline {
    margin: 0 0 var(--space-3);
    font-size: var(--font-size-xs);
    line-height: var(--line-height-partner-label);
    letter-spacing: var(--letter-spacing-partner);
    color: var(--color-text-muted);
}
.process-step-highlights {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.process-step-highlights li {
    position: relative;
    padding-left: var(--space-3);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}
.process-step-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: var(--space-1);
    height: var(--space-1);
    border-radius: 50%;
    background: var(--color-accent);
    opacity: 0.55;
}

/* Journey connector — desktop row */
@media (min-width: 1024px) {
    .process-track::before {
        content: '';
        position: absolute;
        top: calc(var(--space-5) + var(--space-2));
        left: 12.5%;
        right: 12.5%;
        height: 1px;
        background: rgba(255,255,255,0.1);
        pointer-events: none;
        z-index: 0;
    }
    .process-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Journey connector — mobile stack */
@media (max-width: 520px) {
    .process-grid {
        grid-template-columns: 1fr;
    }
    .process-step:not(:last-child) .process-step-marker::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        width: 1px;
        height: var(--space-4);
        background: rgba(255,255,255,0.1);
        transform: translateX(-50%);
    }
}

/* =========================================
   FINAL POLISH & ACCESSIBILITY
   ========================================= */

/* Focus styles for keyboard users (premium = accessible) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Subtle selection color */
::selection {
    background: var(--color-accent);
    color: var(--color-dark);
}

/* Reduce motion for those who prefer it */
@media (prefers-reduced-motion: reduce) {
    .glass,
    .stat-card,
    .service-card,
    .btn-primary,
    .test-card,
    .faq-item {
        transition: none !important;
    }
    .faq-item:hover {
        transform: none;
    }
}