/* Mist Nail and Spa design system: THE STERILE FIELD.
   Swiss information-design grammar on cool fog neutrals. Hairline rules and
   ledger rows instead of card shadows; one deep teal accent. The wordmark is
   the store sign: cursive script (Mr Dafoe) reserved for the brand and display
   moments; Hanken Grotesk carries structure and body; Fragment Mono is
   reserved for measurement: durations, times, codes (no public prices, by
   owner decision). Drifting mist (blurred fields, hero only) is the single
   authored motion moment.
   Class names are shared with the staff portal and admin console; those pages
   inherit these tokens without layout changes, so rename nothing lightly. */

:root {
  --bg: #f0eeea;
  --card: #fdfcfa;
  --border: #d5cfc4;
  --ink: #211e18;
  --muted: #6b6459;
  --accent: #8a6c3c;
  --accent-down: #6f5527;
  --accent-soft: #ece3d4;
  --green: #1d7a53;
  --green-soft: #ddefe5;
  --amber: #8a6100;
  --amber-soft: #f3ecd7;
  --red: #b3283e;
  --red-soft: #f7e3e6;
  --track: #e5e1d8;
  --font: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Pacifico', 'Snell Roundhand', cursive;
  --mono: 'Fragment Mono', ui-monospace, 'SF Mono', monospace;
  --radius: 0px;
  --shadow: none;
  --shadow-lg: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.55;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 10px; letter-spacing: -0.015em; }
h1 { font-size: 30px; font-weight: 750; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
/* .serif is the legacy display hook used across pages. One display voice:
   bold Hanken, same as section heads. The script (--display) is reserved for
   the brand wordmark alone (.wordmark, .brand .word, .fbrand). */
.serif { font-family: var(--font); font-weight: 750; letter-spacing: -0.02em; text-transform: none; line-height: 1.15; }
p { margin: 0 0 10px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* Caps micro-label: the spec-sheet voice. */
.lbl {
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 660px; }

/* Topbar: a ruled document header. */
.topbar { background: transparent; border-bottom: 1px solid var(--border); }
.topbar-in {
  max-width: 1060px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 24px; height: 24px; display: block; flex: none; }
.brand .word {
  font-family: var(--display); font-weight: 400; font-size: 19px;
  line-height: 1.5; white-space: nowrap;
}
.topbar nav { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.topbar nav a {
  color: var(--muted); font-weight: 600; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 7px 11px; border-bottom: 2px solid transparent;
}
.topbar nav a:hover { color: var(--ink); text-decoration: none; }
.topbar nav a.on { color: var(--ink); border-bottom-color: var(--ink); }
.topbar .spacer { flex: 1; }

/* Buttons: sharp, tracked caps. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: var(--radius); padding: 11px 20px;
  font: 600 12.5px var(--font); letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--accent-down); border-color: var(--accent-down); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--card); border-color: var(--ink); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid var(--border); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-sm { padding: 7px 13px; font-size: 11.5px; }
.btn-lg { padding: 14px 26px; font-size: 13px; }
.btn-block { width: 100%; }

/* Panels (legacy name .card): flat clinical panels, hairline-bound. */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.cards { display: grid; gap: 0; }
.cards > .card { margin-top: -1px; }
.cards > .card:first-child { margin-top: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

/* Badges: rectangular caps tags. */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: var(--radius); padding: 3px 8px;
  font-size: 10.5px; font-weight: 650; letter-spacing: 0.09em;
  text-transform: uppercase; white-space: nowrap;
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-ink { background: var(--track); color: var(--muted); }
.badge-accent { background: var(--accent-soft); color: var(--accent-down); }

/* Chips (durations, tags): measurement tags. */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font: 500 12px var(--font); color: var(--muted);
  border: 1px solid var(--border); background: transparent;
  border-radius: var(--radius); padding: 2px 8px;
}

/* Tabs: a ruled index line; the active entry is inked and underlined. */
.tabs {
  display: flex; gap: 2px; background: transparent;
  border-bottom: 1px solid var(--border); border-radius: 0;
  padding: 0; overflow-x: auto; max-width: 100%;
}
.tabs button {
  border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  background: transparent; color: var(--muted);
  font: 600 12px var(--font); letter-spacing: 0.09em; text-transform: uppercase;
  padding: 9px 12px; cursor: pointer; white-space: nowrap;
}
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); box-shadow: none; }

/* Forms */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 12px; font: 400 15px var(--font); color: var(--ink);
  background: var(--card);
}
.field textarea { resize: vertical; min-height: 74px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent-soft); border-color: var(--accent);
}
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; letter-spacing: 0; text-transform: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-msg { border-radius: var(--radius); padding: 11px 13px; font-size: 14px; margin: 12px 0; border: 1px solid transparent; }
.form-msg.err { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.form-msg.ok { background: var(--green-soft); color: var(--green); border-color: var(--green); }

/* Tables */
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 650; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 9px 10px; border-bottom: 1px solid var(--ink);
}
.tbl td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-scroll { overflow-x: auto; max-width: 100%; }

