/* =============================================================
   GN128 Solutions — Landing page styles
   Structure: 1) Tokens  2) Reset/base  3) Layout  4) Components
              5) Sections  6) Responsive  7) Motion
   ============================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
    /* Surfaces */
    --bg: #050509;
    --bg-2: #0a0a12;
    --surface: #10101a;
    --surface-2: #16161f;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);

    /* Text */
    --text: #f4f4f7;
    --text-muted: #8a8a99;
    --text-dim: #61616e;

    /* Brand */
    --primary: #8b5cf6;
    --primary-600: #7c3aed;
    --primary-400: #a78bfa;
    --accent: #4f7cff;
    --gradient: linear-gradient(120deg, #a78bfa 0%, #7c5cff 45%, #4f7cff 100%);
    --glow: rgba(124, 92, 255, 0.45);

    /* Type */
    --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-display: "Space Grotesk", var(--font-body);

    /* Metrics */
    --header-h: 74px;
    --container: 1200px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --section-y: clamp(4rem, 9vw, 7.5rem);
}

/* ---------- 2. Reset / base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Homepage only: single-screen hero, no scrollbar at all. */
body.is-landing {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Media never forces horizontal overflow */
img,
video,
svg {
    max-width: 100%;
}

/* Long headings wrap instead of overflowing on narrow screens */
h1,
h2,
h3 {
    overflow-wrap: break-word;
}

img {
    max-width: 100%;
    display: block;
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
    padding: 0;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -0.02em;
}

:focus-visible {
    outline: 2px solid var(--primary-400);
    outline-offset: 3px;
    border-radius: 6px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 200;
    background: var(--primary);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 1rem;
}

/* ---------- 3. Layout ---------- */
.container {
    width: min(100% - 2.5rem, var(--container));
    margin-inline: auto;
}

.section {
    padding-block: var(--section-y);
}

.section__head {
    max-width: 640px;
    margin: 0 auto clamp(2.5rem, 5vw, 4rem);
    text-align: center;
}

.section__head--left {
    max-width: 900px;
    margin-inline: 0;
    text-align: left;
}

.eyebrow {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.section__title {
    font-size: clamp(1.7rem, 3.6vw, 2.6rem);
}

.section__lead {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 1.02rem;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- 4. Components ---------- */
/* Buttons */
.btn {
    --btn-py: 0.7rem;
    --btn-px: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: var(--btn-py) var(--btn-px);
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn .icon {
    width: 1.05em;
    height: 1.05em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn--lg {
    --btn-py: 0.95rem;
    --btn-px: 1.8rem;
    font-size: 1rem;
}

.btn--pill {
    --btn-py: 0.55rem;
    --btn-px: 1.15rem;
}

/* Dark pill with a gradient border + inner bottom glow */
.btn--primary {
    color: #fff;
    border: 1px solid transparent;
    background:
        radial-gradient(130% 130% at 50% 118%, rgba(124, 92, 255, 0.75), rgba(16, 14, 26, 0.96) 62%) padding-box,
        var(--gradient) border-box;
    box-shadow: 0 10px 34px -14px var(--glow), inset 0 -10px 24px -12px rgba(167, 139, 250, 0.7);
}

.btn--primary:hover {
    box-shadow: 0 16px 46px -12px var(--glow), inset 0 -10px 24px -8px rgba(167, 139, 250, 0.9);
}

/* Dark pill with a soft light gradient border */
.btn--ghost {
    color: var(--text);
    border: 1px solid transparent;
    background:
        linear-gradient(#0d0d15, #0d0d15) padding-box,
        linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.08)) border-box;
}

.btn--ghost:hover {
    background:
        linear-gradient(#16161f, #16161f) padding-box,
        linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12)) border-box;
}

/* Dark rounded-rectangle with a gradient border */
.btn--dark {
    color: #fff;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 600;
    background:
        linear-gradient(#0b0b10, #0b0b10) padding-box,
        var(--gradient) border-box;
}

.btn--dark:hover {
    background:
        linear-gradient(#16161f, #16161f) padding-box,
        var(--gradient) border-box;
    box-shadow: 0 8px 26px -14px var(--glow);
}

/* Pill badge */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: rgba(226, 228, 236, 0.82);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pill__accent {
    color: var(--primary-400);
    font-weight: 600;
}

.pill__dot {
    position: relative;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-400);
    box-shadow: 0 0 8px 1px var(--glow);
}

.pill__dot::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--primary-400);
    opacity: 0.55;
    animation: pill-pulse 2s ease-out infinite;
}

@keyframes pill-pulse {
    0% { transform: scale(0.6); opacity: 0.55; }
    70% { transform: scale(2.2); opacity: 0; }
    100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .pill__dot::after { animation: none; }
}

/* Cards — dark fill with a subtle purple gradient border, brighter at the top */
.card {
    position: relative;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 1.9rem;
    background:
        linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%) padding-box,
        linear-gradient(155deg, rgba(124, 92, 255, 0.55), rgba(255, 255, 255, 0.05) 42%, rgba(124, 92, 255, 0.14)) border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: scale(1.035);
    box-shadow: 0 24px 60px -24px rgba(124, 92, 255, 0.55);
    z-index: 2;
}

/* ---------- 5. Sections ---------- */
/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 110;
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
    border-bottom: 1px solid transparent;
}

