/* =========================================================================
   Trespa® webshop retirement page
   Tokens: verified against the Trespa Corebook (my.corebook.io/trespa),
   read 2026-11-10. See BRAND_TOKENS.md for the source of every value.
   ========================================================================= */

/* Roboto = Corebook-approved substitute when Aeonik is not available.
   Self-hosted (SIL OFL 1.1, see fonts/OFL-Roboto.txt): no third-party font request.
   To switch to Aeonik once a web licence is confirmed: add an @font-face for
   "Aeonik" (Light 300, Medium 500, SemiBold 600) and put it first in --font-brand. */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/roboto-latin-wght.20b535fa80.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Corebook › Masterbrand › Colours › Brand colours */
  --c-yellow: #FFD300;   /* Trespa Yellow – "a touch of yellow" only */
  --c-white: #FFFFFF;    /* Trespa White – dominant colour */
  --c-black: #191919;    /* Trespa Black – text colour */
  --c-black-20: #D1D1D1; /* Trespa Black tint 20% */
  --c-black-15: #D8D8D8; /* Trespa Black tint 15% */
  --c-black-10: #E6E6E6; /* Trespa Black tint 10% */
  --c-black-5:  #F0F0F0; /* Trespa Black tint 5%  */

  /* Corebook › Subbrands › colours (subbrand communication only) */
  --c-izeon: #BFCBCB;     /* Trespa Blue */
  --c-izeon-20: #F2F5F5;
  --c-meteon: #D0CCBC;    /* Trespa Sand */
  --c-meteon-20: #F6F5F2;
  --c-pura: #C0C4AE;      /* Pura® NFC Green */
  --c-pura-20: #F2F3EF;
  /* Closure campaign banner (Marketing, Nov 2026) uses Trespa Sand as its background */
  --c-campaign-bg: var(--c-meteon);

  /* Corebook › Masterbrand › Typography */
  --font-brand: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --fw-light: 300;   /* Aeonik Light  → Roboto Light (300)  */
  --fw-medium: 500;  /* Aeonik Medium → Roboto Medium (500) */
  --fw-semibold: 600;/* Aeonik SemiBold → Roboto SemiBold (600) */

  /* Web sizes from the Corebook, scaled down fluidly for small screens */
  --fs-h1: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);   /* 72px, lh 0.9 */
  --fs-h2: clamp(2.25rem, 1.5rem + 3vw, 4rem);      /* 64px, lh 0.9 */
  --fs-h3: clamp(2rem, 1.5rem + 2vw, 3rem);         /* 48px, lh 1   */
  --fs-h4: clamp(1.625rem, 1.4rem + 0.9vw, 2rem);   /* 32px, lh 1   */
  --fs-h5: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem); /* 24px, lh 1.3 */
  --fs-h6: 1.125rem;                                /* 18px, lh 1.3 */
  --fs-body: 1.125rem;                              /* 18px          */
  --fs-caption: 0.875rem;                           /* see BRAND_AUDIT: 12px raised to 14px */

  /* Layout (not specified by the Corebook – implementation choices) */
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1280px;
  --space-section: clamp(56px, 8vw, 120px);
  --line-guide: 12px;         /* yellow "to guide" line width (doubled after Marketing review, 2026-11-25) */
  --focus: 3px solid var(--c-black);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 112px; /* sticky header (88px) + 24px */
  scroll-padding-bottom: 96px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-black);
  font-family: var(--font-brand);
  font-weight: var(--fw-light);
  font-size: var(--fs-body);
  line-height: 1.4;
  font-kerning: normal;
  overflow-wrap: break-word;
}

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

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: var(--fw-light); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: var(--fw-medium); }
/* Corebook › Trademark usage: ® always in superscript, no space after the name */
sup.reg { font-size: 0.5em; line-height: 0; position: relative; top: -0.75em; vertical-align: baseline; margin-left: 0.04em; font-weight: inherit; }

