/* ============================================================
   Home page — full redesign, built on top of global.css's
   reveal / media-placeholder / gradient-backdrop utilities.
   ============================================================ */

/* ---- Hero: true full-viewport video background ---- */
.hero-full {
    position: relative;
    overflow-x: hidden; /* the wordmark below is one unbroken run of letters (no spaces to wrap on) — clip rather than let it push the page wider */
    overflow-y: visible; /* must be set explicitly: setting only overflow-x makes browsers silently default overflow-y to "auto", which turned the hero into its own scrollable box — this also has to stay visible (not hidden) so the stat strip below can keep overlapping past the hero's bottom edge */
    height: 100vh;
    min-height: 640px;
    display: flex;
    align-items: center;
    background: var(--color-navy);
    margin-bottom: 130px; /* generous room for the overlapping stat strip below */
}

.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg-video, .hero-bg-fallback {
    position: absolute;
    inset: -3%; /* slightly oversized so the Ken Burns zoom never shows an edge */
    width: 106%;
    height: 106%;
    object-fit: cover;
}

/* Solid, no-gradient placeholder shown until real footage is wired in.
   Flat navy + a faint monochrome grid, with a slow continuous zoom
   (the classic "Ken Burns" technique) so it reads as alive, not static —
   the same slow-zoom will look great on the real video too. */
.hero-bg-fallback {
    background: var(--color-navy);
    animation: hero-bg-zoom 24s ease-in-out infinite alternate;
}
.hero-bg-fallback::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 48px 48px;
}
@keyframes hero-bg-zoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.09); }
}
.hero-bg-video { animation: hero-bg-zoom 30s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) {
    .hero-bg-fallback, .hero-bg-video { animation: none; }
}

/* The wordmark and the headline/CTA row share one flex column
   (.hero-content-stack, below) so the space between them scales with the
   hero's actual height instead of a fixed top offset + bottom anchor —
   that fixed version left a big dead gap on shorter/wider screens where
   100vh isn't very tall (laptops, tablets, phones in landscape). */
.hero-content-stack {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 0 56px;
}

/* Oversized wordmark bleeding across the top of the frame, grid-aligned to
   the same left edge as the headline underneath it. mix-blend-mode lets the
   footage show through the letterforms instead of the type sitting flat on
   top of it — the effect the reference layout uses. */
.hero-giant-wrap {
    pointer-events: none;
}
.hero-giant-type {
    font-family: var(--font-heading);
    font-size: clamp(4.5rem, 14vw, 12.5rem);
    font-weight: 800;
    line-height: 0.85;
    letter-spacing: -0.035em;
    color: var(--color-white);
    mix-blend-mode: overlay;
    user-select: none;
}
/* This element also carries the shared .reveal class so the global scroll
   IntersectionObserver picks it up and flags .is-visible — but the block
   itself should stay put; only its individual .hero-letter children
   animate, so this overrides the generic fade/rise .reveal does elsewhere. */
.hero-giant-type.reveal { opacity: 1; transform: none; transition: none; }
.hero-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.45em);
    transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 0.06s);
}
.hero-giant-type.is-visible .hero-letter { opacity: 1; transform: translateY(0); }

.hero-giant-mark {
    color: var(--color-gold);
    mix-blend-mode: normal;
    margin-left: 0.06em;
    transform-origin: 60% 70%;
    transform: rotate(-12deg);
    animation: hero-mark-breathe 5s ease-in-out infinite;
    animation-play-state: paused; /* starts once .is-visible is added, see rule below */
}
.hero-giant-type.is-visible .hero-giant-mark { animation-play-state: running; }
@keyframes hero-mark-breathe {
    0%, 100% { transform: rotate(-12deg) scale(1); }
    50% { transform: rotate(-6deg) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-letter { transition: none; opacity: 1; transform: none; }
    .hero-giant-mark { animation: none; transform: rotate(-12deg); }
}

.hero-full-inner {
    position: relative;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
    flex-wrap: wrap;
}
.hero-headline { max-width: 560px; }
.hero-tag {
    background: rgba(228,166,43,0.18);
    color: var(--color-gold);
    margin-bottom: 22px;
    display: inline-block;
}
.hero-headline h1 {
    color: var(--color-white);
    font-size: clamp(2rem, 3.4vw, 2.9rem);
    line-height: 1.12;
    letter-spacing: -0.015em;
    text-shadow: 0 2px 24px rgba(0,0,0,0.25);
}

.hero-meta { max-width: 360px; }
.hero-cta-group { display: flex; align-items: center; gap: 14px; }
.hero-cta-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    flex-shrink: 0;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.hero-cta-arrow svg { width: 18px; height: 18px; }
.hero-cta-arrow:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.7);
    transform: translateY(-2px) rotate(45deg);
    text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
    .hero-cta-arrow:hover { transform: none; }
}

