/* ===== Tokens — tweak the greens here ===== */
:root {
  --green: #22b04f;      /* hero + contact background */
  --green-hi: #4bdc7a;   /* accent on dark sections */
  --green-lo: #0a6e2c;   /* accent on light sections */
  --black: #0b0b0a;
  --paper: #eceae2;
  --display: "UnifrakturMaguntia", serif;
  --sans: "Figtree", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --noise-gray: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0.33 0.33 0.33 0 0 0 0 0 0 1'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
  --noise-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.4 0 0 0 0.45'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='240' height='240' filter='url(%23n)' opacity='0.55'/></svg>");
}
/* One colour scheme for the whole page; JS flips body[data-theme] as each section crosses mid-screen.
   Registered colour properties let every dependent colour blend smoothly. */
@property --bg     { syntax: "<color>"; inherits: true; initial-value: #0b0b0a; }
@property --ink    { syntax: "<color>"; inherits: true; initial-value: #f4f2ec; }
@property --muted  { syntax: "<color>"; inherits: true; initial-value: rgba(244,242,236,.55); }
@property --line   { syntax: "<color>"; inherits: true; initial-value: rgba(244,242,236,.16); }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #4bdc7a; }
@property --on     { syntax: "<color>"; inherits: true; initial-value: #04140a; }
body, body[data-theme="dark"] { --bg: #0b0b0a; --ink: #f4f2ec; --muted: rgba(244,242,236,.55); --line: rgba(244,242,236,.16); --accent: #4bdc7a; --on: #04140a; }
body[data-theme="light"] { --bg: #eceae2; --ink: #101210; --muted: rgba(16,18,16,.55); --line: rgba(16,18,16,.16); --accent: #0a6e2c; --on: #ffffff; }
body { background: var(--bg); color: var(--ink);
  transition: --bg 1s cubic-bezier(.6,0,.2,1), --ink 1s cubic-bezier(.6,0,.2,1), --muted 1s cubic-bezier(.6,0,.2,1), --line 1s cubic-bezier(.6,0,.2,1), --accent 1s cubic-bezier(.6,0,.2,1), --on 1s cubic-bezier(.6,0,.2,1); }
@media (prefers-reduced-motion: reduce) { body { transition: none; } }

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--sans); font-weight: 400; overflow-x: clip; -webkit-font-smoothing: antialiased; }
body.loading { overflow: hidden; }
::selection { background: var(--green); color: #04140a; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.mono { font-family: var(--mono); font-size: .75rem; letter-spacing: .02em; }

/* film grain */
.grain { position: fixed; inset: -60px; z-index: 80; pointer-events: none; opacity: .45; mix-blend-mode: overlay; background: var(--noise-gray); background-size: 120px; animation: gs 6s steps(6) infinite; }
@keyframes gs { 20% { transform: translate(-24px,14px); } 40% { transform: translate(18px,-20px); } 60% { transform: translate(-14px,-26px); } 80% { transform: translate(26px,18px); } }

/* grainy wave edge between sections (drawn by main.js) */
.edge { position: absolute; top: -1px; left: 0; width: 100%; height: clamp(90px,12vw,190px); pointer-events: none; z-index: 0; }
.edge svg { display: block; width: 100%; height: 100%; will-change: transform; }

/* loader */
#loader { position: fixed; inset: 0; z-index: 200; background: var(--black); color: #efede6; display: flex; align-items: flex-end; justify-content: space-between; padding: 2rem; will-change: transform; }
#loader .edge { top: calc(100% - 1px); }
.load-count { font: 300 clamp(4rem,14vw,10rem)/.8 var(--sans); letter-spacing: -.05em; color: var(--green-hi); font-variant-numeric: tabular-nums; }

/* header: text colour follows the section underneath (set from JS) */
.site-header { position: fixed; inset: 0 0 auto; z-index: 90; display: flex; justify-content: space-between; align-items: center; padding: 1rem 2rem; color: var(--ink); }
/* solid bar fades in once you scroll, in the colour of the section underneath */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: color-mix(in srgb, var(--bg) 94%, transparent); transition: opacity .4s, background-color .5s; }
.site-header.scrolled::before { opacity: 1; }
.brand-banner { display: block; height: 2.15rem; width: auto; fill: currentColor; overflow: visible; }
.burger { display: none; position: relative; z-index: 2; width: 44px; height: 44px; border: 0; background: none; color: inherit; cursor: pointer; flex-direction: column; justify-content: center; align-items: flex-end; gap: 7px; }
.burger i { display: block; width: 28px; height: 1.5px; background: currentColor; transition: transform .5s cubic-bezier(.7,0,.2,1), width .4s; }
.burger i:last-child { width: 18px; }
.menu-open .burger i:first-child { transform: translateY(4.25px) rotate(45deg); }
.menu-open .burger i:last-child { width: 28px; transform: translateY(-4.25px) rotate(-45deg); }
.site-nav { display: flex; gap: 2.2rem; font-size: 1rem; }
.site-nav a { position: relative; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s cubic-bezier(.6,0,.2,1); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.site-nav sup { font: .6rem var(--mono); opacity: .7; margin-left: 2px; }

/* panels */
.panel { position: relative; min-height: 100svh; padding: clamp(5.5rem,11svh,7.5rem) 2rem clamp(2rem,5svh,3.5rem); display: flex; flex-direction: column; justify-content: center; overflow: clip; color: var(--ink); }
.panel > :not(.edge, .car-stage, .dots, .hero__bg, .hero__grain, .contact__wave, .work__accent) { position: relative; z-index: 1; }
.label { font: .75rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: clamp(.8rem,2.2svh,1.6rem); }
.section-title { font: 500 clamp(2.2rem,min(5.6vw,9.5svh),5.2rem)/1 var(--sans); letter-spacing: -.045em; max-width: 18ch; }
.section-sub { color: var(--muted); margin-top: clamp(.7rem,1.8svh,1.2rem); max-width: 52ch; font-size: 1.05rem; line-height: 1.55; }
.cta { display: inline-flex; gap: .5rem; width: fit-content; margin-top: clamp(1.2rem,3.4svh,2.2rem); color: var(--accent); font-weight: 500; border-bottom: 1px solid transparent; transition: border-color .25s; }
.cta:hover { border-color: currentColor; }

/* hero */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: clip; color: #fff; isolation: isolate;
  background: linear-gradient(168deg, #0bd36c 0%, #07a055 38%, #046a3d 72%, #032d1c 100%); }
.hero::after { content: ""; position: absolute; inset: 0 0 auto; height: 34%; z-index: 0; pointer-events: none; background: linear-gradient(rgba(1,38,20,.45), transparent); }
.hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero__bg .b { position: absolute; border-radius: 50%; will-change: transform; }
.b1 { width: 70vmax; height: 70vmax; left: -22vmax; top: 4%; background: radial-gradient(circle, rgba(190,255,90,.5) 0%, transparent 62%); }
.b2 { width: 62vmax; height: 62vmax; right: -20vmax; top: 22%; background: radial-gradient(circle, rgba(30,240,190,.45) 0%, transparent 62%); }
.hero__grain { position: absolute; inset: -60px; z-index: 1; pointer-events: none; opacity: .5; mix-blend-mode: overlay; background: var(--noise-gray); background-size: 120px; animation: gs 6s steps(6) infinite; will-change: transform; }
.hero__pattern { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
/* brand lockup (mark + wordmark), shrinks into the navbar on scroll */
.hero__word { position: fixed; pointer-events: none; left: 0; right: 0; top: 18svh; z-index: 1; display: flex; justify-content: center; will-change: transform; }
.lock { -webkit-mask-image: var(--noise-mask); mask-image: var(--noise-mask); -webkit-mask-size: 120px; mask-size: 120px; --lockw: min(92vw, 1900px); --u: calc(var(--lockw) / 2560); display: inline-flex; align-items: center; will-change: transform; }
.hw { display: block; overflow: visible; flex: none; }
.hw-mark { width: calc(500 * var(--u)); height: calc(476 * var(--u)); margin-right: calc(60 * var(--u)); }
.hw-a { width: calc(1125 * var(--u)); height: calc(280 * var(--u)); }
.hw-b { width: calc(855 * var(--u)); height: calc(280 * var(--u)); margin-left: calc(20 * var(--u)); }
@media (max-width: 700px) {
  .hero__word { top: 12svh; }
  .lock { --u: calc(86vw / 1125); flex-direction: column; }
  .hw-mark { margin: 0 0 calc(80 * var(--u)); }
  .hw-b { margin: calc(40 * var(--u)) 0 0; }
}
.hero__wave { position: absolute; inset: 0 -12% -28%; z-index: 2; pointer-events: none; will-change: transform; }
.hero__wave svg { display: block; width: 100%; height: 100%; will-change: transform; }
.hero__copy { position: absolute; left: 2rem; bottom: 9vh; z-index: 3; max-width: 34rem; }
.hero__statement { font: 700 clamp(1.5rem,2.6vw,2.6rem)/1.1 var(--sans); letter-spacing: -.02em; }
.hero__sub { margin-top: 1rem; color: rgba(255,255,255,.62); line-height: 1.55; max-width: 44ch; }
.hero__meta { position: absolute; right: 2rem; bottom: 9vh; z-index: 3; text-align: right; display: flex; flex-direction: column; gap: .3rem; }
.dot { display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--green-hi); margin-right: .5em; }

/* vision */
.vision-statement { margin-top: clamp(1.2rem,4svh,3rem); font: 300 clamp(1.25rem,min(2.7vw,4.3svh),2.5rem)/1.32 var(--sans); letter-spacing: -.02em; max-width: 32ch; }
.vision-statement .accent { font-style: normal; }

/* work: horizontal track (pinned on desktop) */
.work { justify-content: flex-start; }
/* faint sponsor-wall backdrop, faded in/out by scroll (main.js) and multiplied into the light background */
.work__accent { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; mix-blend-mode: multiply; background: url("assets/sponsors_25.png") center / auto 100% no-repeat; will-change: opacity; }
.work__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; }
.work .label { margin-bottom: 1.2rem; }
.hint { color: var(--muted); display: none; }
.track { display: flex; flex-direction: column; gap: 2.5rem; margin-top: 2.4rem; }
.card { --h: 56vw; width: 100%; }
.card__img { position: relative; height: var(--h); max-height: 70svh; overflow: hidden; background: #111; }
.card__img .mono { position: absolute; top: 1rem; left: 1rem; color: #fff; z-index: 2; }
.ph { position: absolute; inset: 0 -12%; background: repeating-linear-gradient(98deg, rgba(0,0,0,.13) 0 2px, transparent 2px 11px), linear-gradient(120deg, var(--w1,#333), var(--w2,#777)); }
.ph::after { content: ""; position: absolute; inset: 0; background: var(--noise); opacity: .2; mix-blend-mode: overlay; }
.card__img img, .group-photo img { position: absolute; inset: 0 -12%; width: 124%; height: 100%; object-fit: cover; }
.card:hover .ph, .card:hover img { filter: saturate(1.25) brightness(1.06); }
.card figcaption { display: flex; justify-content: space-between; align-items: baseline; margin-top: .9rem; }
.card h3 { font: 500 1.4rem var(--sans); letter-spacing: -.02em; }
.progress { display: none; opacity: 0; position: absolute !important; left: 2rem; right: 2rem; bottom: 2rem; height: 1px; background: var(--line); }
.progress i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* disciplines */
.d-wrap { display: grid; grid-template-columns: minmax(0,720px) minmax(0,1fr); gap: 4rem; margin-top: clamp(1.2rem,4svh,3rem); align-items: center; }
.d-row { display: grid; grid-template-columns: 3rem 1fr auto; gap: 1.2rem; padding: clamp(.55rem,1.6svh,1.1rem) 1rem; border-top: 1px solid var(--line); cursor: pointer; transition: background-color .35s, color .35s; }
.d-row:last-child { border-bottom: 1px solid var(--line); }
.d-row > .mono { padding-top: .45rem; color: var(--accent); transition: color .35s; }
.d-row:hover { background: var(--accent); color: var(--on); }
.d-row:hover > .mono, .d-row:hover .d-desc { color: inherit; }
.d-title { font: 500 clamp(1.4rem,min(2.8vw,4.6svh),2.6rem)/1 var(--sans); letter-spacing: -.035em; }
.d-desc { color: var(--muted); max-width: 52ch; line-height: 1.5; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s cubic-bezier(.6,0,.2,1), opacity .4s, margin .4s; }
.d-row.active .d-desc { max-height: 6.5rem; opacity: 1; margin-top: .6rem; }
#disciplines .section-title { max-width: none; }
/* preview: a vertical film strip of tilted frames, centred in its column while it sticks;
   the mask fades the top/bottom ends of the band into the dark section background */
.d-preview { --ph: min(66svh,780px); --fh: calc(var(--ph) * .71); position: sticky; top: calc((100svh - var(--ph)) / 2 + 31px); height: var(--ph); width: min(100%, calc(var(--ph) * 1.15)); justify-self: center; align-self: center; overflow: hidden; perspective: 1400px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.55) 8%, #000 17%, #000 83%, rgba(0,0,0,.55) 92%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.55) 8%, #000 17%, #000 83%, rgba(0,0,0,.55) 92%, transparent 100%); }
.d-film { position: absolute; left: 0; right: 0; top: calc(50% - var(--fh) / 2); transform: rotateY(14deg); transform-style: preserve-3d; will-change: transform; }
.d-scene { position: relative; height: var(--fh); width: 62%; margin: 0 auto calc(var(--ph) * .04); display: flex; align-items: flex-end; padding: 1.3rem; color: #fff; overflow: hidden; border-radius: 10px; background: #111; box-shadow: 0 50px 90px -40px rgba(0,0,0,.55); will-change: transform; }
.d-scene::after { content: ""; position: absolute; inset: 0; background: var(--noise); opacity: .25; mix-blend-mode: overlay; }
.d-scene .num { position: absolute; top: .8rem; right: 1.2rem; font: 300 clamp(4rem,8vw,7rem)/1 var(--sans); letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.7); }
.d-scene .mono { position: relative; z-index: 1; }
.d-scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.d-scene img.is-missing { display: none; }
.scene-1 { background: repeating-linear-gradient(115deg, rgba(0,0,0,.18) 0 3px, transparent 3px 16px), linear-gradient(150deg, #3a2a17, #8a5a2b 60%, #d9a05b); }
.scene-2 { background: radial-gradient(circle at 55% 42%, #eaffb0 0, #2ee66b 32%, #0b3d22 66%, #0b0b0a); }
.scene-3 { background: repeating-linear-gradient(0deg, #6b4423 0 14px, #8a5a2b 14px 26px, #a9743c 26px 30px); }
.scene-4 { background: repeating-radial-gradient(circle at 50% 46%, #14202e 0 12px, #33506e 12px 15px), #14202e; }
.scene-5 { background: linear-gradient(180deg, #d9a05b 0 16%, #6b4423 16% 30%, #eceae2 30% 42%, #6b4423 42% 56%, #d9a05b 56%); }

/* toggle: classic pill switch with season labels, knob slides left/right */
.toggle { display: flex; align-items: center; gap: .7rem; width: fit-content; max-width: 100%; margin-top: clamp(1rem,3svh,2.2rem); }
.toggle-opt { color: var(--muted); transition: color .35s; }
.toggle-opt.active { color: var(--ink); }
.switch { position: relative; flex: none; width: 58px; height: 32px; padding: 0; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 7%, transparent); cursor: pointer; transition: border-color .3s, background-color .3s; }
.switch:hover { border-color: var(--muted); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); transition: left .4s cubic-bezier(.6,0,.2,1); }
.switch[aria-checked="true"] .knob { left: calc(100% - 27px); }
.swap { position: relative; margin-top: clamp(1.2rem,3.4svh,2.4rem); }
.swap-panel { display: none; height: 100%; }
.swap-panel.active { display: block; }

/* team */
.team-grid { display: grid; grid-template-columns: repeat(8,1fr); gap: clamp(.6rem,1.2vw,1.2rem); align-items: start; }
.member .ph { position: relative; inset: auto; aspect-ratio: 4/5; max-height: min(34svh,420px); width: 100%; display: grid; place-items: center; overflow: hidden; }

.member .ph span { position: relative; z-index: 1; font: 300 clamp(1.6rem,2.4vw,2.6rem) var(--sans); letter-spacing: -.04em; color: rgba(255,255,255,.9); }
.member p { margin-top: .8rem; font-weight: 500; }

/* partners */
.partner-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.partner-cell { background: var(--bg); padding: 2.4rem 1rem; display: grid; place-items: center; text-align: center; font: 500 1.05rem var(--sans); transition: background-color .3s, color .3s; }
.partner-cell:hover { background: var(--accent); color: var(--on); }

/* contact */
.contact-mail { font: 300 clamp(1.7rem,min(6.2vw,10.5svh),5.6rem)/1.05 var(--sans); letter-spacing: -.05em; margin-top: clamp(.9rem,3svh,2rem); width: fit-content; word-break: break-all; border-bottom: 2px solid transparent; transition: border-color .3s; }
.contact-mail:hover { border-color: currentColor; }

/* ---------- Logo ---------- */
.brand { position: relative; z-index: 2; display: flex; align-items: center; gap: .75rem; }
.logo { width: 2.5rem; height: 2.5rem; fill: currentColor; flex: none; }
/* brand is revealed by the hero-word morph (JS adds .js-morph) */
.js-morph .brand-banner { opacity: 0; }
.loader-logo { position: absolute; top: 2rem; left: 2rem; width: 3.4rem; height: 3.4rem; fill: var(--green-hi); }

/* ---------- 3D car (vision) ---------- */
.car-stage { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.car-sticky { position: sticky; top: 0; height: 100svh; }
#car-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.car-drag { position: absolute; right: 0; top: 14%; width: 56%; height: 72%; pointer-events: auto; cursor: grab; touch-action: pan-y; }
.car-drag:active { cursor: grabbing; }
.car-hint { position: absolute; right: 2rem; bottom: 11%; color: var(--muted); transition: opacity .5s; pointer-events: none; }
#vision .vision-statement { max-width: min(32ch, 46vw); }

/* ---------- Footer dots ---------- */
.dots { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* more air before the light (white) sections */
@media (max-width: 1100px) { .team-grid { grid-template-columns: repeat(4,1fr); } }

/* ---------- Responsive ---------- */
/* horizontal pinned work: desktops + landscape tablets */
@media (min-width: 981px) and (min-height: 640px) {
  .work { height: 100svh; justify-content: center; padding-top: clamp(5.5rem,11svh,7.5rem); padding-bottom: 4rem; }
  .work .section-title { max-width: none; font-size: clamp(2.2rem,4.6vw,4.4rem); }
  .hint, .progress { display: block; }
  .track { flex-direction: row; width: max-content; gap: 2rem; padding-right: 2rem; }
  .card { --h: clamp(190px,40svh,440px); width: max(calc(var(--h) * 1.3), 42vw); }
  .card__img { max-height: none; }
}
@media (max-width: 1000px) { .partner-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 980px) {
  .burger { display: flex; }
  .site-nav { position: fixed; inset: 0; z-index: 1; flex-direction: column; justify-content: center; gap: .3rem; padding: 6rem 2rem 3rem; background: var(--black); color: #efede6;
    font: 300 clamp(2.4rem,9vw,4.2rem)/1.1 var(--sans); letter-spacing: -.04em; clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path .8s cubic-bezier(.76,0,.24,1), visibility 0s .8s; }
  .site-nav a { width: fit-content; opacity: 0; transform: translateY(40px); transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .6s; }
  .site-nav sup { font-size: .9rem; }
  .menu-open { color: #efede6; }
  .menu-open .site-nav { clip-path: inset(0); visibility: visible; transition: clip-path .8s cubic-bezier(.76,0,.24,1); }
  .menu-open .site-nav a { opacity: 1; transform: none; }
  .menu-open .site-nav a:nth-child(1) { transition-delay: .3s; } .menu-open .site-nav a:nth-child(2) { transition-delay: .35s; }
  .menu-open .site-nav a:nth-child(3) { transition-delay: .4s; } .menu-open .site-nav a:nth-child(4) { transition-delay: .45s; }
  .menu-open .site-nav a:nth-child(5) { transition-delay: .5s; } .menu-open .site-nav a:nth-child(6) { transition-delay: .55s; }
}
@media (max-width: 960px) { .d-wrap { grid-template-columns: 1fr; } .d-preview { display: none; } }
@media (max-width: 860px) {
  .panel { padding: 7rem 1.25rem 5rem; }
  .site-header { padding: 1rem 1.25rem; }
  .hero__copy { left: 1.25rem; right: 1.25rem; bottom: 8vh; }
  .hero__meta { display: none; }
  .d-row { grid-template-columns: 2.4rem 1fr; }
  .d-row > .mono:last-child { grid-column: 2; }
  .contact-cols { grid-template-columns: 1fr; gap: 2.2rem; }
  .mega { margin-inline: -1.25rem; }
}
@media (max-width: 600px) {
  .team-grid, .partner-grid { grid-template-columns: repeat(2,1fr); }
  .contact-mail { font-size: clamp(1.6rem,9vw,3rem); }
}
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .track { width: auto; overflow-x: auto; }
}

@media (max-width: 980px), (max-height: 639px) {
  .panel { padding: 7rem 2rem 5rem; }
  #vision .vision-statement { max-width: none; }
  #vision .car-stage { position: relative; inset: auto; order: 9; height: min(105vw,520px); margin-top: 3rem; }
  #vision .car-sticky { position: relative; height: 100%; }
  #vision .car-drag { inset: 0; width: 100%; height: 100%; }
  #vision .car-hint { right: 1.25rem; bottom: 4%; }
}

/* partner tiers */
.tiers { margin-top: clamp(1.2rem,3.5svh,2.4rem); border-top: 1px solid var(--line); }
.tier { display: grid; grid-template-columns: minmax(150px,230px) 1fr; align-items: center; gap: 1.5rem; padding: clamp(.6rem,1.8svh,1.2rem) 0; border-bottom: 1px solid var(--line); }
.tier-name { display: flex; align-items: baseline; gap: .8rem; font: 500 clamp(1.3rem,min(2.4vw,3.6svh),2rem)/1 var(--sans); letter-spacing: -.03em; }
.tier-name i { font: .75rem var(--mono); color: var(--accent); }
.tier-logos { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.plogo { isolation: isolate; display: grid; place-items: center; height: clamp(56px,9.5svh,92px); padding: .7rem 1.5rem; background: #f4f2ec; border-radius: 4px; transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.plogo:hover { transform: translateY(-4px); }
.plogo img { mix-blend-mode: multiply; display: block; height: clamp(30px,5.2svh,50px); width: auto; max-width: 190px; object-fit: contain; }
.partner-open { display: inline-flex; gap: .5rem; color: var(--accent); font-weight: 500; border: 1px dashed var(--line); padding: .9rem 1.4rem; transition: background-color .3s, color .3s, border-color .3s; }
.partner-open:hover { background: var(--accent); color: var(--on); border-color: var(--accent); }
@media (max-width: 700px) { .tier { grid-template-columns: 1fr; gap: .6rem; } }

/* ---------- Contact: the green field, with the grainy wave rising into the black footer ---------- */
.contact { justify-content: center; isolation: isolate; padding-bottom: clamp(12rem,32svh,20rem); --accent: #fff; --muted: rgba(255,255,255,.72); --line: rgba(255,255,255,.28);
  background: linear-gradient(168deg, #0bd36c 0%, #07a055 45%, #046a3d 100%); }
.contact .section-title { max-width: none; }
.contact__wave { position: absolute; left: -12%; right: -12%; bottom: -8vh; height: calc(44% + 8vh); z-index: 2; pointer-events: none; will-change: transform; }
.contact__wave svg { display: block; width: 100%; height: 100%; will-change: transform; }
.foot { position: relative; z-index: 3; display: flex; flex-direction: column; justify-content: space-between; gap: clamp(2rem,6svh,4rem); min-height: 78svh;
  padding: clamp(3rem,9svh,6rem) 2rem 1.4rem; background: #0b0b0a; color: #f4f2ec; overflow: clip; }
.foot-cols { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; }
.foot-cols h4 { font-weight: 400; text-transform: uppercase; letter-spacing: .14em; color: rgba(244,242,236,.5); margin-bottom: 1.1rem; }
.foot-cols li { padding: .22rem 0; font-size: 1.05rem; }
.foot-cols a:hover, .foot-legal a:hover { color: #4bdc7a; }
.foot-word { align-self: flex-start; display: inline-block; font: 700 19vw/.82 var(--sans); letter-spacing: -.055em; white-space: nowrap; margin-left: -.04em; user-select: none; }
.foot-legal { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.1rem; border-top: 1px solid rgba(244,242,236,.16); color: rgba(244,242,236,.55); }
@media (max-width: 860px) { .foot-cols { grid-template-columns: repeat(2,1fr); } .foot { padding-inline: 1.25rem; } }

.contact .hero__grain { animation: none; }

/* ---------- Team: real photos keep their own aspect ratio ---------- */
.panel#team { --mh: clamp(100px, calc(54svh - 10.5rem), 320px); }
@media (min-width: 981px) {
  /* exactly one screen tall, so the dwell pin (scroll-break) always engages; the swap box flexes to
     whatever height is left under the header, keeping both season panels the same size */
  .panel#team { height: 100svh; --mh: clamp(70px, calc((100svh - 30rem) / 2), 320px); }
  .panel#team .swap { flex: 1 1 auto; min-height: 0; }
}
.team-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.team-head .toggle { margin-top: 0; }
.team-row-label { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; margin: clamp(.7rem,2svh,1.4rem) 0 .55rem; padding-top: clamp(.5rem,1.4svh,1rem); border-top: 1px solid var(--line); }
.member { margin: 0; }
.member img { display: block; width: auto; height: auto; max-width: 100%; max-height: var(--mh);}
.member figcaption { margin-top: .55rem; line-height: 1.25; }
.member strong { display: block; font-weight: 600; font-size: clamp(.8rem,1vw,.98rem); }
.member span { display: block; color: var(--muted); font-size: clamp(.72rem,.9vw,.86rem); }
.group { margin: 0 auto; width: fit-content; max-width: 100%; height: 100%; }
.group img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100% - 5rem); }
.group-names { display: grid; gap: .35rem; margin-top: .9rem; justify-items: center; text-align: center; }
.group-names p { display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem clamp(.8rem,1.6vw,1.6rem); font-weight: 600; font-size: clamp(.8rem,1vw,.98rem); }
.group-names span:not(:last-child)::after { content: "·"; margin-left: clamp(.8rem,1.6vw,1.6rem); color: var(--muted); }
/* off the fixed-height desktop layout, fall back to a viewport-based cap for the group photo */
@media (max-width: 980px), (max-height: 639px) { .group img { max-height: calc(100svh - 25rem); } }

/* ---------- Mark 1: tilted 3D viewports ---------- */
.work__text { max-width: 34ch; color: var(--muted); line-height: 1.5; }
.stage3d { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem,3vw,3rem); align-items: center; perspective: 1700px; perspective-origin: 50% 35%; margin-top: clamp(1rem,3svh,2.2rem); }
.tilt { margin: 0; transform-style: preserve-3d; will-change: transform; }
.tilt__in { position: relative; display: grid; width: fit-content; max-width: 100%; margin-inline: auto; overflow: hidden; border-radius: 10px; background: #111; transform-style: preserve-3d; box-shadow: 0 50px 90px -40px rgba(0,0,0,.55); }
.tilt img, .tilt video { display: block; width: auto; height: auto; max-width: 100%; max-height: min(46svh,520px); }
.tilt figcaption { margin-top: .9rem; color: var(--muted); text-align: center; }
.play { position: absolute; left: 1rem; bottom: 1rem; border: 0; cursor: pointer; padding: .65rem 1rem; border-radius: 999px; background: rgba(244,242,236,.92); color: #101210; transition: opacity .3s, transform .3s; }
.play:hover { transform: scale(1.04); }
.play.hide { opacity: 0; pointer-events: none; }
@media (max-width: 980px), (max-height: 639px) { .stage3d { grid-template-columns: 1fr; gap: 2rem; } .tilt img, .tilt video { max-height: 60vw; } .work__head { flex-direction: column; align-items: flex-start; } }

/* ---------- Smooth scroll (Lenis) ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* a pinned (fixed) section needs no sticky preview; sticky inside a pin makes the preview lag/jump when the pin releases */
#disciplines.is-pinned .d-preview { position: relative; top: auto; }
