/* Pacific Agricultural - site stylesheet (v2)
 *
 * Type: Archivo (expanded width) for display, Hanken Grotesk for text.
 * Colour: forest-green neutrals plus ONE accent, maize gold (--gold). Text links use --link.
 * Shape: buttons and chips are full pills; cards, images and panels use --r-card (16px);
 *        inputs use --r-input (10px).
 * Pattern: topographic contours (assets/img/contours.svg), applied as a tinted mask via .has-pattern.
 * Motion: every animation sits behind prefers-reduced-motion: no-preference. Scroll-linked effects
 *         also sit behind @supports (animation-timeline: view()) and simply do nothing elsewhere.
 * Layers (z-index): header 50, progress bar 60, floating WhatsApp 40, skip link 100.
 */

:root {
  --bg: #f1f3ec;
  --surface: #fafbf6;
  --surface-2: #e4eadd;
  --ink: #102118;
  --ink-2: #45544a;
  --line: #d0d9c9;
  --link: #1d5236;
  --forest: #0f2a1d;
  --forest-2: #17392a;
  --on-forest: #eef2e8;
  --on-forest-2: #b3c3b6;
  --gold: #e8b53e;
  --gold-hover: #f3c75e;
  --on-gold: #102118;
  --pattern-ink: #1d5236;
  --pattern-alpha: 0.09;
  --shadow: 0 1px 2px rgba(16, 33, 24, 0.06), 0 18px 40px -18px rgba(16, 33, 24, 0.28);
  --shadow-lg: 0 2px 4px rgba(16, 33, 24, 0.06), 0 40px 80px -30px rgba(16, 33, 24, 0.45);

  --font-display: "Archivo", "Arial Black", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  --r-card: 16px;
  --r-input: 10px;
  --container: 1280px;
  --gutter: 16px;
  --header-h: 76px;
  --section-y: clamp(72px, 10vw, 128px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1510;
    --surface: #111e17;
    --surface-2: #16271d;
    --ink: #e8eee5;
    --ink-2: #a7b6ab;
    --line: #253a2d;
    --link: #f0c45a;
    --forest: #0e2419;
    --forest-2: #143222;
    --pattern-ink: #9fd0b0;
    --pattern-alpha: 0.06;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.3), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

@media (min-width: 768px) { :root { --gutter: 32px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.75rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.875rem, 3.6vw, 3rem); }
h3 { font-size: 1.1875rem; font-stretch: 110%; letter-spacing: -0.01em; line-height: 1.2; }
h1 em, h2 em { font-style: italic; font-weight: inherit; color: var(--link); padding-right: 0.06em; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--gold); color: var(--on-gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: var(--section-y); }
.section-tint { background: var(--surface-2); }
.lead { font-size: clamp(1.125rem, 1.5vw, 1.3125rem); line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.muted { color: var(--ink-2); }
.measure { max-width: 62ch; }
.section-head { max-width: 64ch; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head p { color: var(--ink-2); font-size: 1.125rem; }
/* A short gold rule above section headings, drawn in when the heading scrolls into view */
.section-head h2::before, .rule-before::before {
  content: ""; display: block; width: 56px; height: 4px; border-radius: 4px;
  background: var(--gold); margin-bottom: 22px; transform-origin: left;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--link); margin-bottom: 14px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--on-gold);
  padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Topographic pattern ---------- */
.has-pattern { position: relative; isolation: isolate; }
.has-pattern::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--pattern-ink); opacity: var(--pattern-alpha);
  -webkit-mask: url("../img/contours.svg") 0 0 / 800px repeat;
  mask: url("../img/contours.svg") 0 0 / 800px repeat;
}
.dark-band {
  background: var(--forest); color: var(--on-forest);
  --pattern-ink: #e8b53e; --pattern-alpha: 0.1; --link: #f0c45a; --ink-2: var(--on-forest-2); --line: rgba(238, 242, 232, 0.16);
}
.dark-band h1, .dark-band h2, .dark-band h3 { color: var(--on-forest); }

