/* =====================================================================
   APPOINTEK DESIGN SYSTEM - COMPONENTS
   Every value here is a var() from tokens.css. No raw hex, no raw
   radius, no hand-rolled shadow, no inline style attribute.
   `node scripts/check-design-tokens.mjs` enforces it.
   ===================================================================== */

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-chip);
}

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

.skip {
  position: absolute; left: var(--pad-x); top: calc(var(--s-8) * -1); z-index: var(--z-skip);
  background: var(--surface); color: var(--ink);
  padding: var(--s-3) var(--s-5); border-radius: var(--r-input);
  box-shadow: var(--sh-panel); font-weight: 600;
  transition: top var(--dur-quick) var(--ease-out);
}
.skip:focus { top: var(--s-3); }

/* -------------------------------------------------------------- layout */
.wrap    { max-width: var(--w-grid); margin: 0 auto; padding: 0 var(--pad-x); }
.wrap--read { max-width: var(--w-read); }
.section { padding: var(--section) 0; }
.section + .section { padding-top: 0; }
.stack > * + * { margin-top: var(--s-4); }

/* ---------------------------------------------------------------- type */
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; }

.display {
  font-size: var(--fs-display); font-weight: 800;
  letter-spacing: var(--track-display); line-height: var(--lh-display);
  text-wrap: balance;
}
h1 {
  font-size: var(--fs-h1); font-weight: 800;
  letter-spacing: var(--track-display); line-height: var(--lh-head);
  text-wrap: balance;
}
h2 {
  font-size: var(--fs-h2); font-weight: 800;
  letter-spacing: var(--track-h2); line-height: var(--lh-head);
  text-wrap: balance;
}
h3 {
  font-size: var(--fs-h3); font-weight: 600;
  letter-spacing: var(--track-h3); line-height: var(--lh-tight);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin: 0 0 var(--s-3);
  font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500;
  letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--ink-4);
}
.dot {
  width: 7px; height: 7px; border-radius: var(--r-pill);
  background: var(--accent); flex: none;
}

.lede {
  margin: var(--s-3) 0 0; max-width: var(--measure);
  font-size: var(--fs-lede); line-height: var(--lh-tight); color: var(--ink-2);
  text-wrap: pretty;
}
.prose  { max-width: var(--measure); color: var(--ink-2); }
.prose p { margin: 0 0 var(--s-4); }
.meta   { font-size: var(--fs-meta); color: var(--ink-4); }
.num    { font-variant-numeric: tabular-nums; }

.link {
  color: var(--accent-text); font-weight: 500;
  box-shadow: inset 0 -1px 0 var(--accent-wash);
  transition: box-shadow var(--dur-quick) var(--ease-out);
}
.link:hover { box-shadow: inset 0 -2px 0 var(--accent-text); }

.section__head { max-width: var(--w-read); margin-bottom: var(--s-5); }

/* ------------------------------------------------------------- buttons
   Ink is the action colour. The accent is never a button fill. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2); min-height: var(--tap);
  padding: var(--s-3) var(--s-5); border: 0; cursor: pointer;
  font-family: var(--font-body); font-size: var(--fs-meta); font-weight: 600;
  border-radius: var(--r-pill); text-align: center;
  transition: background var(--dur-quick) var(--ease-out),
              transform var(--dur-press) var(--ease-out);
}
.btn:active { transform: scale(0.985); }
.btn--ink  { background: var(--ink); color: var(--on-ink); box-shadow: var(--sh-btn); }
.btn--ink:hover  { background: var(--ink-raised); }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.btn--line:hover { background: var(--surface-alt); }
.btn--wide { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.btn-row--stack { flex-direction: column; max-width: 330px; }

/* ------------------------------------------------------- panel and rows
   RULE 1: sibling items of the same kind share ONE panel with hairline
   dividers. Never a row of separately bordered, separately tinted cards. */
.panel {
  background: var(--surface);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
  overflow: hidden;
}
.panel--flat { box-shadow: var(--sh-card); }
.panel__label {
  margin: 0; padding: var(--s-5) var(--row-x) var(--s-3);
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-4);
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: baseline; gap: var(--s-3);
}
.panel__label b {
  margin-left: auto; font-family: var(--font-display); font-size: var(--fs-h3);
  font-weight: 700; color: var(--ink); letter-spacing: var(--track-h3);
  text-transform: none; font-variant-numeric: tabular-nums;
}

.row { display: block; padding: var(--row-y) var(--row-x); }
.row + .row { border-top: 1px solid var(--rule); }
a.row { transition: background var(--dur-quick) var(--ease-out); }
a.row:hover { background: var(--surface-alt); }
.row__title { display: block; font-size: var(--fs-h3); font-weight: 600; color: var(--ink); letter-spacing: var(--track-h3); }
.row__body  { margin: var(--s-1) 0 0; font-size: var(--fs-meta); color: var(--ink-2); max-width: var(--measure); }

