/* assets/public/site/about-us.css
   /historia page styles. Brand-aligned (white surface, navy primary, frosted
   glass touches). Reveal animations are driven by data-reveal attributes set
   in the markup; history.js adds .is-visible when each enters the viewport.

   Section layout:
     1. Hero        — full-bleed dark image with text card + parallax bg
     2. Intro       — narrow centered editorial copy
     3. Pillars     — 3 cards with icons, hover lift
     4. Stats       — full-bleed warehouse bg with counter cards
     5. Values      — 4 small cards in a row
     6. Location    — split: contact info + map iframe
     7. CTA         — centered final action

   All sections use a max-width of 1200px and consistent vertical rhythm. */


/* ── Root scope ──────────────────────────────────────────────────────────── */

.hist {
    color: var(--color-label-primary);
    background: var(--surface-primary);
}

/* Eyebrow — small uppercase label used in section heads */
.hist-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-brand-primary);
    margin: 0 0 12px;
}

.hist-eyebrow--inline {
    margin-bottom: 8px;
}

/* Section title — used across sections 3, 5, 6 */
.hist-section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-label-primary);
    margin: 0;
}

.hist-section-head {
    text-align: center;
    margin-bottom: 48px;
}


/* ──────────────────────────────────────────────────────────────────────────
   Reveal animations
   ────────────────────────────────────────────────────────────────────────── */

[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ══════════════════════════════════════════════════════════════════════════
   1. HERO + PARALLAX
   ══════════════════════════════════════════════════════════════════════════

   The parallax effect is driven by history.js, which writes inline
   `transform: translate3d(0, Ypx, 0) scale(s)` to .hist-hero-bg on scroll.

   Why 20% headroom on top AND bottom (`inset: -20% 0 -20% 0`)?
     With a parallax factor of 0.35 and a hero height of ~700px, max scroll
     translation is ~245px before the hero scrolls fully off-screen. We
     also scale the bg up to 1.06×. The 20% (≈140px) headroom each way
     guarantees the bg never exposes a gap at the top edge or pulls in
     from the sides at any scroll position.
   ══════════════════════════════════════════════════════════════════════════ */

.hist-hero {
    position: relative;
    width: 100%;
    height: clamp(520px, 75vh, 720px);
    overflow: hidden;
    background: var(--color-label-primary);
}

.hist-hero-bg {
    position: absolute;
    /* Headroom on top AND bottom so parallax + scale never expose gaps.
       The bg is 140% of the hero height, centered. */
    inset: -20% 0 -20% 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Explicit transform-origin so the scale animation grows from the
       middle of the image, not a corner. */
    transform-origin: center;
    /* GPU layer hint — tells the browser this element will animate via
       transform, so it pre-creates a compositor layer and scrolls smoothly. */
    will-change: transform;
}

.hist-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(15, 25, 35, 0.65) 0%,
            rgba(15, 25, 35, 0.35) 60%,
            rgba(15, 25, 35, 0.15) 100%);
}

.hist-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;

    /* Initial state (animates in on load via .is-loaded) */
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s,
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.hist-hero-content.is-loaded {
    opacity: 1;
    transform: translateY(0);
}

.hist-hero .hist-eyebrow {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 20px;
}

.hist-hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0 0 24px;
    max-width: 800px;
}

.hist-hero-title-em {
    color: rgba(255, 255, 255, 0.78);
    font-style: italic;
    font-weight: 500;
}

.hist-hero-sub {
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    max-width: 540px;
    margin: 0;
}

.hist-hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hist-hero-scroll-line {
    display: block;
    width: 1px;
    height: 56px;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.6) 0%,
            rgba(255, 255, 255, 0) 100%);
    animation: hist-scroll-cue 2.4s ease-in-out infinite;
    transform-origin: top;
}

@keyframes hist-scroll-cue {

    0%,
    100% {
        transform: scaleY(0.4);
        opacity: 0.4;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}


/* ══════════════════════════════════════════════════════════════════════════
   2. INTRO
   ══════════════════════════════════════════════════════════════════════════ */

.hist-intro {
    padding: clamp(64px, 10vw, 120px) 32px;
}

.hist-intro-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.hist-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-brand-primary);
    background: var(--color-brand-primary-subtle);
    padding: 7px 14px;
    border-radius: 999px;
    margin-bottom: 28px;
}

.hist-intro-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-label-primary);
    margin: 0 0 32px;
}

.hist-intro-body {
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.7;
    color: var(--color-label-secondary);
    margin: 0 0 16px;
}

.hist-intro-body:last-child {
    margin-bottom: 0;
}


/* ══════════════════════════════════════════════════════════════════════════
   2b. STORY — origin & timeline anchor
   ══════════════════════════════════════════════════════════════════════════
   Two-column layout: oversized year marker on the left, narrative on the
   right. We use a brand-colored left rule on the marker column to give a
   "timeline anchor" feel without adopting a full timeline UI — we only
   have two meaningful points (founding + today), so a timeline would be
   over-engineered. On <=1024px the rule flips to a top border so the
   marker reads as a header above the prose instead of a side column.
   ══════════════════════════════════════════════════════════════════════════ */