/* ---------- Buttons & links ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 26px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.2s var(--ease), box-shadow 0.35s var(--ease);
}
/* Fill sweeps up from below on hover */
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  transform: translateY(101%); transition: transform 0.45s var(--ease);
}
.btn:hover::after { transform: none; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn .ph { font-size: 1.15em; transition: transform 0.35s var(--ease); }
.btn:hover .ph-arrow-right, .btn:hover .ph-arrow-up-right { transform: translateX(4px); }
.btn-primary { background: var(--gold); color: var(--on-gold); box-shadow: 0 10px 24px -12px rgba(232, 181, 62, 0.7); }
.btn-primary::after { background: var(--gold-hover); }
.btn-primary:hover { box-shadow: 0 16px 30px -12px rgba(232, 181, 62, 0.8); }
.btn-ghost { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 28%, transparent); }
.btn-ghost::after { background: var(--ink); }
.btn-ghost:hover { color: var(--bg); border-color: var(--ink); }
.dark-band .btn-ghost, .btn-light-ghost { color: var(--on-forest); border-color: rgba(238, 242, 232, 0.45); background: rgba(8, 20, 13, 0.2); }
.dark-band .btn-ghost::after, .btn-light-ghost::after { background: var(--on-forest); }
.dark-band .btn-ghost:hover, .btn-light-ghost:hover { color: var(--forest); border-color: var(--on-forest); }
.btn-light { background: var(--gold); color: var(--on-gold); }
.btn-light::after { background: var(--gold-hover); }
.btn-outline-light { background: rgba(8, 20, 13, 0.25); color: #eef2e8; border-color: rgba(238, 242, 232, 0.6); }
.btn-outline-light::after { background: #eef2e8; }
.btn-outline-light:hover { color: #0f2a1d; border-color: #eef2e8; }
.btn-sm { min-height: 42px; padding: 9px 20px; font-size: 0.9375rem; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--link); font-weight: 600; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  padding-bottom: 2px; transition: background-size 0.4s var(--ease);
}
.text-link:hover { background-size: 100% 1.5px; }
.text-link .ph { transition: transform 0.35s var(--ease); }
.text-link:hover .ph { transform: translateX(4px); }

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .scroll-progress { animation: progress linear both; animation-timeline: scroll(root); }
    @keyframes progress { to { transform: scaleX(1); } }
  }
}

/* ---------- Header ---------- */
/* Every page opens on a dark band, so the header starts light-on-dark and turns solid once scrolled. */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--on-forest);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease), transform 0.45s var(--ease);
  view-transition-name: site-header;
}
.site-header.is-stuck {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark {
  display: grid; place-items: center; flex: none;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--gold); color: var(--on-gold);
  font: 800 1rem/1 var(--font-display); font-stretch: 120%; letter-spacing: -0.03em;
  transition: transform 0.5s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
.brand-name { font: 750 1.0625rem/1.05 var(--font-display); font-stretch: 115%; letter-spacing: -0.02em; }
.brand-name small { display: block; font: 500 0.75rem/1.3 var(--font-body); letter-spacing: 0.03em; opacity: 0.75; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { list-style: none; display: flex; gap: 6px; }
.site-nav ul a {
  position: relative; display: block; padding: 8px 12px;
  text-decoration: none; font-weight: 500; opacity: 0.82;
  transition: opacity 0.25s var(--ease);
}
.site-nav ul a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease);
}
.site-nav ul a:hover { opacity: 1; }
.site-nav ul a:hover::after, .site-nav ul a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.site-nav ul a[aria-current="page"] { opacity: 1; }
.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent); background: transparent; color: inherit;
  font-size: 1.375rem; cursor: pointer; place-items: center;
}