/* Soft scrim so the logo/nav stay readable over bright video frames. */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(4, 4, 10, 0.62) 0%, rgba(4, 4, 10, 0.28) 60%, transparent 100%);
    transition: opacity 0.3s ease;
}

.site-header.is-scrolled::before {
    opacity: 0;
}

.header__inner {
    position: relative;
}

.site-header.is-scrolled {
    background: rgba(6, 6, 12, 0.8);
    backdrop-filter: blur(14px);
    border-bottom-color: var(--border);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 74px;
    /* Span nearly full width with only a small side gap so the logo and nav
       sit closer to the screen edges. */
    width: 100%;
    max-width: none;
    padding-inline: clamp(1.25rem, 3vw, 2rem);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
}

.brand__logo {
    height: 34px;
    width: auto;
}

.footer__brand .brand__logo {
    height: 42px;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--gradient);
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 4px 16px -4px var(--glow);
}

.brand__accent {
    color: var(--primary-400);
}

.nav {
    margin-left: auto;
}

.nav__list {
    display: flex;
    gap: 0.4rem;
}

.nav__link {
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-pill);
    color: rgba(240, 242, 248, 0.92);
    font-weight: 500;
    font-size: 0.92rem;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav__link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    cursor: pointer;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
    position: relative;
    /* Pull the hero (and its background) up behind the transparent header so
       the pattern flows continuously — no seam under the nav. */
    margin-top: calc(-1 * var(--header-h));
    /* Content is flex-centred, so it doesn't need a big top pad to clear the
       header — keep padding modest so everything fits inside one viewport
       (no page scrollbar) even on short screens. */
    padding-top: calc(var(--header-h) + 0.5rem);
    padding-bottom: 1.5rem;
    text-align: center;
    overflow: hidden;
    /* Fill the viewport and centre the content vertically. */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
}

.hero__inner {
    width: 100%;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    /* First frame of the hero video shows instantly while the video buffers,
       so the user never sees a blank/black background. */
    background: url("../img/hero-poster.jpg") center center / cover no-repeat, var(--bg);
    overflow: hidden;
}

.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Fade in once the first frames are ready so it eases in instead of
       popping over the dark placeholder. */
    opacity: 0;
    transition: opacity 0.7s ease;
}

.hero__video.is-ready {
    opacity: 1;
}

.hero__bg::after {
    /* Gray overlay over the background video — keeps headline/nav legible and
       fades into the base colour at top and bottom so there are no hard seams. */
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(58% 55% at 50% 46%, rgba(15, 15, 18, 0.5), transparent 72%),
        linear-gradient(180deg,
            rgba(18, 18, 22, 0.72) 0%,
            rgba(28, 28, 32, 0.4) 28%,
            rgba(32, 32, 38, 0.26) 50%,
            rgba(28, 28, 32, 0.42) 72%,
            rgba(18, 18, 22, 0.78) 100%);
}

.hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    padding-bottom: 0;
}

.hero__title {
    font-size: clamp(2.2rem, 6vw, 4.1rem);
    max-width: 45ch;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.hero__subtitle {
    max-width: 70ch;
    color: rgba(240, 240, 245, 0.94);
    font-size: 1.05rem;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: center;
    margin-top: 0.5rem;
}

/* ---- Hero text carousel ---------------------------------------------- */
/* All slides share one grid cell so the block never jumps height. */
.hero__slides {
    display: grid;
    width: 100%;
}

.hero__slide {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}

.hero__slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.6s ease, visibility 0s;
}

