/* Doppio design system: tokens + base components. Canonical copy lives in style-guide/. */
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-opsz-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-latin-opsz-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  /* colour */
  --ink: #231712; --roast: #4a2e22; --paper: #faf6ee; --crema: #f1e4ce; --milk: #ffffff;
  --copper: #b8461b; --copper-deep: #8e3512; --steam: #e3b25a; --leaf: #3e6b4a; --brick: #a63a2e;
  --muted: #6e5e53; --line: #e3d6bf;
  /* type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Geist", system-ui, sans-serif;
  --t-xs: 0.75rem; --t-sm: 0.875rem; --t-base: 1rem; --t-md: 1.25rem; --t-lg: 1.5625rem;
  --t-xl: 1.9375rem; --t-2xl: 2.4375rem; --t-3xl: clamp(2.4375rem, 1.6rem + 3.2vw, 3.8125rem);
  --t-4xl: clamp(2.75rem, 1.5rem + 5vw, 5.25rem);
  /* space (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  /* shape */
  --r-input: 8px; --r-card: 14px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgb(35 23 18 / 0.06), 0 8px 24px rgb(35 23 18 / 0.08);
  --shadow-2: 0 2px 4px rgb(35 23 18 / 0.08), 0 20px 48px rgb(35 23 18 / 0.14);
  /* motion */
  --ease-pour: cubic-bezier(0.2, 0.8, 0.2, 1);
  --d-press: 150ms; --d-state: 250ms; --d-enter: 600ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--t-base)/1.55 var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.band--ink :focus-visible, .on-dark :focus-visible, .close :focus-visible { outline-color: var(--steam); }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-pill); z-index: 100; }
.skip:focus { top: 12px; }

/* button */
.btn { --bg: var(--copper); --fg: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 0; border-radius: var(--r-pill); background: var(--bg); color: var(--fg); font: 600 var(--t-base)/1 var(--font-body); cursor: pointer; text-decoration: none; transition: background var(--d-state) var(--ease-pour), transform var(--d-press) var(--ease-pour), box-shadow var(--d-state) var(--ease-pour); }
.btn:hover { --bg: var(--copper-deep); transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn--ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ghost:hover { --bg: var(--ink); --fg: var(--paper); }
.btn--quiet { --bg: var(--crema); --fg: var(--roast); }
.btn--quiet:hover { --bg: var(--line); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: var(--t-sm); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.link { color: var(--copper-deep); font-weight: 600; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size var(--d-state) var(--ease-pour); }
.link:hover { background-size: 100% 1.5px; }

/* chip */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 14px; border-radius: var(--r-pill); background: var(--crema); color: var(--roast); font: 500 var(--t-sm)/1 var(--font-body); border: 1.5px solid transparent; cursor: pointer; transition: all var(--d-state) var(--ease-pour); }
.chip:hover { border-color: var(--line); }
.chip[disabled] { opacity: 0.45; cursor: not-allowed; }
.chip[aria-pressed="true"], .chip--on { background: var(--ink); color: var(--paper); }
.chip--status { cursor: default; }
.chip--confirmed { background: #dfeadc; color: #27472f; }
.chip--pending { background: #f7e6bd; color: #6b4a0a; }
.chip--cancelled { background: #f2d6d1; color: #7d241b; }

/* field */
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: var(--t-sm); }
.field input, .field select { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: var(--r-input); background: var(--milk); color: var(--ink); font: inherit; transition: border-color var(--d-state), box-shadow var(--d-state); }
.field input:hover, .field select:hover { border-color: var(--muted); }
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-color: var(--ink); }
.field .hint { color: var(--muted); font-size: var(--t-sm); }
.field--error input { border-color: var(--brick); }
.field--error .hint { color: var(--brick); }

/* card */
.card { background: var(--milk); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s-5); box-shadow: var(--shadow-1); transition: transform var(--d-state) var(--ease-pour), box-shadow var(--d-state) var(--ease-pour); }
a.card:hover, .card--lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }

/* booking row */
.booking { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-4); align-items: center; padding: var(--s-4); background: var(--milk); border: 1px solid var(--line); border-radius: var(--r-card); }
.booking__date { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: var(--crema); color: var(--roast); text-align: center; line-height: 1; font-weight: 600; }
.booking__date b { font: 600 var(--t-lg)/1 var(--font-display); display: block; }
.booking__date small { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.08em; }
.booking__main { min-width: 0; }
.booking__main strong, .booking__main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking__main span { color: var(--muted); font-size: var(--t-sm); }

/* stat */
.stat { display: grid; gap: 4px; }
.stat__label { color: var(--muted); font-size: var(--t-sm); }
.stat__value { font: 600 var(--t-xl)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.stat__delta { font-size: var(--t-sm); color: var(--leaf); font-weight: 600; }

/* toast */
.toast { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: var(--r-card); background: var(--ink); color: var(--paper); box-shadow: var(--shadow-2); }
.toast::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 4px rgb(62 107 74 / 0.35); flex: none; }

/* pour fill */
.pour { height: 10px; border-radius: var(--r-pill); background: var(--crema); overflow: hidden; }
.pour > i { display: block; height: 100%; width: var(--v, 50%); background: var(--copper); border-radius: inherit; transition: width var(--d-enter) var(--ease-pour); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