@media (max-width: 999px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 20px;
    padding: 20px var(--gutter) 28px;
    background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    visibility: hidden; opacity: 0; transform: translateY(-12px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .site-header:has(.site-nav.is-open) { background: var(--bg); color: var(--ink); }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav ul a { padding: 14px 4px; font: 700 1.375rem/1.2 var(--font-display); font-stretch: 112%; opacity: 1; border-bottom: 1px solid var(--line); }
  .site-nav ul a::after { left: 4px; right: auto; width: 40px; bottom: -1px; }
  .site-nav .btn { width: 100%; }
}

/* ---------- Media ---------- */
.media { position: relative; overflow: hidden; border-radius: var(--r-card); background: var(--surface-2); margin: 0; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media-contain { background: #ffffff; }
.media-contain img { object-fit: contain; padding: 4%; }
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-3x2 { aspect-ratio: 3 / 2; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-1x1 { aspect-ratio: 1 / 1; }
.ratio-4x5 { aspect-ratio: 4 / 5; }

/* ---------- Home hero: full-bleed slideshow ---------- */
.hero-cine {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(640px, 100svh, 1080px); display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--forest); color: var(--on-forest);
  --link: #f0c45a;
}
.hero-slides { position: absolute; inset: 0; z-index: -3; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s var(--ease-in-out); }
.hero-slide.is-active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-cine::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 20, 13, 0.7) 0%, rgba(8, 20, 13, 0) 26%),
    linear-gradient(90deg, rgba(8, 20, 13, 0.88) 0%, rgba(8, 20, 13, 0.55) 45%, rgba(8, 20, 13, 0.08) 80%),
    linear-gradient(0deg, rgba(8, 20, 13, 0.85) 0%, rgba(8, 20, 13, 0) 45%);
}
.hero-cine::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: #e8b53e; opacity: 0.16;
  -webkit-mask: url("../img/contours.svg") 0 0 / 900px repeat, linear-gradient(90deg, #000 0%, transparent 55%);
  -webkit-mask-composite: source-in;
  mask: url("../img/contours.svg") 0 0 / 900px repeat, linear-gradient(90deg, #000 0%, transparent 55%);
  mask-composite: intersect;
}
.hero-inner { padding-top: calc(var(--header-h) + 48px); padding-bottom: clamp(28px, 4vw, 44px); }
.hero-cine h1 { max-width: 13ch; color: var(--on-forest); font-size: clamp(2.75rem, 7vw, 6rem); line-height: 0.98; }
.hero-cine h1 em { color: var(--gold); }
.hero-cine .lead { color: rgba(238, 242, 232, 0.86); max-width: 44ch; margin-top: 8px; }
.hero-cine .btn-ghost { color: var(--on-forest); border-color: rgba(238, 242, 232, 0.45); background: rgba(8, 20, 13, 0.25); }
.hero-cine .btn-ghost::after { background: var(--on-forest); }
.hero-cine .btn-ghost:hover { color: var(--forest); }

/* Slide tabs: label + progress line; the active one fills over the slide's duration */
.hero-controls {
  display: flex; align-items: flex-end; gap: clamp(12px, 3vw, 36px);
  margin-top: clamp(40px, 7vh, 88px); padding-top: 20px;
  border-top: 1px solid rgba(238, 242, 232, 0.18);
}
.hero-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 3vw, 36px); flex: 1; max-width: 760px; }
.hero-tab {
  appearance: none; background: none; border: 0; padding: 0 0 4px; cursor: pointer; text-align: left;
  color: rgba(238, 242, 232, 0.6); font: 500 0.9375rem/1.3 var(--font-body);
  transition: color 0.3s var(--ease);
}
.hero-tab:hover, .hero-tab[aria-selected="true"] { color: var(--on-forest); }
.hero-tab .bar { display: block; height: 2px; margin-bottom: 12px; background: rgba(238, 242, 232, 0.22); border-radius: 2px; overflow: hidden; }
.hero-tab .bar::before { content: ""; display: block; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; }
.hero-tab[aria-selected="true"] .bar::before { transform: scaleX(1); }
.hero-pause {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid rgba(238, 242, 232, 0.35); background: rgba(8, 20, 13, 0.3); color: var(--on-forest);
  font-size: 1.1rem; cursor: pointer; transition: border-color 0.3s var(--ease);
}
.hero-pause:hover { border-color: var(--on-forest); }
@media (max-width: 640px) {
  .hero-tab { font-size: 0.8125rem; }
  .hero-cine h1 { font-size: clamp(2.5rem, 11vw, 3.25rem); }
}

/* ---------- Inner page hero: forest band with pattern; the photo hangs over the band's edge ---------- */
.page-hero, .page-hero-simple {
  position: relative; isolation: isolate;
  background: var(--forest); color: var(--on-forest);
  --pattern-ink: #e8b53e; --pattern-alpha: 0.11; --link: #f0c45a; --ink-2: var(--on-forest-2); --line: rgba(238, 242, 232, 0.16);
}
.page-hero::before, .page-hero-simple::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--pattern-ink); opacity: var(--pattern-alpha);
  -webkit-mask: url("../img/contours.svg") 0 0 / 800px repeat;
  mask: url("../img/contours.svg") 0 0 / 800px repeat;
}
.page-hero h1, .page-hero-simple h1 { color: var(--on-forest); }
.page-hero .lead, .page-hero-simple .lead { color: rgba(238, 242, 232, 0.84); }
.page-hero .btn-ghost, .page-hero-simple .btn-ghost { color: var(--on-forest); border-color: rgba(238, 242, 232, 0.45); }
.page-hero .btn-ghost::after, .page-hero-simple .btn-ghost::after { background: var(--on-forest); }
.page-hero .btn-ghost:hover, .page-hero-simple .btn-ghost:hover { color: var(--forest); }
.page-hero { z-index: 1; padding-block: calc(var(--header-h) + clamp(32px, 6vw, 72px)) clamp(48px, 6vw, 80px); } /* above the next section, so the photo can hang over it */
.page-hero-grid { display: grid; gap: 40px; align-items: center; }
.page-hero h1, .page-hero-simple h1 { font-size: clamp(2.375rem, 4.4vw, 4rem); }
.page-hero h1 { max-width: 15ch; }
.page-hero .media { aspect-ratio: 4 / 3; box-shadow: var(--shadow-lg); }
@media (min-width: 960px) {
  .page-hero { padding-bottom: 0; margin-bottom: 0; }
  .page-hero-grid { grid-template-columns: 1.05fr 1fr; gap: 72px; align-items: end; }
  .page-hero-grid > :first-child { padding-bottom: 120px; }
  .page-hero .media { margin-bottom: -96px; }
  .page-hero + .section { padding-top: calc(var(--section-y) + 96px); }
}
.page-hero-simple { padding-block: calc(var(--header-h) + clamp(40px, 7vw, 96px)) clamp(48px, 6vw, 88px); }
.page-hero-simple h1 { max-width: 18ch; }