/* Staggered rise for each line of the active slide */
.hero__slide > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.75, 0.3, 1);
}

.hero__slide.is-active > * {
    opacity: 1;
    transform: none;
}

.hero__slide.is-active > *:nth-child(1) { transition-delay: 0.08s; }
.hero__slide.is-active > *:nth-child(2) { transition-delay: 0.18s; }
.hero__slide.is-active > *:nth-child(3) { transition-delay: 0.28s; }

/* Prev / next arrows — glassmorphism */
.hero__arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transform: translateY(-50%);
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.hero__arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-50%) scale(1.08);
}

.hero__arrow:active {
    transform: translateY(-50%) scale(0.96);
}

.hero__arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero__arrow--prev { left: clamp(0.6rem, 3vw, 2rem); }
.hero__arrow--next { right: clamp(0.6rem, 3vw, 2rem); }

/* Dots */
.hero__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.hero__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.35);
    transition: width 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.hero__dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.hero__dot.is-active {
    width: 26px;
    border-radius: 999px;
    background: var(--primary-400);
    box-shadow: 0 0 12px 1px var(--glow);
}

@media (prefers-reduced-motion: reduce) {
    .hero__slide,
    .hero__slide > * {
        transition-duration: 0.01ms;
        transform: none;
    }
}

/* Showcase band */
/* Standalone video band beneath the hero */
.showcase-section {
    padding-block: 0 clamp(3rem, 6vw, 5rem);
}

.showcase {
    margin: 0;
}

.showcase__media {
    display: block;
    width: 100%;
    aspect-ratio: 24 / 9;
    object-fit: cover;
    background: #05050b;
}

/* Features */
.features__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.feature__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(124, 92, 255, 0.12);
    border: 1px solid var(--border-strong);
    margin-bottom: 1.2rem;
}

.feature__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--primary-400);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature__title {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}

.feature__text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Network nodes */
.nodes {
    position: relative;
    max-width: 760px;
    margin-inline: auto;
    aspect-ratio: 1 / 0.82;
    /* Slowly orbit the whole constellation around the centre hub */
    animation: node-orbit 48s linear infinite;
}

/* Pause the whole constellation on hover so labels are easy to read */
.nodes:hover,
.nodes:hover .node--pill,
.nodes:hover .node--hub {
    animation-play-state: paused;
}

.nodes__lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.nodes__lines line {
    stroke: rgba(124, 92, 255, 0.35);
    stroke-width: 1;
    stroke-dasharray: 4 5;
    vector-effect: non-scaling-stroke;
}

.node {
    position: absolute;
    transform: translate(-50%, -50%);
}

.node--hub {
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 0 40px -4px var(--glow);
    /* Pulse + counter-rotate so the hub icon/label stay upright while the ring spins */
    animation: pulse 3s ease-in-out infinite, node-orbit-counter 48s linear infinite;
}

.hub__icon {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: #fff;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hub__label {
    font-family: var(--font-display);
    font-size: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    max-width: 8ch;
    line-height: 1.2;
    opacity: 0.95;
}

.node--pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 6px 20px -12px rgba(0, 0, 0, 0.8);
    /* Counter-rotate at the same rate so labels stay upright while orbiting */
    animation: node-orbit-counter 48s linear infinite;
}

.node__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: none;
    stroke: var(--primary-400);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Services */
.services {
    position: relative;
    overflow: hidden;
}

.services__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.services__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* Darken heavily on the left (behind the heading) and fade the section edges
       into the page background so the video reads as an ambient glow. */
    background:
        linear-gradient(90deg, var(--bg) 8%, rgba(5, 5, 9, 0.72) 45%, rgba(5, 5, 9, 0.55) 100%),
        linear-gradient(180deg, var(--bg) 0%, transparent 22%, transparent 78%, var(--bg) 100%);
}

/* On mobile the video is busy behind stacked cards — dim it to an ambient glow */
@media (max-width: 700px) {
    .services__overlay {
        background:
            linear-gradient(180deg, var(--bg) 0%, rgba(5, 5, 9, 0.86) 30%, rgba(5, 5, 9, 0.9) 70%, var(--bg) 100%);
    }
}

