/* ══════════════════════════════════════════════════════════════════
   INDIE CHEM CO — cinematic industrial dark theme
   Palette + typography per brand moodboard.
   ══════════════════════════════════════════════════════════════════ */

:root {
  /* Brand palette */
  --orange:    #c85603;
  --navy:      #162230;
  --cream:     #f7f1eb;
  --steel:     #686868;
  --blueprint: #243060;

  /* Derived tints */
  --bg:            #0e161f;   /* near-black navy base */
  --navy-2:        #131e2b;
  --navy-3:        #1b2a3b;
  --orange-bright: #ee6e12;
  --orange-glow:   rgba(200, 86, 3, 0.35);
  --bp-line:       #4a68b0;   /* blueprint linework */
  --bp-line-dim:   rgba(74, 104, 176, 0.35);
  --cream-dim:     rgba(247, 241, 235, 0.72);
  --hairline:      rgba(247, 241, 235, 0.10);

  /* Type */
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-cond:    "din-condensed", "DIN Condensed", "Oswald", "Arial Narrow", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;

  --nav-h: 76px;
  --gutter: clamp(20px, 5vw, 80px);

  /* ── Hero headline sizing ──
     The headline is sized from the ACTUAL content width so the longest
     line always fits, phone through desktop — no magic breakpoints.

     --hero-line-ratio: width of the longest line ("FIELD TESTED.") as a
       multiple of the font size, measured in Cinzel 800 with this
       letter-spacing. Re-measure if the headline copy or font changes.
     --hero-fill: fraction of the content width that longest line should
       span. THIS IS THE KNOB — raise toward 1 for a tighter, bigger
       headline, lower for more breathing room. Useful range ~0.80–0.95;
       0.92 keeps the punchy desktop proportions from the moodboard.
     --hero-max-w: caps the hero text column. Shared by .hero__content and
       the font formula so the fill ratio holds on ultra-wide screens too. */
  --hero-line-ratio: 7.5;
  --hero-fill: 0.92;
  --hero-max-w: 1200px;
  --hero-content: min(calc(100vw - 2 * var(--gutter)), var(--hero-max-w));
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; } /* Lenis owns scrolling; CSS fallback set in JS-off case below */
html.no-js { scroll-behavior: smooth; }

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

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--orange); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--orange-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ══════════════ FILM GRAIN ══════════════
   Tiled SVG turbulence in a fixed layer — cheap, no JS. */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, 1.5%); }
  50%  { transform: translate(1.5%, -2%); }
  75%  { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

/* ══════════════ CUSTOM CURSOR ══════════════ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(247, 241, 235, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9500;
  opacity: 0;
  transition: width .25s, height .25s, margin .25s, border-color .25s, opacity .3s;
}
.cursor.is-active {
  width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-color: var(--orange-bright);
}
body.has-cursor a, body.has-cursor button { cursor: none; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ══════════════ TYPE PRIMITIVES ══════════════ */
.eyebrow {
  font-family: var(--font-cond);
  font-weight: 500;
  font-size: clamp(12px, 1.1vw, 14px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--orange-bright);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 34px; height: 1px;
  background: var(--orange);
  vertical-align: middle;
  margin-right: 14px;
}
.eyebrow--center { text-align: center; }
.eyebrow--center::before { display: none; }

.headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.2vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--cream);
}
.headline--center { text-align: center; margin-inline: auto; max-width: 20ch; }
.headline--mega { font-size: clamp(38px, 7vw, 104px); }

.body    { color: var(--cream-dim); max-width: 56ch; }
.body-lg { color: var(--cream-dim); font-size: clamp(17px, 1.5vw, 20px); max-width: 58ch; }

/* Split-text units (JS wraps words) */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; }
.split .w > span { display: inline-block; will-change: transform; }

/* ══════════════ BADGE / DIVIDER ══════════════ */
.badge {
  display: inline-block;
  margin-top: 34px;
  padding: 12px 26px;
  border: 1px solid rgba(247, 241, 235, 0.35);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px rgba(247, 241, 235, 0.14);
  font-family: var(--font-cond);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cream);
}
.badge--sm { margin-top: 0; padding: 8px 16px; letter-spacing: 0.2em; }
.badge__dot { color: var(--orange-bright); margin: 0 6px; }

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
}
.divider__line { flex: 1; height: 1px; background: var(--hairline); }
.divider__label {
  font-family: var(--font-cond);
  font-size: 12px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--steel);
}
.divider__diamond {
  width: 7px; height: 7px;
  background: var(--orange);
  transform: rotate(45deg);
  flex: 0 0 auto;
}
.divider--section { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); }

