/* Klaar Labs: design tokens */
:root {
  --paper: #EDF0EE;
  --surface: #F8FAF8;
  --white: #FFFFFF;
  --ink: #13243A;
  --muted: #4B596A;
  --line: #C9D1CF;
  --line-soft: #DDE3E1;

  --klaar: #0A7A52;
  --klaar-soft: #D3ECDF;
  --klaar-bright: #5FD3A0;
  --busy: #C98A12;
  --busy-text: #7A4A00;
  --busy-bright: #F2C46B;
  --idle: #8A949D;
  --idle-text: #56626E;

  --ink-2: #1B3150;
  --ink-line: #2E4766;
  --on-ink: #E8EDF2;
  --on-ink-muted: #A8B6C6;

  --focus: var(--klaar);

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-menuklaar: "Fraunces", Georgia, serif;
  --wide: 114%;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem);
  --step-4: clamp(2.125rem, 1.5rem + 2.6vw, 3.5rem);
  --step-5: clamp(2.625rem, 1.2rem + 5.6vw, 6rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-1: 160ms;
  --dur-2: 320ms;
  --dur-3: 640ms;

  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

html:not(.js) .js-only { display: none; }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-s);
  text-decoration: none;
}
.skip-link:focus { top: var(--space-3); }

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Logo system: mark + wordmark */
.wordmark {
  font-weight: 400;
  font-stretch: var(--wide);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark__klaar { font-weight: 700; }

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  --mark-check: var(--klaar);
}
.lockup__mark { width: 1.35em; height: 1.35em; flex: none; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1875rem;
  text-decoration: none;
}
.logo__mark { width: 28px; height: 28px; }
.logo__stem,
.logo__check {
  fill: none;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 2;
  stroke-dashoffset: 0;
}
.logo__stem { stroke: currentColor; animation: draw 480ms var(--ease-inout) 150ms both; }
.logo__check { stroke: var(--klaar); animation: draw 560ms var(--ease-inout) 560ms both; }

@keyframes draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.button:hover { background: var(--klaar); border-color: var(--klaar); }
.button--ghost { background: transparent; color: var(--ink); }
.button--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button--small { min-height: 40px; padding: 0.5rem 1rem; font-size: var(--step--1); }
.button--light { background: var(--on-ink); border-color: var(--on-ink); color: var(--ink); }
.button--light:hover { background: var(--klaar-bright); border-color: var(--klaar-bright); }

/* Status labels */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.2rem 0.65rem 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status--busy { background: rgba(201, 138, 18, 0.16); color: var(--busy-bright); }
.status--busy::before { background: var(--busy-bright); }

/* Header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(237, 240, 238, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  min-height: var(--header-h);
}
.nav__menu { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-6); }
.nav__links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); }
.nav__links a {
  position: relative;
  padding-block: var(--space-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease);
}
.nav__links a:hover::after,
.nav__links a[aria-current="true"]::after { transform: scaleX(1); }

.nav__toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
}
.nav__toggle-bars,
.nav__toggle-bars::before {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur-2) var(--ease);
}
.nav__toggle-bars { position: relative; transform: translateY(-3px); }
.nav__toggle-bars::before { content: ""; position: absolute; top: 6px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars::before { transform: translateY(-6px) rotate(-90deg); }

@media (max-width: 960px) {
  .js .nav { flex-wrap: nowrap; }
  .js .nav__toggle { display: inline-flex; }
  .js .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    padding: var(--space-4) var(--gutter) var(--space-5);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease), visibility 0s linear var(--dur-2);
  }
  .js .nav__menu.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
  }
  .js .nav__links { flex-direction: column; gap: 0; }
  .js .nav__links a { display: block; padding-block: var(--space-3); border-bottom: 1px solid var(--line-soft); }
  .js .nav__links a::after { display: none; }
}

/* Sections */
.section { padding-block: clamp(4rem, 3rem + 5vw, 8rem); }
.section--surface { background: var(--surface); }
.section--ink {
  --focus: var(--klaar-bright);
  background: var(--ink);
  color: var(--on-ink);
}