/* ---------- Marquee band (one per page at most) ---------- */
.marquee {
  overflow: hidden; background: var(--forest); color: var(--on-forest);
  padding-block: clamp(18px, 2.4vw, 28px); border-block: 1px solid rgba(238, 242, 232, 0.08);
}
.marquee-track { display: flex; width: max-content; }
.marquee-group { display: flex; align-items: center; flex: none; }
.marquee-item {
  display: inline-flex; align-items: center; gap: clamp(20px, 3vw, 40px); padding-right: clamp(20px, 3vw, 40px);
  font: 800 clamp(1.5rem, 3.4vw, 2.75rem)/1 var(--font-display); font-stretch: 125%; letter-spacing: -0.02em; white-space: nowrap;
}
.marquee-item:nth-child(even) { color: transparent; -webkit-text-stroke: 1.2px rgba(238, 242, 232, 0.75); }
.marquee-item .ph { color: var(--gold); font-size: 0.6em; }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee 48s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
  @keyframes marquee { to { transform: translateX(-50%); } }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { width: auto; flex-wrap: wrap; justify-content: center; padding-inline: var(--gutter); }
  .marquee-group[aria-hidden="true"] { display: none; }
  .marquee-group { flex-wrap: wrap; justify-content: center; row-gap: 12px; }
}

/* ---------- Duo (two large image tiles) ---------- */
.duo { display: grid; gap: 20px; }
@media (min-width: 860px) { .duo { grid-template-columns: 7fr 5fr; } .duo > :nth-child(2) { margin-top: 88px; } }
.image-tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 480px; padding: clamp(24px, 3vw, 40px);
  border-radius: var(--r-card); overflow: hidden; isolation: isolate;
  color: #eef2e8; text-decoration: none; box-shadow: var(--shadow);
}
.image-tile > img {
  position: absolute; inset: -8% 0; z-index: -2; width: 100%; height: 116%; object-fit: cover;
  transition: scale 1.1s var(--ease);
}
.image-tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(8, 18, 12, 0.9) 0%, rgba(8, 18, 12, 0.5) 42%, rgba(8, 18, 12, 0.04) 74%);
}
.image-tile:hover > img { scale: 1.05; }
.image-tile h3 { font-size: clamp(1.5rem, 2.4vw, 2.125rem); color: #eef2e8; max-width: 18ch; }
.image-tile p { color: rgba(238, 242, 232, 0.86); max-width: 42ch; }
.image-tile .tile-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; font-weight: 600; }
.image-tile .tile-link .ph {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  background: var(--gold); color: var(--on-gold); font-size: 1.05rem;
  transition: transform 0.45s var(--ease);
}
.image-tile:hover .tile-link .ph { transform: rotate(-45deg); }

/* ---------- Horizontal scroller (category cards) ---------- */
.scroller-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.scroller-controls { display: flex; gap: 10px; }
.icon-btn {
  display: grid; place-items: center; width: 50px; height: 50px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-size: 1.2rem; cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.15s var(--ease);
}
.icon-btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.icon-btn:active { transform: scale(0.94); }
.scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 320px);
  gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 4px 16px; margin: -4px; scrollbar-width: none;
  overscroll-behavior-x: contain; cursor: grab;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.scroller.is-dragging a { pointer-events: none; }