.services > .container {
    position: relative;
    z-index: 2;
}

/* Glass cards so the glow shows through subtly (keeps the gradient border) */
.services .card {
    background:
        linear-gradient(180deg, rgba(16, 16, 26, 0.62), rgba(10, 10, 18, 0.62)) padding-box,
        linear-gradient(155deg, rgba(124, 92, 255, 0.55), rgba(255, 255, 255, 0.05) 42%, rgba(124, 92, 255, 0.14)) border-box;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
}

.service {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service__num {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-400);
    opacity: 0.8;
}

.service__title {
    font-size: 1.15rem;
}

.service__text {
    color: var(--text-muted);
    font-size: 0.92rem;
}

/* ---------- Services page ---------- */
.nav__link.is-active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

/* Framed hero panel */
/* Full-bleed hero with a giant title over the silk video */
.svc-hero {
    position: relative;
    margin-top: calc(-1 * var(--header-h));
    min-height: clamp(600px, 82vh, 860px);
    overflow: hidden;
}

.svc-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.svc-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(5, 5, 9, 0.72) 0%, rgba(5, 5, 9, 0.12) 26%, rgba(5, 5, 9, 0.22) 62%, rgba(5, 5, 9, 0.88) 100%),
        linear-gradient(90deg, rgba(5, 5, 9, 0.6) 0%, transparent 55%);
}

.svc-hero__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    min-height: clamp(600px, 82vh, 860px);
    padding-top: calc(var(--header-h) + 1.6rem);
    padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumb svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.breadcrumb a:hover {
    color: var(--text);
}

.breadcrumb [aria-current] {
    color: var(--text);
}

.svc-hero__title {
    font-size: clamp(2.2rem, 5.4vw, 4.2rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
    max-width: 15ch;
    margin-top: 0.5rem;
}

.svc-hero__foot {
    margin-top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2rem 3rem;
    align-items: end;
}

.svc-hero__intro {
    max-width: 52ch;
}

/* Plain, borderless monospace badge (matches the reference) */
.svc-hero__badge {
    padding: 0;
    border: none;
    background: none;
    backdrop-filter: none;
    align-items: flex-start;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    line-height: 1.6;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    letter-spacing: 0.08em;
}

.pill__glyph {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: none;
    stroke: var(--primary-400);
    stroke-width: 1.6;
    margin-top: 0.15em;
}

.svc-hero__subtitle {
    color: var(--text-muted);
    max-width: 52ch;
    font-size: 1rem;
}

.svc-hero__links {
    min-width: 230px;
}

.quicklinks__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.quicklinks {
    display: grid;
    gap: 0.4rem;
}

.quicklinks a {
    display: block;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-display);
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.quicklinks a:hover {
    color: var(--primary-400);
    padding-left: 0.4rem;
}

/* Highlight the quicklink for the page you're currently on */
.quicklinks a.is-active {
    color: var(--primary-400);
    border-bottom-color: var(--primary-400);
}

.scroll-down {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.scroll-down svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(3px); }
}

/* Popular solutions grid (Services page — 2 up) */
.solutions__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

/* Audience grid (Solutions page — 3 up) */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.solution {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.solution__title {
    font-size: 1.2rem;
}

.solution__text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.solution__list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.4rem;
}

.solution__list li {
    position: relative;
    padding-left: 1.3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.solution__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-400);
}

/* ---------- Contact page ---------- */
.svc-hero__meta {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

/* Form */
.contact-form {
    display: grid;
    gap: 1.1rem;
}

.field {
    display: grid;
    gap: 0.5rem;
}

.field label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
    resize: vertical;
    min-height: 130px;
}

.field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 18px;
    padding-right: 2.6rem;
    cursor: pointer;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--text-dim);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.contact-form .btn {
    margin-top: 0.4rem;
    width: 100%;
}

.form-status {
    font-size: 0.9rem;
    color: var(--primary-400);
    min-height: 1.2em;
}

.form-status.is-error {
    color: #ff6b6b;
}

/* Info column */
.contact-info {
    display: grid;
    gap: 2.2rem;
    padding-top: 0.5rem;
}

.info-block__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
}

.info-block__text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    max-width: 40ch;
}