/* Line item: label left, plain fact right, description under both. */
.row--item { display: grid; grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-6); align-items: baseline; }
.row--item .row__body { grid-column: 1 / -1; }
.row__fact {
  font-family: var(--font-mono); font-size: var(--fs-meta); font-weight: 500;
  color: var(--ink-4); font-variant-numeric: tabular-nums; white-space: nowrap;
}
@media (max-width: 620px) {
  .row--item { grid-template-columns: 1fr; }
  .row__fact { order: 3; }
}

/* The answer row. Sunken so the price reads as the conclusion. */
.row--total {
  background: var(--surface-sunk);
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: var(--s-2) var(--s-4); padding: var(--s-6) var(--row-x);
}
.price {
  font-family: var(--font-display); font-size: clamp(34px, 4.4vw, 46px);
  font-weight: 700; letter-spacing: var(--track-display); color: var(--ink);
  line-height: 1; font-variant-numeric: tabular-nums;
}
.price__unit { font-size: var(--fs-meta); color: var(--ink-3); font-family: var(--font-body); font-weight: 500; }
.price__note { flex-basis: 100%; margin: var(--s-2) 0 0; font-size: var(--fs-meta); color: var(--ink-3); }

/* --------------------------------------------------------- fact strip
   Three or four facts on one line with vertical rules between them.
   This is what replaces a row of little bordered cards. */
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  background: var(--surface); border-radius: var(--r-panel);
  box-shadow: var(--sh-card); overflow: hidden;
}
.facts__cell { padding: var(--row-y) var(--row-x); border-left: 1px solid var(--rule); }
.facts__cell:first-child { border-left: 0; }
.facts__k {
  display: block; font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink-4);
}
.facts__v {
  display: block; margin-top: var(--s-2);
  font-family: var(--font-display); font-size: 21px; font-weight: 700;
  letter-spacing: var(--track-h3); color: var(--ink); font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .facts { grid-template-columns: 1fr; }
  .facts__cell { border-left: 0; border-top: 1px solid var(--rule); }
  .facts__cell:first-child { border-top: 0; }
}

/* --------------------------------------------------------------- band
   An ink block. At most twice per page: the guarantee, and the close. */
.band {
  background: var(--ink-surface); color: var(--on-ink);
  border-radius: var(--r-panel); padding: clamp(28px, 4vw, 44px) var(--row-x);
}
.band h1, .band h2, .band h3 { color: var(--on-ink); }
.band .lede { color: var(--on-ink-2); }
.band__rule { height: 1px; background: var(--on-ink-rule); border: 0; margin: var(--s-5) 0; }
.band__fine { margin: 0; font-size: var(--fs-meta); color: var(--on-ink-3); max-width: var(--measure); }
.band .btn--ink  { background: var(--on-ink); color: var(--ink); box-shadow: none; }
.band .btn--ink:hover { background: var(--surface-alt); }
.band .btn--line { color: var(--on-ink); box-shadow: inset 0 0 0 1px var(--on-ink-rule); }
.band .btn--line:hover { background: var(--ink-raised); }

/* --------------------------------------------------------------- steps
   A numbered rail. Use ONLY when the content is genuinely a sequence. */
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 19px; top: var(--s-3); bottom: var(--s-3);
  width: 1px; background: var(--rule);
}
.step { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: var(--s-5); }
.step + .step { margin-top: var(--s-5); }
.step__n {
  position: relative; z-index: 1;
  width: 39px; height: 39px; border-radius: var(--r-pill);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: var(--fs-meta); font-weight: 500;
  color: var(--accent-text); font-variant-numeric: tabular-nums;
}
.step__body { padding-top: var(--s-1); }
.step__body p { margin: var(--s-2) 0 0; color: var(--ink-2); max-width: var(--measure); }

/* ---------------------------------------------------- definition grid */
.defs { display: grid; grid-template-columns: repeat(2, 1fr); }
.defs > * { padding: var(--row-y) var(--row-x); border-top: 1px solid var(--rule); }
.defs > *:nth-child(odd) { border-right: 1px solid var(--rule); }
.defs > *:nth-child(1), .defs > *:nth-child(2) { border-top: 0; }
@media (max-width: 700px) {
  .defs { grid-template-columns: 1fr; }
  .defs > *:nth-child(odd) { border-right: 0; }
  .defs > *:nth-child(2) { border-top: 1px solid var(--rule); }
}

/* ----------------------------------------------------------------- faq
   Native disclosure, one panel, hairline dividers. */
.faq summary {
  list-style: none; cursor: pointer;
  padding: var(--row-y) var(--row-x);
  display: grid; grid-template-columns: 1fr 18px; gap: var(--s-5); align-items: center;
  font-size: var(--fs-h3); font-weight: 600; color: var(--ink);
  letter-spacing: var(--track-h3);
  transition: background var(--dur-quick) var(--ease-out);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--surface-alt); }