.hist-story {
    /* Slightly tighter top padding than other sections — this comes
       directly after the intro and we want them to feel like a continuous
       editorial spread, not two unrelated cards. */
    padding: clamp(48px, 8vw, 88px) 32px clamp(64px, 10vw, 100px);
    max-width: 1200px;
    margin: 0 auto;
}

.hist-story-head {
    text-align: center;
    margin-bottom: clamp(40px, 6vw, 64px);
}

.hist-story-grid {
    display: grid;
    /* Marker column is fluid between 220–320px so the giant "1986" never
       gets cramped on tablets but doesn't waste space on huge displays. */
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: clamp(40px, 6vw, 72px);
    align-items: start;
}

/* ── Year marker (left column) ──────────────────────────────────────── */

.hist-story-marker {
    position: relative;
    padding: 28px 0 28px 28px;
    /* Vertical brand-colored rule. Acts as the visual "anchor" of the
       section — the eye lands here first because of the big 1986. */
    border-left: 3px solid var(--color-brand-primary);
}

.hist-story-marker-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-brand-primary);
    margin-bottom: 10px;
}

.hist-story-marker-year {
    display: block;
    font-family: var(--font-display);
    /* Big editorial display — this is the hero element of the section.
       Capped at 120px so it doesn't blow out on ultra-wide screens. */
    font-size: clamp(64px, 11vw, 120px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: var(--color-label-primary);
    /* tabular-nums keeps digit widths uniform — matters on the off-chance
       we ever localize this number or use a font with non-tabular figures. */
    font-variant-numeric: tabular-nums;
}

.hist-story-marker-rule {
    display: block;
    width: 48px;
    height: 2px;
    background: var(--color-brand-primary);
    margin: 26px 0 18px;
    border-radius: 2px;
}

.hist-story-marker-foot {
    display: block;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: 0.02em;
    color: var(--color-label-secondary);
}

/* ── Story text (right column) ──────────────────────────────────────── */

.hist-story-text {
    /* Cap line length for readability — body text past ~70ch hurts the eye.
       640px ≈ ~70ch at our base font size. */
    max-width: 640px;
}

.hist-story-lead {
    font-family: var(--font-display);
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--color-label-primary);
    margin: 0 0 24px;
}

.hist-story-body {
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.7;
    color: var(--color-label-secondary);
    margin: 0 0 18px;
}

.hist-story-body:last-child {
    margin-bottom: 0;
}


/* ══════════════════════════════════════════════════════════════════════════
   3. THREE PILLARS
   ══════════════════════════════════════════════════════════════════════════ */

.hist-pillars {
    padding: clamp(64px, 10vw, 100px) 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.hist-pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.hist-pillar {
    position: relative;
    padding: 40px 32px;
    background: var(--surface-secondary);
    border: 1px solid var(--separator-default);
    border-radius: 20px;
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.3s ease-out;
}

.hist-pillar:hover {
    transform: translateY(-4px);
    border-color: var(--color-brand-primary-subtle);
    box-shadow: 0 16px 36px rgba(15, 25, 35, 0.08);
}

.hist-pillar-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--color-brand-primary-subtle);
    color: var(--color-brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: background 0.3s ease-out;
}

.hist-pillar:hover .hist-pillar-icon {
    background: var(--color-brand-primary);
    color: #fff;
}

.hist-pillar-icon svg {
    width: 32px;
    height: 32px;
}

.hist-pillar-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--color-label-primary);
    margin: 0 0 12px;
}

.hist-pillar-body {
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--color-label-secondary);
    margin: 0;
}


/* ══════════════════════════════════════════════════════════════════════════
   4. STATS — warehouse bg + animated counters
   ══════════════════════════════════════════════════════════════════════════ */

.hist-stats {
    position: relative;
    padding: clamp(80px, 12vw, 140px) 32px;
    overflow: hidden;
    background: var(--color-label-primary);
}

.hist-stats-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
}

.hist-stats-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(15, 25, 35, 0.85) 0%,
            rgba(15, 25, 35, 0.75) 50%,
            rgba(15, 25, 35, 0.85) 100%);
}

.hist-stats-inner {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
}

.hist-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: center;
    color: #fff;
}

.hist-stat {
    padding: 0 16px;
}

.hist-stat-num {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #fff;
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    /* tabular-nums prevents the counter from jiggling as digits change width */
    font-variant-numeric: tabular-nums;
}

.hist-stat-prefix,
.hist-stat-suffix {
    font-size: 0.5em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.hist-stat-label {
    font-size: clamp(13px, 1.3vw, 15px);
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.78);
    margin-top: 12px;
}


/* ══════════════════════════════════════════════════════════════════════════
   5. VALUES
   ══════════════════════════════════════════════════════════════════════════ */