.scroller > * { scroll-snap-align: start; }
.scroller-progress { height: 2px; margin-top: 18px; background: var(--line); border-radius: 2px; overflow: hidden; }
.scroller-progress span { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0.2); transition: transform 0.2s linear; }
.cat-card { text-decoration: none; color: var(--ink); display: block; }
.cat-card .media { aspect-ratio: 4 / 5; margin-bottom: 16px; box-shadow: var(--shadow); }
.cat-card .media img { transition: scale 0.9s var(--ease); }
.cat-card:hover .media img { scale: 1.07; }
.cat-card h3 { margin-bottom: 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cat-card h3 .ph { color: var(--link); transition: transform 0.45s var(--ease); }
.cat-card:hover h3 .ph { transform: rotate(45deg); }
.cat-card p { color: var(--ink-2); font-size: 0.975rem; }

/* ---------- Timeline (sticky heading, steps with a line that fills on scroll) ---------- */
.timeline-wrap { display: grid; gap: 48px; }
@media (min-width: 960px) {
  .timeline-wrap { grid-template-columns: 5fr 6fr; gap: 88px; align-items: start; }
  .timeline-aside { position: sticky; top: calc(var(--header-h) + 40px); }
}
.timeline-aside .media { aspect-ratio: 4 / 3; margin-top: 32px; box-shadow: var(--shadow); }
.timeline { list-style: none; position: relative; display: grid; gap: clamp(40px, 6vw, 72px); padding-left: 76px; }
.timeline::before, .timeline::after {
  content: ""; position: absolute; left: 25px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
}
.timeline::before { background: var(--line); }
.timeline::after { background: var(--gold); transform-origin: top; transform: scaleY(1); }
.timeline li { position: relative; }
.timeline .node {
  position: absolute; left: -76px; top: -4px;
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--line); color: var(--link); font-size: 1.4rem;
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease), color 0.5s var(--ease);
}
.timeline li.is-in .node { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.timeline h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); margin-bottom: 10px; }
.timeline p { color: var(--ink-2); max-width: 48ch; }

/* ---------- Steps (horizontal process row) ---------- */
.steps { list-style: none; display: grid; gap: 36px; position: relative; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; } }
.step { position: relative; padding-top: 32px; border-top: 2px solid var(--line); }
.step::before {
  content: ""; position: absolute; top: -2px; left: 0; width: 100%; height: 2px; background: var(--gold);
  transform: scaleX(0.18); transform-origin: left; transition: transform 1.1s var(--ease);
}
.step.is-in::before { transform: scaleX(1); }
.step .ph {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 999px; margin-bottom: 18px;
  background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--link); font-size: 1.5rem;
}
.step h3 { margin-bottom: 8px; font-size: 1.3125rem; }
.step p { color: var(--ink-2); font-size: 0.99rem; }

/* ---------- Split (image + text) ---------- */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: 1fr 1fr; gap: 88px; }
  .split-reverse > :first-child { order: 2; }
}
.split > .media, .split > figure.media { aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.collage { position: relative; padding-bottom: 14%; padding-right: 12%; }
.collage .media:first-child { aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.collage .media:last-child {
  position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 1 / 1;
  border: 8px solid var(--bg); box-shadow: var(--shadow-lg);
}
.section-tint .collage .media:last-child { border-color: var(--surface-2); }

.icon-list { list-style: none; display: grid; gap: 20px; margin: 32px 0 0; }
.icon-list li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.icon-list .ph {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--link); font-size: 1.3rem;
  transition: transform 0.5s var(--ease), background-color 0.3s var(--ease);
}
.icon-list li:hover .ph { transform: rotate(-8deg) scale(1.06); background: var(--gold); color: var(--on-gold); }
.icon-list strong { display: block; font-weight: 600; font-size: 1.0625rem; }
.icon-list span { color: var(--ink-2); font-size: 0.99rem; }

/* ---------- People grid ---------- */
.people { display: grid; gap: 32px 22px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .people { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) {
  .people { grid-template-columns: repeat(4, 1fr); }
  .people > :nth-child(even) { margin-top: 64px; }
}
.person .media { aspect-ratio: 4 / 5; margin-bottom: 18px; box-shadow: var(--shadow); }
.person .media img { transition: scale 0.9s var(--ease); }
.person:hover .media img { scale: 1.05; }
.person h3 { margin-bottom: 6px; }
.person p { color: var(--ink-2); font-size: 0.99rem; }

/* ---------- Banner CTA (full image) ---------- */
.banner {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: calc(var(--r-card) + 8px);
  padding: clamp(48px, 8vw, 112px) clamp(24px, 6vw, 88px);
  color: #eef2e8; box-shadow: var(--shadow-lg);
}
.banner > img { position: absolute; inset: -10% 0; z-index: -3; width: 100%; height: 120%; object-fit: cover; }
.banner::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(90deg, rgba(8, 18, 12, 0.92) 0%, rgba(8, 18, 12, 0.66) 50%, rgba(8, 18, 12, 0.12) 100%);
}
.banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: #e8b53e; opacity: 0.14;
  -webkit-mask: url("../img/contours.svg") 0 0 / 700px repeat, linear-gradient(90deg, #000, transparent 60%);
  -webkit-mask-composite: source-in;
  mask: url("../img/contours.svg") 0 0 / 700px repeat, linear-gradient(90deg, #000, transparent 60%);
  mask-composite: intersect;
}
.banner h2 { color: #eef2e8; max-width: 15ch; font-size: clamp(2rem, 4.4vw, 3.5rem); }
.banner p { color: rgba(238, 242, 232, 0.88); max-width: 44ch; font-size: 1.1875rem; }

/* ---------- Panel CTA ---------- */
.panel {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--forest); color: var(--on-forest); border-radius: calc(var(--r-card) + 8px);
  padding: clamp(32px, 5vw, 64px);
  display: grid; gap: 28px; align-items: center;
  --link: #f0c45a; --ink-2: var(--on-forest-2);
}
.panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: #e8b53e; opacity: 0.12;
  -webkit-mask: url("../img/contours.svg") 0 0 / 700px repeat; mask: url("../img/contours.svg") 0 0 / 700px repeat;
}
@media (min-width: 860px) { .panel { grid-template-columns: 1.4fr auto; gap: 56px; } }
.panel h2 { margin-bottom: 0.35em; color: var(--on-forest); }
.panel p { color: var(--on-forest-2); max-width: 54ch; font-size: 1.0625rem; }
.panel .btn-row { margin-top: 0; }
.panel .btn-ghost { color: var(--on-forest); border-color: rgba(238, 242, 232, 0.45); }
.panel .btn-ghost::after { background: var(--on-forest); }
.panel .btn-ghost:hover { color: var(--forest); }

/* ---------- Feature grid (bento) ---------- */
.feature-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .feature-grid { grid-template-columns: repeat(6, 1fr); } }
.feature {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 30px; display: flex; flex-direction: column;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.feature:not(.image-tile):hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); }
.feature .ph { font-size: 1.75rem; color: var(--link); margin-bottom: 16px; }
.feature:not(.image-tile) .ph {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px;
  background: color-mix(in srgb, var(--gold) 22%, transparent); margin-bottom: auto;
}
.feature:not(.image-tile) h3 { margin-top: 28px; }
.feature h3 { margin-bottom: 8px; font-size: 1.3125rem; }
.feature p { color: var(--ink-2); font-size: 0.99rem; }
.feature.image-tile { padding: 30px; border: 0; min-height: 300px; }
.feature.image-tile .ph { color: var(--gold); }
.feature.image-tile p { color: rgba(238, 242, 232, 0.88); }
@media (min-width: 1040px) {
  .span-2 { grid-column: span 2; }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
}