/* Service menu: the price ledger. Index numeral, name, hairline, mono price. */
.menu { display: grid; gap: 0; }
.menu-item {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline;
  gap: 4px 12px; padding: 13px 2px; border-bottom: 1px solid var(--border);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item .mi-idx { font: 12px var(--mono); color: var(--muted); }
.menu-item .mi-name { font-weight: 620; }
.menu-item .mi-desc { grid-column: 2 / -1; color: var(--muted); font-size: 13.5px; margin-top: 1px; }
.menu-item .mi-price { font-family: var(--mono); font-size: 15px; white-space: nowrap; }
.menu-item .mi-dur { color: var(--muted); font-size: 13px; }

/* Category headings on the menu: ruled index heads. */
.cat-head {
  font-family: var(--font); font-weight: 700; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase;
  border-top: 1px solid var(--ink); padding-top: 10px; margin: 34px 0 4px;
}
.cat-head:first-child { margin-top: 4px; }

/* Staff grid */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 24px; }
.staff-card { text-align: left; border-top: 1px solid var(--border); border-left: 0; border-right: 0; border-bottom: 0; padding: 18px 0 22px; background: transparent; }
.staff-card .avatar {
  width: 52px; height: 52px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; color: #fff; font-weight: 700;
  font-size: 19px; margin-bottom: 12px;
}
.staff-card .st-name { font-weight: 700; }
.staff-card .st-title { color: var(--muted); font-size: 13px; }

/* Offers */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.offer .offer-title { font-weight: 750; font-size: 21px; letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 4px; }

/* Slot picker: measured time cells. */
.slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot {
  border: 1px solid var(--border); background: var(--card); color: var(--ink);
  border-radius: var(--radius); padding: 10px 6px;
  font: 13px var(--mono); font-variant-numeric: tabular-nums;
  cursor: pointer; text-align: center;
}
.slot:hover { border-color: var(--accent); color: var(--accent-down); }
.slot.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Selectable option rows (service / technician): ledger entries. */
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 1px solid var(--border); background: var(--card); color: var(--ink);
  border-radius: var(--radius); padding: 13px 15px; cursor: pointer;
  margin-bottom: -1px; font: inherit;
}
.opt:hover { border-color: var(--accent); position: relative; z-index: 1; }
.opt.on { border-color: var(--accent); background: var(--accent-soft); position: relative; z-index: 1; }
.opt .opt-main { flex: 1; min-width: 0; }
.opt .opt-name { font-weight: 620; }
.opt .opt-sub { color: var(--muted); font-size: 13px; }
.opt .opt-right { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 14px; }

/* Booking stepper: a numbered protocol line. */
.steps { display: flex; gap: 0; flex-wrap: wrap; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.step {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); padding: 9px 14px 9px 0; margin-right: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; border-radius: 0;
}
.step .n {
  font: 12px var(--mono); color: var(--muted);
  width: auto; height: auto; border-radius: 0; background: transparent;
}
.step.on { color: var(--ink); border-bottom-color: var(--ink); background: transparent; }
.step.on .n { color: var(--accent); background: transparent; }
.step.done { color: var(--ink); }
.step.done .n { color: var(--green); background: transparent; }