.info-block__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-400);
    font-family: var(--font-display);
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.info-block__link:hover {
    border-bottom-color: var(--primary-400);
}

/* ---------- Projects page ---------- */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.filter {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.filter:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.filter.is-active {
    color: #fff;
    background: var(--gradient);
    border-color: transparent;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-strong);
    box-shadow: 0 24px 60px -28px rgba(124, 92, 255, 0.55);
}

.project-card__media {
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
    /* Placeholder gradient — swap for a real project image via inline style or here */
    background-image: linear-gradient(135deg, #1a1830, #0d1b2e);
    position: relative;
}

.project-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 1.4rem;
}

.project-card__tag {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    background: rgba(124, 92, 255, 0.14);
    border: 1px solid var(--border-strong);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-400);
}

.project-card__title {
    font-size: 1.15rem;
}

.project-card__text {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex: 1;
}

.project-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.92rem;
    margin-top: 0.3rem;
    transition: gap 0.2s ease, color 0.2s ease;
}

.project-card__link:hover {
    color: var(--primary-400);
    gap: 0.7rem;
}

.project-card__link svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.project-card[hidden] {
    display: none;
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-top: clamp(2.5rem, 5vw, 4rem);
}

.pagination a,
.pagination span {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.5rem;
    border-radius: 9px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.pagination a:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.04);
}

.pagination .is-active {
    color: #fff;
    background: var(--gradient);
    border-color: transparent;
}

.pagination .pagination__gap {
    border: none;
    background: none;
}

/* ---------- Project detail page ---------- */
.proj-hero {
    padding-top: calc(var(--header-h) + clamp(1.5rem, 4vw, 3rem));
    padding-bottom: clamp(2rem, 4vw, 3rem);
}

.proj-hero__eyebrow {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 1rem 0 0.5rem;
}

.proj-hero__title {
    font-size: clamp(2.6rem, 8vw, 5rem);
    letter-spacing: -0.03em;
    margin-bottom: 1.2rem;
}

.proj-hero__lead {
    max-width: 64ch;
    color: var(--text-muted);
    margin-bottom: 1.6rem;
}

.proj-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.proj-hero__actions .icon {
    width: 1.1em;
    height: 1.1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Big showcase image */
.proj-showcase {
    margin: 0 0 clamp(3rem, 6vw, 5rem);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(60% 80% at 50% 30%, rgba(124, 92, 255, 0.18), transparent 70%),
        linear-gradient(160deg, #14141f, #08080f);
}

.proj-showcase img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Challenge / Solution blocks */
.proj-block {
    max-width: 960px;
}

.block-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    margin-bottom: 1.2rem;
}

.block-title .pill__glyph {
    width: 20px;
    height: 20px;
    margin-top: 0;
}

.proj-block p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.proj-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem 2.5rem;
    margin-top: 1.6rem;
}

.proj-points li {
    position: relative;
    padding-left: 1.4rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.proj-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-400);
}

/* ---------- FAQ page ---------- */
.faq-hero {
    padding-top: calc(var(--header-h) + clamp(1.5rem, 4vw, 3rem));
    padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.faq-hero__title {
    font-size: clamp(2.6rem, 8vw, 5rem);
    letter-spacing: -0.03em;
    margin-top: 0.8rem;
}

.faq-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    max-width: 640px;
    margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
}

.faq-intro__title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.faq-intro__text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.faq-list {
    max-width: 820px;
    margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
    display: grid;
    gap: 0.9rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface), var(--bg-2));
    transition: border-color 0.25s ease;
}

.faq-item[open] {
    border-color: rgba(124, 92, 255, 0.55);
}

.faq-item summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.4rem;
    cursor: pointer;
    list-style: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.02rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:focus-visible {
    outline: 2px solid var(--primary-400);
    outline-offset: 2px;
    border-radius: var(--radius);
}

.faq-toggle {
    position: relative;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(124, 92, 255, 0.15);
    border: 1px solid var(--border-strong);
}

.faq-toggle::before,
.faq-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary-400);
    border-radius: 2px;
}

.faq-toggle::before {
    width: 12px;
    height: 2px;
}

