/* Kerstmenu Chef Demkes: een gedrukte menukaart op een antraciet tafel, met een bon die meeloopt. */
:root {
  --table: #161314;      /* diep zwart (klant wil meer zwart/goud) */
  --table-2: #1F1B1C;
  --black: #1C1819;      /* zwarte panelen en knoppen op de kaart */
  --on-black: #EFE6D4;
  --on-black-soft: #B5A992;
  --paper: #F4ECDD;      /* menukaart */
  --paper-2: #EBE0CC;
  --ink: #2B2420;
  --ink-soft: #6E625A;
  --rule: #CDBB98;
  --gold: #D8AE44;       /* merkgoud */
  --gold-ink: #946E1F;   /* goud dat leesbaar is op papier */
  --cranberry: #9E2B3A;
  --pine: #24463A;
  --receipt: #FBF8F1;

  --display: 'Antonio', 'Arial Narrow', sans-serif;
  --serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
/* hidden moet altijd winnen, ook van display:flex/grid in componentregels */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--table);
  color: var(--ink);
  font: 400 17px/1.6 var(--serif);
  padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
}
a { color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---- Hero: op de tafel ------------------------------------------------- */
.hero { text-align: center; padding: 34px 16px 0; max-width: 720px; margin: 0 auto; color: #E9DFCC; }
.hero-logo { display: inline-block; }
.hero-logo img { width: min(240px, 64vw); height: auto; display: block; }
.hero h1 {
  font-family: var(--display); font-weight: 300; color: var(--gold);
  font-size: clamp(40px, 8vw, 60px); line-height: 1; letter-spacing: .04em;
  margin: 22px 0 0;
}
.intro { max-width: 34em; margin: 12px auto 0; font-size: 16.5px; line-height: 1.6; }
.deadline { margin: 10px 0 0; font-style: italic; color: #BFB29C; }

/* ---- Stappen ------------------------------------------------------------- */
.steps { list-style: none; display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin: 30px auto 22px; padding: 0 16px; color: #9C907E; font-size: 15px; }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps span { width: 24px; height: 24px; flex: none; border: 1px solid #5A5150; border-radius: 50%; }
.steps svg { display: block; }
.steps text { font-family: var(--display); font-size: 15px; fill: currentColor; }
.steps .is-active { color: #F1E8D6; }
.steps .is-active span { background: var(--gold); border-color: var(--gold); color: var(--table); }
.steps .is-done span { border-color: var(--gold); color: var(--gold); }

/* ---- Indeling: kaart + bon ------------------------------------------------ */
.layout { max-width: 760px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 1120px) {
  .layout { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; align-items: start; }
  .layout.is-single { display: block; max-width: 760px; }
}

/* ---- De menukaart ----------------------------------------------------------- */
.card {
  background: var(--paper);
  border-radius: 3px;
  padding: 40px 44px 30px;
  position: relative;
  box-shadow: 0 2px 0 #FFFFFF14 inset, 0 30px 70px rgba(0, 0, 0, .45), 0 4px 12px rgba(0, 0, 0, .3);
}
.card::before {
  content: ''; position: absolute; inset: 12px; pointer-events: none;
  border: 1px solid var(--gold); outline: 1px solid var(--gold); outline-offset: -5px;
}

.course + .course { margin-top: 44px; }
.course > h2 {
  font-family: var(--display); font-weight: 500; font-size: 30px; letter-spacing: .08em;
  text-align: center; color: var(--ink);
}
.course > h2::after { content: ''; display: block; width: 44px; height: 2px; background: var(--gold); margin: 12px auto 0; }
.course-note { text-align: center; color: var(--ink-soft); font-style: italic; margin: 12px auto 0; max-width: 30em; font-size: 15.5px; }
.dishes { margin-top: 20px; }

.dish, .side-opt { display: flex; align-items: center; gap: 22px; padding: 14px 0; position: relative; }
.dish + .dish { border-top: 1px solid #E2D6BF; }
.dish-text { flex: 1; min-width: 0; }
.dish-line { display: flex; align-items: baseline; gap: 10px; }
.dish h3 { font-size: 19px; line-height: 1.3; }
.leader { flex: 1; min-width: 20px; border-bottom: 2px dotted #C9A54E; transform: translateY(-5px); }
.dish-price { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; font-size: 17px; font-weight: 700; color: var(--gold-ink); }
.dish-sub { margin: 3px 0 0; font-style: italic; color: var(--ink-soft); font-size: 15.5px; line-height: 1.45; }
.unit { font-style: normal; font-size: 13.5px; color: var(--ink-soft); white-space: nowrap; }
.unit.after-sub { margin-left: .7em; padding-left: .7em; border-left: 1px solid #C9B795; }

/* gekozen gerecht: gouden streep in de kantlijn */
.dish.is-chosen::before, .side-opt.is-chosen::before {
  content: ''; position: absolute; left: -22px; top: 14px; bottom: 14px; width: 3px; background: var(--gold); border-radius: 2px;
}

/* normaal + vegetarisch: twee tellers onder elkaar */
.variants { display: flex; flex-direction: column; gap: 8px; flex: none; }
.variant { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.variant-label { font-size: 15px; color: var(--ink-soft); }
.variant.is-chosen .variant-label { color: var(--ink); font-weight: 700; }
.check input { width: 18px; height: 18px; accent-color: var(--pine); margin: 0; }

/* ---- Teller ---------------------------------------------------------------- */
.stepper { display: flex; align-items: center; flex: none; gap: 2px; }
.step-btn {
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--black); background: var(--black); color: var(--gold);
  font: 400 22px/1 var(--serif); display: grid; place-items: center;
  transition: background-color .15s, color .15s, border-color .15s;
}
.step-btn:hover:not(:disabled) { background: var(--gold); border-color: var(--gold); color: var(--black); }
.step-btn:disabled { opacity: .3; cursor: not-allowed; }
.stepper input {
  width: 38px; text-align: center; background: transparent; border: 0; color: var(--ink);
  font: 500 22px var(--display); -moz-appearance: textfield; appearance: textfield; padding: 0;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.is-chosen > .stepper input, .variant.is-chosen .stepper input { color: var(--gold-ink); }
.stepper.small .step-btn { width: 34px; height: 34px; font-size: 20px; }

/* ---- Bijgerechten: één bordje per hoofdgerecht ----------------------------- */
.sides {
  margin: 26px -20px 0; padding: 26px 20px 18px;
  background: var(--black); color: var(--on-black);
  border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
}
.sides:not([hidden]) { animation: unfold .35s ease-out; }
.sides-title { font-family: var(--display); font-weight: 500; font-size: 24px; letter-spacing: .06em; color: var(--gold); }
.sides-intro { margin: 6px 0 0; font-size: 15.5px; max-width: 36em; color: var(--on-black); }
.sides-intro strong { color: var(--gold); font-weight: 700; }
.side-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 18px; }
.side-group { min-width: 0; }
.side-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.side-group h4 { font-size: 19px; font-weight: 700; color: var(--on-black); }
.side-status { font-size: 14.5px; font-style: italic; color: #E8A3AD; }
.side-group.is-done .side-status { color: var(--gold); font-style: normal; font-weight: 700; }
.side-group.is-done .side-status::before { content: '✓ '; }

.plates { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; min-height: 22px; }
.plate {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid #D8AE4466; background: transparent;
  box-shadow: inset 0 0 0 3px var(--black), inset 0 0 0 4px #D8AE4433;
  transition: background-color .2s;
}
.plate.is-full { background: var(--gold); border-color: var(--gold); }
.side-group.is-done .plate.is-full { background: #F0D48A; border-color: #F0D48A; }
.plate.is-over { background: #D2566A; border-color: #D2566A; }
.plates-count { font-family: var(--display); font-size: 20px; color: var(--gold); }

.side-opt { padding: 9px 0; gap: 12px; }
.side-opt + .side-opt { border-top: 1px solid #3A3435; }
.side-opt h5 { font-size: 16.5px; line-height: 1.3; color: var(--on-black); }
.side-opt .dish-sub { font-size: 14px; color: var(--on-black-soft); }
.side-opt.is-chosen::before { left: -12px; top: 9px; bottom: 9px; }
.sides .step-btn { background: transparent; border-color: #D8AE4499; }
.sides .step-btn:hover:not(:disabled) { background: var(--gold); color: var(--black); }
.sides .stepper input { color: var(--on-black); }
.sides .is-chosen > .stepper input { color: var(--gold); }

.shake { animation: shake .45s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes unfold { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---- Stap 2 ------------------------------------------------------------------ */
.summary { margin-top: 18px; }
.summary h4, .bon-lines h4 { font-family: var(--display); font-weight: 500; letter-spacing: .06em; font-size: 16px; color: var(--gold-ink); margin: 18px 0 2px; }
.sum-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; padding: 5px 0; border-bottom: 1px dotted #CDBB98; }
.sum-row .q { font-family: var(--display); font-size: 17px; }
.sum-row .p { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sum-row .muted { color: var(--ink-soft); font-style: italic; }
.sum-total { display: flex; justify-content: space-between; padding: 16px 0 0; font-family: var(--display); font-size: 30px; font-weight: 500; }
.link-btn { background: none; border: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font: inherit; cursor: pointer; padding: 16px 0 0; }
.link-btn.back { padding: 0; margin-bottom: 18px; font-size: 15px; color: var(--ink-soft); }
.step > .course + .course { margin-top: 44px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin-top: 22px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: var(--ink-soft); }
.field em { font-style: italic; }
.field-wide { grid-column: 1 / -1; }
.field input, .field textarea {
  background: transparent; border: 0; border-bottom: 1.5px solid #A8957A; border-radius: 0;
  color: var(--ink); font: 18px var(--serif); padding: 6px 2px;
}
.field textarea { border: 1.5px solid #A8957A; padding: 8px 10px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: #FFFFFF66; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pickup { margin: 26px 0 0; padding: 16px 20px; background: var(--black); color: var(--on-black); border-left: 3px solid var(--gold); }
.pickup h3 { font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: .06em; color: var(--gold); }
.pickup p { margin: 4px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 0; cursor: pointer; }
.check input { margin-top: 4px; flex: none; }
.errors { margin-top: 18px; padding: 12px 16px; border-left: 3px solid var(--cranberry); background: #9E2B3A14; color: var(--cranberry); }
.errors ul { margin: 0; padding-left: 18px; }

.done { text-align: center; padding: 10px 0; }
.done > h2 { font-size: 46px; }
.done p { max-width: 32em; margin: 18px auto 0; }
.done .pickup { text-align: left; max-width: 30em; margin: 26px auto 0; }
.closed { text-align: center; margin-top: 28px; }
.closed h2 { font-family: var(--display); font-size: 34px; letter-spacing: .06em; margin-bottom: 12px; }

/* ---- Bon: telefoon = balk onderin, computer = bon naast de kaart ------------- */
.bon {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--table-2); color: #EFE6D4;
  border-top: 1px solid #D8AE4466;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.bon-paper { display: none; }
.bar-inner { max-width: 728px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.bar-total { display: flex; flex-direction: column; line-height: 1.15; }
.bar-count { font-size: 14px; color: #B5A992; }
.bar-total strong { font-family: var(--display); font-weight: 500; font-size: 30px; color: var(--gold); letter-spacing: .02em; }
.btn {
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--gold); color: var(--table);
  font: 700 15.5px var(--serif); padding: 14px 24px;
  transition: background-color .15s, transform .1s;
}
.btn:hover { background: #E6BE57; }
.btn:active { transform: translateY(1px); }
.btn.is-muted { background: #8C7A4E; color: #2B2420; }
.btn:disabled { opacity: .6; cursor: wait; }
.bar-msg { max-width: 728px; margin: 8px auto 0; color: #F2B8B5; font-size: 14.5px; }

/* Telefoon/tablet: knop bovenin de balk, totaalregel eronder.
   iPhone/Safari gebruikt een tik in de onderste strook om de ingeklapte adresbalk te openen;
   in die strook staat nu alleen tekst, zodat de knop altijd in één tik werkt. */
@media (max-width: 1119px) {
  .bon { display: flex; flex-direction: column; }
  .bar-msg { order: -1; margin: 0 auto 8px; width: 100%; }
  .bar-inner { width: 100%; flex-direction: column-reverse; align-items: stretch; gap: 4px; }
  .bar-total { flex-direction: row; justify-content: space-between; align-items: baseline; padding: 2px 4px 0; }
  .bar-total strong { font-size: 24px; }
  .btn { width: 100%; white-space: nowrap; }
}

@media (min-width: 1120px) {
  body { padding-bottom: 40px; }
  .bon { position: sticky; top: 24px; background: transparent; border: 0; padding: 0; color: var(--ink); }
  .bon-paper {
    display: block; background: var(--receipt); padding: 22px 22px 26px;
    max-height: calc(100vh - 230px); overflow-y: auto;
    /* gekartelde onderrand van een bon */
    -webkit-mask: linear-gradient(#000, #000) top / 100% calc(100% - 9px) no-repeat,
                  conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 18px 9px repeat-x;
            mask: linear-gradient(#000, #000) top / 100% calc(100% - 9px) no-repeat,
                  conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 18px 9px repeat-x;
  }
  .bon-title { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: .08em; text-align: center; padding-bottom: 10px; border-bottom: 1px dashed #B9A684; }
  .bon-lines { font-size: 14.5px; }
  .bon-lines h4 { font-size: 14px; margin-top: 14px; }
  .bon-lines .sum-row { grid-template-columns: 28px 1fr auto; padding: 3px 0; border-bottom: 0; }
  .bon-lines .sum-row .q { font-size: 15px; }
  .bon-empty { color: var(--ink-soft); font-style: italic; margin: 16px 0 0; text-align: center; }
  .bon-todo { color: var(--cranberry); font-style: italic; margin: 4px 0; font-size: 14px; }
  /* stap 2: de bestelling staat al op de bon, dus niet nog eens in de kaart */
  .order-review { display: none; }
  .bar-inner { display: block; margin-top: 16px; }
  .bar-total { flex-direction: row; justify-content: space-between; align-items: baseline; color: #EFE6D4; margin-bottom: 12px; }
  .bar-count { color: #B5A992; }
  .btn { width: 100%; }
  .bar-msg { color: #F2B8B5; }
}

/* ---- Voet --------------------------------------------------------------------- */
.foot { text-align: center; color: #9C907E; font-size: 14.5px; padding: 40px 16px 24px; }
.foot p { margin: 2px 0; }
.foot p:first-child { font-family: var(--display); letter-spacing: .1em; color: var(--gold); font-size: 16px; }
.foot a { color: #CFC2AA; }
body.is-done { padding-bottom: 0; }
/* genoeg hoogte zodat de bevestiging bovenaan in beeld kan scrollen */
body.is-done .layout { min-height: 100vh; min-height: 100svh; }
/* na het bestellen is er geen bon meer: één gecentreerde kolom i.p.v. kaart + lege bonkolom */
body.is-done .layout { display: block; max-width: 760px; }

/* ---- Smal scherm ----------------------------------------------------------------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 26px; }
  .card { padding: 30px 22px 22px; }
  .card::before { inset: 8px; }
  .dish { flex-wrap: wrap; gap: 8px 12px; padding: 14px 0 12px; }
  .dish-text { flex-basis: 100%; }
  /* eenheid op eigen regel i.p.v. achter een lange subtitel afbreken */
  .unit.after-sub { display: block; margin: 2px 0 0; padding: 0; border: 0; }
  .dish .stepper, .dish .variants { margin-left: auto; }
  .dish.is-chosen::before, .side-opt.is-chosen::before { left: -14px; }
  .sides { margin: 22px -22px 0; padding: 22px 22px 14px; }
  .side-groups { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .bar-total strong { font-size: 26px; }
  .btn { padding: 13px 18px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- Mollie: testmodus-balk en terugkeerpagina ------------------------------------- */
.testmode { background: #F0D48A; color: var(--black); text-align: center; font-size: 14.5px; font-weight: 700; padding: 8px 16px; }
.hero-small { padding-bottom: 28px; }
.done .btn { display: inline-block; margin-top: 22px; text-decoration: none; }
.done .errors { text-align: left; max-width: 30em; margin: 18px auto 0; }