h1, .h1 { font-size: var(--fs-h1); line-height: 0.95; letter-spacing: -0.01em; }
.h3 { font-size: var(--fs-h3); line-height: 1; }
.h4 { font-size: var(--fs-h4); line-height: 1.05; }
.h6 { font-size: var(--fs-h6); line-height: 1.3; font-weight: var(--fw-semibold); }
.lead { font-size: var(--fs-h5); line-height: 1.3; font-weight: var(--fw-medium); }
.caption { font-size: var(--fs-caption); line-height: 1.4; }

a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: var(--focus); outline-offset: 3px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--c-white); color: var(--c-black); padding: 12px 16px;
  font-weight: var(--fw-medium); border: 2px solid var(--c-black);
}
.skip-link:focus { top: 12px; }

/* ---------- Yellow line (Corebook › Core elements) ---------- */
/* "To guide": runs alongside the text, anchored to the layout edge. */
.guide-line { position: relative; padding-left: calc(var(--line-guide) + clamp(16px, 2vw, 28px)); }
.guide-line::before {
  content: ""; position: absolute; left: 0; top: 0.08em; bottom: 0.08em;
  width: var(--line-guide); background: var(--c-yellow);
}
/* "To highlight": runs through the text, thickness = 1/2 of the text size. */
.highlight {
  background-image: linear-gradient(var(--c-yellow), var(--c-yellow));
  background-repeat: no-repeat; background-size: 100% 0.5em; background-position: 0 0.75em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
@media (forced-colors: active) { .highlight { background: none; text-decoration: underline; } }

/* ---------- Calls to action ---------- */
/* "To call to action": yellow line below the text; thickness 1/2 of the text size,
   distance between text and line equals the thickness. */
.cta {
  display: inline-flex; align-items: center; gap: 0.5em;
  min-height: 48px; padding: 6px 0;
  font-weight: var(--fw-medium); font-size: var(--fs-h6); line-height: 1.3;
  text-decoration: none; color: var(--c-black);
}
.cta::after {
  content: ""; width: 0.6em; height: 0.6em; flex: none;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: rotate(45deg); margin-left: -0.1em;
}
/* Primary CTA: no yellow bar under the text (Marketing review 2026-11-25: avoid yellow underlining) */
.cta--primary { font-size: 1.25rem; }
.cta--primary:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
.cta--secondary { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.cta--secondary:hover { text-decoration-thickness: 2px; }

.text-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.text-link:hover { text-decoration-thickness: 2px; }

/* GetTalk call button (external service, opened in a new tab).
   Yellow fill without border, like the buttons on trespa.com (Marketing review 2026-11-25). */
.btn-call {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 22px;
  border: 0; background: var(--c-yellow); color: var(--c-black);
  font-weight: var(--fw-semibold); font-size: 1rem; line-height: 1.2; text-decoration: none;
}
.btn-call:hover span:first-of-type { text-decoration: underline; text-underline-offset: 0.2em; }
.btn-call .icon, .call-fab .icon { width: 20px; height: 20px; fill: currentColor; stroke: none; }
@media (forced-colors: active) { .btn-call, .call-fab { border: 2px solid ButtonText; } }

/* Attention sweep on the main call button, as on the trespa.com "Gratis stalen" button:
   runs once, 1 s after loading; a black panel passes over the yellow button and the text
   briefly turns white. Switched off by the prefers-reduced-motion rule at the top. */
.btn-call--header, .call-fab { position: relative; z-index: 0; overflow: hidden; animation: cta-text 1.6s ease-in-out 1s 1; }
.btn-call--header::before, .call-fab::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--c-black); pointer-events: none;
  transform: translateX(-101%); animation: cta-sweep 1.4s ease-in-out 1.2s 1;
}
@keyframes cta-sweep { 0% { transform: translateX(-101%); } 45%, 55% { transform: translateX(0); } 100% { transform: translateX(101%); } }
@keyframes cta-text { 0%, 35%, 100% { color: var(--c-black); } 45% { color: var(--c-white); } }

/* ---------- Header ---------- */
/* Sticky menu bar: stays at the top while scrolling (request Stefan 2026-11-30). */
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--c-black-10); background: var(--c-white); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 88px; }
/* Logo SVG already contains the Corebook clear space (8x wide, 5x high);
   140px wide → wordmark ≈ 94px, above the 50px online minimum. */
