/* Empire Salon public site
   Identity: classic shopfront. Bottle-green glass with gold-leaf lettering,
   porcelain tile, oxblood leather. Colours are overridden at runtime from
   the salon's branding settings (see site.js applyBrand). */

:root {
  --gold: #C8A04A;
  --gold-hi: #E3C987;
  --green: #12302A;
  --green-deep: #0B201C;
  --porcelain: #EEF0EC;
  --tile: #E1E5E0;
  --ink: #1B1D1B;
  --muted: #545B57;
  --line: #C9D0CA;
  --oxblood: #7A2A22;
  --ok: #1F6B45;
  --warn: #8A5A00;

  --display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --wrap: 1120px;
  --radius-sm: 4px;
  --radius: 8px;
  --focus: 0 0 0 3px #fff, 0 0 0 5px var(--green);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--porcelain);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--oxblood); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { top: 8px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0 0 var(--s4); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 var(--s4); max-width: 68ch; }
.lede { font-size: 1.15rem; color: var(--muted); }

/* ---------- Placeholder notice ---------- */
.notice-bar {
  background: #FFF6DA; color: #5A4300; font-size: 0.875rem; text-align: center; padding: 6px 16px; border-bottom: 1px solid #E8D79A;
}

/* ---------- Header ---------- */
.site-header { background: var(--green); color: var(--porcelain); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(200,160,74,.35); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--gold-hi); text-decoration: none; font-family: var(--display); font-size: 1.45rem; font-weight: 600; letter-spacing: 0.01em; }
.brand:hover { color: #fff; }
.brand img { height: 36px; width: auto; }
.nav { display: flex; gap: var(--s5); align-items: center; }
.nav a { color: var(--porcelain); text-decoration: none; font-size: 0.95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--gold); color: #fff; }
.nav .btn { border-bottom: 0; }
.menu-btn { display: none; background: none; border: 1px solid rgba(238,240,236,.4); color: var(--porcelain); border-radius: var(--radius-sm); padding: 8px 12px; font: inherit; font-size: 0.9rem; }
@media (max-width: 760px) {
  .menu-btn { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; background: var(--green-deep); flex-direction: column; align-items: stretch; gap: 0; padding: var(--s2) 16px var(--s4); border-bottom: 1px solid rgba(200,160,74,.35); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid rgba(238,240,236,.1); }
  .nav .btn { margin-top: var(--s3); text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1 var(--sans); padding: 14px 22px; min-height: 48px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-gold { background: var(--gold); color: var(--green-deep); }
.btn-gold:hover { background: var(--gold-hi); color: var(--green-deep); }
.btn-green { background: var(--green); color: var(--porcelain); }
.btn-green:hover { background: var(--green-deep); color: #fff; }
.btn-line { background: transparent; color: var(--green); border-color: var(--green); }
.btn-line:hover { background: var(--green); color: var(--porcelain); }
.btn-ghost-light { background: transparent; color: var(--porcelain); border-color: rgba(238,240,236,.5); }
.btn-ghost-light:hover { border-color: var(--gold-hi); color: var(--gold-hi); }
.btn-danger { background: transparent; color: var(--oxblood); border-color: var(--oxblood); }
.btn-danger:hover { background: var(--oxblood); color: #fff; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-sm { min-height: 38px; padding: 9px 14px; font-size: 0.9rem; }

/* ---------- Hero: the shopfront window ---------- */
.hero { background: var(--green); color: var(--porcelain); padding: var(--s7) 0 var(--s8); position: relative; overflow: hidden; }
.hero::after { /* tiled floor edge */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 18px;
  background: repeating-conic-gradient(var(--porcelain) 0 25%, var(--ink) 0 50%) 0 0 / 18px 18px; opacity: .9;
}
.window {
  position: relative; max-width: 760px; margin-inline: auto; text-align: center;
  padding: clamp(40px, 8vw, 84px) clamp(20px, 6vw, 72px) clamp(36px, 6vw, 60px);
  border: 2px solid var(--gold); border-radius: 380px 380px 6px 6px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.07), transparent 60%), var(--green-deep);
}
.window::before { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(200,160,74,.45); border-radius: 372px 372px 3px 3px; pointer-events: none; }
.window .est { font-family: var(--display); font-style: italic; color: var(--gold-hi); font-size: 1.05rem; margin-bottom: var(--s3); }
.gilt {
  font-family: var(--display); font-weight: 700; font-size: clamp(3rem, 12vw, 6.4rem); line-height: .95; margin: 0 0 var(--s4);
  background: linear-gradient(180deg, #F3E2AE 0%, var(--gold) 46%, #8E6B23 54%, var(--gold-hi) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 1px 0 rgba(0,0,0,.15);
}
.window .tagline { font-size: clamp(1.05rem, 2.4vw, 1.25rem); color: #D9DED8; margin: 0 auto var(--s5); }
.hero-actions { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; }
.hero-img { margin-top: var(--s6); border-radius: var(--radius); overflow: hidden; max-height: 420px; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .gilt { animation: shine 1.4s ease-out .2s both; }
  @keyframes shine { from { opacity: 0; letter-spacing: .06em; } to { opacity: 1; letter-spacing: 0; } }
}

/* ---------- Sections ---------- */
.section { padding: var(--s8) 0; }
.section-tile { background: var(--tile); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s6); }
.section-head p { margin: 0; }

/* ---------- Price board ---------- */
.board { background: var(--green); color: var(--porcelain); border-radius: var(--radius); padding: clamp(20px, 4vw, 48px); border: 2px solid var(--gold); box-shadow: inset 0 0 0 6px var(--green), inset 0 0 0 7px rgba(200,160,74,.45); }
.board h3 { color: var(--gold-hi); font-size: 1.15rem; font-family: var(--sans); font-weight: 600; letter-spacing: .02em; margin: var(--s5) 0 var(--s3); padding-bottom: 6px; border-bottom: 1px solid rgba(200,160,74,.35); }
.board h3:first-child { margin-top: 0; }
.board section + section { margin-top: var(--s5); }
.board-list { list-style: none; margin: 0; padding: 0; }
.board-item { padding: var(--s3) 0; }
.board-row { display: flex; align-items: baseline; gap: 10px; }
.board-name { font-family: var(--display); font-size: 1.3rem; font-weight: 600; }
.board-dots { flex: 1; border-bottom: 2px dotted rgba(200,160,74,.55); transform: translateY(-5px); min-width: 24px; }
.board-price { font-family: var(--display); font-size: 1.3rem; color: var(--gold-hi); white-space: nowrap; }
.board-meta { color: #B9C2BC; font-size: 0.93rem; margin-top: 2px; display: flex; gap: var(--s3); flex-wrap: wrap; justify-content: space-between; }
.board-meta a { color: var(--gold-hi); margin-left: 12px; font-weight: 600; }
.board-side { white-space: nowrap; margin-left: auto; }
.board-cols { columns: 2 380px; column-gap: var(--s7); }
.board-cols > section { break-inside: avoid; }

/* ---------- Steps (a real sequence) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; padding-top: var(--s5); border-top: 2px solid var(--ink); }
.steps li::before { content: counter(step); font-family: var(--display); font-size: 2.2rem; color: var(--gold); display: block; line-height: 1; margin-bottom: var(--s3); }
.steps strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.steps p { color: var(--muted); margin: 0; }

/* ---------- Info grid (hours / visit) ---------- */
.info-grid { display: grid; gap: var(--s6); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.hours { width: 100%; border-collapse: collapse; font-size: 1rem; }
.hours th, .hours td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.today th, .hours tr.today td { font-weight: 700; }
.hours .closed { color: var(--muted); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.contact-list span:first-child { color: var(--muted); }
.map-frame { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); background: var(--tile); }
.map-placeholder { aspect-ratio: 4/3; border-radius: var(--radius); background: var(--tile); display: grid; place-items: center; color: var(--muted); text-align: center; padding: var(--s5); border: 1px dashed var(--line); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-deep); color: #C5CCC7; padding: var(--s7) 0 var(--s6); font-size: 0.95rem; }
.site-footer a { color: var(--gold-hi); }
.footer-grid { display: grid; gap: var(--s6); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-brand { font-family: var(--display); color: var(--gold-hi); font-size: 1.6rem; margin-bottom: var(--s2); }
.site-footer h2 { font-family: var(--sans); font-size: 0.95rem; color: #fff; margin-bottom: var(--s3); font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.footer-legal { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid rgba(255,255,255,.1); font-size: 0.85rem; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: var(--s4); }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .hint { font-size: 0.875rem; color: var(--muted); }
.input, .textarea, select.input {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #9AA49D; border-radius: var(--radius-sm);
  padding: 12px 14px; min-height: 48px; width: 100%;
}
.input:focus, .textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(18,48,42,.18); }
.input[aria-invalid="true"] { border-color: var(--oxblood); }
.field-error { color: var(--oxblood); font-size: 0.9rem; }
.form-error { background: #F7E6E3; border-left: 4px solid var(--oxblood); padding: var(--s3) var(--s4); margin-bottom: var(--s4); border-radius: var(--radius-sm); }
.form-success { background: #E2F1E8; border-left: 4px solid var(--ok); padding: var(--s3) var(--s4); margin-bottom: var(--s4); border-radius: var(--radius-sm); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Booking wizard ---------- */
.book-shell { padding: var(--s6) 0 140px; }
.progress { list-style: none; margin: 0 0 var(--s6); padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: p; }
.progress li { counter-increment: p; font-size: 0.85rem; color: var(--muted); padding-top: 10px; border-top: 4px solid var(--line); }
.progress li::before { content: counter(p) '. '; font-weight: 700; }
.progress li.done { border-top-color: var(--green); color: var(--ink); }
.progress li.current { border-top-color: var(--gold); color: var(--ink); font-weight: 600; }
@media (max-width: 520px) { .progress li span { display: none; } .progress li.current span { display: inline; } }

.step-panel[hidden] { display: none; }
.step-panel h2 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
.choice-list { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice label { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: var(--s4); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; min-height: 88px; }
.choice .c-name { font-weight: 600; font-size: 1.05rem; }
.choice .c-price { font-family: var(--display); font-size: 1.15rem; color: var(--green); }
.choice .c-meta { grid-column: 1 / -1; color: var(--muted); font-size: 0.92rem; }
.choice input:checked + label { border-color: var(--green); box-shadow: inset 0 0 0 2px var(--green); background: #F6FAF7; }
.choice input:focus-visible + label { box-shadow: var(--focus); }

.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); max-width: 460px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s3); }
.cal-title { font-family: var(--display); font-size: 1.35rem; font-weight: 600; }
.cal-nav { background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 44px; height: 44px; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.cal-nav:disabled { opacity: .35; cursor: not-allowed; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 0.78rem; color: var(--muted); padding: 4px 0; }
.cal-day { aspect-ratio: 1; min-height: 40px; border: 1px solid transparent; border-radius: var(--radius-sm); background: none; font: inherit; font-variant-numeric: tabular-nums; color: #9BA39E; cursor: default; position: relative; }
.cal-day.avail { color: var(--ink); background: #EEF5F0; border-color: #CFE0D5; cursor: pointer; font-weight: 600; }
.cal-day.avail::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--gold); }
.cal-day.avail:hover { border-color: var(--green); }
.cal-day[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.cal-day[aria-pressed="true"]::after { background: var(--gold-hi); }
.cal-day.today { text-decoration: underline; text-underline-offset: 3px; }
.cal-legend { font-size: 0.85rem; color: var(--muted); margin-top: var(--s3); }

.slot-groups { display: grid; gap: var(--s5); }
.slot-group h3 { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--muted); margin-bottom: var(--s3); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: var(--s2); }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.slot label { display: flex; align-items: center; justify-content: center; min-height: 52px; border: 1px solid #9AA49D; border-radius: 999px; background: #fff; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.slot input:checked + label { background: var(--green); color: #fff; border-color: var(--green); }
.slot input:focus-visible + label { box-shadow: var(--focus); }
.empty { padding: var(--s5); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

.review { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); margin-bottom: var(--s5); }
.review dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px var(--s5); }
.review dt { color: var(--muted); }
.review dd { margin: 0; font-weight: 600; }
.policy { font-size: 0.92rem; color: var(--muted); }

.summary-bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--green); color: var(--porcelain); z-index: 15; border-top: 2px solid var(--gold); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
.summary-bar .wrap { display: flex; gap: var(--s4); align-items: center; justify-content: space-between; }
.summary-text { font-size: 0.92rem; line-height: 1.35; min-width: 0; }
.summary-text strong { display: block; font-size: 1rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-actions { display: flex; gap: var(--s2); flex-shrink: 0; }

/* ---------- Confirmation / status ---------- */
.ticket { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-width: 620px; }
.ticket-head { background: var(--green); color: var(--porcelain); padding: var(--s5); }
.ticket-head .ref-label { font-size: 0.9rem; color: #C5CCC7; }
.ticket-ref { font-family: var(--display); font-size: clamp(2rem, 8vw, 2.8rem); color: var(--gold-hi); letter-spacing: 0.04em; margin: 2px 0 var(--s3); }
.ticket-body { padding: var(--s5); }
.ticket-body dl { margin: 0 0 var(--s4); display: grid; grid-template-columns: max-content 1fr; gap: 10px var(--s5); }
.ticket-body dt { color: var(--muted); }
.ticket-body dd { margin: 0; font-weight: 600; }
.ticket-perf { height: 14px; background: radial-gradient(circle at 7px 7px, var(--porcelain) 6px, transparent 6.5px) -7px 0 / 22px 14px repeat-x; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; }
.status-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-pending { background: #FFF1CC; color: #6B4A00; }
.st-approved { background: #DCF0E3; color: #17573A; }
.st-completed { background: #E2E8F0; color: #2B3A4D; }
.st-rejected, .st-cancelled, .st-expired, .st-no_show { background: #F5E1DE; color: #6E241D; }
.next-steps { margin: 0; padding-left: 1.2em; color: var(--muted); }
.next-steps li { margin-bottom: 6px; }
.actions-row { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s5); }

.page-head { padding: var(--s7) 0 var(--s5); }
.page-head p { color: var(--muted); }
.loading { color: var(--muted); }
.loading::after { content: ''; display: inline-block; width: 14px; height: 14px; margin-left: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