.section__head { max-width: 46rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }
.section__title {
  font-size: var(--step-4);
  font-weight: 650;
  font-stretch: var(--wide);
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.section__intro {
  margin-top: var(--space-4);
  max-width: 40rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--muted);
}
.section--ink .section__intro { color: var(--on-ink-muted); }

/* Hero */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 2rem + 6vw, 7rem) clamp(2rem, 1rem + 3vw, 4rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 2rem + 3vw, 5rem);
  align-items: center;
}
.hero__studio {
  margin-bottom: var(--space-5);
  font-weight: 600;
  color: var(--muted);
}
.hero__title {
  font-size: var(--step-5);
  font-weight: 650;
  font-stretch: 118%;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.hero__title span { display: block; }
.hero__lead {
  max-width: 36rem;
  margin-top: var(--space-6);
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }

/* Hero checklist */
.checklist {
  padding: var(--space-5) var(--space-5) var(--space-4);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: 0 1px 0 var(--line-soft), 0 24px 48px -32px rgba(19, 36, 58, 0.35);
}
.checklist__title { font-weight: 650; font-stretch: var(--wide); font-size: var(--step-1); line-height: 1.3; }
.checklist__rows { margin-top: var(--space-4); }
.checklist__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-3);
  border-top: 1px solid var(--line-soft);
  line-height: 1.4;
}
.checkbox {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--klaar);
  border: 1.5px solid var(--klaar);
  transition: background-color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.checkbox::after {
  content: "";
  position: absolute;
  left: 6.5px;
  top: 2.5px;
  width: 6px;
  height: 11px;
  border: solid var(--white);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(1);
  transition: transform var(--dur-2) var(--ease) 60ms;
}
.js .checklist__row:not(.is-done) .checkbox { background: transparent; border-color: var(--line); }
.js .checklist__row:not(.is-done) .checkbox::after { transform: rotate(45deg) scale(0); }

.checklist__status {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1.5px solid var(--ink);
  font-weight: 650;
}
.checklist__status-label { margin-right: auto; font-weight: 500; color: var(--muted); }
.checklist__pending { display: none; color: var(--busy-text); }
.checklist__done {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--klaar);
  font-size: var(--step-1);
  font-stretch: var(--wide);
}
.checklist__mark { width: 24px; height: 24px; color: var(--ink); --mark-check: var(--klaar); }
.js .checklist:not(.is-done) .checklist__pending { display: inline; }
.js .checklist:not(.is-done) .checklist__done { display: none; }
.js .checklist.is-done .checklist__done { animation: settle var(--dur-3) var(--ease) both; }

@keyframes settle {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Over Klaar Labs */
.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-5) clamp(2.5rem, 2rem + 4vw, 6rem);
  align-items: start;
}
.about__text {
  padding-top: var(--space-5);
  border-top: 1.5px solid var(--ink);
  font-size: var(--step-2);
  line-height: 1.45;
}
.about__text p { max-width: 36rem; }
.about__text p + p { margin-top: var(--space-4); color: var(--muted); }

/* Portfolio */
.case {
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-l);
}
.case__intro {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas:
    "meta meta"
    "title title"
    "lead features"
    "text features"
    "text link";
  gap: var(--space-4) clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
}
.case__meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.case__type { font-size: var(--step--1); color: var(--on-ink-muted); }
.case__title {
  grid-area: title;
  display: flex;
  align-items: center;
  gap: 0.3em;
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem);
  font-weight: inherit;
  line-height: 1.1;
}
/* MenuKlaar's own identity: app icon plus Fraunces wordmark, not the Klaar Labs mark */
.case__icon { width: 1.05em; height: 1.05em; flex: none; }
.case__wordmark { font-family: var(--font-menuklaar); font-weight: 400; letter-spacing: -0.01em; }
.case__lead { grid-area: lead; font-size: var(--step-2); font-stretch: var(--wide); font-weight: 600; line-height: 1.25; }
.case__intro > p:not(.case__lead) { grid-area: text; max-width: 38rem; color: var(--on-ink-muted); }
.case__intro > .button { grid-area: link; justify-self: start; margin-top: var(--space-2); }