/* Logo links back to the top of the page (404: to the home page). */
.logo-link { display: inline-flex; flex-shrink: 0; margin-left: calc(-1 * 140px * 25 / 153); }
.logo { width: 140px; height: auto; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 28px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; padding: 12px 0; font-size: 1rem; font-weight: var(--fw-medium);
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; text-underline-offset: 0.3em; }

/* Language switch (NL default, EN) */
.lang-switch ul { display: flex; list-style: none; margin: 0; padding: 0; }
.lang-switch li + li { border-left: 1px solid var(--c-black-20); }
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 8px;
  font-size: 1rem; font-weight: var(--fw-medium); text-decoration: none;
}
.lang-switch a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.lang-switch a:not([aria-current]):hover { background: var(--c-black-5); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 104px) clamp(48px, 8vw, 120px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.hero-copy h1 { margin-bottom: clamp(24px, 3vw, 36px); max-width: 15ch; }
.hero-copy .lead { max-width: 34ch; margin-bottom: clamp(28px, 3vw, 40px); }
.actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 40px; }

/* Panels (Corebook › Core elements › Panels): one colour, hanging from the top edge,
   never coming out from below. */
.panels { position: relative; }
.panel { position: absolute; top: 0; background: var(--c-black-10); }
.hero-visual { height: clamp(320px, 38vw, 520px); }
.hero-visual .p1 { left: 0;     width: 12%; height: 58%; }
.hero-visual .p2 { left: 13.5%; width: 8%;  height: 44%; }
.hero-visual .p3 { left: 23%;   width: 40%; height: 100%; }
.hero-visual .p4 { left: 64.5%; width: 21%; height: 80%; }
.hero-visual .p5 { left: 87%;   width: 13%; height: 63%; }

/* Campaign hero: mirrors the Trespa.shop closure banner (Trespa Sand + Pura® NFC planks entering from the right) */
.hero--campaign { position: relative; overflow: hidden; background: var(--c-campaign-bg); }
/* Background-only campaign banner (Marketing, 1850 × 380): planks stay anchored on the right */
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: right center;
}
.hero--campaign .hero-grid { grid-template-columns: minmax(0, 1fr); position: relative; z-index: 1; }
.hero--campaign .hero-copy { max-width: min(880px, 72%); }
.hero--campaign .hero-copy h1 { max-width: none; }
.hero--campaign .hero-copy .lead { max-width: 36ch; font-weight: var(--fw-light); }
.highlight--h1 { font-weight: var(--fw-semibold); background-size: 100% 0.42em; background-position: 0 88%; padding-right: 0.08em; }

/* ---------- Dealer band ---------- */
.band { background: var(--c-white); border-bottom: 1px solid var(--c-black-10); padding-block: clamp(40px, 5vw, 72px); }
.band-links { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 32px; }
.band-note { font-size: 1rem; line-height: 1.4; max-width: 56ch; }
.band-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(32px, 5vw, 80px); align-items: start; }
.band p { max-width: 52ch; }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-section); }
.section--tint { background: var(--c-black-5); }
.section-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px clamp(32px, 5vw, 80px); align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { max-width: 44ch; }
.section-foot { margin-top: 32px; }

/* ---------- Product cards (informational only) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); list-style: none; margin: 0; padding: 0; }
.card { --card-pad: clamp(20px, 2.4vw, 32px); display: flex; flex-direction: column; padding: 0 var(--card-pad) var(--card-pad); background: var(--card-tint); }
/* Product-line thumbnails (same key visuals as trespa.shop) */
.card-img {
  display: block; width: calc(100% + 2 * var(--card-pad)); max-width: none; height: auto;
  aspect-ratio: 3 / 2; object-fit: cover; margin: 0 calc(-1 * var(--card-pad)) 24px;
}
.card-title { margin-bottom: 8px; }
.card-title img { height: 18px; width: auto; max-width: 100%; }
.card-type { font-size: 1rem; font-weight: var(--fw-medium); margin-bottom: 16px; }
.card p:not(.card-type) { flex: 1 0 auto; }
.card .cta { margin-top: 16px; align-self: flex-start; }
.card--izeon  { --card-tint: var(--c-izeon-20);  --card-colour: var(--c-izeon); }
.card--meteon { --card-tint: var(--c-meteon-20); --card-colour: var(--c-meteon); }
.card--pura   { --card-tint: var(--c-pura-20);   --card-colour: var(--c-pura); }