/* ══════════════ BUTTONS ══════════════ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 30px;
  font-family: var(--font-cond);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: background-color .3s, border-color .3s, box-shadow .3s, color .3s;
  white-space: nowrap;
}
.btn__arrow { transition: transform .3s cubic-bezier(.22,1,.36,1); }
.btn:hover .btn__arrow, .textlink:hover .btn__arrow { transform: translateX(6px); }

.btn--solid {
  background: var(--orange);
  color: var(--cream);
}
.btn--solid:hover {
  background: var(--orange-bright);
  box-shadow: 0 0 28px var(--orange-glow);
}

.btn--outline {
  border: 1px solid rgba(247, 241, 235, 0.4);
  color: var(--cream);
}
.btn--outline:hover {
  border-color: var(--orange-bright);
  box-shadow: 0 0 22px rgba(200, 86, 3, 0.25);
  color: #fff;
}

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-cond);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange-bright);
}
.textlink--sm { font-size: 12.5px; }

/* ══════════════ NAV ══════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  transition: background-color .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(22, 34, 48, 0.92);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(200, 86, 3, 0.55);
}
.nav__brand { display: flex; align-items: center; gap: 14px; margin-right: auto; }
.nav__mark { width: 44px; height: 44px; object-fit: contain; }
.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
}
.nav__links { display: flex; gap: 30px; }
.nav__links a {
  font-family: var(--font-cond);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-dim);
  padding: 6px 0;
  position: relative;
  transition: color .25s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--orange-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.nav__links a:hover { color: var(--cream); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__cta { padding: 11px 20px; font-size: 12.5px; }

/* Hamburger */
.nav__burger { display: none; flex-direction: column; gap: 5px; padding: 10px; }
.nav__burger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--cream);
  transition: transform .3s, opacity .3s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mmenu {
  position: fixed;
  inset: 0;
  z-index: 7500;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s, visibility .4s;
}
.mmenu.is-open { opacity: 1; visibility: visible; }
.mmenu__links { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.mmenu__links a {
  font-family: var(--font-display);
  font-size: clamp(26px, 7vw, 38px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mmenu__links a:hover { color: var(--orange-bright); }
.mmenu__est {
  font-family: var(--font-cond);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--steel);
}

/* ══════════════ CINEMATIC MEDIA (shared: hero / story / gallery tile) ══════════════ */
.cine { position: relative; }
/* z-index: 0 creates a stacking context so the layer order below stays
   internal to the media block and never rises above section content */
.cine__media { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.cine__video,
.cine__fallback, .cine__poster {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Layers: fallback (1) under video (2) under shade (3).
   The video is transparent until it can play, letting the animated
   fallback show through; once live it fades in and covers the fallback. */
.cine__fallback { overflow: hidden; z-index: 1; }
.cine__video { opacity: 0; transition: opacity 1.2s ease; z-index: 2; }
.cine__video.is-live { opacity: 1; }
.cine__shade { z-index: 3; }

/* Ken Burns drift on poster fallbacks */
.kenburns { animation: kenburns 26s ease-in-out infinite alternate; transform-origin: 50% 40%; }
@keyframes kenburns {
  from { transform: scale(1.02) translateY(0); }
  to   { transform: scale(1.14) translateY(-2%); }
}

/* Orange energy sweep across fallback blueprints */
.energy-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 30%,
    rgba(200, 86, 3, 0.18) 46%,
    rgba(238, 110, 18, 0.30) 50%,
    rgba(200, 86, 3, 0.18) 54%,
    transparent 70%);
  background-size: 260% 100%;
  mix-blend-mode: screen;
  animation: sweep 7s cubic-bezier(.6,.05,.35,1) infinite;
}
@keyframes sweep {
  0%   { background-position: 120% 0; }
  55%  { background-position: -60% 0; }
  100% { background-position: -60% 0; }
}

.cine__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14,22,31,.72) 0%, rgba(14,22,31,.30) 34%, rgba(14,22,31,.55) 72%, var(--bg) 100%),
    radial-gradient(120% 90% at 50% 110%, rgba(36,48,96,.35), transparent 60%);
}
.cine__shade--story {
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(14,22,31,.55) 18%, rgba(14,22,31,.62) 82%, var(--bg) 100%),
    linear-gradient(90deg, rgba(14,22,31,.72) 0%, rgba(14,22,31,.25) 60%);
}