/* ---------- Equipment catalogue ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip {
  min-height: 44px; padding: 9px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 500 0.9375rem/1.2 var(--font-body); cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.2s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: var(--on-forest); }
@media (prefers-color-scheme: dark) { .chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--on-gold); } }
.catalogue { display: grid; gap: 40px 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .catalogue { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .catalogue { grid-template-columns: repeat(3, 1fr); } }
.product { display: flex; flex-direction: column; }
.product[hidden] { display: none; }
.product.is-entering { animation: card-in 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.product .media { aspect-ratio: 4 / 3; margin-bottom: 18px; box-shadow: var(--shadow); }
.product .media img { transition: scale 0.9s var(--ease); }
.product:hover .media img { scale: 1.06; }
.product-cat { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--link); margin-bottom: 6px; }
.product h3 { margin-bottom: 8px; }
.product p { color: var(--ink-2); font-size: 0.99rem; flex: 1; }
.product .text-link { margin-top: 14px; align-self: flex-start; }
.catalogue-status { color: var(--ink-2); font-size: 0.9375rem; margin-bottom: 24px; }

/* ---------- Columns & quad ---------- */
.columns-2 { display: grid; gap: 32px; }
@media (min-width: 860px) { .columns-2 { grid-template-columns: 1fr 1fr; gap: 72px; } }
.quad { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .quad { grid-template-columns: repeat(2, 1fr); } }
.quad-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 30px;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.quad-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.quad-item .ph {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; margin-bottom: 20px;
  background: var(--forest); color: var(--gold); font-size: 1.6rem;
}
.quad-item h3 { margin-bottom: 8px; font-size: 1.375rem; }
.quad-item p { color: var(--ink-2); }

/* ---------- Statement (large quote-like line) ---------- */
.statement { font: 750 clamp(1.75rem, 3.8vw, 3.25rem)/1.12 var(--font-display); font-stretch: 116%; letter-spacing: -0.025em; max-width: 24ch; text-wrap: balance; margin: 0; }
.statement em { font-style: italic; color: var(--link); }

/* ---------- Contact & form ---------- */
.contact-grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1.5fr 1fr; gap: 56px; } }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--r-card) + 4px); padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
/* On the contact page the form card rises into the dark band above it */
@media (min-width: 960px) {
  .page-hero-simple:has(+ .section .form-card) { padding-bottom: 168px; }
  .page-hero-simple + .section:has(.form-card) { padding-top: 0; }
  .page-hero-simple + .section .form-card { margin-top: -112px; position: relative; }
  .page-hero-simple + .section .contact-grid > aside { padding-top: 56px; }
}
.form-grid { display: grid; gap: 22px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .field-full { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field legend { font-weight: 600; font-size: 0.9375rem; color: var(--ink); padding: 0; }
.field .hint { font-size: 0.875rem; color: var(--ink-2); }
.field .req { color: var(--link); }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--r-input);
  background: var(--bg); color: var(--ink);
  font: 400 1rem/1.4 var(--font-body);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}