.faq details + details { border-top: 1px solid var(--rule); }
.faq .chev {
  width: 11px; height: 11px; justify-self: center;
  border-right: 1.5px solid var(--ink-5); border-bottom: 1.5px solid var(--ink-5);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur-quick) var(--ease-out);
}
.faq details[open] .chev { transform: rotate(225deg) translate(-2px, -2px); }
.faq__a { padding: 0 var(--row-x) var(--row-y); }
.faq__a p { margin: 0; color: var(--ink-2); max-width: var(--measure); }

/* --------------------------------------------------------------- chips
   Status only, never decoration. Semantic colour is not the accent. */
.chip {
  display: inline-flex; align-items: center; gap: var(--s-1);
  padding: 3px var(--s-2); border-radius: var(--r-chip);
  font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500;
  letter-spacing: var(--track-label); text-transform: uppercase;
}
.chip--ok   { background: var(--accent-wash); color: var(--accent-text); }
.chip--warn { background: var(--warn-wash); color: var(--warn); }
.chip--quiet{ background: var(--surface-sunk); color: var(--ink-4); }

/* ----------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: var(--surface);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-quick) var(--ease-out);
}
.nav.is-scrolled { border-bottom-color: var(--rule); }
.nav__in {
  max-width: var(--w-grid); margin: 0 auto;
  padding: 0 var(--pad-x); min-height: 64px;
  display: flex; align-items: center; gap: var(--s-4);
}
.nav__brand {
  font-family: var(--font-display); font-size: 21px; font-weight: 700;
  letter-spacing: var(--track-h2); color: var(--ink); margin-right: auto;
  display: flex; align-items: baseline; gap: var(--s-3);
}
.nav__tag {
  font-family: var(--font-mono); font-size: var(--fs-label);
  font-weight: 500; letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--ink-4);
}
.nav__links { display: flex; align-items: center; gap: var(--s-6); }
.nav__links a { font-size: var(--fs-meta); color: var(--ink-3); transition: color var(--dur-quick) var(--ease-out); }
.nav__links a:hover { color: var(--ink); }
@media (max-width: 760px) { .nav__links { display: none; } }

/* -------------------------------------------------------------- footer */
.foot {
  border-top: 1px solid var(--rule); padding: var(--s-6) 0 var(--s-7);
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); align-items: baseline;
  font-size: var(--fs-meta); color: var(--ink-4);
}
.foot__brand {
  font-family: var(--font-display); font-weight: 700; color: var(--ink);
  margin-right: auto; letter-spacing: var(--track-h3);
}
.foot a { transition: color var(--dur-quick) var(--ease-out); }
.foot a:hover { color: var(--ink); }

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

/* ------------------------------------------------------- accent button
   The accent as a fill. --on-accent decides whether ink or white sits on
   it, so a palette swap never needs a change here. */
.btn--accent { background: var(--accent); color: var(--on-accent); box-shadow: var(--sh-btn); }
.btn--accent:hover { background: var(--accent-hover); }

/* ----------------------------------------------------------------- hero
   Split: the offer on the left, the product artifact on the right.
   Structure after cal.com, chosen 2026-08-31. See BENCHMARKS.md. */
.hero { padding: var(--s-6) 0 var(--s-5); }
.hero + .section { padding-top: var(--s-5); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--s-7); align-items: center; }
.hero .lede { max-width: var(--measure-tight); }
@media (max-width: 880px) { .hero__grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- calendar
   The booked-calls artifact. This is the product, so it is the hero image:
   not an illustration, not a gradient, the actual thing being bought.
   --dark is for use on an ink surface. */
.cal { background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--sh-panel); overflow: hidden; }
.cal--dark { background: var(--ink-raised); box-shadow: none; }
.cal__top {
  display: flex; align-items: baseline; gap: var(--s-3);
  padding: var(--s-4) var(--row-x); border-bottom: 1px solid var(--rule);
}
.cal--dark .cal__top { border-bottom-color: var(--on-ink-rule); }
.cal__k {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: var(--track-label); text-transform: uppercase;
  color: var(--ink-4); margin-right: auto;
}
.cal--dark .cal__k { color: var(--on-ink-3); }
.cal__n {
  font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700;
  color: var(--ink); letter-spacing: var(--track-h3); font-variant-numeric: tabular-nums;
}
.cal--dark .cal__n { color: var(--on-ink); }
.slot { display: grid; grid-template-columns: 92px 1fr auto; gap: var(--s-3); align-items: baseline; padding: var(--s-3) var(--row-x); }
.slot + .slot { border-top: 1px solid var(--rule); }
.cal--dark .slot + .slot { border-top-color: var(--on-ink-rule); }
.slot__t { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--ink-4); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal--dark .slot__t { color: var(--on-ink-3); }
.slot__co { font-weight: 600; color: var(--ink); font-size: var(--fs-meta); }
.cal--dark .slot__co { color: var(--on-ink); }
.slot__role { display: block; font-size: var(--fs-small); color: var(--ink-4); font-weight: 400; }
.cal--dark .slot__role { color: var(--on-ink-3); }
.cal--dark .chip { background: var(--on-ink-rule); color: var(--on-ink-2); }