.hero-scroll-cue {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.06);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: bob 2.4s ease-in-out infinite;
}
.hero-scroll-cue svg { width: 18px; height: 18px; }
@keyframes bob {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-scroll-cue { animation: none; }
}

/* ---- Overlapping stat strip (the "negative spacing" bridge into the next section) ---- */
.hero-stat-strip {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translate(-50%, 50%);
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
}
.stat-chip {
    background: var(--color-white);
    border-radius: 14px;
    padding: 24px 18px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(11,31,58,0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-chip:hover { transform: translateY(-6px); box-shadow: 0 30px 70px rgba(11,31,58,0.28); }
.stat-chip h3 { color: var(--color-green-dark); font-size: 1.9rem; margin-bottom: 4px; }
.stat-chip p { color: var(--color-text-muted); margin: 0; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }

/* One-time "power on" pulse the instant a stat card scrolls into view —
   a quick gold ring expanding outward, like the card just got energized. */
.stat-chip.reveal.is-visible { animation: stat-energize 1s ease-out; }
@keyframes stat-energize {
    0% { box-shadow: 0 24px 60px rgba(11,31,58,0.22), 0 0 0 0 rgba(228,166,43,0.4); }
    70% { box-shadow: 0 24px 60px rgba(11,31,58,0.22), 0 0 0 14px rgba(228,166,43,0); }
    100% { box-shadow: 0 24px 60px rgba(11,31,58,0.22), 0 0 0 0 rgba(228,166,43,0); }
}
@media (prefers-reduced-motion: reduce) {
    .stat-chip.reveal.is-visible { animation: none; }
}

/* Extra top padding on the section right after the hero so the overlapping
   stat strip has room to breathe before the section's own content starts */
.pt-overlap { padding-top: 168px; }

/* ---- Photo gallery mosaic ---- */
.gallery-mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 150px;
    grid-auto-flow: dense;
    gap: 14px;
}
.gallery-tile {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
}
.gallery-tile-lg { grid-column: span 2; grid-row: span 2; }
.gallery-tile .media-placeholder { height: 100%; border-radius: 14px; }
.gallery-tile .media-fill,
.gallery-tile img,
.gallery-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-tile:hover .media-fill,
.gallery-tile:hover img,
.gallery-tile:hover video { transform: scale(1.07); }
.gallery-tile { transition: box-shadow 0.3s ease; }
.gallery-tile:hover { box-shadow: 0 0 0 3px rgba(228,166,43,0.4); }

/* ---- Section heading ---- */
.section-heading { max-width: 620px; margin-bottom: 40px; }
.section-heading .tag { margin-bottom: 14px; display: inline-block; }
.section-intro { color: var(--color-text-muted); margin-top: 10px; }

/* ---- "What We Build": full-bleed parallax photo background, cards float
   on top as frosted glass panels. No icons — a large faint index number
   instead, which reads as a spec sheet rather than a template icon grid. ---- */
.solutions-section {
    position: relative;
    overflow: hidden;
    background: var(--color-navy); /* shows while/if the background photo hasn't loaded */
}
.solutions-bg {
    position: absolute;
    inset: -160px 0; /* fixed vertical bleed, comfortably larger than the parallax drift range below, so it never shows an edge */
    z-index: 0;
}
.solutions-bg .media-placeholder { width: 100%; height: 100%; border-radius: 0; border: none; }
.solutions-bg::after {
    /* Flat navy tint over the photo so white text/frosted cards stay legible —
       solid color, not a gradient. */
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(11, 60, 137, 0.78);
}
.solutions-section .container { position: relative; z-index: 1; }
.solutions-section .section-heading .tag { background: rgba(255,255,255,0.14); color: var(--color-white); }
.solutions-section .section-heading .tag::after { background: var(--color-gold); }
.solutions-section .section-heading h2 { color: var(--color-white); }
.solutions-section .section-intro { color: rgba(255,255,255,0.75); }

.solution-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: rgba(255,255,255,0.5);
    transition: box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.solution-card:hover { box-shadow: 0 20px 44px rgba(11,31,58,0.3); transform: translateY(-4px); text-decoration: none; background: var(--color-white); }
.solution-index {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-navy);
    opacity: 0.18;
    line-height: 1;
    margin-bottom: 2px;
    transition: opacity 0.25s ease, color 0.25s ease;
}
.solution-card:hover .solution-index { opacity: 1; color: var(--color-gold); }
.card-arrow { color: var(--color-green-dark); font-weight: 600; font-size: 0.86rem; margin-top: 4px; }
.solution-card-cta { background: rgba(255,255,255,0.7); border-style: dashed; justify-content: center; }