.features { grid-area: features; border-top: 1px solid var(--ink-line); }
.features li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--ink-line);
}
.features li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 5px;
  margin-top: -3px;
  border: solid var(--klaar-bright);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}

/* MenuKlaar demo */
.demo {
  margin-top: clamp(2rem, 1.5rem + 2vw, 3rem);
  padding: clamp(1rem, 0.5rem + 1.5vw, 1.5rem);
  background: var(--ink);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-l);
}
.demo__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.demo__step { font-weight: 600; color: var(--on-ink); min-height: 1.6em; }
.demo__toggle {
  min-height: 36px;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--ink-line);
  border-radius: 8px;
  background: transparent;
  color: var(--on-ink-muted);
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.demo__toggle:hover { color: var(--on-ink); border-color: var(--on-ink-muted); }

.demo__grid {
  display: grid;
  grid-template-columns: minmax(250px, 300px) 48px minmax(0, 1fr);
  align-items: center;
}
.demo__caption { margin-top: var(--space-4); font-size: var(--step--1); color: var(--on-ink-muted); }

/* Demo: editor */
.editor {
  padding: var(--space-4);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-m);
  font-size: 0.9375rem;
}
.editor__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}
.editor__title { font-weight: 700; font-stretch: var(--wide); }
.editor__venue { font-size: var(--step--1); color: var(--muted); }
.field {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
  margin-inline: calc(var(--space-2) * -1);
  padding: var(--space-2);
  border-bottom: 1px solid var(--line-soft);
  border-radius: var(--radius-s);
  transition: background-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.field dt { font-size: var(--step--1); color: var(--muted); }
.field dd { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-weight: 600; min-height: 1.75rem; }
.field.is-editing { background: var(--klaar-soft); box-shadow: inset 0 0 0 1.5px var(--klaar); }

.switch {
  position: relative;
  width: 30px;
  height: 18px;
  border-radius: 999px;
  background: var(--klaar);
  transition: background-color var(--dur-2) var(--ease);
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  transition: transform var(--dur-2) var(--ease);
}
.switch.is-off { background: var(--idle); }
.switch.is-off::after { transform: translateX(-12px); }

.chips { gap: var(--space-1); }
.chip {
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: var(--step--1);
  font-weight: 500;
}
.chip.is-new { animation: settle var(--dur-2) var(--ease) both; }

.editor__lang {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
}
.editor__lang-label { margin-right: auto; font-size: var(--step--1); color: var(--muted); }
.editor__lang button {
  min-width: 44px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--white);
  font-size: var(--step--1);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.editor__lang button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.editor__lang button:focus-visible { outline-color: var(--klaar); }

.editor__sync {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-size: var(--step--1);
  color: var(--muted);
}
.editor__sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--klaar); }
.editor__sync.is-syncing .editor__sync-dot { background: var(--busy); }

/* Demo: connection between editor and outputs */
.demo__bus {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
}
.demo__bus::before {
  content: "";
  width: 100%;
  height: 1.5px;
  background: var(--ink-line);
}
.demo__pulse {
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--klaar-bright);
  opacity: 0;
}
.demo.is-syncing .demo__pulse { animation: travel 560ms var(--ease-inout) both; }

@keyframes travel {
  0% { transform: translateX(0); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateX(38px); opacity: 0; }
}

@keyframes travel-down {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(30px); opacity: 0; }
}