.textarea { min-height: 132px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ink-2); opacity: 0.85; }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in srgb, var(--ink) 35%, var(--line)); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--link); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 30%, transparent);
}
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: #b3261e; }
.error-text { display: none; font-size: 0.875rem; font-weight: 500; color: #b3261e; }
@media (prefers-color-scheme: dark) {
  .field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: #f2b8b5; }
  .error-text { color: #f2b8b5; }
}
.field.has-error .error-text { display: flex; gap: 6px; align-items: center; animation: shake 0.4s var(--ease); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 10px 18px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg);
  font-weight: 500; font-size: 0.9375rem;
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.choice input:checked + span { border-color: var(--forest); background: var(--forest); color: var(--on-forest); }
@media (prefers-color-scheme: dark) { .choice input:checked + span { border-color: var(--gold); background: var(--gold); color: var(--on-gold); } }
.choice input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 30px; }
.form-note { font-size: 0.875rem; color: var(--ink-2); margin: 0; }
.form-status {
  display: none; margin-top: 24px; padding: 18px 20px; border-radius: var(--r-input);
  background: color-mix(in srgb, var(--gold) 20%, var(--surface)); color: var(--ink);
}
.form-status.is-visible { display: block; animation: card-in 0.5s var(--ease) both; }
.form-status.is-error { background: color-mix(in srgb, #b3261e 14%, var(--surface)); }
.contact-list { list-style: none; display: grid; gap: 22px; }
.contact-list li { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.contact-list .ph {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--forest); color: var(--gold); font-size: 1.35rem;
}
.contact-list strong { display: block; font-size: 0.875rem; color: var(--ink-2); font-weight: 500; }
.contact-list a, .contact-list span { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--forest); color: var(--on-forest); padding-block: 80px 32px; margin-top: var(--section-y);
  --ink-2: var(--on-forest-2); --line: rgba(238, 242, 232, 0.14);
}
.site-footer::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: #e8b53e; opacity: 0.08;
  -webkit-mask: url("../img/contours.svg") 0 0 / 800px repeat; mask: url("../img/contours.svg") 0 0 / 800px repeat;
}
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; gap: 56px; } }
.footer-grid h2 { font-size: 0.8125rem; font-family: var(--font-body); font-stretch: 100%; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.footer-grid p { color: var(--on-forest-2); max-width: 38ch; }
.footer-links { list-style: none; display: grid; gap: 10px; }
.footer-links a { text-decoration: none; color: var(--on-forest-2); transition: color 0.25s var(--ease), padding 0.35s var(--ease); }
.footer-links a:hover { color: var(--on-forest); padding-left: 6px; }
.footer-contact { list-style: none; display: grid; gap: 12px; color: var(--on-forest-2); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .ph { color: var(--gold); font-size: 1.15rem; margin-top: 3px; }
.footer-contact a { text-decoration: none; overflow-wrap: anywhere; }
.footer-contact a:hover { color: var(--on-forest); text-decoration: underline; }
.footer-word {
  margin: 64px 0 0; font: 800 clamp(2.5rem, 10.5vw, 9.5rem)/0.9 var(--font-display); font-stretch: 125%; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1px rgba(238, 242, 232, 0.28); white-space: nowrap; user-select: none;
}
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 0.875rem; color: var(--on-forest-2);
}
main > .section:last-child { padding-bottom: 0; }

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 54px; padding: 12px 20px; border-radius: 999px;
  background: var(--gold); color: var(--on-gold);
  font-weight: 600; text-decoration: none; box-shadow: var(--shadow-lg);
  transition: transform 0.3s var(--ease);
}
.wa-float:hover { transform: translateY(-3px); }
.wa-float .ph { font-size: 1.4rem; }
@media (max-width: 560px) { .wa-float span { display: none; } .wa-float { padding: 15px; } }

/* ---------- 404 ---------- */
.not-found { min-height: 70svh; display: grid; align-content: center; }

