/* ─────────────────────────────────────────────
   Wijn is fijn — een klein eerbetoon aan Grenache
   ───────────────────────────────────────────── */

:root {
  /* surfaces */
  --bg:          #1b060c;
  --bg-alt:      #240a12;
  --surface:     #2c0e18;
  --surface-up:  #3a1421;

  /* ink */
  --ink:         #f7ede6;
  --ink-2:       #cbaeb5;
  --ink-muted:   #9c818a;

  /* accents */
  --gold:        #e0a94a;
  --gold-soft:   rgba(224, 169, 74, 0.18);

  /* data (één hue: sequentieel/meter) */
  --data:        #c9455e;
  --data-track:  #4a1a26;

  /* status */
  --good:        #5fb786;
  --bad:         #e4736c;

  --radius:      14px;
  --maxw:        62rem;
  --ease:        cubic-bezier(0.22, 0.68, 0.32, 1);

  --font-display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.6rem); margin: 0 0 0.5rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.25rem; }
p  { margin: 0 0 1rem; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  background: var(--gold);
  color: #2a1000;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { left: 0.5rem; }

/* ── Buttons ─────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font: inherit;
  font-weight: 600;
  color: #2a1000;
  background: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s var(--ease), filter 0.15s var(--ease);
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); }

.btn--ghost {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold-soft);
}
.btn--ghost:hover { background: var(--gold-soft); }

/* ── Hero ────────────────────────────────── */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 7rem) 1.5rem clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -30% 20% auto -20%;
  height: 32rem;
  background: radial-gradient(ellipse at center, rgba(201, 69, 94, 0.28), transparent 65%);
  pointer-events: none;
}
.hero__inner { position: relative; max-width: 34rem; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(3rem, 1.6rem + 6.5vw, 5.5rem);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero__lead {
  color: var(--ink-2);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  text-wrap: pretty;
}

/* Het glas vult zich bij binnenkomst */
.hero__glass { position: relative; }
.glass { width: 108px; }
.glass__bowl {
  height: 132px;
  border: 2px solid var(--gold-soft);
  border-top: none;
  border-radius: 6px 6px 54px 54px / 6px 6px 76px 76px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}
/* Het glas is gevuld; de animatie schenkt het alleen even in. */
.glass__wine {
  display: block;
  width: 100%;
  height: 62%;
  background: linear-gradient(180deg, #a5324a, var(--data));
  border-radius: 0 0 50px 50px / 0 0 74px 74px;
  animation: schenken 1.6s var(--ease) both;
}
@keyframes schenken { from { height: 0; } }

.glass__stem { width: 3px; height: 62px; margin: 0 auto; background: var(--gold-soft); }
.glass__foot { width: 74px; height: 6px; margin: 0 auto; background: var(--gold-soft); border-radius: 999px; }

/* ── Secties ─────────────────────────────── */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) 1.5rem;
}
/* Zelfde tekstkolom als een gewone sectie, maar de achtergrond loopt door
   tot de schermranden. */
.section--alt {
  max-width: none;
  background: var(--bg-alt);
  border-block: 1px solid rgba(255, 255, 255, 0.045);
  padding-inline: max(1.5rem, calc((100% - var(--maxw)) / 2 + 1.5rem));
}

.section__lead {
  color: var(--ink-2);
  max-width: 44ch;
  margin-bottom: 2.5rem;
  text-wrap: pretty;
}

/* ── Feitenkaartjes ──────────────────────── */

.facts {
  list-style: none;
  margin: 0 0 3.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.85rem;
}
.fact {
  background: var(--surface);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.fact__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  font-weight: 600;
}
.fact__value { font-family: var(--font-display); font-size: 1.5rem; }
.fact__note { font-size: 0.83rem; color: var(--ink-muted); line-height: 1.45; }

/* ── Smaakprofiel (meters) ───────────────── */

.profile {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  padding: clamp(1.35rem, 3vw, 2rem);
}
.profile figcaption { margin-bottom: 1.75rem; }
.profile figcaption p { color: var(--ink-muted); font-size: 0.88rem; margin: 0; }

.profile__rows { display: grid; gap: 1.15rem; }

.meter {
  display: grid;
  grid-template-columns: minmax(6rem, 8rem) 1fr auto;
  align-items: center;
  gap: 0.9rem;
  position: relative;
}
.meter__name { font-size: 0.92rem; color: var(--ink-2); }
.meter__track {
  height: 10px;
  background: var(--data-track);
  border-radius: 999px;
  overflow: hidden;
}
.meter__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--data);
  border-radius: 0 4px 4px 0;
  transition: width 1.1s var(--ease);
}
.meter__value {
  font-size: 0.82rem;
  color: var(--ink-muted);
  min-width: 8.5rem;
}