/* Demo: outputs */
.outputs {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}
.out__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--on-ink);
  white-space: nowrap;
}
.out__state {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 500;
  color: var(--on-ink-muted);
}
.out__state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--klaar-bright);
  transition: background-color var(--dur-1) var(--ease);
}
.out.is-syncing .out__state::before { background: var(--busy); }

[data-item="bitter"] { transition: background-color var(--dur-3) var(--ease); }
.out.is-updated [data-item="bitter"] { background-color: var(--klaar-soft); transition-duration: var(--dur-1); }

.menu-list { display: grid; }
.menu-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius-s);
}
.menu-item__name { font-weight: 600; }
.menu-item__price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.menu-item__desc { grid-column: 1 / -1; font-size: 0.8125rem; line-height: 1.4; color: var(--muted); }
.menu-item.is-soldout [data-t="bitter"],
.menu-item.is-soldout .menu-item__price { color: var(--idle-text); text-decoration: line-through; }
.tag {
  display: inline-block;
  padding: 0 0.4rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  vertical-align: 1px;
}
.tag[hidden] { display: none; }

.browser {
  overflow: hidden;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-m);
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.browser__dots,
.browser__dots::before,
.browser__dots::after {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
}
.browser__dots { position: relative; margin-left: 12px; }
.browser__dots::before,
.browser__dots::after { content: ""; position: absolute; top: 0; }
.browser__dots::before { left: -11px; }
.browser__dots::after { left: 11px; }
.browser__url {
  flex: 1;
  margin-left: var(--space-3);
  padding: 0.05rem 0.6rem;
  border-radius: 999px;
  background: var(--white);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.web { padding: var(--space-4) var(--space-3); font-size: 0.875rem; }
.web__title { margin: 0 var(--space-2) var(--space-2); font-size: var(--step-1); font-weight: 650; font-stretch: var(--wide); }

.phone {
  max-width: 210px;
  margin-inline: auto;
  padding: 8px;
  background: #0B1626;
  border: 1px solid var(--ink-line);
  border-radius: 28px;
}
.phone__screen {
  min-height: 300px;
  padding: var(--space-5) var(--space-2) var(--space-3);
  background: var(--white);
  color: var(--ink);
  border-radius: 21px;
  font-size: 0.8125rem;
}
.phone__venue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 var(--space-2) var(--space-2);
  font-weight: 700;
  font-stretch: var(--wide);
  white-space: nowrap;
}
.phone__lang {
  padding: 0 0.4rem;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.6875rem;
  font-weight: 600;
  font-stretch: 100%;
}
.menu-list--compact .menu-item {
  grid-template-columns: minmax(0, 1fr);
  padding-block: var(--space-2);
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
}
.menu-list--compact .menu-item__price { font-weight: 500; color: var(--muted); }