/* Hours list */
.hours { display: grid; gap: 0; }
.hours .hrow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.hours .hrow span:last-child { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.hours .hrow:last-child { border-bottom: 0; }
.hours .hrow.today { font-weight: 700; color: var(--accent-down); }
.hours .hrow .d { color: var(--muted); }
.hours .hrow.today .d { color: var(--accent-down); font-weight: 700; }

/* Day schedule (portal) */
.sched { display: grid; gap: 0; }
.sched-row {
  display: grid; grid-template-columns: 78px 4px 1fr auto; gap: 12px;
  align-items: center; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 11px 13px; background: var(--card); margin-bottom: -1px;
}
.sched-row .t { font-family: var(--mono); font-size: 13px; }
.sched-row .bar { width: 4px; align-self: stretch; border-radius: 0; background: var(--accent); }
.sched-row.canceled { opacity: 0.55; }
.sched-row.canceled .who { text-decoration: line-through; }
.sched-row .who { font-weight: 620; }
.sched-row .meta { color: var(--muted); font-size: 13px; }

/* Weekly availability editor */
.week { display: grid; gap: 10px; }
.week-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; }
.week-row.wk-day { grid-template-columns: 140px 1fr; align-items: start; }
.week-row .wd { font-weight: 600; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.w-on { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.w-body { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.win-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.week-row .times { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.week-row input[type="time"] { width: 130px; }

/* Two-column split card that collapses on mobile (see media query) */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; }
.stats > .stat { margin-left: -1px; }
.stats > .stat:first-child { margin-left: 0; }
.stat { padding: 14px 16px; }
.stat .v { font-family: var(--mono); font-size: 24px; }
.stat .k { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

/* Hero: the sterile field. Giant expanded wordmark over drifting mist,
   then the claim, the action, and the protocol ledger. */
.hero { position: relative; padding: 54px 0 12px; }
/* The wordmark is the store sign, set in its script. No caps, no tracking.
   Pacifico runs wide with deep descenders: smaller clamp, taller line. */
.hero .wordmark {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(38px, 7.2vw, 82px); line-height: 1.4;
  letter-spacing: 0; text-transform: none; margin: 0;
}
.hero .wordsub {
  font-size: 12px; font-weight: 600; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--muted); margin: 4px 0 0 4px;
}
.hero .hero-claim { font-size: clamp(24px, 4vw, 36px); font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; max-width: 16em; margin: 34px 0 12px; }
.hero p { font-size: 16.5px; color: var(--muted); max-width: 54ch; }
.hero .cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* The protocol ledger: measured facts under the hero. */
.specrow {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0 26px; margin-top: 40px; border-top: 1px solid var(--ink);
}
.specrow > div { padding: 12px 0 4px; border-top: 0; }
.specrow .lbl { display: block; }
.specrow .sv { display: block; font-weight: 600; font-size: 14px; margin-top: 3px; }

/* Drifting mist: the one authored motion moment. Soft blurred fields that
   wander very slowly behind hero content. Decor only; content stays crisp. */
.mist { position: absolute; inset: -80px -40px 0; overflow: hidden; pointer-events: none; z-index: -1; }
.mist i {
  position: absolute; border-radius: 50%; filter: blur(64px); will-change: transform;
  animation: mist-drift 52s ease-in-out infinite alternate;
}
.mist i:nth-child(1) { width: 480px; height: 300px; left: -8%; top: 4%; background: rgba(255, 255, 255, 0.85); }
.mist i:nth-child(2) { width: 420px; height: 280px; right: -6%; top: 22%; background: rgba(212, 201, 183, 0.55); animation-duration: 67s; animation-delay: -18s; }
.mist i:nth-child(3) { width: 340px; height: 240px; left: 32%; top: 46%; background: rgba(255, 255, 255, 0.6); animation-duration: 43s; animation-delay: -30s; }
@keyframes mist-drift {
  from { transform: translate3d(-6%, 2%, 0) scale(1); }
  to   { transform: translate3d(9%, -5%, 0) scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .mist i { animation: none; }
}

section.block { margin-top: 56px; }
.section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; border-top: 1px solid var(--ink); padding-top: 12px; }
.section-head h1, .section-head h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 750; letter-spacing: -0.02em; margin: 0; }
.section-head .spacer { flex: 1; }
.lead { font-size: 16px; color: var(--muted); max-width: 60ch; }

/* Protocol / equipment ledger: ruled rows, not card tiles. */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.feature {
  display: grid; grid-template-columns: 38px 1fr; gap: 4px 14px;
  border-top: 1px solid var(--border); border-left: 0; border-right: 0; border-bottom: 0;
  background: transparent; padding: 16px 0 20px; border-radius: 0;
}
.feature .ico {
  width: 38px; height: 38px; border-radius: 0; background: transparent;
  display: inline-flex; align-items: flex-start; justify-content: flex-start; margin-bottom: 0;
}
.feature .ico svg { width: 24px; height: 24px; stroke: var(--accent); }
.feature h3 { margin-bottom: 0; align-self: center; }
.feature p { grid-column: 2; }

/* Info banner */
.notice {
  background: var(--card); border: 1px solid var(--border); color: var(--ink);
  border-left: 1px solid var(--accent);
  border-radius: var(--radius); padding: 13px 16px; font-size: 14px;
}

/* Empty / loading states */
.empty { color: var(--muted); text-align: center; padding: 30px 10px; }
.spin { color: var(--muted); padding: 24px; text-align: center; }

/* Footer: the colophon. */
footer { border-top: 1px solid var(--ink); margin-top: 72px; background: transparent; }
.footer-in {
  max-width: 1060px; margin: 0 auto; padding: 34px 20px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px;
  color: var(--muted); font-size: 14px;
}
.footer-in h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin: 0 0 10px; }
.footer-in a { color: var(--ink); display: block; padding: 3px 0; }
.footer-in .fbrand {
  font-family: var(--display); font-size: 23px; font-weight: 400;
  line-height: 1.45; color: var(--ink); margin-bottom: 8px;
}
.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom-in { max-width: 1060px; margin: 0 auto; padding: 14px 20px; color: var(--muted); font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .form-row, .form-row-3, .footer-in, .split-2, .feature-grid { grid-template-columns: 1fr; }
  /* Topbar: brand + Book share the first row; the nav becomes its own ruled row. */
  .topbar-in { padding: 10px 16px; row-gap: 4px; }
  .topbar-in > .btn { order: 2; margin-left: auto; }
  .topbar-in > .spacer { display: none; }
  .topbar nav { order: 3; flex-basis: 100%; margin: 2px -4px 0; }
  .hero { padding: 38px 0 8px; }
  .specrow { margin-top: 30px; }
  .week-row { grid-template-columns: 1fr; }
  .sched-row { grid-template-columns: 70px 4px 1fr; }
  .sched-row .actions { grid-column: 3; }
}
