/* CodeBrewers homepage — light/dark editorial redesign */

.home-page {
    --ink: #102a35;
    --ink-deep: #081c25;
    --teal: #154050;
    --teal-mid: #3b6675;
    --gold: #dfa144;
    --cream: #edf3f4;
    --paper: #f8fafb;
    --mist: #e4edef;
    --line: rgba(21, 64, 80, 0.16);
    --muted: #627178;
    --white: #ffffff;
    --display: 'Manrope', sans-serif;
    --mono: 'DM Mono', monospace;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--display);
    overflow-x: hidden;
}

.home-page.menu-open { overflow: hidden; }

.home-page *,
.home-page *::before,
.home-page *::after { box-sizing: border-box; }

.home-page html { scroll-behavior: smooth; }

.home-page .container { max-width: 1400px; margin: 0 auto; padding: 0; }

.home-page h1,
.home-page h2,
.home-page h3,
.home-page p { max-width: none; }

.home-page h1,
.home-page h2,
.home-page h3 {
    font-family: var(--display);
    color: inherit;
    margin: 0;
    text-wrap: balance;
}

.home-page p { color: inherit; margin: 0; text-wrap: pretty; }
.home-page a { color: inherit; }

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    padding: .8rem 1rem;
    background: var(--gold);
    color: var(--ink-deep);
    font-weight: 800;
    transform: translateY(-160%);
    transition: transform .2s ease;
}

.skip-link:focus { transform: translateY(0); }

.home-page :focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.eyebrow {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--teal-mid);
    font-family: var(--mono);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.eyebrow span { width: 1.6rem; height: 1px; background: currentColor; }
.eyebrow-light { color: #d7b575; }

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .65fr);
    gap: 5rem;
    align-items: end;
    margin-bottom: 4.5rem;
}

.section-heading h2,
.contact h2 {
    max-width: 820px;
    margin-top: 1rem;
    color: var(--ink);
    font-size: clamp(2.45rem, 4.8vw, 5rem);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: .98;
}

.section-heading > p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    width: fit-content;
    color: var(--teal);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: .22rem;
    transition: color .2s ease, gap .2s ease;
}

.text-link:hover { color: var(--gold); gap: .85rem; }
.text-link-light { color: #f7f3e9; }

/* Navigation */
.home-page .navbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 100;
    padding: 1.15rem clamp(25px, 6vw, 120px);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    transition: background .3s ease, padding .3s ease, box-shadow .3s ease;
}

.home-page .nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.home-page .logo { display: block; line-height: 0; }
.home-page .logo img { width: auto; height: 44px; object-fit: contain; }
.home-page .logo-colored { display: none; }
.home-page .logo-white { display: block; }

.home-page .nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0;
    list-style: none;
}

.home-page .nav-menu > li > a {
    color: rgba(255,255,255,.76);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}

.home-page .nav-menu > li > a::after { display: none; }
.home-page .nav-menu > li > a:hover,
.home-page .nav-menu > li > a.active { color: var(--white); }

.home-page .nav-menu .nav-cta {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-left: .5rem;
    padding: .8rem 1.1rem;
    background: var(--gold);
    color: var(--ink-deep);
    border-radius: 999px;
}

.home-page .navbar.scrolled {
    top: 20px;
    width: min(1100px, calc(100% - 50px));
    max-width: 95%;
    padding: .62rem clamp(1.5rem, 3vw, 4rem);
    background: rgba(248,250,251,.94);
    border: 1px solid rgba(21,64,80,.13);
    border-radius: 999px;
    box-shadow: 0 12px 38px rgba(13,42,53,.08);
    backdrop-filter: blur(18px);
}

.home-page .navbar.scrolled .logo-white { display: none; }
.home-page .navbar.scrolled .logo-colored { display: block; height: 50px; }
.home-page .navbar.scrolled .logo img { height: 40px; }
.home-page .navbar.scrolled .nav-menu > li > a { color: var(--muted); }
.home-page .navbar.scrolled .nav-menu > li > a:hover,
.home-page .navbar.scrolled .nav-menu > li > a.active { color: var(--teal); }
.home-page .navbar.scrolled .nav-menu .nav-cta { color: var(--ink-deep); }

.home-page .mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: .35rem;
}

.home-page .mobile-menu-btn span {
    display: block;
    width: 19px;
    height: 1px;
    margin: 5px auto;
    background: var(--white);
    transition: transform .25s ease;
}

.home-page .navbar.scrolled .mobile-menu-btn { border-color: var(--line); }
.home-page .navbar.scrolled .mobile-menu-btn span { background: var(--teal); }
.home-page .mobile-menu-btn.active span:first-child { transform: translateY(3px) rotate(45deg); }
.home-page .mobile-menu-btn.active span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* Hero — a slim gap on all sides holds a rounded, contained panel rather
   than letting the hero bleed to the viewport edges. The fixed navbar is
   taller than the top gap, so it always overlays the dark panel, never the
   page background peeking through the gap. */
.home-page .hero {
    position: relative;
    display: block;
    min-height: 0;
    text-align: left;
    padding: 12px;
}

.home-page .hero-panel {
    position: relative;
    display: flex;
    align-items: center;
    min-height: calc(100dvh - 24px);
    overflow: hidden;
    padding: 9rem clamp(25px, 6vw, 120px) 5rem;
    background:
        radial-gradient(circle at 50% 38%, rgba(59,102,117,.38), transparent 34%),
        linear-gradient(112deg, #071b24 0%, #0a2a37 58%, #123f4e 100%);
    color: var(--white);
    text-align: center;
    border-radius: clamp(20px, 3vw, 32px);
}

.home-page #circuit-bg-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: transparent;
    pointer-events: none;
    opacity: .36;
    mask-image: linear-gradient(90deg, transparent 0%, black 18%, black 82%, transparent 100%);
}

.home-page #circuit-canvas { width: 100%; height: 100%; }

/* Compact page hero — the same framed panel as the landing hero, at roughly
   half height, used to open every interior page. Fixed (not min-) height so
   every page's hero matches exactly, regardless of how much copy it holds. */
.home-page .hero.hero-compact .hero-panel {
    min-height: 54vh;
    height: 54vh;
    padding: 10rem clamp(25px, 6vw, 120px) 4.5rem;
}

.home-page .hero.hero-compact h1 {
    max-width: 900px;
    margin: 1.25rem auto 0;
    font-size: clamp(2.5rem, 5vw, 4.6rem);
    line-height: .95;
}

.home-page .hero.hero-compact .hero-subtitle {
    max-width: 640px;
    margin-top: 1.6rem;
}

@media (max-width: 1024px) {
    .home-page .hero.hero-compact .hero-panel { min-height: 46vh; height: 46vh; padding: 9rem 25px 3.75rem; }
}