.paper {
  aspect-ratio: 1 / 1.414;
  padding: 10% 11%;
  background: #FDFDFB;
  color: #1E2328;
  border-radius: 2px;
  box-shadow: 0 18px 36px -24px rgba(0, 0, 0, 0.6);
  font-family: var(--font-menuklaar);
  font-size: 0.875rem;
  line-height: 1.45;
}
.paper__venue { font-size: 1.375rem; font-weight: 600; text-align: center; }
.paper__title {
  margin-bottom: var(--space-4);
  font-style: italic;
  text-align: center;
  color: #5A6168;
}
.paper__item { display: flex; align-items: baseline; gap: var(--space-1); padding-block: 0.3rem; }
.paper__leader { flex: 1; min-width: 12px; border-bottom: 1px dotted #9AA0A6; transform: translateY(-3px); }
.paper__item [data-price] { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.paper__soldout { font-size: 0.8125rem; color: #5A6168; }
.paper__soldout[hidden] { display: none; }
.paper__item.is-soldout [data-t="bitter"],
.paper__item.is-soldout [data-price] { text-decoration: line-through; color: var(--idle-text); }
.paper__note { margin-top: var(--space-4); font-size: 0.75rem; font-style: italic; color: #5A6168; }

/* Werkwijze */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
}
.steps::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  right: 0;
  height: 1.5px;
  background: var(--ink);
  transform-origin: left;
}
.step { position: relative; display: flex; flex-direction: column; gap: var(--space-3); }
.step__num {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-3);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.step__title { font-size: var(--step-2); font-weight: 650; font-stretch: var(--wide); line-height: 1.2; }
.step p { color: var(--muted); }
.step .step__done {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
}
.step__done span { display: block; font-size: var(--step--1); font-weight: 600; color: var(--klaar); }

.js .steps[data-reveal]::before { transform: scaleX(0); transition: transform 1200ms var(--ease-inout) 200ms; }
.js .steps.is-visible::before { transform: scaleX(1); }
.js .steps.is-visible .step__num { background: var(--ink); color: var(--paper); }
.js .steps .step:nth-child(2) .step__num { transition-delay: 450ms; }
.js .steps .step:nth-child(3) .step__num { transition-delay: 750ms; }
.js .steps .step:nth-child(4) .step__num { transition-delay: 1050ms; }
.js .steps .step:nth-child(1) .step__num { transition-delay: 150ms; }

/* Principes */
.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
}
.principle { padding-top: var(--space-5); border-top: 1.5px solid var(--ink); }
.principle__title {
  margin-bottom: var(--space-3);
  font-size: var(--step-3);
  font-weight: 650;
  font-stretch: var(--wide);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.principle p { color: var(--muted); }

/* Contact */
.section--contact { background: var(--white); border-top: 1px solid var(--line); }
.contact__title {
  max-width: 22ch;
  font-size: var(--step-4);
  font-weight: 650;
  font-stretch: var(--wide);
  line-height: 1.04;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.contact__text { margin-top: var(--space-4); max-width: 36rem; font-size: var(--step-1); color: var(--muted); }
.contact__mail {
  display: inline-block;
  margin-top: var(--space-6);
  font-size: clamp(1.5rem, 1rem + 2.6vw, 2.75rem);
  font-weight: 600;
  font-stretch: var(--wide);
  letter-spacing: -0.015em;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 2px no-repeat;
  padding-bottom: 0.1em;
  overflow-wrap: anywhere;
  transition: color var(--dur-2) var(--ease), background-size var(--dur-2) var(--ease);
}
.contact__mail:hover { color: var(--klaar); background-size: 0% 2px; background-position: right bottom; }

/* Footer */
.site-footer { padding-block: var(--space-6); background: var(--paper); border-top: 1px solid var(--line); }
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  font-size: var(--step--1);
  color: var(--muted);
}
.footer .lockup { font-size: 1.0625rem; color: var(--ink); }
.footer__line { margin-left: auto; }

/* Scroll reveals (only when JS is active) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1240px) {
  .demo__grid { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
  .editor { max-width: 520px; width: 100%; justify-self: center; }
  .demo__bus { height: 40px; justify-content: center; }
  .demo__bus::before { width: 1.5px; height: 100%; }
  .demo__pulse { left: 50%; top: 0; margin: 0 0 0 -5px; }
  .demo.is-syncing .demo__pulse { animation-name: travel-down; }
}

@media (max-width: 1180px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  html:not(.js) .site-header { position: static; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .checklist { max-width: 480px; }
  .case__intro {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "meta" "title" "lead" "text" "features" "link";
  }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-7); }
  .steps::before { display: none; }
  .about { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .outputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .out--web { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .steps,
  .principles { grid-template-columns: minmax(0, 1fr); }
  .footer__line { margin-left: 0; }
}

@media (max-width: 520px) {
  .outputs { grid-template-columns: minmax(0, 1fr); }
  .paper { max-width: 300px; width: 100%; justify-self: center; }
  .out--print .out__head { max-width: 300px; margin-inline: auto; }
  .field { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
