/* ==========================================================================
   Soudal Fix All — one-pager
   Layout: elk paneel heeft een "canvas" in design-units (--u).
   Desktop/landscape = Figma-artboard 1920×1080. Portrait = eigen 1000×2000 canvas.
   Alle posities hieronder zijn letterlijk de Figma-coördinaten (in units).
   ========================================================================== */

/* ---- Fonts --------------------------------------------------------------
   Let op: de Druk-bestanden zijn TRIAL-versies. Voor livegang vervangen door de
   gelicentieerde (bij voorkeur .woff2) en enkel de src-regels hieronder aanpassen. */
@font-face {
  font-family: "Druk Wide";
  src: url("../fonts/DrukTextWide-Super-Trial.otf") format("opentype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Druk Condensed";
  src: url("../fonts/DrukCond-Super-Trial.otf") format("opentype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "DIN Pro Cond";
  src: url("../fonts/DINPro-CondMedium.otf") format("opentype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* kleuren uit Figma-variabelen */
  --bg-high-tack: #ed3439;
  --bg-flexi: #00b1ce;
  --bg-turbo: #ffd200;
  --bg-crystal: #a8d8f0;
  --bg-xtreme: #232323;
  --ink-dark: #000;
  --ink-light: #fff;
  --header-bar: #000;

  --font-wide: "Druk Wide", "Arial Black", sans-serif;
  --font-cond: "Druk Condensed", "Impact", sans-serif;
  --font-ui: "DIN Pro Cond", "Arial Narrow", sans-serif;

  /* Hoofdletterhoogte t.o.v. font-size en verticale correctie (in em).
     js/main.js meet deze waarden voor het font dat echt geladen is (Druk of fallback). */
  --cr-wide: 0.72;
  --cr-cond: 0.72;
  --shift-wide: 0;
  --shift-cond: 0;

  --header-h: 84px;

  /* design canvas */
  --cw: 1920;
  --ch: 1080;
  --vh: 100vh;
  --u: min(calc(100vw / var(--cw)), calc(var(--vh) / var(--ch)));
  /* ruimte onder het canvas tot de onderrand van het scherm */
  --gap-b: calc((var(--vh) - var(--ch) * var(--u)) / 2);
}
@supports (height: 100dvh) {
  :root { --vh: 100dvh; }
}

/* ---- Reset / basis ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg-high-tack);
  color: var(--ink-dark);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: none; }
p { margin: 0; }
a { color: inherit; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: #fff; color: #000; padding: 10px 16px;
  font: 600 18px/1 var(--font-ui); text-transform: uppercase; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  background: var(--header-bar);
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 43px 0 44px;
}
.logo {
  position: absolute; left: 44px; top: 14.5px;
  width: 100px;
}
.logo img { width: 100%; height: auto; }

.nav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.nav ul { display: flex; gap: 44px; margin: 0; padding: 0; list-style: none; }
.nav a {
  position: relative; display: block;
  color: var(--ink-light); text-decoration: none; text-transform: uppercase;
  font: 500 24px/1 var(--font-ui); letter-spacing: 0.03em;
  padding: 6px 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: currentColor;
  transform: scaleX(0); transform-origin: left center;
  transition: transform .45s cubic-bezier(.65, 0, .35, 1);
}
.nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(.4); }
.nav a.is-active::after { transform: scaleX(1); }

.cta {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; min-width: 168.8px; padding: 0 22px;
  background: #fff; color: #000; text-decoration: none; text-transform: uppercase;
  font: 600 21px/1 var(--font-ui); letter-spacing: 0.04em;
  transition: background-color .2s, color .2s;
}
.cta:hover, .cta:focus-visible { background: var(--bg-turbo); }

a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

/* ---- Scroll-indicator --------------------------------------------------- */
.progress {
  position: fixed; z-index: 40;
  right: 26px; top: 124px; bottom: 40px; width: 4px;
  color: var(--ink-dark);
  transition: color .4s;
  pointer-events: none;
}
.progress::before {
  content: ""; position: absolute; inset: 0; border-radius: 2px;
  background: currentColor; opacity: .25;
}
.progress__thumb {
  position: absolute; left: 0; top: 0; width: 100%; height: calc(100% / 6);
  border-radius: 2px; background: currentColor;
}
.progress.is-light { color: var(--ink-light); }

/* ---- Panelen ------------------------------------------------------------ */
/* Zonder JS: gewone verticale pagina met alle secties onder elkaar. */
.panel {
  position: relative;
  height: 100vh; height: var(--vh);
  overflow: hidden;
  background: var(--bg);
  color: var(--ink, var(--ink-dark));
}
.hero-only { display: none; }
.overlay { display: none; }

/* Met JS: alle panelen gestapeld in één vast scherm; GSAP doet de rest.
   Panelen worden met een clip-path onthuld (wipe), ze verschuiven niet: FIX, JOBS en
   de koker staan dus op elke sectie exact op dezelfde plek. */
.js, .js body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.js .stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; touch-action: none; }
.js .panel { position: absolute; inset: 0; height: auto; --hx: 0; }
.js .hero-only { display: block; }
.js .lineup.hero-only,
.js .arow.hero-only { display: flex; }
.js .overlay { display: block; position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.js .tube--static { display: none; }
.js:not(.is-ready) .canvas,
.js:not(.is-ready) .site-header,
.js:not(.is-ready) .progress { visibility: hidden; }

.canvas {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--cw) * var(--u));
  height: calc(var(--ch) * var(--u));
  margin-left: calc(var(--cw) * var(--u) / -2);
  margin-top: calc(var(--ch) * var(--u) / -2);
}

/* ---- Typografie --------------------------------------------------------- */
.row {
  position: absolute; left: 0; right: 0;
  top: calc(var(--t) * var(--u));
  text-align: center; white-space: nowrap;
  font-size: calc(var(--cap) / var(--cap-ratio) * var(--u));
  line-height: 1;
  text-transform: uppercase;
  margin-top: calc(var(--shift) * -1em);
}
.row > span { display: inline-block; text-box: inherit; }
.t-wide {
  font-family: var(--font-wide);
  font-weight: 900; font-stretch: 125%;
  font-synthesis: none;
  --cap-ratio: var(--cr-wide);
  --shift: var(--shift-wide);
  text-box: trim-both cap alphabetic;
}
.t-cond {
  font-family: var(--font-cond);
  font-weight: 400;
  font-synthesis: none;
  --cap-ratio: var(--cr-cond);
  --shift: var(--shift-cond);
  text-box: trim-both cap alphabetic;
}

/* FIX + JOBS: productstand (p) en herostand (h). --hx (0 → 1) mengt beide; GSAP animeert --hx. */
.fix, .jobs {
  --t: calc(var(--tp) + (var(--th) - var(--tp)) * var(--hx, 0));
  --cap: calc(var(--cp) + (var(--chh) - var(--cp)) * var(--hx, 0));
}
.fix  { --tp: 136;   --cp: 148.5; --th: 152.5; --chh: 165; }
.jobs { --tp: 685.8; --cp: 88.4;  --th: 548.6; --chh: 98.2; }

/* Headline per product: 2 regels, beide gecentreerd. Regel 2 heeft een opening voor de spuitmond. */
.hl-1 { --t: 288.9; --cap: 191; }
.hl-2 { --t: 488.9; --cap: 191; }
.split { display: flex; justify-content: center; align-items: flex-start; }
.split > .gap { flex: none; width: calc(var(--nozzle-gap, 26) * var(--u)); }

/* Hero: FIX AAAAAAAALLL JOBS */
.arow { --t: 329.3; --cap: 212.8; --pitch: 225; line-height: calc(var(--pitch) / var(--cap) * var(--cap-ratio)); }
.arow { display: flex; justify-content: center; } /* blijft gecentreerd, ook als de rij breder is dan het canvas */
.row > .arow__txt { display: block; white-space: nowrap; text-align: center; }
.arow__txt .a { display: inline-block; transform-origin: 50% 60%; will-change: width, transform; }

/* ---- Schaduw achter de koker (per sectie, in de kleur van de achtergrond) --- */
.shadow {
  position: absolute;
  left: calc(var(--sl, 864.85) * var(--u));
  top: calc(var(--st, 434.8) * var(--u));
  width: calc(var(--sw, 224.1) * var(--u));
  height: calc(var(--sh, 988.4) * var(--u));
  object-fit: cover;
  pointer-events: none;
}
.shadow--xtreme { --sl: 866.1; --st: 462.3; }

/* ---- Vaste koker (één element boven alle panelen) -----------------------
   Productstand (p) = Figma: 222.53 breed, top 380; de spuitmond wordt op 485 afgesneden.
   Herostand (h) = de koker in de line-up waarop geklikt is (--slot 0–4).
   --ht (0 → 1) mengt beide standen; GSAP animeert --ht. */
.ftube {
  --ht: 0;
  --hl: calc(var(--l0) + var(--slot, 1) * var(--lstep));
  position: absolute;
  left:  calc((var(--pl) + (var(--hl) - var(--pl)) * var(--ht)) * var(--u));
  top:   calc((var(--pt) + (var(--htop) - var(--pt)) * var(--ht)) * var(--u));
  width: calc((var(--pw) + (var(--hw) - var(--pw)) * var(--ht)) * var(--u));
  aspect-ratio: 280 / 1270;
  /* spuitmond afgeknipt op 455 (7.43% van de render): de punt komt net over de bovenste kopregel */
  clip-path: inset(calc(7.43% * (1 - var(--ht))) 0 0 0);
  --pl: 850.74; --pt: 380; --pw: 222.53;
  --l0: 619.29; --lstep: 143.25; --htop: 589.94; --hw: 108.92;
}
.ftube__base { position: absolute; inset: 0; width: 100%; height: 100%; }
/* frames uit de draai-animatie (Soudal_Fix_All_Loop) — zelfde positie als de koker in de PNG-render */
.ftube__cv {
  position: absolute; left: 16.79%; top: 2.83%; width: 66.07%; height: 93.62%;
  visibility: hidden;
}
.ftube.has-cv .ftube__cv { visibility: visible; }
.ftube.has-cv .ftube__base { visibility: hidden; }

/* Zonder JS: elke sectie toont zijn eigen koker */
.tube--static {
  position: absolute; overflow: hidden;
  left: calc(850.74 * var(--u)); top: calc(485 * var(--u));
  width: calc(222.53 * var(--u)); bottom: calc(-1 * var(--gap-b));
}
.tube--static img { position: absolute; left: 0; top: calc(-105 * var(--u)); width: 100%; height: auto; }

/* ---- Claims ------------------------------------------------------------- */
.claim {
  position: absolute;
  top: calc(var(--t, 903.2) * var(--u));
  left: calc(var(--l) * var(--u));
  width: calc(var(--w, 600) * var(--u));
  --cap: 16.2;
  --pitch: 27.6; /* afstand tussen de twee regels, in units */
  font-size: calc(var(--cap) / var(--cap-ratio) * var(--u));
  line-height: calc(var(--pitch) / var(--cap) * var(--cap-ratio));
  text-align: center; text-transform: uppercase;
  white-space: nowrap;
  margin-top: calc(var(--shift) * -1em);
}
.claim--l { --l: 239; }
.claim--r { --l: 1081; }

/* ---- Hero line-up ------------------------------------------------------- */
.lineup {
  position: absolute; left: 0; right: 0;
  top: calc(var(--lt, 589.94) * var(--u));
  justify-content: center;
  gap: calc(var(--lg, 34.33) * var(--u));
}
.lineup__item {
  position: relative; display: block;
  width: calc(var(--lw, 108.92) * var(--u));
  cursor: pointer; transition: translate .35s cubic-bezier(.2, .8, .2, 1);
}
.lineup__item:hover, .lineup__item:focus-visible { translate: 0 calc(-14 * var(--u)); }
.lineup__item:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
.lineup__item.is-hidden > img:last-child { visibility: hidden; }
.lineup__item > img:last-child { position: relative; width: 100%; height: auto; }
.lineup__shadow {
  position: absolute; left: -5.09%; top: 92.32%;
  width: 110.17%; height: auto;
}

/* ==========================================================================
   Tablet
   ========================================================================== */
@media (max-width: 1280px) {
  .nav ul { gap: 28px; }
  .nav a { font-size: 21px; }
}

/* ==========================================================================
   Mobiel / portrait — eigen canvas van 1000 × 2000 units
   ========================================================================== */
@media (max-aspect-ratio: 1/1) {
  :root { --cw: 1000; --ch: 2000; }

  .fix  { --tp: 330; --th: 380; }
  .jobs { --tp: 920; --th: 1268; }
  .hl-1 { --t: 500; }
  .hl-2 { --t: 700; --nozzle-gap: 46; }
  /* hero: de A's lopen over 3 regels */
  .arow { --t: 575; }

  /* koker 1.8× groter, gecentreerd, loopt onder de rand door */
  .ftube { --pl: 299.7; --pt: 571; --pw: 400.6; --l0: 39; --lstep: 188; --htop: 1300; --hw: 170; }
  .shadow { --sl: 325.1; --st: 669.6; --sw: 403.4; --sh: 1779.1; }
  .shadow--xtreme { --sl: 327.4; --st: 719.1; }
  .tube--static { left: calc(299.7 * var(--u)); top: calc(760 * var(--u)); width: calc(400.6 * var(--u)); }
  .tube--static img { top: calc(-189 * var(--u)); }

  .claim { --t: 1560; --w: 290; --cap: 17; --pitch: 27; white-space: normal; text-wrap: balance; }
  .claim--l { --l: 4; }
  .claim--r { --l: 706; }

  .lineup { --lt: 1300; --lw: 170; --lg: 18; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .site-header { padding: 0 16px; }
  .logo { left: 16px; top: 10px; width: 66px; }
  .nav { display: none; }
  .cta { height: 36px; min-width: 0; padding: 0 16px; font-size: 18px; }
  .progress { right: 10px; top: 96px; bottom: 24px; width: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav a::after, .progress { transition: none; }
}