@media (max-width: 760px) {
    .home-page .hero.hero-compact .hero-panel { min-height: 0; padding: 8.5rem 25px 3rem; }
    .home-page .hero.hero-compact h1 { font-size: clamp(2.15rem, 8.5vw, 3.2rem); }
    .home-page .hero.hero-compact .hero-subtitle { font-size: .96rem; margin-top: 1.2rem; }
}

.home-page .hero-panel::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 10rem;
    background: linear-gradient(transparent, rgba(3,17,23,.45));
    pointer-events: none;
}

.home-page .hero-content {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.home-page .hero-copy { max-width: 1080px; margin: 0 auto; }
.home-page .hero-copy .eyebrow { justify-content: center; }

.home-page .hero h1 {
    max-width: 1080px;
    margin: 1.35rem auto 1.8rem;
    color: var(--white);
    background: none;
    font-size: clamp(3.45rem, 6.7vw, 6rem);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: .9;
    -webkit-text-fill-color: currentColor;
}

.home-page .hero-subtitle {
    max-width: 680px;
    margin: 0 auto;
    color: rgba(238,244,244,.72);
    font-size: clamp(1rem, 1.35vw, 1.22rem);
    line-height: 1.75;
}

.home-page .hero-buttons {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.2rem;
}

.home-page .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    width: auto;
    max-width: none;
    min-height: 52px;
    padding: .95rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--display);
    font-size: .92rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.home-page .btn-primary {
    background: var(--gold);
    color: var(--ink-deep);
    box-shadow: none;
}