/* ---- Spotlight ---- */
.spotlight-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.spotlight-media { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; }
.spotlight-media .media-placeholder { aspect-ratio: 4/3; }
.spotlight-copy .tag { margin-bottom: 16px; display: inline-block; }
.spotlight-copy p { color: var(--color-text-muted); font-size: 1.02rem; margin-bottom: 26px; max-width: 460px; }

/* ---- CTA band: a floating navy card that overlaps the section above it
   (same "negative spacing" bridge the hero/stat-strip uses) rather than a
   flat full-width strip — one more seam where sections read as connected
   layers instead of stacked, separate blocks. ---- */
.cta-band-outer { position: relative; }
.cta-band-card {
    position: relative;
    overflow: hidden;
    background: var(--color-navy);
    border-radius: 28px;
    margin-top: -180px; /* pulls up into this section's own top padding + the Spotlight section's bottom padding above it */
    box-shadow: 0 30px 70px rgba(11,31,58,0.25);
}
.cta-inner {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; flex-wrap: wrap; padding: 64px 48px;
}
.cta-inner h2 { max-width: 480px; margin-bottom: 8px; color: var(--color-white); }
.cta-inner p { color: rgba(255,255,255,0.7); margin: 0; }

/* ---- Insights teaser ---- */
.insights-teaser-grid { margin-bottom: 32px; }
.insight-card { padding: 0; overflow: hidden; display: block; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.insight-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); text-decoration: none; }
.insight-media { aspect-ratio: 16/10; overflow: hidden; background: var(--color-white); }
.insight-media img, .insight-media video { width: 100%; height: 100%; object-fit: cover; }
.insight-body { padding: 16px 18px 20px; }
.insight-body h4 { margin-bottom: 6px; font-size: 1rem; }
.insight-date { color: var(--color-text-muted); font-size: 0.82rem; }
.empty-state { color: var(--color-text-muted); }

.insights-teaser-cta { text-align: center; }
.btn-secondary-outline {
    background: transparent;
    border: 2px solid var(--color-navy);
    color: var(--color-navy);
}
.btn-secondary-outline:hover { background: var(--color-navy); color: var(--color-white); text-decoration: none; }

/* ---- Responsive ----
   The 100vh + absolutely-positioned-everything layout below the hero was
   built desktop-first; below ~960px the stat strip needs to leave the
   absolute/overlap system entirely (there's no long single-line row to
   overlap into) and become part of the hero's own normal flow instead,
   with the hero switching from a fixed viewport-height box to one that
   simply grows to fit its (now taller, stacked) content. */
@media (max-width: 960px) {
    .spotlight-inner { grid-template-columns: 1fr; }

    .hero-full {
        height: auto;
        min-height: 100vh;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 128px 0 48px;
        margin-bottom: 40px;
    }
    .hero-content-stack {
        height: auto;
        padding: 0;
        gap: 48px;
    }
    .hero-stat-strip {
        position: static;
        transform: none;
        grid-template-columns: repeat(2, 1fr);
        margin: 40px auto 0;
        max-width: 480px;
    }
    .pt-overlap { padding-top: 64px; }
    .gallery-mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
    .gallery-tile-lg { grid-column: span 2; grid-row: span 1; }

    .cta-band-card { margin-top: -110px; }
}

@media (max-width: 720px) {
    .hero-full { padding-top: 108px; }
    .hero-full-inner { flex-direction: column; align-items: flex-start; gap: 28px; }
    .hero-giant-type { font-size: clamp(3.2rem, 20vw, 6rem); }
    .hero-headline h1 { font-size: 1.9rem; }
    .hero-meta { max-width: none; }
    .hero-stat-strip { grid-template-columns: repeat(2, 1fr); }
    .cta-band-card { margin-top: -84px; border-radius: 20px; }
    .cta-band-card .cta-inner { padding: 40px 24px; }
}

@media (max-width: 480px) {
    .hero-giant-type { font-size: clamp(2.6rem, 18vw, 4rem); }
    .hero-headline h1 { font-size: 1.65rem; }
    .hero-cta-group { width: 100%; }
    .stat-chip { padding: 18px 12px; }
    .stat-chip h3 { font-size: 1.5rem; }
    .gallery-mosaic { grid-template-columns: 1fr; grid-auto-rows: 190px; }
    .gallery-tile-lg { grid-column: span 1; grid-row: span 1; }
}