/* ==========================================================================
   HEATLINE INDUSTRIES
   Design system + global styles
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */
:root {
    /* Canvas */
    --paper:        #FFFFFF;
    --paper-warm:   #F7F6F4;
    --paper-cool:   #F2F3F5;
    --paper-deep:   #EAEAEC;

    /* Ink */
    --ink:          #0A0A0B;
    --ink-soft:     #1C1C1F;
    --ink-mute:     #6B6B72;
    --ink-faint:    #A2A2AA;
    --hairline:     #E2E2E5;

    /* Heatline red */
    --red:          #D71920;
    --red-deep:     #A5121A;
    --red-glow:     rgba(215, 25, 32, 0.14);
    --red-line:     rgba(215, 25, 32, 0.32);

    /* Metal accents for macro imagery */
    --steel:        #8E949C;
    --copper:       #B87333;

    /* Type */
    --font-display: 'Inter Display', 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    /* Rhythm */
    --gutter:       clamp(1.25rem, 4.5vw, 5rem);
    --maxw:         88rem;
    --nav-h:        7rem;

    /* Motion */
    --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* NOTE: overflow-x must NOT be set on <html> — it silently breaks
       position: sticky (the pinned scroll sections) in several browsers.
       Horizontal bleed is contained on .hero / .film / .cta instead. */
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    font-feature-settings: 'kern' 1, 'liga' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Clips the decorative sweeps without disabling sticky on <html>. */
    overflow-x: clip;
}

/* Scroll lock while the drawer is open — must stay `hidden`, since `clip`
   would not stop the page scrolling behind the overlay. */
body.is-locked { overflow: hidden; }

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

/* Inline icons never balloon to their intrinsic size before their own rule
   applies (or if a stylesheet fails to load). */
svg:not([width]):not([height]) { width: 1em; height: 1em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin: 0;
    text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

::selection { background: var(--red); color: #fff; }

/* --- Layout helpers ----------------------------------------------------- */
.shell {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.shell--wide { max-width: 104rem; }

.section { position: relative; padding-block: clamp(5rem, 12vh, 10rem); }
.section--tight { padding-block: clamp(3.5rem, 8vh, 6rem); }
.section--warm { background: var(--paper-warm); }
.section--cool { background: var(--paper-cool); }

.section--dark {
    background: var(--ink);
    color: var(--paper);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--paper); }

/* --- Typography scale --------------------------------------------------- */
.t-mega {
    font-size: clamp(2.75rem, 11vw, 10.5rem);
    letter-spacing: -0.045em;
}

.t-h1 { font-size: clamp(2.25rem, 6.5vw, 5.25rem); }
.t-h2 { font-size: clamp(1.85rem, 4.6vw, 3.75rem); }
.t-h3 { font-size: clamp(1.35rem, 2.6vw, 2.1rem); }

.t-lead {
    font-size: clamp(1.05rem, 1.55vw, 1.375rem);
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 46ch;
}

.t-body { color: var(--ink-mute); max-width: 60ch; }

/* Eyebrow / technical label */
/* Section label. Body face in sentence case — the old 0.7rem uppercase mono
   at 0.24em tracking was hard to read at a glance. The red rule before it
   still marks it as a label. */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--ink-soft);
}

.eyebrow::before {
    content: '';
    width: 2.25rem;
    height: 1px;
    background: var(--red);
    flex: none;
}

.eyebrow--plain::before { display: none; }
.eyebrow--light { color: rgba(255, 255, 255, 0.55); }

.red { color: var(--red); }
.mono { font-family: var(--font-mono); }

/* --- Buttons ------------------------------------------------------------ */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.85rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-transform: none;
    border-radius: 999px;
    overflow: clip;
    isolation: isolate;
    transition: color .45s var(--ease-out), border-color .45s var(--ease-out);
}

.btn__label { position: relative; z-index: 2; }