.faq-toggle::after {
    width: 2px;
    height: 12px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.faq-item[open] .faq-toggle::after {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
}

.faq-a {
    padding: 0 1.4rem 1.3rem calc(1.4rem + 30px + 1rem);
    margin-top: -0.3rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 62ch;
}

/* ---------- Plain hero (no video) ---------- */
.plain-hero {
    padding-top: calc(var(--header-h) + clamp(1.5rem, 4vw, 3rem));
    padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* ---------- Book a call (Calendly embed) ---------- */
.book-lead {
    max-width: 60ch;
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 1.02rem;
}

.book-embed {
    margin-top: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-2);
}

.calendly-inline-widget {
    width: 100%;
}

/* Fallback shown until the Calendly script loads */
.book-embed__fallback {
    display: grid;
    place-items: center;
    gap: 0.8rem;
    padding: 4rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.book-embed__fallback a {
    color: var(--primary-400);
    font-weight: 500;
}

/* ---------- Testimonials / marquee ---------- */
.marquee {
    overflow: hidden;
    padding: 0.6rem 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee + .marquee {
    margin-top: 1.5rem;
}

.marquee__track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    will-change: transform;
}

.marquee__track--left {
    animation: marquee-left 55s linear infinite;
}

.marquee__track--right {
    animation: marquee-right 55s linear infinite;
}

.marquee:hover .marquee__track {
    animation-play-state: paused;
}

@keyframes marquee-left {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes marquee-right {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0); }
}

.tcard {
    flex-shrink: 0;
    width: min(360px, 78vw);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.7rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface), var(--bg-2));
}

.tcard--accent {
    background: linear-gradient(150deg, #7c5cff, #4f7cff);
    border-color: transparent;
    color: #fff;
}

.tcard__stars {
    color: #fff;
    letter-spacing: 0.15em;
    font-size: 0.95rem;
}

.tcard:not(.tcard--accent) .tcard__stars {
    color: var(--primary-400);
}

.tcard__quote {
    flex: 1;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.tcard--accent .tcard__quote {
    color: rgba(255, 255, 255, 0.95);
}

.tcard__person {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.tcard__avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
}

.tcard--accent .tcard__avatar {
    background: rgba(255, 255, 255, 0.2);
}

.tcard__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
}

.tcard__role {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.tcard--accent .tcard__role {
    color: rgba(255, 255, 255, 0.82);
}

/* CTA */
.cta {
    position: relative;
    text-align: center;
    padding: clamp(3rem, 7vw, 5rem) 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: url("../img/cta-bg.png") left center / cover no-repeat, var(--bg-2);
    overflow: hidden;
}

/* The wide CTA image crops poorly on narrow screens — use a scalable CSS glow */
@media (max-width: 700px) {
    .cta {
        background:
            radial-gradient(90% 70% at 12% 0%, rgba(124, 92, 255, 0.4), transparent 60%),
            linear-gradient(180deg, var(--surface), var(--bg-2));
    }
}

/* Glow is baked into the CTA background image now */
.cta__glow {
    display: none;
}

.cta > *:not(.cta__glow) {
    position: relative;
    z-index: 1;
}

.cta__title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 1rem;
}

.cta__text {
    max-width: 55ch;
    margin: 0 auto 2rem;
    color: var(--text-muted);
}

.cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: center;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-2);
    padding-top: clamp(3rem, 6vw, 4.5rem);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 2.5rem 1.5rem;
    padding-bottom: 3rem;
}

.footer__tagline {
    margin: 1.1rem 0 0.5rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    max-width: 32ch;
}

.footer__note {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer__heading {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
}

.footer__col ul {
    display: grid;
    gap: 0.6rem;
}

.footer__col a {
    color: var(--text-dim);
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.footer__col a:hover {
    color: var(--text);
}

.footer__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.4rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.85rem;
}

.socials {
    display: flex;
    gap: 0.6rem;
}

.socials a {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.socials a:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: rgba(255, 255, 255, 0.05);
}

.socials svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

/* ---------- Mobile overlay menu (Osmo-style side wipe) ---------- */
.site-menu {
    --menu-pad: 1.6rem;
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
}

.site-menu__overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 9, 0.6);
    cursor: pointer;
}

.site-menu__panel {
    position: relative;
    margin-left: auto;
    width: min(30rem, 100%);
    height: 100%;
    padding: calc(3.5 * var(--menu-pad)) var(--menu-pad) calc(2 * var(--menu-pad));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    overflow: auto;
}