/* ══════════════ HERO ══════════════ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--nav-h) + 40px) var(--gutter) 110px;
}
.hero__content { position: relative; max-width: var(--hero-max-w); }
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  /* Fluid: longest line spans --hero-fill of the available content width.
     Floor is a safety net for sub-280px viewports; ceiling is a backstop
     that only engages if --hero-max-w is raised well past 1200px. */
  font-size: clamp(
    28px,
    calc(var(--hero-content) / var(--hero-line-ratio) * var(--hero-fill)),
    158px
  );
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin-bottom: 30px;
  /* Last-resort guard: if copy is edited longer, shrink rather than spill */
  overflow-wrap: break-word;
}
.hline { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hline__inner { display: block; will-change: transform; }
.hline__inner--accent { color: var(--orange-bright); }

.hero__sub {
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--cream-dim);
  max-width: 52ch;
  margin-bottom: 38px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 48px; }
.hero__est { max-width: 380px; }

.scrollcue {
  position: absolute;
  right: var(--gutter);
  bottom: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.scrollcue__label {
  font-family: var(--font-cond);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--cream-dim);
  writing-mode: vertical-rl;
}
.scrollcue__line {
  width: 1px; height: 64px;
  background: linear-gradient(var(--orange-bright), transparent);
  animation: cue 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.4); opacity: .5; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* ══════════════ STATS ══════════════ */
.stats {
  position: relative;
  background:
    linear-gradient(rgba(36, 48, 96, 0.88), rgba(36, 48, 96, 0.92)),
    url("assets/refinery-tile.jpg") center/cover;
  border-top: 1px solid rgba(74, 104, 176, 0.4);
  border-bottom: 1px solid rgba(74, 104, 176, 0.4);
}
.stats__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1400px;
  margin: 0 auto;
  padding: 64px var(--gutter);
}
.stat {
  text-align: center;
  padding: 8px 18px;
}
.stat + .stat { border-left: 1px solid rgba(247, 241, 235, 0.12); }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 4.6vw, 68px);
  line-height: 1;
  color: var(--orange-bright);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-family: var(--font-cond);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

/* ══════════════ SECTION SHELL ══════════════ */
.section {
  position: relative;
  padding: clamp(90px, 11vw, 170px) var(--gutter);
  max-width: 1500px;
  margin: 0 auto;
}
.section__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 110px);
  align-items: start;
}
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: clamp(44px, 5vw, 72px);
  flex-wrap: wrap;
}
.body + .body, .body-lg + .body { margin-top: 20px; }

/* ══════════════ MISSION ══════════════ */
.mission { overflow: hidden; }
.mission__blueprint {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  color: var(--bp-line-dim);
  opacity: 0.5;
  pointer-events: none;
}
/* Stroke-draw paths: dash values set by JS (measured per-path) */
.bp-draw path, .bp-draw circle, .bp-draw ellipse { fill: none; }