/* =====================================================================
   Motion
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Fade-up reveal; .reveal-delay-N and [data-stagger] children stagger via --i */
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .reveal-delay-1 { --i: 1; }
  .js .reveal-delay-2 { --i: 2; }
  .js .reveal-delay-3 { --i: 3; }

  /* Media wipes in from the bottom */
  /* (An observed element must not clip itself to nothing, or IntersectionObserver never fires,
     so a .media.reveal wipes its <img> while the frame stays observable.) */
  .js .media.reveal { opacity: 1; transform: none; transition: box-shadow 0.9s var(--ease), background-color 0.9s var(--ease); }
  .js .media.reveal:not(.is-in) { background: transparent; box-shadow: none; }
  .js .media.reveal > img { clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
  .js .media.reveal.is-in > img { clip-path: inset(0 0 0 0); }
  .js .reveal > .media, .js .reveal > figure.media, .js .collage.reveal .media {
    clip-path: inset(100% 0 0 0 round var(--r-card));
    transition: clip-path 1.2s var(--ease), opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js .reveal.is-in > .media, .js .reveal.is-in > figure.media, .js .collage.reveal.is-in .media { clip-path: inset(0 0 0 0 round var(--r-card)); }
  .js .collage.reveal { opacity: 1; transform: none; }
  .js .collage.reveal .media:last-child { transition-delay: 0.3s; }
  .js .image-tile.reveal, .js .banner.reveal { clip-path: inset(10% 5% 0 5% round 24px); transform: none; transition: clip-path 1.3s var(--ease), opacity 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
  .js .image-tile.reveal.is-in, .js .banner.reveal.is-in { clip-path: inset(0 0 0 0 round 24px); }

  /* Section heading rule draws in */
  .js .section-head.reveal h2::before { transform: scaleX(0); transition: transform 1s var(--ease) 0.25s; }
  .js .section-head.reveal.is-in h2::before { transform: scaleX(1); }

  /* Split headline: each word rises out of its own mask */
  [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; padding-right: 0.04em; }
  [data-split] .wi { display: inline-block; transform: translateY(115%); transition: transform 1.1s var(--ease); transition-delay: calc(0.15s + var(--wi) * 70ms); }
  [data-split].is-split .wi { transform: none; }
  .js .hero-cine .lead, .js .hero-cine .btn-row, .js .hero-cine .hero-controls,
  .js .page-hero .lead, .js .page-hero .btn-row, .js .page-hero-simple .lead, .js .page-hero-simple .btn-row {
    animation: rise 1s var(--ease) both; animation-delay: 0.7s;
  }
  .js .hero-cine .btn-row, .js .page-hero .btn-row, .js .page-hero-simple .btn-row { animation-delay: 0.85s; }
  .js .hero-cine .hero-controls { animation-delay: 1.05s; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } }
  .js .page-hero .media { animation: wipe 1.4s var(--ease) both 0.25s; }
  @keyframes wipe { from { clip-path: inset(0 0 100% 0 round var(--r-card)); } to { clip-path: inset(0 0 0 0 round var(--r-card)); } }

  /* Ken Burns on the active hero slide; the active tab's bar fills in step */
  .hero-slide.is-active img { animation: kenburns 8s linear both; }
  @keyframes kenburns { from { transform: scale(1.14) translate3d(1.5%, 1%, 0); } to { transform: scale(1.02) translate3d(0, 0, 0); } }
  .hero-cine:not(.is-paused) .hero-tab[aria-selected="true"] .bar::before { animation: fill var(--slide-ms, 7000ms) linear both; }
  .hero-cine.is-paused .hero-slide.is-active img { animation-play-state: paused; }
  @keyframes fill { from { transform: scaleX(0); } }
}

/* Scroll-linked effects (Chrome, Edge, Safari 26+); other browsers keep the static layout */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Hero content drifts up and fades, photo deepens, as you scroll away */
    .hero-inner { animation: hero-out linear both; animation-timeline: view(); animation-range: exit 0% exit 80%; }
    @keyframes hero-out { to { transform: translateY(-80px); opacity: 0; } }
    .hero-slides { animation: hero-zoom linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    @keyframes hero-zoom { to { transform: scale(1.12); filter: brightness(0.55); } }

    /* Photos drift inside their frames */
    .split .media img, .collage .media img, .timeline-aside .media img, .image-tile > img, .banner > img, .person .media img {
      animation: drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%;
    }
    .split .media img, .collage .media img, .timeline-aside .media img, .person .media img { height: 116%; margin-top: -8%; }
    @keyframes drift { from { translate: 0 -6%; } to { translate: 0 6%; } }

    /* Timeline line fills as the list passes through the viewport */
    .timeline::after { animation: line-fill linear both; animation-timeline: view(); animation-range: entry 40% cover 70%; }
    @keyframes line-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }

    /* Footer wordmark slides in */
    .footer-word { animation: word-slide linear both; animation-timeline: view(); animation-range: entry 0% cover 60%; }
    @keyframes word-slide { from { transform: translateX(12%); } to { transform: none; } }
  }
}

/* Cross-document page transitions (Chrome and Edge 126+) */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: 0.35s var(--ease) both vt-out; }
  ::view-transition-new(root) { animation: 0.6s var(--ease) both vt-in; }
  @keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none !important; }
}
