/* optijd.net — stijl van de site. Tokens en regels staan in site/DESIGN_SYSTEM.md. */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("fonts/nunito-latin.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;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: url("fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* kleur */
  --bg: #f6f1e7;
  --surface: #fffaf1;
  --panel: #ece4d4;
  --ink: #151210;
  --ink-2: #4a433b;
  --ink-3: #6f675d;
  --line: #e3d9c6;
  --line-strong: #cfc4b0;
  --green: #1d7a52;
  --green-hover: #145c3d;
  --green-soft: #e5f3ec;
  --plum: #6b4a78;
  --night: #2a1d33;
  --night-line: #5b4868;
  --night-text: #d9cfe0;
  --night-muted: #b7a9c2;
  --device: #1e1b18;
  --device-button: #4a4540;
  --foot-text: #c9c2b6;
  --warn-soft: #fbead0;
  --warn: #7a4a0c;

  /* type */
  --font: "Nunito", ui-rounded, system-ui, -apple-system, sans-serif;
  --fs-small: 15px;
  --fs-body: 17px;
  --fs-lead: clamp(18px, 1.2vw + 13px, 21px);
  --fs-h3: clamp(20px, 0.8vw + 16px, 24px);
  --fs-h2: clamp(32px, 3vw + 18px, 48px);
  --fs-h1: clamp(44px, 5.5vw + 20px, 76px);

  /* ruimte */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --section-y: clamp(64px, 7vw, 104px);
  --gutter: clamp(16px, 5vw, 80px);
  --max: 1280px;

  /* vorm */
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-pill: 999px;
  --tap: 44px;
  --btn: 56px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 600;
  font-size: var(--fs-body);
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol { margin: 0; }
a { color: var(--green); }
a:hover { color: var(--green-hover); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s4); top: var(--s4); z-index: 10; background: var(--ink); color: var(--bg); padding: var(--s3) var(--s4); border-radius: var(--r-sm); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--surface { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--night { background: var(--night); color: var(--bg); }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.intro { max-width: 760px; }

h1 { font-size: var(--fs-h1); line-height: 1; font-weight: 900; letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); line-height: 1.05; font-weight: 900; letter-spacing: -0.02em; }
h3 { font-size: var(--fs-h3); line-height: 1.2; font-weight: 900; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-2); max-width: 30em; }
.muted { color: var(--ink-2); }
.eyebrow { font-size: var(--fs-small); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--plum); }
.section--night .lead, .section--night .muted { color: var(--night-text); }

/* kop */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 88px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--ink); text-decoration: none; font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; align-items: center; gap: var(--s6); font-size: 16px; font-weight: 800; }
.nav a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); }
.nav a:hover { color: var(--green); }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* knoppen */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--btn); padding: 0 28px; border-radius: var(--r-pill); border: 2px solid transparent; font: inherit; font-size: 18px; font-weight: 900; text-decoration: none; cursor: pointer; text-align: center; }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-hover); color: #fff; }
.btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; font-weight: 800; }
.btn--outline:hover { background: var(--ink); color: var(--bg); }
.btn--light { background: var(--bg); color: var(--ink); }
.btn--light:hover { background: #fff; color: var(--ink); }
.btn--dark { min-height: var(--tap); padding: 0 20px; font-size: 16px; font-weight: 800; background: var(--ink); color: var(--bg) !important; }
.btn--dark:hover { background: var(--green); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }

/* het apparaat: een klokscherm in zijn behuizing */
.device { padding: 12px; border-radius: var(--r-md); background: var(--device); }
.device img { width: 100%; aspect-ratio: 320 / 170; border-radius: 4px; object-fit: cover; }
.device--hero { position: relative; padding: 22px 34px 22px 22px; border-radius: 30px; box-shadow: 0 50px 80px -40px rgba(21, 18, 16, .55), inset 0 1px 0 rgba(255, 255, 255, .08); transform: rotate(-2deg); width: 100%; max-width: 576px; }
.device--hero::before, .device--hero::after { content: ""; position: absolute; right: 12px; width: 8px; height: 26px; border-radius: 4px; background: var(--device-button); }
.device--hero::before { top: 25%; }
.device--hero::after { top: 70%; }

/* hero */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 56px; align-items: center; padding-top: 96px; padding-bottom: 112px; }
.hero__text { display: flex; flex-direction: column; gap: var(--s5); }
.hero__art { display: flex; flex-direction: column; align-items: center; gap: var(--s4); }
.facts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: var(--fs-small); font-weight: 700; color: var(--ink-2); padding: 0; list-style: none; }
.caption { font-size: var(--fs-small); font-weight: 700; color: var(--ink-3); text-align: center; }

/* drie stappen */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--s6); margin-top: var(--s7); padding: 0; list-style: none; }
.step { display: flex; flex-direction: column; gap: var(--s4); }
.step__n { font-size: var(--fs-small); font-weight: 900; color: var(--plum); }