/* ---------- Existing-customer support ---------- */
.support-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px clamp(32px, 5vw, 80px); align-items: start; }
.support-copy h2 { margin-bottom: 28px; }
.support-copy .lead { max-width: 40ch; }
.account-note { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--c-black-20); max-width: 52ch; }
.account-note h3 { margin-bottom: 8px; }
.contact-card { background: var(--c-white); padding: clamp(24px, 3vw, 40px); }
.contact-card h3 { margin-bottom: 16px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.note { margin-top: 12px; font-size: 1rem; line-height: 1.4; max-width: 40ch; }

/* ---------- FAQ (native <details>, works without JavaScript) ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(32px, 5vw, 80px); align-items: start; }
.faq { border-top: 1px solid var(--c-black-20); }
.faq details { border-bottom: 1px solid var(--c-black-20); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  min-height: 56px; padding: 18px 0; cursor: pointer; list-style: none;
  font-size: var(--fs-h6); font-weight: var(--fw-medium); line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-right: 4px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg); transition: transform 150ms ease;
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq-body { padding: 0 0 24px; max-width: 60ch; }

/* ---------- Closing CTA ---------- */
.closing { padding-block: var(--space-section) 0; border-top: 1px solid var(--c-black-10); }
.closing-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 40px clamp(32px, 5vw, 80px); align-items: center; }
.closing h2 { margin-bottom: 24px; }
.closing .lead { margin-bottom: 28px; }
.closing-grid { padding-bottom: var(--space-section); }
/* Dealer-locator mock-up (Marketing asset), links to the dealer locator */
.closing-visual { display: block; }
.closing-visual img { width: 100%; height: auto; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--c-black-10); padding-block: 32px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 40px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 28px; list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-block; padding: 10px 0; font-size: 1rem; font-weight: var(--fw-medium); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.site-footer .caption { margin: 0; max-width: 60ch; }

/* ---------- 404 page ---------- */
.nf-lead { margin-top: 28px; max-width: 40ch; }
.nf-actions { margin-top: 32px; }
.nf-en { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--c-black-20); max-width: 52ch; }

/* ---------- Mobile floating call button ---------- */
.call-fab { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .site-nav { display: none; }
  .lang-switch { margin-left: auto; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { display: grid; grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 640px) and (max-width: 1023px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--pura { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
  .hero-grid, .band-grid, .section-head, .support-grid, .faq-grid, .closing-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { display: none; }
  .hero-bg { display: none; }
  .hero--campaign .hero-copy { max-width: none; }
  .closing-visual { max-width: 480px; }
  /* Corebook: on mobile, centre the logo. Call action moves to the floating button. */
  .header-inner { justify-content: center; min-height: 72px; }
  html { scroll-padding-top: 96px; } /* sticky header (72px) + 24px */
  .header-inner { position: relative; }
  .lang-switch { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); margin-left: 0; }
  .lang-switch a { min-width: 40px; padding: 0 6px; }
  .logo { width: 112px; }
  .logo-link { margin-left: 0; }
  .btn-call--header { display: none; }
  .call-fab {
    display: inline-flex; align-items: center; gap: 10px;
    position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 50; min-height: 52px; padding: 12px 20px 12px 18px;
    background: var(--c-yellow); color: var(--c-black); border: 0;
    font-weight: var(--fw-semibold); font-size: 1rem; text-decoration: none;
    box-shadow: 0 4px 16px rgba(25, 25, 25, 0.25);
  }
  .call-fab:focus-visible { outline: 3px solid var(--c-black); outline-offset: 3px; box-shadow: 0 0 0 3px var(--c-white); }
  body { padding-bottom: 88px; }
  .site-footer { padding-bottom: 24px; }
}
@media print {
  .call-fab, .site-nav, .btn-call--header, .panels, .hero-bg { display: none !important; }
  body { padding: 0; }
  .site-header { position: static; }
}