/* ══════════════ CARDS (shared) ══════════════ */
.card {
  position: relative;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  border: 1px solid var(--hairline);
  transition: transform .45s cubic-bezier(.22,1,.36,1), box-shadow .45s, border-color .45s;
}
.card:hover {
  transform: translateY(-8px);
  border-color: rgba(200, 86, 3, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(200, 86, 3, 0.12);
}

/* Blueprint corner brackets */
.corners, .corners::before {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  transition: inset .4s cubic-bezier(.22,1,.36,1), opacity .4s;
}
.corners {
  background:
    linear-gradient(var(--bp-line), var(--bp-line)) top left    / 18px 1px,
    linear-gradient(var(--bp-line), var(--bp-line)) top left    / 1px 18px,
    linear-gradient(var(--bp-line), var(--bp-line)) bottom right / 18px 1px,
    linear-gradient(var(--bp-line), var(--bp-line)) bottom right / 1px 18px;
  background-repeat: no-repeat;
  opacity: .6;
}
.corners::before {
  content: "";
  inset: 0;
  background:
    linear-gradient(var(--bp-line), var(--bp-line)) top right   / 18px 1px,
    linear-gradient(var(--bp-line), var(--bp-line)) top right   / 1px 18px,
    linear-gradient(var(--bp-line), var(--bp-line)) bottom left / 18px 1px,
    linear-gradient(var(--bp-line), var(--bp-line)) bottom left / 1px 18px;
  background-repeat: no-repeat;
}
.card:hover .corners { inset: 6px; opacity: 1; }

/* ══════════════ PILLARS ══════════════ */
.pillars__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: clamp(48px, 5vw, 80px);
}
.pillar {
  padding: 46px 38px 42px;
  border-top: 2px solid var(--orange);
  display: flex;
  flex-direction: column;
}
.pillar__index {
  font-family: var(--font-cond);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--steel);
  margin-bottom: 26px;
}
.pillar__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.pillar__body { color: var(--cream-dim); font-size: 15.5px; margin-bottom: 28px; flex: 1; }

/* ══════════════ STORY (pinned scrub) ══════════════ */
.story {
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.story__content {
  position: relative;
  padding: 120px var(--gutter);
  max-width: 820px;
}
.story__kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(19px, 2vw, 26px);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--orange-bright);
  margin-top: 26px;
}
.story__content .body-lg { margin-top: 22px; }
.story__content .headline { margin-top: 6px; }

/* ══════════════ PRODUCTS ══════════════ */
.products__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.product { padding: 34px 28px 30px; }
.product__art {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
  color: var(--bp-line);
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(36, 48, 96, 0.5), transparent),
    repeating-linear-gradient(0deg, rgba(74,104,176,.08) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, rgba(74,104,176,.08) 0 1px, transparent 1px 24px);
  transition: color .35s;
}
.product:hover .product__art { color: var(--orange-bright); }
.product__art svg { height: 116px; }
.product__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.product__desc { font-size: 14.5px; color: var(--cream-dim); margin-bottom: 22px; min-height: 3.2em; }

/* ── Consultancy block ── */
.consult {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: center;
  margin-top: clamp(80px, 9vw, 140px);
  padding: clamp(36px, 4vw, 64px);
  background: linear-gradient(150deg, rgba(36,48,96,.42), rgba(22,34,48,.55));
  border: 1px solid rgba(74, 104, 176, 0.28);
}
.consult__svg { width: 100%; color: var(--bp-line); }
.consult__list {
  list-style: none;
  margin: 30px 0 36px;
}
.consult__list li {
  font-family: var(--font-cond);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--cream);
}
.consult__list li::before {
  content: "◈";
  color: var(--orange-bright);
  margin-right: 14px;
  font-size: 12px;
}

/* ══════════════ GALLERY ══════════════ */
/* Tank video spans the full width; the three blueprint stills sit in a
   row directly beneath it. Rows are sized by each tile's aspect-ratio
   rather than a fixed grid-auto-rows, so the layout scales cleanly. */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hairline);
  aspect-ratio: 3 / 2;
}
.tile--hero {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9; /* matches the clip's native frame — no crop */
}
.tile > img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.22,1,.36,1), filter .6s;
  filter: saturate(0.55) brightness(0.8);
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(36, 48, 96, 0.38);
  mix-blend-mode: multiply;
  transition: opacity .6s;
  pointer-events: none;
}
.tile:hover::after { opacity: 0; }
.tile:hover > img { transform: scale(1.05); filter: saturate(1) brightness(1); }
.tile__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 30px 18px 14px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--cream-dim);
  background: linear-gradient(transparent, rgba(14, 22, 31, 0.85));
}
.tile--hero .cine__media { position: absolute; inset: 0; }

/* ══════════════ CONTACT ══════════════ */
.contact { overflow: visible; }
.contact__glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 70%;
  background: radial-gradient(55% 60% at 50% 100%, rgba(200, 86, 3, 0.16), transparent 70%);
  pointer-events: none;
}
.contact__head { text-align: center; margin-bottom: clamp(50px, 6vw, 90px); }
.contact__head .headline { margin: 0 auto 22px; max-width: 16ch; }
.contact__head .body-lg { margin: 0 auto; }