.btn svg { position: relative; z-index: 2; width: 1rem; height: 1rem; transition: transform .45s var(--ease-out); }
.btn:hover svg { transform: translateX(0.3rem); }

/* Fill sweep */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .55s var(--ease-out);
}
.btn:hover::after { transform: scaleX(1); }

.btn--solid { background: var(--red); color: #fff; }
.btn--solid::after { background: var(--ink); }

.btn--line { border: 1px solid var(--hairline); color: var(--ink); }
.btn--line::after { background: var(--red); }
.btn--line:hover { color: #fff; border-color: var(--red); }

.btn--ghost { border: 1px solid rgba(255,255,255,.25); color: #fff; }
.btn--ghost::after { background: var(--red); }
.btn--ghost:hover { border-color: var(--red); }

/* --- Technical red motion lines ----------------------------------------- */
.tech-line {
    position: absolute;
    background: var(--red);
    transform-origin: left center;
    pointer-events: none;
}

.tech-line--h { height: 1px; width: 100%; left: 0; }
.tech-line--v { width: 1px; height: 100%; top: 0; }

/* The blueprint backdrop now lives in cinematic.css as .bp — a two-tier
   grid with a heat bloom, replacing the single-tier .grid-field. */

/* --- Navigation --------------------------------------------------------- */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 200;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    transition: background .5s var(--ease-out), box-shadow .5s var(--ease-out), height .5s var(--ease-out);
}

.nav::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    opacity: 0;
    transition: opacity .5s var(--ease-out);
}

.nav.is-stuck { height: 5.5rem; box-shadow: 0 1px 0 var(--hairline); }
.nav.is-stuck::before { opacity: 1; }

.nav.is-hidden { transform: translateY(-100%); transition: transform .5s var(--ease-out); }

.nav__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav__logo { display: flex; align-items: center; gap: 0.85rem; flex: none; }
.nav__logo img { height: 4.9rem; width: auto; transition: height .5s var(--ease-out); }
.nav.is-stuck .nav__logo img { height: 3.75rem; }

.nav__menu {
    display: flex;
    align-items: center;
    gap: clamp(1.1rem, 2.2vw, 2.4rem);
}

.nav__link {
    position: relative;
    font-family: var(--font-body);
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--ink-soft);
    padding-block: 0.4rem;
    transition: color .35s var(--ease-out);
}

.nav__link::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform .45s var(--ease-out);
}

.nav__link:hover { color: var(--red); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); transform-origin: left center; }
.nav__link.is-active { color: var(--red); }

/* --- Products dropdown -------------------------------------------------- */
.nav__has-sub { position: relative; }

.nav__has-sub > .nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav__caret {
    width: 0.55rem;
    height: 0.4rem;
    transition: transform .35s var(--ease-out);
}

.nav__has-sub:hover .nav__caret,
.nav__has-sub:focus-within .nav__caret { transform: rotate(180deg); }

.submenu {
    position: absolute;
    top: calc(100% + 1.15rem);
    left: 50%;
    z-index: 20;
    width: 21rem;
    padding: 1rem;
    background: var(--paper);
    border: 1px solid var(--hairline);
    box-shadow: 0 1.75rem 3.5rem -1rem rgba(10, 10, 11, .22);
    transform: translate(-50%, -0.6rem);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}

/* Invisible bridge so the pointer can travel from link to panel. */
.submenu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -1.15rem;
    height: 1.15rem;
}

.nav__has-sub:hover .submenu,
.nav__has-sub:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.submenu__label {
    display: block;
    padding: 0 0.65rem 0.6rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--ink-faint);
}

.submenu__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.65rem;
    border-radius: 2px;
    transition: background .3s var(--ease-out);
}

.submenu__item:hover { background: var(--paper-warm); }

.submenu__no {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    color: var(--red);
    flex: none;
}

.submenu__body { display: grid; gap: 0.1rem; flex: 1; }