.home-page .btn-primary:hover { background: #eab357; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(3,17,23,.2); }
.home-page .btn:active { transform: scale(.98); }

.hero-trust { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 3rem; }
.avatar-stack { display: flex; padding-left: .5rem; }
.avatar-stack span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-left: -.5rem;
    background: #d8e2e1;
    color: var(--teal);
    border: 2px solid #0a2a37;
    border-radius: 50%;
    font-family: var(--mono);
    font-size: .63rem;
    font-weight: 500;
}
.avatar-stack span:nth-child(2) { background: #d7b575; }
.avatar-stack span:nth-child(3) { background: #7ba0a9; color: #fff; }
.hero-trust p { color: rgba(255,255,255,.56); font-size: .74rem; line-height: 1.45; }
.hero-trust strong { color: rgba(255,255,255,.9); font-weight: 700; }

.hero-system {
    position: relative;
    width: 100%;
    max-width: 535px;
    justify-self: end;
    padding: 1.2rem;
    background: rgba(6,26,34,.7);
    border: 1px solid rgba(255,255,255,.15);
    box-shadow: 0 35px 90px rgba(0,0,0,.32), inset 0 0 0 5px rgba(255,255,255,.02);
    backdrop-filter: blur(18px);
    border-radius: 28px;
    display: none;
}

.hero-system::before,
.hero-system::after { content: ''; position: absolute; width: 30px; height: 30px; border-color: var(--gold); }
.hero-system::before { top: -7px; left: -7px; border-top: 1px solid; border-left: 1px solid; }
.hero-system::after { right: -7px; bottom: -7px; border-right: 1px solid; border-bottom: 1px solid; }

.system-topbar,
.system-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255,255,255,.47);
    font-family: var(--mono);
    font-size: .6rem;
    letter-spacing: .08em;
}
.system-topbar { padding: .1rem .15rem 1.15rem; border-bottom: 1px solid rgba(255,255,255,.09); }
.status-live { display: flex; align-items: center; gap: .45rem; color: #a5c9b5; }
.status-live::before { content: ''; width: 6px; height: 6px; background: #7fc498; border-radius: 50%; box-shadow: 0 0 0 4px rgba(127,196,152,.12); }
.system-core { display: grid; place-items: center; min-height: 245px; text-align: center; }
.core-mark {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    color: var(--gold);
    border: 1px solid rgba(223,161,68,.55);
    border-radius: 50%;
    box-shadow: 0 0 0 18px rgba(223,161,68,.045), 0 0 0 46px rgba(59,102,117,.055);
}
.core-mark span { font-size: 2rem; font-weight: 800; letter-spacing: -.04em; }
.system-core p { margin-top: -2.2rem; color: rgba(255,255,255,.46); font-family: var(--mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; }
.system-nodes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.system-node { display: grid; grid-template-columns: auto 1fr; gap: .15rem .5rem; align-items: center; padding: .85rem .75rem; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.09); border-radius: 12px; }
.system-node i { grid-row: 1 / 3; color: var(--gold); font-size: 1.2rem; }
.system-node span { color: #fff; font-size: .71rem; font-weight: 700; }
.system-node small { color: rgba(255,255,255,.4); font-size: .55rem; }
.system-footer { margin-top: 1.1rem; padding: .8rem .15rem .1rem; border-top: 1px solid rgba(255,255,255,.09); }

.hero-scroll { position: absolute; z-index: 3; right: clamp(25px, 6vw, 120px); bottom: 2rem; display: flex; align-items: center; gap: .7rem; color: rgba(255,255,255,.55); font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }


/* Proof + client strip */
.proof {
    position: relative;
    padding: 7rem clamp(25px, 6vw, 120px);
    overflow: hidden;
    background: #edf3f4;
    border-bottom: 1px solid var(--line);
}

.proof::before {
    content: '';
    position: absolute;
    top: -190px;
    left: -120px;
    width: 420px;
    aspect-ratio: 1;
    border: 1px solid rgba(21,64,80,.08);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(21,64,80,.025), 0 0 0 110px rgba(21,64,80,.018);
    pointer-events: none;
}

/* Merged "Why CodeBrewers" section: intro + stats, best-practice band */
.whyus { padding-top: 8rem; padding-bottom: 9rem; }
.proof .container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(3.5rem, 6vw, 6rem);
}
.whyus-top {
    display: grid;
    grid-template-columns: minmax(280px, .74fr) minmax(540px, 1.26fr);
    gap: clamp(3rem, 7vw, 7.5rem);
    align-items: center;
}

.proof-intro .eyebrow { justify-content: flex-start; margin-bottom: 1.4rem; color: var(--teal-mid); }
.proof-intro h2 {
    max-width: 560px;
    color: var(--ink);
    font-size: clamp(2.5rem, 4.2vw, 4.75rem);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: .98;
}
.proof-intro > p:last-of-type { max-width: 460px; margin-top: 1.5rem; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.proof-intro .text-link { margin-top: 1.9rem; }
.proof-caption {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    margin-top: 2.3rem;
    color: rgba(21,64,80,.58);
    font-family: var(--mono);
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.proof-caption i { width: 4px; height: 4px; background: var(--gold); border-radius: 50%; }

.proof .stats-grid {
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    grid-template-rows: repeat(2, minmax(210px, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.proof .stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    min-width: 0;
    padding: 1.75rem;
    overflow: hidden;
    background: rgba(255,255,255,.76);
    border: 1px solid rgba(21,64,80,.09);
    border-radius: 26px;
    box-shadow: 0 18px 55px rgba(21,64,80,.07);
    transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease, border-color .35s ease;
}

.proof .stat-card:hover {
    transform: translateY(-6px);
    border-color: rgba(21,64,80,.16);
    box-shadow: 0 28px 70px rgba(21,64,80,.13);
}

/* Header row: index label + icon chip */
.proof .stat-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.proof .stat-index {
    color: rgba(21,64,80,.5);
    font-family: var(--mono);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.proof .stat-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    color: var(--teal);
    background: rgba(21,64,80,.05);
    border: 1px solid rgba(21,64,80,.1);
    border-radius: 12px;
    font-size: 1.2rem;
    transition: color .3s ease, background .3s ease, border-color .3s ease;
}
.proof .stat-card:hover .stat-icon {
    color: #fff;
    background: var(--gold);
    border-color: var(--gold);
}

.proof .stat-body { position: relative; z-index: 1; }

.proof .stat-card-primary {
    grid-row: 1 / 3;
    min-height: 436px;
    padding: 2rem;
    background: linear-gradient(158deg, #17505f 0%, var(--teal) 55%, #0f3a48 100%);
    border-color: transparent;
    box-shadow: 0 28px 65px rgba(21,64,80,.2);
}
.proof .stat-card-primary:hover { box-shadow: 0 36px 80px rgba(21,64,80,.28); }

.proof .stat-card-primary::before {
    content: '';
    position: absolute;
    top: -75px;
    right: -75px;
    width: 245px;
    aspect-ratio: 1;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(255,255,255,.025), 0 0 0 84px rgba(255,255,255,.02);
    pointer-events: none;
}

.proof .stat-card-primary .stat-index { color: rgba(255,255,255,.5); }
.proof .stat-card-primary .stat-icon {
    color: #fff;
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.2);
}
.proof .stat-card-primary:hover .stat-icon { color: var(--ink-deep); background: var(--gold); border-color: var(--gold); }

.proof .stat-card-accent { background: #dfeaed; }

.proof .stat-value { display: flex; align-items: flex-end; }
.proof .stat-number,
.proof .stat-unit {
    color: var(--teal);
    font-size: clamp(3rem, 4.3vw, 4.8rem);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: .8;
    font-variant-numeric: tabular-nums;
}
.proof .stat-unit { margin-left: .12em; font-size: .48em; line-height: 1; }
.proof .stat-card-primary .stat-number,
.proof .stat-card-primary .stat-unit { color: var(--white); font-size: clamp(5rem, 8vw, 8.8rem); }
.proof .stat-card-primary .stat-unit { color: var(--gold); font-size: clamp(2.2rem, 3.6vw, 4.2rem); }
.proof .stat-card p { margin-top: 1rem; color: var(--ink); font-size: .73rem; font-weight: 700; line-height: 1.4; text-transform: uppercase; letter-spacing: .085em; }
.proof .stat-card-primary p { color: var(--white); }
.proof .stat-note {
    display: block;
    max-width: 320px;
    margin-top: 1.1rem;
    padding-top: 1.1rem;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.55;
    border-top: 1px solid rgba(21,64,80,.1);
}
.proof .stat-card-primary .stat-note { color: rgba(255,255,255,.57); border-top-color: rgba(255,255,255,.13); }

/* Circular progress ring on the commitment (100%) card — --ring (0..1) driven
   in sync with the count-up in main.js */
.proof .stat-progress {
    display: inline-block;
    width: clamp(2.6rem, 3.4vw, 3.4rem);
    height: clamp(2.6rem, 3.4vw, 3.4rem);
    margin-right: .9rem;
    margin-bottom: .12em;
    border-radius: 50%;
    background: conic-gradient(var(--gold) calc(var(--ring, 1) * 1turn), rgba(21,64,80,.14) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
}

/* Best-practice band — dark teal feature card echoing the primary stat card */
.practice-band {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: clamp(2.5rem, 5vw, 5rem);
    align-items: center;
    padding: clamp(2.25rem, 4vw, 3.5rem);
    overflow: hidden;
    background: linear-gradient(158deg, #17505f 0%, var(--teal) 55%, #0f3a48 100%);
    border-radius: 30px;
    box-shadow: 0 28px 65px rgba(21,64,80,.2);
}
.practice-band::before {
    content: '';
    position: absolute;
    top: -90px;
    left: -70px;
    width: 260px;
    aspect-ratio: 1;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    box-shadow: 0 0 0 44px rgba(255,255,255,.02);
    pointer-events: none;
}
.practice-copy { position: relative; z-index: 1; }
.practice-copy .eyebrow { justify-content: flex-start; margin-bottom: 1.15rem; }
.practice-copy h3 {
    max-width: 15ch;
    color: #fff;
    font-size: clamp(1.75rem, 2.7vw, 2.85rem);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.05;
}
.practice-copy > p { max-width: 46ch; margin-top: 1rem; color: rgba(255,255,255,.62); font-size: .95rem; line-height: 1.7; }
.practice-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem 1.25rem; margin-top: 1.6rem; }
.google-lighthouse-badge {
    display: inline-flex;
    align-items: center;
    gap: .85rem;
    padding: calc(.78rem + 2.5px) calc(1rem + 2.5px);
    background: #fff;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 15px;
    box-shadow: 0 10px 26px rgba(3,17,23,.2);
}
.google-mark {
    display: inline-block;
    color: transparent;
    background: conic-gradient(from -42deg, #4285f4 0 27%, #34a853 27% 45%, #fbbc05 45% 64%, #ea4335 64% 82%, #4285f4 82% 100%);
    background-clip: text;
    -webkit-background-clip: text;
    font-family: Arial, sans-serif;
    font-size: 1.72rem;
    font-weight: 700;
    line-height: 1;
}
.google-badge-copy { display: grid; gap: .2rem; line-height: 1; }
.google-badge-copy b { color: #303438; font-size: .88rem; font-weight: 700; letter-spacing: -.01em; }
.google-badge-copy small { color: #72787c; font-size: .6rem; font-weight: 600; letter-spacing: .035em; text-transform: uppercase; }
.practice-source {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-top: 1.6rem;
    color: rgba(255,255,255,.5);
    font-family: var(--mono);
    font-size: .62rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.practice-meta .practice-source { margin-top: 0; }
.practice-source i { color: var(--gold); font-size: 1rem; }

.lighthouse-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.lh-score { display: flex; flex-direction: column; align-items: center; gap: .85rem; text-align: center; }
.lh-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(64px, 6vw, 86px);
    aspect-ratio: 1;
}
/* Lighthouse-style ring: arc fills to the score %, coloured by Google's scale
   (green 90-100, orange 50-89, red 0-49). Set --lh inline to override. */
.lh-ring {
    --lh: #0cce6b;
}
.lh-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(var(--lh) calc(var(--score, 100) * 1%), rgba(255,255,255,.15) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
}
.lh-ring b {
    position: relative;
    z-index: 1;
    color: var(--lh);
    font-size: clamp(1.15rem, 1.6vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}
.lh-cat { color: rgba(255,255,255,.72); font-size: .68rem; font-weight: 600; letter-spacing: .01em; line-height: 1.2; }

.home-page .clients {
    padding: 4.75rem clamp(25px, 6vw, 120px) 5.25rem;
    overflow: hidden;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.home-page .clients .container {
    position: relative;
    padding: 0;
}

.home-page .clients .container::before {
    content: none;
}

.clients-strip-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3rem;
    align-items: end;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
}

.clients-strip-head .eyebrow { justify-content: flex-start; margin: 0 0 .85rem; color: var(--teal-mid); }
.clients-strip-head h2 {
    max-width: 680px;
    color: var(--ink);
    font-size: clamp(1.85rem, 2.7vw, 3.1rem);
    font-weight: 650;
    letter-spacing: -.04em;
    line-height: 1.04;
    text-wrap: balance;
}

.clients-intro { max-width: 310px; padding: 0; color: var(--muted); font-size: .83rem; line-height: 1.55; text-align: right; border: 0; }

.home-page .client-carousel {
    position: relative;
    width: 100%;
    padding: 1.5rem 0 0;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.home-page .client-carousel::before,
.home-page .client-carousel::after {
    content: none;
}

.carousel-label {
    display: flex;
    justify-content: space-between;
    padding: 0 0 1rem;
    color: rgba(21,64,80,.52);
    font-family: var(--mono);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.carousel-label span:first-child::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 .55rem .08rem 0; background: var(--gold); border-radius: 50%; }

.home-page .client-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: logoScroll 38s linear infinite;
    will-change: transform;
}

.home-page .client-logo-card {
    display: grid;
    place-items: center;
    flex: 0 0 210px;
    height: 100px;
    margin-right: .7rem;
    padding: 1.25rem 1.65rem;
    background: #f0f5f5;
    border: 1px solid transparent;
    border-radius: 18px;
    box-shadow: none;
    opacity: 1;
    filter: none;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.home-page .client-logo-card:hover {
    opacity: 1;
    filter: none;
    transform: translateY(-3px);
    background: var(--white);
    border-color: rgba(21,64,80,.12);
    box-shadow: none;
}

.home-page .client-logo-card img {
    max-width: 100%;
    max-height: 72px;
    object-fit: contain;
    filter: none;
}

@keyframes logoScroll { to { transform: translateX(-50%); } }

/* Services — retains the existing dark glass-card design */
.home-page .services {
    position: relative;
    padding: 8rem clamp(25px, 6vw, 120px) 8.5rem;
    overflow: hidden;
    background: #f7f9f9;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}
.home-page .services::before { content: ''; position: absolute; inset: 0; opacity: .42; background-image: linear-gradient(rgba(21,64,80,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(21,64,80,.035) 1px, transparent 1px); background-size: 68px 68px; mask-image: linear-gradient(90deg, transparent, black, transparent); }
.home-page .services .container { position: relative; z-index: 1; }
.home-page .services .eyebrow-light { color: var(--teal-mid); }
.home-page .services .eyebrow-light span { background: var(--teal-mid); }
.section-heading-dark h2 { color: var(--ink); }
.section-heading-dark > p { color: var(--muted); }
.home-page .services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 0; }
.home-page .service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    padding: 2.5rem;
    overflow: hidden;
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(21,64,80,.1);
    border-radius: 24px;
    box-shadow: none;
    backdrop-filter: blur(10px);
    opacity: 1;
    transform: none;
    transition: background .3s ease, border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.home-page .service-card:hover { background: var(--white); border-color: rgba(21,64,80,.2); transform: translateY(-5px); box-shadow: 0 20px 55px rgba(21,64,80,.1); }
.home-page .service-icon { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 0 2.2rem; background: var(--teal); color: var(--gold); border: 1px solid rgba(21,64,80,.12); border-radius: 8px; box-shadow: 0 8px 22px rgba(21,64,80,.15); font-size: 1.8rem; }
.home-page .service-number { position: absolute; top: 2.55rem; right: 2.5rem; color: rgba(21,64,80,.34); font-family: var(--mono); font-size: .7rem; }
.home-page .service-card h3 { max-width: 330px; margin: 0 0 1rem; color: var(--ink); font-size: 1.55rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.2; }
.home-page .service-card > p:not(.service-number) { margin-bottom: 1.7rem; color: var(--muted); font-size: .96rem; line-height: 1.65; }
.home-page .service-features { margin: auto 0 0; padding: 1.4rem 0 0; border-top: 1px solid var(--line); list-style: none; }
.home-page .service-features li { position: relative; margin: 0 0 .7rem; padding-left: 1.35rem; color: rgba(10,37,48,.68); font-size: .84rem; }
.home-page .service-features li::before { content: ''; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; background: var(--gold); border-radius: 50%; }
.services-cta { display: flex; justify-content: space-between; align-items: center; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.services-cta p { color: var(--muted); font-size: .9rem; }
.home-page .services .text-link-light { color: var(--teal); border-color: rgba(21,64,80,.28); }
.home-page .services .text-link-light:hover { color: #a96f20; border-color: var(--gold); }

/* Work */
.home-page .portfolio { position: relative; padding: 9rem clamp(25px, 6vw, 120px) 10rem; overflow: hidden; background: var(--paper); }
.home-page .portfolio::before {
    content: '';
    position: absolute;
    top: -170px;
    right: -150px;
    width: 460px;
    aspect-ratio: 1;
    border: 1px solid rgba(21,64,80,.07);
    border-radius: 50%;
    box-shadow: 0 0 0 60px rgba(21,64,80,.02), 0 0 0 120px rgba(21,64,80,.015);
    pointer-events: none;
}
/* Scalable project grid: one card stretches full width; more cards auto-flow
   into 2–3 columns (auto-fit collapses empty tracks so any count looks right). */
.work-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
    gap: clamp(1.5rem, 2.5vw, 2.4rem);
    justify-items: center;
}

.project-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 660px;
    overflow: hidden;
    background: rgba(255,255,255,.72);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: 0 20px 55px rgba(21,64,80,.08);
    color: var(--ink);
    text-decoration: none;
    transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease, border-color .35s ease;
}
.project-card:hover { transform: translateY(-6px); border-color: rgba(21,64,80,.16); box-shadow: 0 34px 80px rgba(21,64,80,.16); }

.project-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--teal);
    border-bottom: 1px solid var(--line);
}
.project-stage img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.16,1,.3,1); }
.project-card:hover .project-stage img { transform: scale(1.04); }

/* Slim browser-style frame across the top of the screenshot */
.project-chrome { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: .4rem; height: 2.4rem; padding: 0 1.1rem; background: linear-gradient(rgba(3,17,23,.55), transparent); }
.project-chrome i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.35); }
.project-chrome i:last-child { background: var(--gold); }

/* Corner action chip — signals the card opens the case study */
.project-open {
    position: absolute;
    z-index: 2;
    right: 1.25rem;
    bottom: 1.25rem;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--ink-deep);
    background: var(--gold);
    border-radius: 50%;
    font-size: 1.1rem;
    transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.project-card:hover .project-open { transform: rotate(45deg); }

.project-body { display: flex; flex-direction: column; flex: 1; padding: clamp(1.6rem, 2.5vw, 2.4rem); }
.project-body-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; }
.project-cat { color: var(--teal-mid); font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; }
.project-year { color: var(--muted); font-family: var(--mono); font-size: .66rem; letter-spacing: .07em; }
.project-body h3 { color: var(--ink); font-size: clamp(1.5rem, 2.2vw, 2.05rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }
.project-body > p { margin-top: .9rem; color: var(--muted); font-size: .92rem; line-height: 1.7; }

.project-scope { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.35rem 0 0; padding: 0; list-style: none; }
.project-scope li { padding: .38rem .8rem; color: var(--teal); font-family: var(--mono); font-size: .63rem; letter-spacing: .06em; text-transform: uppercase; border: 1px solid rgba(21,64,80,.22); border-radius: 999px; background: rgba(255,255,255,.55); }

.project-client { display: flex; align-items: center; gap: .5rem; margin-top: auto; padding-top: 1.5rem; color: var(--ink); font-size: .84rem; font-weight: 700; }
.project-client i { color: var(--gold); font-size: .95rem; }

/* Contact */
.home-page .contact { padding: 9rem clamp(25px, 6vw, 120px) 10rem; background: var(--cream); }
.home-page .contact-wrapper { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(4rem, 9vw, 9rem); align-items: start; margin: 0 auto; }
.contact-intro { position: sticky; top: 8rem; }
.home-page .contact h2 { margin: 1.2rem 0 1.8rem; font-size: clamp(2.6rem, 5vw, 5.4rem); }
.contact-intro > p:not(.eyebrow) { max-width: 570px; color: var(--muted); font-size: 1rem; line-height: 1.75; }
.contact-direct { display: grid; margin-top: 3rem; border-top: 1px solid var(--line); }
.contact-direct a,
.contact-direct > div { display: grid; grid-template-columns: 42px 1fr; align-items: center; padding: 1.15rem 0; border-bottom: 1px solid var(--line); color: var(--teal); text-decoration: none; }
.contact-direct i { font-size: 1.2rem; }
.contact-direct span { font-size: .78rem; font-weight: 700; }
.contact-direct small { display: block; margin-top: .2rem; color: var(--muted); font-size: .84rem; font-weight: 500; }

.home-page .contact-form-container { padding: clamp(2rem, 4vw, 4rem); background: var(--paper); border: 1px solid rgba(21,64,80,.12); border-radius: 28px; box-shadow: 0 30px 80px rgba(21,64,80,.09); }
.home-page .contact-form { display: flex; flex-direction: column; gap: 1.4rem; }
.home-page .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.home-page .form-group { display: flex; flex-direction: column; gap: .5rem; }
.home-page .form-group label { color: var(--ink); font-size: .78rem; font-weight: 700; }
.home-page .form-group label span { color: #5f6b70; font-weight: 500; }
.home-page .form-group input,
.home-page .form-group select,
.home-page .form-group textarea {
    width: 100%;
    padding: .95rem 1rem;
    background: #fff;
    color: var(--ink);
    border: 1px solid rgba(21,64,80,.22);
    border-radius: 12px;
    font-family: var(--display);
    font-size: .92rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.home-page .form-group textarea { resize: vertical; min-height: 135px; }
.home-page .form-group input::placeholder,
.home-page .form-group textarea::placeholder { color: #9aa4a7; }
.home-page .form-group input:focus,
.home-page .form-group select:focus,
.home-page .form-group textarea:focus { outline: none; border-color: var(--teal-mid); box-shadow: 0 0 0 3px rgba(59,102,117,.12); background: #fff; }
.home-page .form-group.has-error input,
.home-page .form-group.has-error select,
.home-page .form-group.has-error textarea { border-color: #a4473f; }
.field-error { min-height: 1em; color: #a4473f; font-size: .68rem; }
.home-page .contact-form .btn { align-self: flex-start; margin-top: .4rem; }
.form-note { color: #899397; font-size: .68rem; line-height: 1.45; }
.form-status { display: none; padding: .9rem 1rem; font-size: .84rem; }
.form-status.success { display: block; background: #e3efe7; color: #28583b; border: 1px solid rgba(74,133,97,.45); border-radius: 10px; }

/* Footer */
.home-page .footer { position: relative; margin: 0; padding: 6rem clamp(25px, 6vw, 120px) 2rem; background: #061820; color: var(--white); border: 0; }
.home-page .footer .container { padding: 0; }
.home-page .footer-top { display: flex; justify-content: space-between; align-items: flex-end; margin: 0 0 4.5rem; padding: 0 0 3.5rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.home-page .footer-brand-info > a { display: inline-block; }
.home-page .footer-logo { display: block; height: 52px; margin: 0; }
.home-page .footer-brand-info > p { margin-top: .9rem; color: rgba(255,255,255,.48); font-size: .86rem; }
.footer-cta { display: flex; flex-direction: column; align-items: flex-end; color: rgba(255,255,255,.5); font-size: .75rem; text-decoration: none; }
.footer-cta span { display: flex; align-items: center; gap: .5rem; margin-top: .35rem; color: var(--white); font-size: 1.35rem; font-weight: 700; }
.home-page .footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3rem; margin: 0 0 5rem; }
.home-page .footer-grid > div { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; }
.footer-label { margin-bottom: .7rem !important; color: #d7b575 !important; font-family: var(--mono); font-size: .64rem !important; letter-spacing: .1em; text-transform: uppercase; }
.home-page .footer-grid a,
.home-page .footer-grid span {
    display: flex;
    align-items: center;
    gap: .55rem;
    /* padding-block keeps the tap target above the WCAG 2.2 minimum without
       changing the visual rhythm (the column gap is reduced to compensate) */
    padding-block: .35rem;
    color: rgba(255,255,255,.58);
    font-size: .84rem;
    line-height: 1.5;
    text-decoration: none;
    transition: color .2s ease;
}
.home-page .footer-grid a i,
.home-page .footer-grid span i {
    flex-shrink: 0;
    color: var(--gold);
    font-size: .78rem;
    transition: transform .2s ease;
}
.home-page .footer-grid a:hover { color: var(--white); }
.home-page .footer-grid a:hover i { transform: translateX(2px); }

/* Contact column's meaningful icons (envelope/phone/pin) read a touch larger
   than the plain caret pointers used elsewhere in the footer. */
.home-page .footer-grid a i.ph-envelope-simple,
.home-page .footer-grid a i.ph-phone,
.home-page .footer-grid span i.ph-map-pin { font-size: calc(.78rem + 3px); }

.home-page .footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 1.5rem; color: rgba(255,255,255,.34); border-top: 1px solid rgba(255,255,255,.09); font-size: .68rem; text-align: left; }

.home-page .footer-social { display: flex; gap: .6rem; }
.home-page .footer-social a {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: rgba(255,255,255,.55);
    background: transparent;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    font-size: 1rem;
    transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.home-page .footer-social a:hover {
    color: var(--gold);
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* Reveal motion */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .home-page *, .home-page *::before, .home-page *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}

/* Preserve the site's existing horizontal padding system */
@media (max-width: 1300px) {
    .home-page .nav-container,
    .home-page .hero-panel,
    .home-page .proof,
    .home-page .clients,
    .home-page .services,
    .home-page .portfolio,
    .home-page .contact,
    .home-page .footer { padding-left: 60px; padding-right: 60px; }
}

@media (max-width: 1150px) {
    .home-page .nav-container,
    .home-page .hero-panel,
    .home-page .proof,
    .home-page .clients,
    .home-page .services,
    .home-page .portfolio,
    .home-page .contact,
    .home-page .footer { padding-left: 25px; padding-right: 25px; }
    .home-page .hero-content { grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); gap: 3rem; }
    .home-page .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
    .home-page .hero-panel,
    .home-page .proof,
    .home-page .clients,
    .home-page .services,
    .home-page .portfolio,
    .home-page .contact,
    .home-page .footer { padding-left: 25px; padding-right: 25px; }

    .home-page .navbar { top: 0; width: 100%; padding: 1rem 25px; }
    .home-page .navbar.scrolled { top: 12px; width: calc(100% - 50px); padding: .62rem 1.1rem; }
    .home-page .mobile-menu-btn { display: block; }
    .home-page .nav-menu {
        position: fixed;
        inset: 0 0 auto auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 1.1rem;
        width: min(86vw, 420px);
        height: 100dvh;
        padding: 6.5rem 2rem 2rem;
        background: #071d26;
        border-left: 1px solid rgba(255,255,255,.1);
        transform: translateX(100%);
        transition: transform .35s cubic-bezier(.16,1,.3,1);
    }
    .home-page .nav-menu.active { right: 0; transform: translateX(0); }
    .home-page .nav-menu li { width: 100%; }
    .home-page .nav-menu > li > a,
    .home-page .navbar.scrolled .nav-menu > li > a { display: block; width: 100%; padding: .6rem 0; color: rgba(255,255,255,.72); font-size: 1.25rem; }
    .home-page .nav-menu .nav-cta,
    .home-page .navbar.scrolled .nav-menu .nav-cta { display: flex; width: 100%; margin: 1rem 0 0; padding: 1rem; color: var(--ink-deep); font-size: 1rem; }
    .home-page .mobile-menu-btn.active { position: fixed; right: 25px; border-color: rgba(255,255,255,.2); }
    .home-page .mobile-menu-btn.active span { background: #fff; }

    .home-page .hero-panel { min-height: auto; padding-top: 9rem; padding-bottom: 6rem; }
    .home-page .hero-content { grid-template-columns: 1fr; gap: 5rem; }
    .home-page .hero-copy { max-width: 800px; }
    .home-page .hero h1 { max-width: 850px; }
    .hero-system { max-width: 670px; justify-self: stretch; }
    .hero-scroll { display: none; }
    .whyus-top { grid-template-columns: 1fr; gap: 3rem; }
    .practice-band { grid-template-columns: 1fr; gap: 2.25rem; }
    .home-page .contact-wrapper { grid-template-columns: 1fr; gap: 4rem; }
    .contact-intro { position: static; }
    .project-stage { aspect-ratio: 16 / 10; }
}

@media (max-width: 760px) {
    .section-heading { grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 3rem; }
    .home-page .hero h1 { font-size: clamp(3.2rem, 14vw, 5.6rem); }
    .home-page .hero-buttons { align-items: center; flex-direction: column; gap: 1.2rem; }
    .hero-system { display: none; }
    .home-page .hero-panel { min-height: calc(100dvh - 24px); }
    .home-page .hero-content { display: block; }
    .hero-trust { margin-top: 2.5rem; }
    .proof .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; gap: .8rem; }
    .proof .stat-card { min-height: 185px; padding: 1.35rem; gap: 1.1rem; }
    .proof .stat-card-primary { grid-column: 1 / -1; grid-row: auto; min-height: 320px; padding: 1.65rem; }
    .proof .stat-icon { width: 36px; height: 36px; font-size: 1.1rem; }
    .proof .stat-progress { display: none; }
    .proof .stat-number,
    .proof .stat-unit { font-size: clamp(2.8rem, 12vw, 4.6rem); }
    .proof .stat-card-accent .stat-number,
    .proof .stat-card-accent .stat-unit { font-size: clamp(2.4rem, 10vw, 3.9rem); }
    .proof .stat-card-primary .stat-number { font-size: clamp(5.6rem, 25vw, 8rem); }
    .proof .stat-card-primary .stat-unit { font-size: clamp(2.4rem, 10vw, 3.8rem); }
    .lighthouse-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; max-width: 340px; }
    .home-page .clients .container { padding: 0; }
    .clients-strip-head { grid-template-columns: 1fr; gap: 1rem; padding-bottom: 1.75rem; }
    .clients-strip-head h2 { font-size: clamp(1.9rem, 7.5vw, 2.8rem); }
    .clients-intro { max-width: 520px; text-align: left; }
    .carousel-label { padding-right: 0; padding-left: 0; }
    .home-page .services-grid { grid-template-columns: 1fr; }
    .home-page .service-card { min-height: 460px; padding: 2rem; }
    .home-page .service-number { top: 2.1rem; right: 2rem; }
    .services-cta { align-items: flex-start; flex-direction: column; gap: .8rem; }
    .project-stage { aspect-ratio: 4 / 3; }
    .home-page .form-row { grid-template-columns: 1fr; }
    .home-page .footer-top { align-items: flex-start; flex-direction: column; gap: 2rem; }
    .footer-cta { align-items: flex-start; }
    .home-page .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
    .home-page .footer-bottom { align-items: flex-start; flex-direction: column; gap: .5rem; }
}

@media (max-width: 480px) {
    .home-page .navbar { top: 0; width: 100%; padding: 1rem 20px; }
    .home-page .navbar.scrolled { top: 10px; width: calc(100% - 40px); padding: .58rem .85rem; }
    .home-page .nav-container { padding: 0; }
    .home-page .hero-panel,
    .home-page .proof,
    .home-page .clients,
    .home-page .services,
    .home-page .portfolio,
    .home-page .contact,
    .home-page .footer { padding-left: 20px; padding-right: 20px; }
    .home-page .mobile-menu-btn.active { right: 20px; }
    .home-page .logo img { height: 38px; }
    .home-page .hero-panel { padding-top: 8rem; padding-bottom: 4rem; }
    .home-page .hero h1 { margin-top: 1.15rem; font-size: clamp(3rem, 16vw, 4.6rem); }
    .home-page .hero-subtitle { font-size: .96rem; line-height: 1.65; }
    .avatar-stack { display: none; }
    .proof { padding-top: 5rem; padding-bottom: 5rem; }
    .proof-intro h2 { font-size: clamp(2.5rem, 12vw, 3.4rem); }
    .proof-caption { margin-top: 1.8rem; }
    .proof .container { gap: 2.5rem; }
    .proof .stat-card { min-height: 170px; padding: 1.15rem; border-radius: 20px; gap: .9rem; }
    .proof .stat-card-primary { min-height: 290px; padding: 1.4rem; border-radius: 24px; }
    .proof .stat-index { font-size: .55rem; }
    .proof .stat-icon { width: 34px; height: 34px; font-size: 1rem; border-radius: 10px; }
    .proof .stat-card p { font-size: .61rem; }
    .proof .stat-note { font-size: .74rem; }
    .home-page .clients { padding-top: 3.75rem; padding-bottom: 4.25rem; }
    .home-page .clients .container { padding: 0; }
    .clients-strip-head { padding: 0 0 1.5rem; }
    .clients-strip-head h2 { font-size: 2rem; }
    .clients-intro { padding: 0; font-size: .8rem; }
    .carousel-label { padding-right: 0; padding-left: 0; }
    .carousel-label span:last-child { display: none; }
    .home-page .client-logo-card { flex-basis: 170px; height: 96px; margin-right: .75rem; padding: 1rem 1.2rem; border-radius: 16px; }
    .home-page .client-logo-card img { max-height: 68px; }
    .home-page .services,
    .home-page .portfolio,
    .home-page .contact { padding-top: 6rem; padding-bottom: 6.5rem; }
    .section-heading h2,
    .home-page .contact h2 { font-size: clamp(2.35rem, 12vw, 3.5rem); }
    .project-open { right: 1.1rem; bottom: 1.1rem; width: 40px; height: 40px; }
    .home-page .contact-form-container { padding: 1.5rem; }
    .home-page .contact-form .btn { width: 100%; }
    .home-page .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* Exact header system shared by portfolio.html and portfolio-single.html */
.home-page .navbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    z-index: 1000;
    padding: 1.5rem clamp(25px, 6vw, 120px);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    transition: all .5s cubic-bezier(.16, 1, .3, 1);
    will-change: transform, opacity, width, padding, top, border-radius;
    font-family: var(--font-family);
}

.home-page .nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-page .navbar.scrolled {
    top: 20px;
    width: 1100px;
    max-width: 95%;
    padding: .5rem clamp(1.5rem, 3vw, 4rem);
    white-space: nowrap;
    background: #fff;
    border: 1px solid rgba(21, 64, 80, .12);
    border-radius: 100px;
    box-shadow: 0 10px 40px rgba(21, 64, 80, .16);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: none;
}

.home-page .navbar.scrolled .nav-container {
    width: 100%;
    max-width: none;
    gap: 4rem;
}

.home-page .logo {
    display: flex;
    align-items: center;
    line-height: normal;
}

.home-page .logo img {
    width: auto;
    height: 60px;
    object-fit: contain;
    transition: opacity .3s ease;
}

.home-page .logo-colored { display: none; }
.home-page .logo-white { display: block; }
.home-page .logo-icon { display: none; }
.home-page .navbar.scrolled .logo img { height: 55px; }
.home-page .navbar.scrolled .logo-colored { display: block; }
.home-page .navbar.scrolled .logo-white { display: none; }
.home-page .navbar.scrolled .logo-icon { display: none; }

.home-page .nav-menu {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    transform: none;
    list-style: none;
}

.home-page .nav-menu li { width: auto; }

.home-page .nav-menu > li > a,
.home-page .navbar.scrolled .nav-menu > li > a {
    position: relative;
    display: inline-block;
    width: auto;
    padding: 0;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: color .3s ease;
}

.home-page .nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    display: block;
    /* scaleX instead of animating width — same effect, GPU-composited */
    width: 100%;
    height: 2px;
    background: var(--color-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.home-page .nav-menu > li > a:hover { color: var(--color-gold); }
.home-page .nav-menu > li > a:hover::after { transform: scaleX(1); }
.home-page .nav-menu > li > a.active { color: var(--gold); }

.home-page .navbar.scrolled .nav-menu > li > a:not(.btn) { color: var(--color-primary); }
.home-page .navbar.scrolled .nav-menu > li > a.active { color: var(--gold); }

.home-page .navbar.scrolled .nav-menu > li > a:not(.btn):hover { color: var(--color-gold); }
.home-page .navbar.scrolled .mobile-menu-btn { color: var(--color-primary); }

/* ── Services mega-dropdown ───────────────────────────────────────── */
.home-page .nav-dd { position: relative; }
.home-page .nav-dd-trigger {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text);
    transition: color .3s ease;
}
.home-page .nav-dd-caret { font-size: .78rem; transition: transform .3s ease; }
.home-page .nav-dd:hover .nav-dd-caret,
.home-page .nav-dd:focus-within .nav-dd-caret,
.home-page .nav-dd.open .nav-dd-caret { transform: rotate(180deg); }

/* Trigger colour matches nav links across every state */
.home-page .nav-dd:hover .nav-dd-trigger,
.home-page .nav-dd:focus-within .nav-dd-trigger,
.home-page .nav-dd.open .nav-dd-trigger,
.home-page .nav-dd.is-current .nav-dd-trigger { color: var(--color-gold); }
.home-page .navbar.scrolled .nav-dd-trigger { color: var(--color-primary); }
.home-page .navbar.scrolled .nav-dd:hover .nav-dd-trigger,
.home-page .navbar.scrolled .nav-dd:focus-within .nav-dd-trigger,
.home-page .navbar.scrolled .nav-dd.open .nav-dd-trigger,
.home-page .navbar.scrolled .nav-dd.is-current .nav-dd-trigger { color: var(--color-gold); }

/* Panel */
.home-page .nav-mega {
    position: absolute;
    top: calc(100% + 1.35rem);
    /* Centred with a negative margin rather than translateX(-50%): a persistent
       transform promotes the panel to a composited layer, which rasterises
       blurry on fractional pixel positions at non-integer display scaling. */
    left: 50%;
    margin-left: -310px;
    transform: translateY(10px);
    width: 620px;
    max-width: min(620px, calc(100vw - 3rem));
    padding: 1.35rem;
    background: #fff;
    border: 1px solid rgba(21, 64, 80, .1);
    border-radius: 24px;
    box-shadow: 0 26px 64px rgba(13, 42, 53, .2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s cubic-bezier(.16, 1, .3, 1), visibility .25s;
    z-index: 1001;
}
/* Hover bridge so the gap between trigger and panel stays hoverable */
.home-page .nav-mega::before {
    content: '';
    position: absolute;
    inset: -1.35rem 0 auto;
    height: 1.6rem;
}
/* Mega links must not inherit the nav's underline/hover styling */
.home-page .nav-mega a::after { display: none !important; }

.home-page .nav-dd:hover .nav-mega,
.home-page .nav-dd:focus-within .nav-mega,
.home-page .nav-dd.open .nav-mega {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* settles to no transform so text rasterises crisply */
    transform: none;
}

.home-page .nav-mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.25rem; }
.home-page .navbar .nav-menu .nav-mega .mega-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
    text-decoration: none;
    transition: background .2s ease;
}
.home-page .navbar .nav-menu .nav-mega .mega-item:hover { background: var(--cream); }
.home-page .mega-ico {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    color: var(--teal);
    background: rgba(21, 64, 80, .06);
    border: 1px solid rgba(21, 64, 80, .08);
    border-radius: 13px;
    font-size: 1.3rem;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.home-page .navbar .nav-menu .nav-mega .mega-item:hover .mega-ico { color: #fff; background: var(--gold); border-color: var(--gold); }
.home-page .mega-txt { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.home-page .mega-txt b { color: var(--ink); font-size: .92rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.home-page .mega-txt small { color: var(--muted); font-size: .76rem; line-height: 1.4; }

.home-page .navbar .nav-menu .nav-mega .mega-foot {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .9rem;
    padding: 1.15rem .6rem .3rem;
    color: var(--teal);
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
    border-top: 1px solid var(--line);
}
.home-page .navbar .nav-menu .nav-mega .mega-foot i { transition: transform .2s ease; }
.home-page .navbar .nav-menu .nav-mega .mega-foot:hover { color: var(--gold); }
.home-page .navbar .nav-menu .nav-mega .mega-foot:hover i { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
    .home-page .nav-mega { transition: opacity .01ms, visibility .01ms; }
}

.home-page .nav-menu .btn,
.home-page .navbar.scrolled .nav-menu .btn {
    display: inline-block;
    width: auto;
    max-width: none;
    min-height: 0;
    padding: .75rem 1.5rem !important;
    color: var(--color-text);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(59,102,117,.3);
    font-size: 1rem;
    font-weight: 500;
}

.home-page .nav-menu .btn:hover {
    color: var(--color-text);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(223,161,68,.5);
}

.home-page .mobile-menu-btn,
.home-page .mobile-menu-btn.active {
    position: relative;
    right: auto;
    display: none;
    /* 44x44 minimum touch target (WCAG 2.2 AA / PRODUCT.md).
       flex-shrink:0 stops the nav flex row collapsing it to glyph width. */
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex-shrink: 0;
    padding: 0;
    color: var(--color-text);
    background: none;
    border: none;
    border-radius: 0;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 1024px) {
    .home-page .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 2.5rem;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        padding: 6rem 2rem;
        background: rgba(2,2,2,.98);
        border-left: 1px solid rgba(255,255,255,.1);
        backdrop-filter: blur(10px);
        transform: none;
        transition: right .4s ease;
    }

    .home-page .nav-menu.active { right: 0; transform: none; }
    .home-page .nav-menu li { width: auto; }
    .home-page .nav-menu > li > a,
    .home-page .navbar.scrolled .nav-menu > li > a {
        display: inline-block;
        width: auto;
        padding: 0;
        color: var(--color-text);
        font-size: 1rem;
    }

    .home-page .navbar.scrolled .nav-menu > li > a:not(.btn) { color: var(--color-text); }
    .home-page .navbar.scrolled .nav-menu > li > a.active { color: var(--gold); }

    .home-page .navbar.scrolled .mobile-menu-btn.active { color: var(--color-text); }

    /* Mega-dropdown becomes an inline accordion inside the mobile menu */
    .home-page .nav-dd { width: 100%; text-align: center; }
    .home-page .nav-dd-trigger,
    .home-page .navbar.scrolled .nav-dd-trigger { justify-content: center; width: 100%; color: var(--color-text); }
    .home-page .nav-mega {
        position: static;
        margin-left: 0;
        width: 100%;
        max-width: none;
        margin-top: 1.5rem;
        padding: 0;
        background: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease;
    }
    .home-page .nav-dd:hover .nav-mega,
    .home-page .nav-dd:focus-within .nav-mega,
    .home-page .nav-dd.open .nav-mega { transform: none; }
    .home-page .nav-dd.open .nav-mega { max-height: 30rem; }
    .home-page .nav-mega::before { display: none; }
    .home-page .nav-mega-grid { grid-template-columns: 1fr; gap: 0; }
    .home-page .navbar .nav-menu .nav-mega .mega-item { padding: .7rem .2rem; text-align: left; }
    .home-page .navbar .nav-menu .nav-mega .mega-item:hover { background: none; }
    .home-page .navbar .nav-menu .nav-mega .mega-item:hover .mega-ico { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }
    .home-page .mega-ico { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); }
    .home-page .mega-txt b { color: rgba(255,255,255,.92); }
    .home-page .mega-txt small { color: rgba(255,255,255,.5); }
    .home-page .navbar .nav-menu .nav-mega .mega-foot { justify-content: center; color: rgba(255,255,255,.78); border-top-color: rgba(255,255,255,.12); }

    .home-page .nav-menu .btn,
    .home-page .navbar.scrolled .nav-menu .btn {
        width: 100%;
        max-width: 300px;
    }

    .home-page .navbar { padding: 1.5rem 25px; }
    .home-page .navbar.scrolled { top: 20px; width: 1100px; max-width: 95%; padding: .5rem 2rem; }
    .home-page .mobile-menu-btn,
    .home-page .mobile-menu-btn.active { display: grid; place-items: center; }
}

@media (max-width: 480px) {
    .home-page .navbar { padding: 1.5rem 20px; }
    .home-page .navbar.scrolled { top: 20px; width: 1100px; max-width: 95%; padding: .5rem 1.25rem; }
    .home-page .nav-container { padding: 0 60px; }
}
