/* Parlour — tokens and base styles, written for a 320px phone first.
   Colours: only the tokens in design/palette.json ("oat and damson"), light and dark.
   No viewport-height units anywhere, and no overflow rule on <html>: see design/DIRECTION.md. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght.eb2486760f75.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-wght.c501f578bf3f.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --canvas: #f6f1ee;
  --surface: #fffcfa;
  --raised: #ede5e3;
  --line: #e4d9d7;
  --line-strong: #978a8c;
  --text: #241a20;
  --text-dim: #5f5057;
  --brand: #6b2850;
  --brand-ink: #fffcfa;
  --brand-wash: #f5e3ec;
  --warn: #875508;
  --warn-wash: #fbefd9;
  --ok: #35653f;
  --ok-wash: #e6f0e6;
  --bad: #a3302b;
  --bad-wash: #fae8e5;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --tap: 3rem; /* 48px minimum touch target */
  --gutter: 1rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #161215;
    --surface: #1f1a1e;
    --raised: #292227;
    --line: #322a30;
    --line-strong: #70656c;
    --text: #f0eaed;
    --text-dim: #a79aa2;
    --brand: #dd93bd;
    --brand-ink: #2a0c1e;
    --brand-wash: #351a2a;
    --warn: #dfad52;
    --warn-wash: #332715;
    --ok: #80ba88;
    --ok-wash: #1b2c1e;
    --bad: #ea857b;
    --bad-wash: #36201d;
  }
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 560; line-height: 1.15; margin: 0 0 0.5rem; overflow-wrap: anywhere; }
h1 { font-size: 1.75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.3125rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1rem; }
a { color: var(--brand); text-underline-offset: 0.15em; }
.dim { color: var(--text-dim); }
.num { font-variant-numeric: tabular-nums; }

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

.skip-link { position: absolute; left: -999rem; top: 0; background: var(--surface); padding: 0.75rem 1rem; z-index: 20; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---- page frame ---- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.5rem var(--gutter); padding-top: max(0.5rem, env(safe-area-inset-top));
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: var(--tap); min-width: 0;
  color: var(--text); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem;
}
.wordmark svg { width: 1.5rem; height: 1.5rem; flex: none; color: var(--brand); }
.wordmark span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 0.25rem; flex: none; }
.header-actions form { margin: 0; }

main { display: block; max-width: 44rem; margin: 0 auto; padding: 1.25rem var(--gutter) 2.5rem; }
main:focus { outline: none; }

.site-footer { max-width: 44rem; margin: 0 auto; padding: 1rem var(--gutter) 2rem; color: var(--text-dim); font-size: 0.875rem; }
.site-footer p { margin: 0 0 0.25rem; }

.demo-strip {
  background: var(--warn-wash); color: var(--text); border-bottom: 1px solid var(--line);
  padding: 0.5rem var(--gutter); font-size: 0.875rem; text-align: center;
}
.demo-strip strong { color: var(--warn); }

/* ---- buttons and links that act like buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: var(--tap); padding: 0.6rem 1.1rem; max-width: 100%;
  font: inherit; font-weight: 650; text-decoration: none; text-align: center;
  color: var(--text); background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: 8px; cursor: pointer; touch-action: manipulation;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--brand); padding-left: 0.6rem; padding-right: 0.6rem; }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ---- forms ---- */
.field { margin: 0 0 1rem; }
.field label { display: block; font-weight: 650; margin-bottom: 0.3rem; }
.field input {
  display: block; width: 100%; max-width: 100%; min-width: 0; min-height: var(--tap);
  padding: 0.6rem 0.75rem; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 6px;
}
.field input[aria-invalid="true"] { border-color: var(--bad); border-width: 2.5px; }
.form-error {
  background: var(--bad-wash); border-left: 4px solid var(--bad); padding: 0.75rem 1rem; margin: 0 0 1rem;
  border-radius: 0 6px 6px 0;
}
.form-error strong { color: var(--bad); }

