:root {
  --bg: #f6f1e9;
  --surface: #fffdf9;
  --surface-2: #efe7da;
  --ink: #1d1f24;
  --muted: #6a6459;
  --line: #ddd3c3;
  --brand: #1f2a44;
  --brand-ink: #fffdf9;
  --accent: #b8322a;
  --accent-soft: #f6dcd8;
  --ok: #2f6b45;
  --ok-soft: #dcefe2;
  --warn: #8a5a00;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 6px 20px rgb(0 0 0 / 0.06);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161b;
    --surface: #1c1f26;
    --surface-2: #252a33;
    --ink: #eeeae3;
    --muted: #a49d91;
    --line: #333944;
    --brand: #d9c7a3;
    --brand-ink: #14161b;
    --accent: #e0645a;
    --accent-soft: #3d2422;
    --ok: #79c194;
    --ok-soft: #1f3327;
    --warn: #e2b04a;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--brand); color: var(--brand-ink); font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.danger { background: var(--accent); color: #fff; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}

label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 10px;
  border: 1.5px solid var(--line); background: var(--surface);
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, .chip:focus-visible, .choice:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px;
}

.error { color: var(--accent); font-weight: 600; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* Barber pole stripe used as a brand mark. */
.pole {
  height: 6px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 12px, var(--surface) 12px 24px, var(--brand) 24px 36px, var(--surface) 36px 48px);
}

/* ---------- Booking site ---------- */

.hero { padding-top: 40px; padding-bottom: 28px; }
.hero h1 { font-size: clamp(34px, 7vw, 52px); letter-spacing: -0.01em; }
.hero p.tagline { margin-top: 10px; font-size: 18px; color: var(--muted); }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; color: var(--muted); font-size: 15px; }

.step { padding: 22px; margin-bottom: 16px; }
.step h2 { font-size: 22px; display: flex; align-items: baseline; gap: 10px; }
.step h2 .num {
  font: 600 13px var(--sans); width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; background: var(--brand); color: var(--brand-ink);
  transform: translateY(-2px);
}
.step .body { margin-top: 16px; }
.step.locked { opacity: 0.5; }
.step.locked .body { display: none; }
.step .summary { margin-top: 6px; color: var(--muted); }

.choices { display: grid; gap: 10px; }
.choice {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-align: left; width: 100%;
  padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
}
.choice strong { font-size: 17px; }
.choice .price { font-weight: 700; align-self: center; grid-row: span 2; }
.choice small { color: var(--muted); }
.choice[aria-pressed='true'] { border-color: var(--brand); background: var(--surface-2); }

.dates { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.chip {
  flex: none; scroll-snap-align: start; min-width: 64px; padding: 10px 8px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; text-align: center;
}
.chip .dow { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.chip .dom { display: block; font-size: 20px; font-weight: 700; }
.chip:disabled { opacity: 0.35; cursor: not-allowed; }
.chip[aria-pressed='true'] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.chip[aria-pressed='true'] .dow { color: inherit; }

.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 14px; }
.times .chip { min-width: 0; font-weight: 600; }

.form-grid { display: grid; gap: 14px; }
@media (min-width: 560px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }

.confirm { padding: 28px 22px; text-align: center; }
.confirm .tick {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: 28px;
}
.confirm h2 { font-size: 28px; }
.confirm .when { font-size: 18px; margin-top: 8px; }
.linkbox { display: flex; gap: 8px; margin-top: 18px; }
.linkbox input { font-size: 14px; }

.hours { padding: 22px; margin: 28px 0; }
.hours dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; margin: 14px 0 0; }
.hours dt { font-weight: 600; }
.hours dd { margin: 0; color: var(--muted); }
.hours .today dt, .hours .today dd { color: var(--ink); font-weight: 700; }

footer { padding: 24px 0 40px; color: var(--muted); font-size: 14px; text-align: center; }