.submenu__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--ink);
    transition: color .3s var(--ease-out);
}

.submenu__item:hover .submenu__name { color: var(--red); }

.submenu__sub {
    font-family: var(--font-body);
    font-size: 0.82rem;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--ink-faint);
}

.submenu__go {
    width: 0.8rem;
    height: 0.8rem;
    flex: none;
    color: var(--ink-faint);
    opacity: 0;
    transform: translate(-3px, 3px);
    transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), color .3s var(--ease-out);
}

.submenu__item:hover .submenu__go {
    opacity: 1;
    transform: none;
    color: var(--red);
}

.submenu__all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding: 0.75rem 0.65rem 0.15rem;
    border-top: 1px solid var(--hairline);
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--ink-soft);
    transition: color .3s var(--ease-out);
}

.submenu__all svg { width: 0.9rem; height: 0.9rem; transition: transform .35s var(--ease-out); }
.submenu__all:hover { color: var(--red); }
.submenu__all:hover svg { transform: translateX(0.25rem); }

.nav__cta { display: flex; align-items: center; gap: 1rem; flex: none; }
.nav__cta .btn { padding: 0.75rem 1.35rem; }

/* Mobile menu button */
.nav__burger {
    display: none;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    flex: none;
}

.nav__burger span {
    display: block;
    width: 1.05rem;
    height: 1.5px;
    background: var(--ink);
    transition: transform .4s var(--ease-out), opacity .3s var(--ease-out);
}
.nav__burger span + span { margin-top: 4px; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Mobile drawer */
.drawer {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: var(--paper);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-h) + 1rem) var(--gutter) 2.5rem;
    clip-path: inset(0 0 100% 0);
    transition: clip-path .8s var(--ease-out);
    pointer-events: none;
    /* Component chips can push the panel past the viewport on short phones. */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.drawer.is-open { clip-path: inset(0 0 0 0); pointer-events: auto; }

.drawer__list { display: flex; flex-direction: column; gap: 0.25rem; }

.drawer__item { overflow: clip; }

.drawer__link {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding-block: 0.5rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 9vw, 3.25rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
    transform: translateY(110%);
    transition: transform .7s var(--ease-out), color .3s var(--ease-out);
}

.drawer.is-open .drawer__link { transform: translateY(0); }
.drawer__link:hover { color: var(--red); }

.drawer__num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--red);
}

/* Component shortcuts in the mobile drawer */
.drawer__components {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hairline);
}

.drawer__components-label {
    display: block;
    margin-bottom: 0.85rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--ink-faint);
}

.drawer__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.drawer__chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--hairline);
    border-radius: 2px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: -0.015em;
    color: var(--ink);
    transition: border-color .3s var(--ease-out), color .3s var(--ease-out);
}

.drawer__chip:hover,
.drawer__chip:focus-visible { border-color: var(--red); color: var(--red); }

.drawer__chip-no {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    color: var(--red);
}

.drawer__foot {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hairline);
    display: grid;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--ink-mute);
}

/* --- Scroll progress ---------------------------------------------------- */
.progress {
    position: fixed;
    top: 0; left: 0;
    z-index: 210;
    height: 2px;
    width: 100%;
    transform-origin: left center;
    transform: scaleX(0);
    background: linear-gradient(90deg, var(--red), var(--red-deep));
}

/* --- Footer ------------------------------------------------------------- */
.footer {
    position: relative;
    background: var(--paper);
    color: var(--ink-mute);
    padding-block: clamp(4rem, 9vh, 7rem) 2.5rem;
    border-top: 1px solid var(--hairline);
    overflow: clip;
}

.footer__grid {
    /* The Works column is widest so each address line stays unwrapped. */
    display: grid;
    grid-template-columns: 1.1fr 0.8fr 0.9fr 1.7fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    position: relative;
    z-index: 2;
}

