/* Shared foundation for the booking site and the staff app.
   Colours come from /assets/css/brand.css (generated from shop.config.js). */

/* Ultra for headlines; Archivo (variable weight + width) for everything that
   has to be read quickly. */
@font-face { font-family: 'Ultra'; src: url(/assets/fonts/ultra-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face {
  font-family: 'Archivo'; src: url(/assets/fonts/archivo-var.woff2) format('woff2-variations'), url(/assets/fonts/archivo-var.woff2) format('woff2');
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
}

:root {
  --ink: #000; --char: #16130E; --line: #2E2920; --gold: #DAA41F; --gold-deep: #987216;
  --bone: #F2E8D5; --ash: #A69C8B; --pole: #D0432F;
}
:root {
  --char-2: color-mix(in srgb, var(--char) 80%, var(--bone) 5%);
  --gold-soft: color-mix(in srgb, var(--gold) 14%, transparent);
  --gold-line: color-mix(in srgb, var(--gold) 38%, transparent);
  --gold-hi: color-mix(in srgb, var(--gold) 55%, #fff6dc);   /* the pale line between the two golds */
  --glow: #FFF1CF;                                            /* the LED bar over every mirror */
  --bone-dim: color-mix(in srgb, var(--bone) 72%, transparent);
  --ok: #7FB069;
  --f-display: 'Ultra', 'Rockwell Extra Bold', Georgia, serif;
  --f-ui: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-cond: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  /* type scale, ratio 1.25 on 17px */
  --t-xs: 13px; --t-sm: 15px; --t-md: 17px; --t-lg: 21px; --t-xl: 26px; --t-2xl: 33px; --t-3xl: 41px; --t-4xl: 52px;
  --r-btn: 10px; --r-card: 14px; --r-chip: 8px; --r-sheet: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* Tufted leather from the chairs: diamond quilting with a button at every corner */
  --tuft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cdefs%3E%3CradialGradient id='p' cx='.5' cy='.4' r='.55'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.045'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cg fill='url(%23p)'%3E%3Cpath d='M22 1L43 22 22 43 1 22z'/%3E%3Cpath d='M0 -21L21 0 0 21-21 0z'/%3E%3Cpath d='M44 -21L65 0 44 21 23 0z'/%3E%3Cpath d='M0 23L21 44 0 65-21 44z'/%3E%3Cpath d='M44 23L65 44 44 65 23 44z'/%3E%3C/g%3E%3Cpath d='M22 0L44 22 22 44 0 22z' fill='none' stroke='%23DAA41F' stroke-opacity='.075'/%3E%3Cg fill='%23DAA41F' fill-opacity='.2'%3E%3Ccircle cx='22' cy='0' r='1.3'/%3E%3Ccircle cx='0' cy='22' r='1.3'/%3E%3Ccircle cx='44' cy='22' r='1.3'/%3E%3Ccircle cx='22' cy='44' r='1.3'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
/* Pages cross-fade into each other where the browser supports it */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
body {
  margin: 0; background: var(--ink); color: var(--bone);
  font: 400 var(--t-md)/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'tnum' 0; font-kerning: normal;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--gold); color: var(--ink); }

.display { font-family: var(--f-display); font-weight: 400; letter-spacing: .005em; line-height: 1.08; font-kerning: normal; }
/* The lettering's two-tone gold: bright above the horizon, a pale hairline, deep below. Applied per line. */
.split {
  background: linear-gradient(180deg, var(--gold) 0 52%, var(--gold-hi) 52% 55.5%, var(--gold-deep) 55.5% 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
/* Repeat the split on every line of a wrapped heading */
@supports (height: 1lh) {
  .split { background-size: 100% 1lh; background-repeat: repeat-y; }
}
.cond { font-family: var(--f-cond); font-stretch: 80%; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ash); }
.small { font-size: var(--t-sm); }
.xs { font-size: var(--t-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack > * + * { margin-top: var(--gap, 12px); }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons */
/* Controls answer a tap right away: no wait to see if it's a double-tap zoom */
a, button, input, select, textarea, label, summary, [role="button"] { touch-action: manipulation; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--r-btn); border: 1px solid transparent;
  font: 600 var(--t-md)/1 var(--f-ui); letter-spacing: .005em; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .2s, color .15s, transform .12s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
/* Polished brass: a little light at the top edge, and a sheen that passes on hover */
.btn.primary {
  position: relative; overflow: hidden; isolation: isolate; color: var(--ink);
  background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 82%, #fff3cf) 0%, var(--gold) 46%, color-mix(in srgb, var(--gold) 86%, #3a2a05) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 248, 225, .55), inset 0 -1px 0 rgba(60, 40, 0, .35), 0 1px 0 rgba(0, 0, 0, .7);
}
.btn.primary::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 252, 238, .55) 50%, transparent 62%);
  transform: translateX(-130%); transition: transform .8s var(--ease-out);
}
.btn.primary:hover:not(:disabled)::after { transform: translateX(130%); }
.btn.primary:hover:not(:disabled) { box-shadow: inset 0 1px 0 rgba(255, 248, 225, .7), inset 0 -1px 0 rgba(60, 40, 0, .35), 0 6px 22px -8px color-mix(in srgb, var(--gold) 70%, transparent); }
.btn.ghost { background: transparent; border-color: color-mix(in srgb, var(--gold) 26%, var(--line)); color: var(--bone); }
.btn.ghost:hover:not(:disabled) { border-color: var(--gold); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent); }
.btn .icon { flex: none; }
.btn.quiet { background: transparent; color: var(--gold); padding: 0 8px; min-height: 40px; }
.btn.quiet:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn.danger { background: var(--pole); color: #fff; }
.btn.danger-ghost { background: transparent; border-color: color-mix(in srgb, var(--pole) 50%, transparent); color: #F08A79; }
.btn.block { width: 100%; display: flex; }
.btn.lg { min-height: 56px; font-size: var(--t-lg); padding: 0 26px; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: var(--t-sm); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: transparent; border: 0; color: var(--bone); -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: color-mix(in srgb, var(--bone) 8%, transparent); }

/* Forms */
.field { display: block; }
.field > span { display: block; font-size: var(--t-sm); color: var(--bone-dim); margin-bottom: 6px; font-weight: 500; }
.field > span em { font-style: normal; color: var(--ash); font-weight: 400; }
.input, .field input, .field textarea, .field select {
  width: 100%; min-height: 52px; padding: 12px 14px; border-radius: 10px;
  background: var(--ink); border: 1px solid var(--line); color: var(--bone); font-size: var(--t-md);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft);
}
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--ash) 70%, transparent); }
.field .hint { margin-top: 6px; font-size: var(--t-xs); color: var(--ash); }
.field.invalid input { border-color: var(--pole); }
.form-error { color: #F08A79; font-size: var(--t-sm); display: flex; gap: 8px; align-items: flex-start; }
.form-error .icon { flex: none; margin-top: 1px; }

/* Avatars: photo in a gold ring, or initials stamped in Ultra */
.avatar {
  --av: 56px; width: var(--av); height: var(--av); flex: none; border-radius: 50%; overflow: hidden;
  display: inline-grid; place-items: center; background: var(--char); position: relative;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
/* Gilded like the mirror frames: a gold band, a black gap, a fainter outer band */
.avatar.ring { box-shadow: 0 0 0 2px var(--ink), 0 0 0 3.5px var(--gold), 0 0 0 5.5px var(--ink), 0 0 0 6.2px color-mix(in srgb, var(--gold) 30%, transparent); }
.avatar.initials { background: radial-gradient(circle at 50% 35%, #1f1a10, var(--ink)); }
.avatar.initials span { font-family: var(--f-display); color: var(--gold); font-size: calc(var(--av) * .36); line-height: 1; transform: translateY(1px); }

.spinner { width: 22px; height: 22px; display: inline-grid; place-items: center; flex: none; }
.spinner svg { width: 100%; height: 100%; animation: seek 1.6s cubic-bezier(.45, .05, .3, 1) infinite; }
@keyframes seek {
  0% { transform: rotate(0); } 30% { transform: rotate(230deg); } 45% { transform: rotate(170deg); }
  60% { transform: rotate(200deg); } 100% { transform: rotate(360deg); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toasts */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(18px + var(--safe-b)); display: grid; place-items: center; z-index: 200; pointer-events: none; padding: 0 16px; }
.toast {
  display: flex; gap: 10px; align-items: center; max-width: 520px; padding: 12px 16px; border-radius: 12px;
  background: var(--bone); color: var(--ink); font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.5);
  animation: toast-in .25s var(--ease);
}
.toast.error { background: var(--pole); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* Sheets: bottom sheet on phones, dialog on larger screens */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.72);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .2s;
}
.sheet {
  width: 100%; max-height: 92dvh; display: flex; flex-direction: column; outline: none;
  background: var(--char); border-radius: var(--r-sheet) var(--r-sheet) 0 0; border: 1px solid var(--line); border-bottom: 0;
  animation: sheet-up .28s var(--ease); padding-bottom: var(--safe-b);
}
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 4px 20px; }
.sheet-head h2 { font: 600 var(--t-lg)/1.2 var(--f-ui); }
.sheet-body { padding: 8px 20px 20px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
@media (min-width: 720px) {
  .sheet-backdrop { align-items: center; padding: 24px; }
  .sheet { max-width: 480px; border-radius: var(--r-sheet); border-bottom: 1px solid var(--line); animation: pop .22s var(--ease); }
  .sheet.wide { max-width: 640px; }
  .sheet-grip { display: none; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }

/* Toggle switch */
.switch { position: relative; display: inline-flex; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 30px; background: var(--line); transition: background .18s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--bone); transition: transform .18s var(--ease); }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--ink); }
.switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.empty { text-align: center; padding: 28px 16px; color: var(--ash); }
.empty .icon { color: var(--gold); margin: 0 auto 10px; }
.empty strong { display: block; color: var(--bone); font-weight: 600; margin-bottom: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}