.site-menu__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.site-menu__bg-panel {
    position: absolute;
    inset: 0;
    background: var(--surface);
    border-top-left-radius: 1.25rem;
    border-bottom-left-radius: 1.25rem;
}

.site-menu__bg-panel.first {
    background: linear-gradient(160deg, #7c5cff, #4f7cff);
}

.site-menu__bg-panel.second {
    background: var(--surface-2);
}

.site-menu__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    height: 100%;
}

.site-menu__list {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.site-menu__item {
    position: relative;
    overflow: hidden;
}

.site-menu__link {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    padding: 0.45rem var(--menu-pad);
    text-decoration: none;
    position: relative;
}

.site-menu__heading {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(2.4rem, 13vw, 3.6rem);
    line-height: 0.9;
    letter-spacing: -0.01em;
    color: #fff;
    transition: transform 0.5s cubic-bezier(0.65, 0.05, 0, 1);
}

.site-menu__eyebrow {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--primary-400);
}

.site-menu__link-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(124, 92, 255, 0.2);
    transform-origin: 50% 100%;
    transform: scaleY(0);
    transition: transform 0.5s cubic-bezier(0.65, 0.05, 0, 1);
}

.site-menu__details {
    padding-left: var(--menu-pad);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.site-menu__label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.site-menu__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.site-menu__social {
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-menu__social:hover {
    color: var(--primary-400);
}

@media (hover: hover) {
    .site-menu__link:hover .site-menu__heading {
        transform: translateX(0.4rem);
    }

    .site-menu__link:hover .site-menu__link-bg {
        transform: scaleY(1);
    }
}

/* ---------- 6. Responsive ---------- */
@media (max-width: 900px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer__brand {
        grid-column: 1 / -1;
    }

    .svc-hero__foot {
        grid-template-columns: 1fr;
        gap: 1.8rem;
    }

    .svc-hero__links {
        border-top: 1px solid var(--border);
        padding-top: 1.5rem;
    }

    .solutions__grid {
        grid-template-columns: 1fr;
    }

    .audience-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .proj-points {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Inline nav is replaced by the full-screen overlay menu on mobile */
    .nav {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .header__actions .btn--pill {
        display: none;
    }

    .brand__logo {
        height: 30px;
    }

    /* Keep the constellation orbiting on mobile — just scale it to fit */
    .nodes {
        max-width: min(300px, 84vw);
    }

    .node--pill {
        font-size: 0.64rem;
        padding: 0.36rem 0.66rem;
        gap: 0.3rem;
        box-shadow: none;
    }

    .node--pill .node__icon {
        width: 12px;
        height: 12px;
    }

    .node--hub {
        width: 70px;
        height: 70px;
    }

    .hub__icon {
        width: 18px;
        height: 18px;
    }

    .hub__label {
        font-size: 0.4rem;
    }
}

@media (max-width: 560px) {
    .features__grid,
    .services__grid,
    .footer__grid,
    .audience-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .btn--lg {
        width: 100%;
    }

    .hero__actions,
    .cta__actions {
        width: 100%;
    }

    /* Let the hero headline wrap naturally instead of forcing desktop breaks */
    .hero__title br {
        display: none;
    }

    .hero__title {
        font-size: clamp(1.85rem, 8.5vw, 2.6rem);
        max-width: 100%;
    }

    .svc-hero__title {
        font-size: clamp(1.9rem, 9vw, 2.8rem);
    }

    .section__title {
        font-size: clamp(1.5rem, 6.5vw, 2rem);
    }

    .svc-hero__subtitle,
    .hero__subtitle {
        font-size: 0.95rem;
    }

    /* Tighten the hero pill/badge so it doesn't read as a bulky two-line block */
    .pill {
        font-size: 0.6rem;
        letter-spacing: 0.07em;
        padding: 0.28rem 0.7rem;
    }

    .hero {
        padding-top: calc(var(--header-h) + 0.5rem);
        padding-bottom: 1.5rem;
    }

    .hero__inner {
        gap: 1.1rem;
    }
}

/* ---------- 7. Motion ---------- */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 40px -4px var(--glow);
    }
    50% {
        box-shadow: 0 0 60px 4px var(--glow);
    }
}

/* Constellation orbit — container spins, pills counter-spin to stay upright */
@keyframes node-orbit {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes node-orbit-counter {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(-360deg); }
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