/* Address lines are explicit <br> breaks — never let them wrap again. */
.footer address { text-wrap: nowrap; }

@media (max-width: 1280px) {
    .footer address { text-wrap: wrap; }
}

.footer__logo {
    height: 6.25rem;
    width: auto;
    display: block;
    margin: 0 auto 1.5rem;
}

/* Brand column reads as a centred lock-up under the logo. */
.footer__brand { text-align: center; }
.footer__brand p { margin-inline: auto; }

.footer h4 {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--ink-faint);
    margin-bottom: 1.35rem;
}

.footer__links { display: grid; gap: 0.7rem; }

.footer__links a {
    position: relative;
    display: inline-block;
    color: var(--ink-soft);
    font-size: 0.92rem;
    transition: color .3s var(--ease-out), transform .3s var(--ease-out);
}
.footer__links a:hover { color: var(--red); transform: translateX(4px); }

.footer address { font-style: normal; font-size: 0.92rem; line-height: 1.75; }

.footer__contact a { color: var(--ink); }
.footer__contact a:hover { color: var(--red); }

.footer__base {
    position: relative;
    z-index: 2;
    margin-top: clamp(3rem, 6vh, 5rem);
    padding-top: 1.75rem;
    border-top: 1px solid var(--hairline);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--ink-faint);
}

/* Copyright + credit line. Set in the body face at a readable size rather
   than the uppercase mono used by the other two base items. */
.footer__legal {
    font-family: var(--font-body);
    font-size: 0.82rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink-mute);
}

.footer__sep {
    display: inline-block;
    margin-inline: 0.45rem;
    color: var(--hairline);
}

.footer__legal a,
.footer__credit { color: var(--ink-soft); font-weight: 500; }

.footer__legal a {
    transition: color .35s var(--ease-out);
    border-bottom: 1px solid transparent;
}

.footer__legal a:hover { color: var(--red); border-bottom-color: var(--red); }

/* Oversized watermark word in footer */
.footer__mark {
    position: absolute;
    left: 50%;
    bottom: -3.5vw;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 19vw;
    line-height: 0.8;
    letter-spacing: -0.05em;
    color: rgba(10, 10, 11, 0.04);
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
}

/* --- Reveal primitives (driven by JS) -----------------------------------
   All initial hidden states are scoped to .js. Without JavaScript the page
   renders fully visible instead of staying blank. */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(2rem);
    transition: opacity .95s var(--ease-out), transform .95s var(--ease-out);
    transition-delay: var(--d, 0ms);
    /* Same failsafe as .mask-img: never let a missed reveal hide content for
       good. See the note on .js .mask-img. */
    animation: reveal-failsafe 0s linear 5s forwards;
}
.js [data-reveal].is-in { opacity: 1; transform: none; animation: none; }

@keyframes reveal-failsafe {
    to { opacity: 1; transform: none; }
}

.js [data-reveal='fade'] { transform: none; }

.js [data-reveal='clip'] {
    opacity: 1;
    clip-path: inset(0 0 100% 0);
    transform: none;
    transition: clip-path 1.1s var(--ease-out);
    transition-delay: var(--d, 0ms);
    /* This variant hides via clip-path, so it needs the clip failsafe rather
       than the opacity one inherited from [data-reveal]. */
    animation: mask-failsafe 0s linear 5s forwards;
}
.js [data-reveal='clip'].is-in { clip-path: inset(0 0 0 0); animation: none; }

/* Masked line-by-line heading reveal.
   Padding + negative margin give descenders (y, Q) room inside the mask so
   glyphs are never clipped, while the mask itself stays visually tight. */
.reveal-lines { display: block; }
.reveal-lines .line {
    display: block;
    overflow: clip;
    padding-bottom: 0.14em;
    margin-bottom: -0.14em;
}
.reveal-lines .line > span { display: block; }