/* kopen of bouwen */
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--s6); margin-top: var(--s7); }
.offer { display: flex; flex-direction: column; gap: 20px; padding: clamp(24px, 3vw, 40px); border-radius: var(--r-lg); }
.offer--light { background: var(--bg); color: var(--ink); }
.offer--line { border: 2px solid var(--night-line); }
.offer__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.offer__head h3 { font-size: clamp(24px, 1.5vw + 16px, 30px); }
.offer__price { font-size: clamp(26px, 2vw + 14px, 36px); font-weight: 900; }
.offer p { font-size: 18px; line-height: 1.55; }
.offer--line p { color: var(--night-text); }
.offer > .btn { align-self: flex-start; }
.offer .note { font-size: var(--fs-small); font-weight: 700; color: var(--night-muted); }
.offer--light .note { color: var(--ink-2); }
.offer__spacer { flex-grow: 1; }
.checks { padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s3); font-size: 18px; font-weight: 700; }
.checks li { display: flex; gap: var(--s3); align-items: flex-start; }
.checks svg { color: var(--green); flex: none; width: 22px; height: 22px; margin-top: 3px; }
.badge { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 20px; border-radius: var(--r-pill); background: var(--panel); color: var(--ink-2); font-size: 16px; font-weight: 800; align-self: flex-start; }

/* vragen */
.faq { display: flex; flex-wrap: wrap; gap: var(--s5) var(--s8); }
.faq h2 { flex: 1 1 280px; max-width: 360px; }
.faq dl { flex: 999 1 420px; min-width: 0; }
.guide dl { margin: 0; }
.faq dl { margin: 0; }
.faq__item { display: flex; flex-direction: column; gap: var(--s2); padding: 22px 0; border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__item dt { font-size: 20px; font-weight: 900; }
.faq__item dd { margin: 0; line-height: 1.55; color: var(--ink-2); }

/* voet */
.foot { background: var(--ink); color: var(--foot-text); font-size: var(--fs-small); font-weight: 700; }
.foot .wrap { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s5); flex-wrap: wrap; padding-top: var(--s7); padding-bottom: var(--s7); }
.foot__brand { font-size: 24px; font-weight: 900; color: var(--bg); }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s6); }
.foot a { color: var(--bg); display: inline-flex; align-items: center; min-height: var(--tap); }

/* lange tekstpagina's (bouwgids) */
.page-head { padding-top: var(--s8); padding-bottom: var(--s7); display: flex; flex-direction: column; gap: var(--s4); }
.toc { display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0; list-style: none; margin-top: var(--s2); }
.toc a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 18px; border-radius: var(--r-pill); border: 2px solid var(--line-strong); color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 800; }
.toc a:hover { border-color: var(--ink); }
.guide { display: flex; flex-direction: column; gap: var(--s5); max-width: 760px; scroll-margin-top: var(--s5); }
.guide p, .guide li { color: var(--ink-2); }
.guide strong { color: var(--ink); font-weight: 900; }
.guide ol, .guide ul { padding-left: 1.3em; display: flex; flex-direction: column; gap: var(--s2); }
.parts { display: grid; gap: var(--s3); padding: 0 !important; list-style: none; }
.part { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--s4); align-items: start; padding: var(--s4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.part svg { width: 56px; height: 56px; }
.part h3 { font-size: 18px; }
.part p { font-size: 16px; }
.part .tag { font-size: 14px; font-weight: 800; color: var(--plum); }
.callout { display: flex; gap: var(--s3); padding: var(--s4) 20px; border-radius: var(--r-md); background: var(--panel); color: var(--ink-2); font-size: 16px; }
.callout svg { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.callout--warn { background: var(--warn-soft); color: var(--warn); }
.figure { display: flex; flex-direction: column; gap: var(--s3); }
.figure svg { width: 100%; height: auto; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.figure figcaption { font-size: var(--fs-small); color: var(--ink-3); }

/* software-installer */
.flasher { display: flex; flex-direction: column; gap: var(--s4); padding: clamp(20px, 3vw, 32px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.flasher__status { display: flex; gap: var(--s3); align-items: flex-start; font-size: 16px; color: var(--ink-2); }
.flasher__status svg { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.flasher__status--ok { color: var(--green); }
.flasher__status--warn { color: var(--warn); }
esp-web-install-button [slot="activate"] { width: 100%; }

/* /start: telefoonkaart */
.phone { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; padding-top: var(--s5); padding-bottom: var(--s6); }
.phone h1 { font-size: var(--fs-h2); }
.phone .device { padding: 10px; border-radius: 16px; }
.numbered { padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--s4); counter-reset: n; }
.numbered li { display: flex; gap: 14px; font-weight: 700; line-height: 1.45; counter-increment: n; }
.numbered li::before { content: counter(n); flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font-weight: 900; }
.numbered b { font-weight: 900; }
.center { text-align: center; }

/* 404 */
.lost { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; gap: var(--s5); }

/* één breekpunt: telefoon */
@media (max-width: 600px) {
  .top .wrap { min-height: 72px; }
  .brand { font-size: 22px; }
  .brand svg { width: 26px; height: 26px; }
  .nav { gap: var(--s2); }
  .nav .nav__link { display: none; }
  .hero { gap: var(--s7); padding-top: var(--s7); padding-bottom: var(--s8); }
  .hero__art { order: -1; }
  .device--hero { padding: 12px 20px 12px 12px; border-radius: 20px; transform: rotate(-1.5deg); }
  .device--hero::before, .device--hero::after { right: 6px; width: 6px; height: 18px; }
  .actions .btn { width: 100%; }
  .steps { gap: var(--s7); }
  .offers { gap: var(--s5); }
  .offer .btn { width: 100%; }
  .foot nav { flex-direction: column; }
}