.contact__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(36px, 5vw, 80px);
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

/* Form */
.form { padding: clamp(30px, 4vw, 54px); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--font-cond);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-bottom: 9px;
}
.field input, .field textarea {
  width: 100%;
  background: rgba(14, 22, 31, 0.6);
  border: 1px solid var(--hairline);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 15px;
  transition: border-color .3s, box-shadow .3s;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange), 0 0 18px rgba(200, 86, 3, 0.18);
}
.field input::placeholder, .field textarea::placeholder { color: var(--steel); }
.form__submit { width: 100%; justify-content: center; margin-top: 6px; }

/* Success state */
.form__success {
  display: none;
  text-align: center;
  padding: 40px 10px 20px;
}
.form.is-sent .form__success { display: block; }
.form.is-sent .form__row, .form.is-sent .field, .form.is-sent .form__submit { display: none; }
.form__success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  border: 1px solid var(--orange-bright);
  border-radius: 50%;
  color: var(--orange-bright);
  font-size: 26px;
  margin-bottom: 22px;
  box-shadow: 0 0 30px var(--orange-glow);
}
.form__success h3 {
  font-family: var(--font-display);
  font-size: 24px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.form__success p { color: var(--cream-dim); }

/* Contact aside */
.contact__aside { display: flex; flex-direction: column; gap: 26px; padding-top: 8px; }
.contact__item { border-left: 2px solid var(--orange); padding-left: 20px; }
.contact__label {
  display: block;
  font-family: var(--font-cond);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 6px;
}
.contact__item a:hover { color: var(--orange-bright); }

/* ══════════════ FOOTER ══════════════ */
.footer { position: relative; }
.footer__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  padding: 60px var(--gutter);
  background: var(--navy-2);
  border-top: 1px solid var(--hairline);
}
.footer__brand { display: flex; align-items: center; gap: 16px; }
.footer__links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer__links a {
  font-family: var(--font-cond);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream-dim);
  transition: color .25s;
}
.footer__links a:hover { color: var(--orange-bright); }
.footer__legal { font-size: 12.5px; color: var(--steel); }

.footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px var(--gutter);
  background: var(--orange);
  color: var(--cream);
  font-family: var(--font-cond);
  font-size: clamp(12px, 1.3vw, 15px);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* ══════════════ REVEAL DEFAULTS (JS animates; keep visible if JS fails) ══════════════ */
html.js .reveal { opacity: 0; transform: translateY(28px); }
html.js .story__step { opacity: 0; transform: translateY(30px); }

/* ══════════════ RESPONSIVE ══════════════ */
@media (max-width: 1100px) {
  .products__grid { grid-template-columns: repeat(2, 1fr); }
  .pillars__grid { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
  .consult { grid-template-columns: 1fr; }
  .consult__art { max-width: 420px; margin: 0 auto; }
  /* Nav gets cramped below ~1100px — switch to the burger early */
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
}

@media (max-width: 900px) {
  .section__grid { grid-template-columns: 1fr; gap: 36px; }
  .stats__inner { grid-template-columns: repeat(2, 1fr); gap: 34px 0; }
  .stat:nth-child(3) { border-left: 0; }
  .contact__grid { grid-template-columns: 1fr; }
  /* Blueprint row stays 3-up as thumbnails; only the crop relaxes */
  .tile { aspect-ratio: 4 / 3; }
  .scrollcue { display: none; }
}

@media (max-width: 560px) {
  .products__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  /* Too narrow for a 3-up row — stack the blueprints under the video */
  .gallery__grid { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 3 / 2; }
  .stats__inner { grid-template-columns: 1fr 1fr; padding: 44px var(--gutter); }
  .hero { padding-bottom: 80px; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .footer__main { flex-direction: column; text-align: center; }
  .grain { animation: none; } /* keep grain cheap on small screens */
}

/* ══════════════ REDUCED MOTION ══════════════ */
@media (prefers-reduced-motion: reduce) {
  .grain, .kenburns, .energy-sweep, .scrollcue__line { animation: none !important; }
  html.js .reveal, html.js .story__step { opacity: 1; transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