.js .reveal-lines .line > span {
    transform: translateY(105%);
    transition: transform 1.05s var(--ease-out);
    transition-delay: var(--d, 0ms);
}
.js .reveal-lines.is-in .line > span { transform: translateY(0); }

/* Word-level kinetic reveal */
.kinetic .word {
    display: inline-block;
    overflow: clip;
    vertical-align: top;
    padding-bottom: 0.14em;
    margin-bottom: -0.14em;
}
.kinetic .word > span { display: inline-block; }

.js .kinetic .word > span {
    transform: translateY(105%);
    transition: transform .9s var(--ease-out);
    transition-delay: var(--d, 0ms);
}
.js .kinetic.is-in .word > span { transform: translateY(0); }

/* Image mask reveal */
.mask-img {
    position: relative;
    /* clip, not hidden — `hidden` creates a scroll container, which makes
       Chrome paint ::scroll-button() arrows over the image. */
    overflow: clip;
}

.js .mask-img {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 1.2s var(--ease-out);
    transition-delay: var(--d, 0ms);
    /* Failsafe: if the reveal never fires — script error, observer missed the
       element, slow image decode — this uncovers the box on its own. Without
       it a missed reveal leaves the image permanently invisible, which is why
       the page used to need a reload before anything showed. */
    animation: mask-failsafe 0s linear 5s forwards;
}
.js .mask-img.is-in {
    clip-path: inset(0 0 0 0);
    animation: none;
}

@keyframes mask-failsafe {
    to { clip-path: inset(0 0 0 0); }
}

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

/* Product photographs must never be cropped — the component itself would be
   cut off at the tile edge. These sit on a neutral field instead. The hero
   plate is deliberately excluded: it is an art-directed macro shot where a
   full-bleed crop is the intent. */
.split__media.mask-img img,
.pviewer__main.mask-img img {
    object-fit: cover;
}

/* No tinted frame behind the photographs — the source images already carry
   their own white background, so a grey field just reads as a stray box. */
.split__media.mask-img,
.pviewer__main.mask-img { background: transparent; }

.js .mask-img img {
    transform: scale(1.18);
    transition: transform 1.6s var(--ease-out);
    transition-delay: var(--d, 0ms);
}
.js .mask-img.is-in img { transform: scale(1); }

/* The zoom-in reveal would still crop a contained image mid-transition. */
.js .split__media.mask-img img,
.js .pviewer__main.mask-img img { transform: scale(1.04); }

.js .split__media.mask-img.is-in img,
.js .pviewer__main.mask-img.is-in img { transform: scale(1); }

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

.skip-link {
    position: absolute;
    top: 0; left: 50%;
    transform: translate(-50%, -120%);
    z-index: 400;
    background: var(--ink);
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    text-transform: none;
    transition: transform .3s var(--ease-out);
}
.skip-link:focus { transform: translate(-50%, 0); }

:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 3px;
}

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1080px) {
    .footer__grid { grid-template-columns: 1fr 1fr; row-gap: 3rem; }
}

@media (max-width: 900px) {
    :root { --nav-h: 5.6rem; }
    /* The whole primary menu — dropdown included — is replaced by the drawer. */
    .nav__menu,
    .nav__has-sub,
    .submenu { display: none; }
    .nav__cta .btn { display: none; }
    .nav__burger { display: flex; flex-direction: column; }
    .nav__logo img { height: 3.75rem; }
    .nav.is-stuck { height: 4.75rem; }
    .nav.is-stuck .nav__logo img { height: 3rem; }
}

@media (max-width: 620px) {
    .footer__grid { grid-template-columns: 1fr; }
    .footer__base { flex-direction: column; align-items: flex-start; }
}

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

    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    [data-reveal],
    .reveal-lines .line > span,
    .kinetic .word > span { opacity: 1 !important; transform: none !important; }

    [data-reveal='clip'], .mask-img { clip-path: none !important; }
    .mask-img img { transform: none !important; }
}