/* ---- cards and tags ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; min-width: 0; }
.card + .card { margin-top: 0.75rem; }
.tag {
  display: inline-block; padding: 0.1rem 0.5rem; border-radius: 4px; font-size: 0.8125rem; font-weight: 650;
  border: 1px solid var(--line-strong); color: var(--text); background: var(--raised); white-space: nowrap;
}
.tag-arrived { background: var(--warn-wash); border-color: var(--warn); color: var(--warn); }
.tag-in_progress { background: var(--brand-wash); border-color: var(--brand); color: var(--brand); }
.tag-completed { background: var(--ok-wash); border-color: var(--ok); color: var(--ok); }
.tag-no_show { background: var(--bad-wash); border-color: var(--bad); color: var(--bad); }

.messages { list-style: none; margin: 0 0 1rem; padding: 0; }
.msg { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: 0.6rem 0.8rem; }

/* ---- the price list: the salon's printed menu ---- */
.menu-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.menu-jump a { min-height: var(--tap); }
.menu-group { margin: 0 0 2rem; scroll-margin-top: 1rem; }
.menu-group > h2 { font-size: 1.5rem; padding-bottom: 0.4rem; border-bottom: 2px solid var(--text); margin-bottom: 1rem; }
.menu-category { margin: 0 0 1.5rem; }
.menu-category > h3 { color: var(--brand); margin-bottom: 0.25rem; }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-list > li { padding: 0.65rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.price-list > li:last-child { border-bottom: 0; }
.price-row { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; }
.price-name { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 520; min-width: 0; overflow-wrap: anywhere; }
.price-leader { flex: 1 1 1rem; min-width: 1rem; border-bottom: 2px dotted var(--line-strong); transform: translateY(-0.25em); }
.price-amount { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-meta { margin: 0.1rem 0 0; color: var(--text-dim); font-size: 0.9375rem; overflow-wrap: anywhere; }
.price-variants { list-style: none; margin: 0.35rem 0 0; padding: 0 0 0 0.9rem; border-left: 2px solid var(--line); }
.price-variants li { padding: 0.2rem 0; }
.price-variants .price-name, .price-variants .price-amount { font-family: var(--font-body); font-size: 1rem; }

.hours { width: 100%; border-collapse: collapse; }
.hours th { text-align: left; font-weight: 500; padding: 0.3rem 0; }
.hours td { text-align: right; padding: 0.3rem 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours tr + tr th, .hours tr + tr td { border-top: 1px solid var(--line); }

/* ---- marketing home ---- */
.hero { padding: 1.5rem 0 1rem; }
.hero h1 { font-size: 2.125rem; }
.hero .lede { font-size: 1.125rem; color: var(--text-dim); max-width: 34rem; }
.point-list { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 1fr); }
.point-list h3 { margin-bottom: 0.25rem; }
.point-list p { margin: 0; color: var(--text-dim); }

@media (min-width: 40rem) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.75rem; }
  .point-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* iOS date and time inputs otherwise size themselves and can overflow their panel. */
.field input[type="date"], .field input[type="time"], .field input[type="datetime-local"] { -webkit-appearance: none; appearance: none; }

/* ---- footer links and the legal pages ---- */
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin: 0 0 0.5rem; }
.footer-legal a { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; padding: 0 0.25rem; }
.legal h2 { margin-top: 1.75rem; }
.legal dl { margin: 0; }
.legal dt { color: var(--text-dim); font-size: 0.875rem; margin-top: 0.6rem; }
.legal dd { margin: 0; overflow-wrap: anywhere; }
.legal ul { padding-left: 1.2rem; }
.tap-link { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; }
.tenant-logo { width: 2rem; height: 2rem; object-fit: contain; border-radius: 4px; flex: none; }
/* iOS sizes date and time inputs from their content unless told otherwise; on an iPhone they
   then overflow their card. Let them shrink to the space they are given. */
input[type="date"], input[type="time"], input[type="datetime-local"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; }

/* ---- tick boxes: the whole label is the target ---- */
.check { display: flex; align-items: flex-start; gap: 0.75rem; min-height: var(--tap); margin: 0 0 1rem; }
.check input { width: 1.5rem; height: 1.5rem; margin: 0.6rem 0 0; flex: none; accent-color: var(--brand); }
.check label { min-height: 2.75rem; display: flex; align-items: center; flex: 1 1 auto; flex-wrap: wrap; gap: 0 0.3rem; font-weight: 400; }
.field .hint { display: block; color: var(--text-dim); font-size: 0.9375rem; }
.field-error { display: block; color: var(--bad); font-weight: 650; margin-top: 0.3rem; }
.small-print { color: var(--text-dim); font-size: 0.9375rem; }
.notice { background: var(--warn-wash); border-left: 4px solid var(--warn); border-radius: 0 6px 6px 0; padding: 0.75rem 1rem; margin: 0 0 1.25rem; }
.notice strong { color: var(--warn); }

/* ---- "make it mine": turn the demo into your own salon ---- */
.demo-strip p { margin: 0; }
.mine-form { margin: 0.4rem auto 0; max-width: 30rem; text-align: left; }
.mine-form label { display: block; font-weight: 650; margin-bottom: 0.25rem; }
.mine-row { display: flex; gap: 0.5rem; }
.mine-row input { flex: 1 1 8rem; min-width: 0; min-height: var(--tap); padding: 0.5rem 0.75rem; font: inherit; font-size: 1rem; color: var(--text); background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 6px; }
.mine-row .btn { flex: none; }
.mine-home { margin: 1rem 0 0; }
.btn-row form { margin: 0; }

/* ---- a section that opens on demand ---- */
.fold > summary { display: flex; align-items: center; min-height: var(--tap); font-weight: 650; color: var(--brand); cursor: pointer; }
.fold[open] > summary { margin-bottom: 0.5rem; }
.sub-head { margin-top: 1.25rem; }