.hist-values {
    padding: clamp(64px, 10vw, 100px) 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.hist-values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.hist-value {
    text-align: center;
    padding: 32px 24px;
    transition: transform 0.3s ease-out;
}

.hist-value:hover {
    transform: translateY(-3px);
}

.hist-value-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 18px;
    color: var(--color-brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hist-value-icon svg {
    width: 32px;
    height: 32px;
}

.hist-value-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--color-label-primary);
    margin: 0 0 10px;
    letter-spacing: -0.005em;
}

.hist-value-body {
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-label-secondary);
    margin: 0;
}


/* ══════════════════════════════════════════════════════════════════════════
   6. LOCATION + MAP
   ══════════════════════════════════════════════════════════════════════════ */

.hist-location {
    padding: clamp(64px, 10vw, 100px) 32px;
    background: var(--surface-secondary);
}

.hist-location-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
    align-items: stretch;
}

.hist-location-info {
    padding: 8px 0;
}

.hist-location .hist-section-title {
    margin-bottom: 20px;
}

.hist-location-intro {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-label-secondary);
    margin: 0 0 32px;
}

.hist-location-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hist-location-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.hist-location-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--color-brand-primary-subtle);
    color: var(--color-brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hist-location-icon svg {
    width: 20px;
    height: 20px;
}

.hist-location-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-label-tertiary);
    margin-bottom: 4px;
}

.hist-location-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-label-primary);
    text-decoration: none;
    font-style: normal;
    line-height: 1.4;
    transition: color 0.2s ease-out;
}

a.hist-location-value:hover {
    color: var(--color-brand-primary);
}

.hist-location-map {
    border-radius: 20px;
    overflow: hidden;
    background: var(--surface-primary);
    border: 1px solid var(--separator-default);
    min-height: 420px;
    box-shadow: 0 8px 24px rgba(15, 25, 35, 0.06);
}

.hist-location-map iframe {
    display: block;
    height: 100%;
    min-height: 420px;
}


/* ══════════════════════════════════════════════════════════════════════════
   7. CTA
   ══════════════════════════════════════════════════════════════════════════ */

.hist-cta {
    padding: clamp(64px, 10vw, 120px) 32px;
}

.hist-cta-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.hist-cta-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-label-primary);
    margin: 0 0 20px;
}

.hist-cta-sub {
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.6;
    color: var(--color-label-secondary);
    margin: 0 0 36px;
}

.hist-cta-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.hist-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    border-radius: 999px;
    text-decoration: none;
    border: 1.5px solid;
    transition:
        background 0.25s ease-out,
        color 0.25s ease-out,
        transform 0.25s ease-out,
        box-shadow 0.25s ease-out;
}

.hist-btn--primary {
    background: var(--color-brand-primary);
    border-color: var(--color-brand-primary);
    color: #fff;
    box-shadow: 0 6px 20px rgba(42, 68, 90, 0.25);
}

.hist-btn--primary:hover {
    background: rgba(42, 68, 90, 0.92);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(42, 68, 90, 0.35);
}

.hist-btn--ghost {
    background: transparent;
    border-color: var(--separator-default);
    color: var(--color-label-primary);
}

.hist-btn--ghost:hover {
    border-color: var(--color-brand-primary);
    color: var(--color-brand-primary);
    background: var(--color-brand-primary-subtle);
}


/* ══════════════════════════════════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .hist-pillars-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 560px;
        margin: 0 auto;
    }

    .hist-values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hist-location-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hist-stats-grid {
        gap: 24px;
    }

    /* Story section — stack marker above text. The vertical brand rule
       flips to a top rule so the marker still reads as "anchored" rather
       than floating, just horizontally now instead of vertically. */
    .hist-story-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hist-story-marker {
        border-left: none;
        border-top: 3px solid var(--color-brand-primary);
        padding: 24px 0 0;
    }

    .hist-story-marker-year {
        font-size: clamp(56px, 14vw, 96px);
    }
}

@media (max-width: 600px) {
    .hist-hero {
        height: clamp(440px, 70vh, 600px);
    }

    .hist-hero-content {
        padding: 0 24px;
    }

    .hist-stats-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hist-values-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin: 0 auto;
    }

    .hist-cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

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


/* ══════════════════════════════════════════════════════════════════════════
   Reduced motion
   ══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {

    [data-reveal],
    .hist-hero-content,
    .hist-pillar,
    .hist-value,
    .hist-btn,
    .hist-pillar-icon {
        transition: opacity 0.2s ease-out !important;
        transform: none !important;
        animation: none !important;
    }

    [data-reveal] {
        opacity: 1;
    }

    .hist-hero-scroll-line {
        animation: none !important;
        opacity: 0.5;
    }

    /* Parallax bg stays still — history.js bails out early when this query
       matches and never writes a transform. The bg simply renders at its
       default centered position. */
    .hist-hero-bg {
        transform: none !important;
    }
}