/* hover-laag */
.meter::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: var(--surface-up);
  border: 1px solid var(--gold-soft);
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s var(--ease);
  z-index: 3;
}
.meter:hover::after { opacity: 1; }

.profile__table { margin-top: 1.75rem; }
.profile__table summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.profile__table table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.9rem;
  font-size: 0.87rem;
}
.profile__table th,
.profile__table td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.profile__table th { color: var(--gold); font-weight: 600; }
.profile__table td:last-child { font-variant-numeric: tabular-nums; }

/* ── Weetjesmachine ──────────────────────── */

.machine {
  background: var(--surface);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 3rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.machine::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 14rem;
  background: radial-gradient(ellipse at center, rgba(224, 169, 74, 0.12), transparent 70%);
  pointer-events: none;
}
.machine__counter {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.machine__text {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 0.95rem + 1vw, 1.6rem);
  line-height: 1.45;
  margin: 0 auto 2rem;
  max-width: 40ch;
  min-height: 4.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-wrap: pretty;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}
.machine__text.is-schenken { opacity: 0; transform: translateY(8px); }

/* ── Regio's ─────────────────────────────── */

.regios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.regio-knop {
  font: inherit;
  font-size: 0.92rem;
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.regio-knop:hover { background: rgba(255, 255, 255, 0.05); color: var(--ink); }
.regio-knop[aria-selected="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: #2a1000;
  font-weight: 600;
}

.regio-kaart {
  background: var(--surface);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  padding: clamp(1.35rem, 3.5vw, 2.25rem);
}
.regio-kaart h3 { font-size: 1.6rem; }
.regio-kaart__land {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.regio-kaart__tekst { color: var(--ink-2); max-width: 52ch; text-wrap: pretty; }
.regio-kaart__meta {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1rem;
}
.regio-kaart__meta dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--ink-muted);
  margin-bottom: 0.15rem;
}
.regio-kaart__meta dd { margin: 0; font-size: 0.95rem; }

/* ── Quiz ────────────────────────────────── */

.quiz {
  background: var(--surface);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.quiz__voortgang {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.quiz__stip {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--data-track);
}
.quiz__telling {
  margin-left: 0.5rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.quiz__stip.is-nu   { background: var(--gold); transform: scale(1.35); }
.quiz__stip.is-goed { background: var(--good); }
.quiz__stip.is-fout { background: var(--bad); }

.quiz__vraag {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 0.9vw, 1.55rem);
  margin: 0 0 1.5rem;
  text-wrap: pretty;
}

.quiz__opties { display: grid; gap: 0.6rem; margin-bottom: 1.25rem; }
.quiz__optie {
  font: inherit;
  text-align: left;
  background: var(--surface-up);
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.8rem 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.quiz__optie:hover:not(:disabled) { background: #491a29; }
.quiz__optie:disabled { cursor: default; }
.quiz__optie::before {
  content: "";
  flex: none;
  width: 1.15rem;
  font-weight: 700;
}
.quiz__optie.is-goed { border-color: var(--good); background: rgba(95, 183, 134, 0.13); }
.quiz__optie.is-goed::before { content: "✓"; color: var(--good); }
.quiz__optie.is-fout { border-color: var(--bad); background: rgba(228, 115, 108, 0.13); }
.quiz__optie.is-fout::before { content: "✕"; color: var(--bad); }

.quiz__uitleg {
  color: var(--ink-2);
  font-size: 0.92rem;
  border-left: 2px solid var(--gold);
  padding-left: 0.9rem;
  margin: 0 0 1.25rem;
  text-wrap: pretty;
}

.quiz__slot { text-align: center; padding: 1rem 0; }
.quiz__score {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 2rem + 3vw, 4rem);
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.quiz__oordeel { font-size: 1.1rem; margin-bottom: 1.75rem; color: var(--ink-2); }

/* ── Footer ──────────────────────────────── */

.footer {
  text-align: center;
  padding: 4rem 1.5rem 5rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
}
.footer__toast {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.footer p:last-child { max-width: 34ch; margin-inline: auto; }

/* ── Klein scherm ────────────────────────── */

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; }
  .hero__glass { justify-self: start; }
  .meter { grid-template-columns: 1fr; gap: 0.35rem; }
  .meter__value { min-width: 0; }
}

/* ── Minder beweging ─────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-fill-mode: forwards !important;
    transition-duration: 0.01ms !important;
  }
}