.ranking { margin-top: 16px; display: grid; gap: 12px; }
.ranking ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: rank; }
.ranking li {
  counter-increment: rank; display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface);
}
.ranking li::before {
  content: counter(rank); font: 600 13px var(--sans); width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--surface-2);
}
.ranking li:first-child::before { background: var(--brand); color: var(--brand-ink); }
.ranking li span { flex: 1; font-weight: 600; }
.ranking .move {
  width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface);
  cursor: pointer; font-size: 16px;
}
.ranking .move:disabled { opacity: 0.3; cursor: default; }
.slot-with { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.chip[aria-pressed='true'] .slot-with { color: inherit; }

label.check { display: flex; gap: 10px; align-items: center; font-weight: 400; font-size: 15px; margin: 0; cursor: pointer; }
label.check input { width: 22px; min-height: 22px; height: 22px; flex: none; accent-color: var(--brand); }
.fine { font-size: 13px; color: var(--muted); }
.choice.no-price { grid-template-columns: 1fr; }

.legal { padding-top: 24px; padding-bottom: 48px; max-width: 680px; }
.legal h1 { font-size: 34px; margin: 12px 0 6px; }
.legal h2 { font-size: 20px; margin: 26px 0 8px; }
.legal p, .legal li { margin: 0 0 10px; }
.legal ul { padding-left: 20px; }

/* ---------- Website themes (the shop picks one; the barber app stays Classic) ---------- */
:root { --accent-ink: #fff; --hero-bg: var(--brand); --hero-ink: var(--brand-ink); }
@media (prefers-color-scheme: dark) {
  :root { --hero-bg: #1c1f26; --hero-ink: #eeeae3; }
}
:root[data-theme='midnight'] {
  --bg: #121417; --surface: #1b1e23; --surface-2: #252a31; --ink: #f1ede4; --muted: #a7a197; --line: #343a44;
  --brand: #c8a96a; --brand-ink: #121417; --accent: #c8a96a; --accent-ink: #121417; --accent-soft: #3a3222;
  --ok: #8fd0a6; --ok-soft: #1f3327; --hero-bg: #0b0c0e; --hero-ink: #f1ede4; --shadow: none; color-scheme: dark;
}
:root[data-theme='fresh'] {
  --bg: #f4f8f7; --surface: #ffffff; --surface-2: #e6f0ee; --ink: #14211f; --muted: #5b6b68; --line: #d3e2df;
  --brand: #0f766e; --brand-ink: #ffffff; --accent: #e4572e; --accent-ink: #ffffff; --accent-soft: #fbe3db;
  --ok: #2f6b45; --ok-soft: #dcefe2; --hero-bg: #0f766e; --hero-ink: #ffffff;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 6px 20px rgb(0 0 0 / 0.06); color-scheme: light;
}
:root[data-theme='vintage'] {
  --bg: #f3ebe0; --surface: #fbf6ef; --surface-2: #ebdfcf; --ink: #2b1d14; --muted: #7a6553; --line: #dccbb5;
  --brand: #6b3e26; --brand-ink: #fbf6ef; --accent: #c8962c; --accent-ink: #2b1d14; --accent-soft: #f1e2bf;
  --ok: #4d6b2f; --ok-soft: #e3ecd5; --hero-bg: #6b3e26; --hero-ink: #fbf6ef;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 6px 20px rgb(0 0 0 / 0.06); color-scheme: light;
}

/* ---------- Website layout ---------- */
.site-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--hero-bg); color: var(--hero-ink); }
/* The cover photo, cropped by the shop: a focal point (--cover-x/y) that stays in view on every
   screen shape, and a zoom around that point. */
.site-hero.has-cover { background: #111; color: #fff; }
.site-hero.has-cover::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: var(--cover) var(--cover-x, 50%) var(--cover-y, 50%) / cover no-repeat;
  transform: scale(var(--cover-zoom, 1)); transform-origin: var(--cover-x, 50%) var(--cover-y, 50%);
}
.site-hero.has-cover::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(0 0 0 / 0.3), rgb(0 0 0 / 0.68)); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.site-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; padding-bottom: 6px; }
.site-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; font: 600 18px var(--serif); }
.site-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The logo sits in the hero, sized by its shape. */
.hero-logo { display: block; margin-bottom: 18px; object-fit: contain; }
/* --logo-scale is the shop's size slider (0.6 - 1.8). */
.hero-logo.square { width: calc(clamp(76px, 18vw, 108px) * var(--logo-scale, 1)); height: calc(clamp(76px, 18vw, 108px) * var(--logo-scale, 1)); }
.hero-logo.wide { width: auto; height: auto; max-width: min(100%, calc(420px * var(--logo-scale, 1))); max-height: calc(clamp(64px, 16vw, 120px) * var(--logo-scale, 1)); }
.hero-logo.boxed { border-radius: 14px; box-shadow: 0 4px 18px rgb(0 0 0 / 0.25); }
.hero-logo.square.boxed { object-fit: cover; }
/* A dark transparent logo on the dark header: no box, just a soft light glow that follows
   the logo's own shape so it lifts off the background. */
.hero-logo.plate {
  filter: drop-shadow(0 0 1px rgb(255 255 255 / 0.95)) drop-shadow(0 0 2px rgb(255 255 255 / 0.7)) drop-shadow(0 0 14px rgb(255 255 255 / 0.35));
}
.hero-logo:not(.boxed):not(.plate) { filter: drop-shadow(0 2px 8px rgb(0 0 0 / 0.35)); }
.nav-book, .hero-cta { background: var(--accent); color: var(--accent-ink); }
.hero-body { padding-top: 36px; padding-bottom: 52px; }
.hero-body h1 { font-size: clamp(38px, 9vw, 64px); letter-spacing: -0.01em; }
.hero-body .tagline { margin-top: 10px; font-size: clamp(18px, 3.5vw, 21px); opacity: 0.88; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.site-hero .hero-call { color: inherit; border-color: color-mix(in srgb, currentColor 45%, transparent); }
.hero-body .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 15px; opacity: 0.85; }
.site-heading { font-size: 26px; margin: 34px 0 14px; scroll-margin-top: 16px; }
.site-section.about { margin-top: 28px; padding: 4px 0 4px 18px; border-left: 4px solid var(--accent); }
.site-section.about p { font-size: 18px; max-width: 62ch; }
.team { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.member { display: flex; gap: 14px; align-items: center; padding: 16px; }
.member strong { font-size: 17px; }
.avatar {
  width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink); font: 600 20px var(--serif);
}
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.big { width: 64px; height: 64px; font-size: 26px; }
.choice.with-avatar { display: flex; align-items: center; gap: 12px; }
.choice.with-avatar .avatar { width: 44px; height: 44px; font-size: 18px; }
.choice-text { display: grid; gap: 2px; min-width: 0; }
.site-info { display: grid; gap: 16px; margin: 32px 0; }
.site-info .hours { margin: 0; }
.visit { padding: 22px; display: grid; gap: 8px; align-content: start; }
.visit p { color: var(--muted); }
@media (min-width: 700px) { .site-info { grid-template-columns: 1fr 1fr; } }
.site-footer { display: grid; gap: 6px; padding: 28px 16px 44px; border-top: 1px solid var(--line); }
.site-footer strong { color: var(--ink); font-family: var(--serif); font-size: 18px; }
