/* Base styles and components. Tokens come from tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--navy-900);
  background: var(--ivory-100);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums proportional-nums;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.012em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--gold-400); color: var(--navy-900); padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: var(--s-4); }

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

.wrap { width: 100%; max-width: calc(var(--content) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* Type helpers */
.eyebrow {
  font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-700);
}
.on-dark .eyebrow { color: var(--gold-200); }
.display, .h1, .h2, .h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.012em; }
.display { font-size: var(--fs-display); line-height: 1.04; }
.h1 { font-size: var(--fs-h1); line-height: 1.08; }
.h2 { font-size: var(--fs-h2); line-height: 1.12; }
.h3 { font-size: var(--fs-h3); line-height: 1.25; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-600); max-width: 34em; }
.on-dark .lead { color: var(--mist-300); }
.fine { font-size: var(--fs-caption); line-height: 1.5; color: var(--ink-500); }
.on-dark .fine { color: var(--mist-400); }
.display em, .h1 em, .h2 em { font-style: italic; }
.display .line { display: block; }

.on-dark { color: var(--ivory-100); }
.on-dark a:not(.btn) { color: var(--gold-200); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 52px; padding: 0 var(--s-6);
  border-radius: var(--r-pill); border: 1px solid transparent;
  font: 600 16px/1 var(--font-text); letter-spacing: 0.01em; text-decoration: none;
  cursor: pointer; transition: background-color 200ms var(--ease), border-color 200ms var(--ease), transform 200ms var(--ease);
}
.btn-primary { background: var(--gold-400); color: var(--navy-900); }
.btn-primary:hover { background: var(--gold-300); }
.btn-primary:active { background: var(--gold-500); transform: translateY(1px); }
.btn-secondary { border-color: currentColor; color: var(--navy-900); background: transparent; }
.btn-secondary:hover { background: rgba(2, 0, 52, 0.05); }
.on-dark .btn-secondary { color: var(--ivory-100); border-color: rgba(247, 245, 240, 0.5); }
.on-dark .btn-secondary:hover { background: rgba(247, 245, 240, 0.08); border-color: var(--ivory-100); }
.btn-sm { min-height: 42px; padding: 0 var(--s-5); font-size: 15px; }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.4; pointer-events: none; }
.link-quiet { font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link-quiet:hover { text-decoration-thickness: 2px; }

/* Glass: functional layer only (see DESIGN.md) */
.glass {
  position: relative;
  background: rgba(16, 14, 72, 0.42);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    var(--shadow-float);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0.06) 100%);
}
.glass-light {
  background: rgba(251, 250, 247, 0.72);
  border-color: rgba(2, 0, 52, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 32px -18px rgba(2, 0, 52, 0.35);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass { background: var(--navy-800); }
  .glass-light { background: var(--ivory-50); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .glass { background: var(--navy-800); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--mist-400); }
  .glass-light { background: var(--ivory-50); border-color: var(--stone-500); }
  .glass::before { display: none; }
}

/* Header */
.site-header { position: fixed; inset: var(--s-4) 0 auto; z-index: 50; pointer-events: none; transition: transform 420ms var(--ease), opacity 320ms var(--ease); }
.site-header.is-hidden { transform: translateY(-130%); opacity: 0; }
.site-header.is-scrolled .header-capsule { box-shadow: 0 12px 40px -16px rgba(1, 0, 31, 0.55); }
@media (prefers-reduced-motion: reduce) { .site-header { transition: none; } }
.header-capsule {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--s-5);
  max-width: calc(var(--content) + 2 * var(--gutter) - 2 * var(--s-4));
  margin: 0 auto; padding: var(--s-2) var(--s-2) var(--s-2) var(--s-5);
  border-radius: var(--r-pill);
  color: var(--ivory-100);
}
.header-capsule.glass-light { color: var(--navy-900); }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; color: inherit; flex-shrink: 0; }
.brand svg { width: 34px; height: auto; color: var(--gold-400); }
.glass-light .brand svg { color: var(--gold-500); }
.wordmark { display: grid; line-height: 1; }
.wordmark .wm-1 { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 21px; letter-spacing: -0.01em; }
.wordmark .wm-2 { font-size: 9.5px; font-weight: 600; letter-spacing: 0.42em; text-transform: uppercase; margin-top: 4px; padding-left: 2px; opacity: 0.85; }
.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; display: flex; gap: var(--s-1); }
.primary-nav a {
  display: block; padding: var(--s-2) var(--s-3); border-radius: var(--r-pill);
  font-size: var(--fs-small); font-weight: 500; text-decoration: none; color: inherit; opacity: 0.88;
}
.primary-nav a:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }
.glass-light .primary-nav a:hover { background: rgba(2, 0, 52, 0.05); }
.header-phone { font-size: var(--fs-small); font-weight: 600; text-decoration: none; color: inherit; white-space: nowrap; font-variant-numeric: tabular-nums; }
.menu-btn {
  display: none; margin-left: auto; min-height: 42px; padding: 0 var(--s-4);
  border-radius: var(--r-pill); border: 1px solid rgba(255, 255, 255, 0.3); background: transparent; color: inherit;
  font: 600 15px/1 var(--font-text); cursor: pointer;
}
.glass-light .menu-btn { border-color: rgba(2, 0, 52, 0.25); }
.mobile-menu {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  display: grid; align-content: center; gap: var(--s-6);
  padding: 120px var(--gutter) calc(var(--s-7) + env(safe-area-inset-bottom));
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(194, 154, 46, 0.18) 0%, rgba(194, 154, 46, 0) 60%),
    radial-gradient(70% 50% at 0% 100%, rgba(46, 42, 132, 0.6) 0%, rgba(46, 42, 132, 0) 70%),
    var(--navy-950);
  color: var(--ivory-100);
  opacity: 0; visibility: hidden; transition: opacity 320ms var(--ease), visibility 0s linear 320ms;
}
.mobile-menu[data-open="true"] { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 320ms var(--ease), visibility 0s; }
.mobile-menu ul { list-style: none; display: grid; }
.mobile-menu li { border-bottom: 1px solid rgba(247, 245, 240, 0.12); opacity: 0; transform: translateY(14px); transition: opacity 420ms var(--ease), transform 420ms var(--ease); }
.mobile-menu[data-open="true"] li { opacity: 1; transform: none; }
.mobile-menu[data-open="true"] li:nth-child(1) { transition-delay: 60ms; } .mobile-menu[data-open="true"] li:nth-child(2) { transition-delay: 100ms; }
.mobile-menu[data-open="true"] li:nth-child(3) { transition-delay: 140ms; } .mobile-menu[data-open="true"] li:nth-child(4) { transition-delay: 180ms; }
.mobile-menu[data-open="true"] li:nth-child(5) { transition-delay: 220ms; } .mobile-menu[data-open="true"] li:nth-child(6) { transition-delay: 260ms; }
.mobile-menu[data-open="true"] li:nth-child(7) { transition-delay: 300ms; } .mobile-menu[data-open="true"] li:nth-child(8) { transition-delay: 340ms; }
.mobile-menu ul a {
  display: flex; align-items: baseline; gap: var(--s-4); padding: var(--s-4) 0;
  font-family: var(--font-display); font-size: clamp(26px, 7vw, 34px); line-height: 1.1; letter-spacing: -0.01em;
  text-decoration: none; color: var(--ivory-100);
}
.mobile-menu ul a::before { content: counter(menu, decimal-leading-zero); counter-increment: menu; font: 600 11px/1 var(--font-text); letter-spacing: 0.14em; color: var(--gold-300); min-width: 24px; }
.mobile-menu ul { counter-reset: menu; }
.mobile-menu-foot { display: grid; gap: var(--s-3); opacity: 0; transform: translateY(14px); transition: opacity 420ms var(--ease) 380ms, transform 420ms var(--ease) 380ms; }
.mobile-menu[data-open="true"] .mobile-menu-foot { opacity: 1; transform: none; }
.mobile-menu-foot .btn { width: 100%; }
.mobile-menu-foot a.phone { color: var(--mist-300); text-decoration: none; text-align: center; font-size: var(--fs-small); font-weight: 600; }
.menu-open { overflow: hidden; }
.menu-open .header-capsule.glass { background: var(--navy-950); border-color: rgba(247, 245, 240, 0.18); }
.menu-open .site-header { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .mobile-menu, .mobile-menu li, .mobile-menu-foot { transition: none; } }
@media (max-width: 1080px) {
  .primary-nav, .header-phone { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .header-capsule .btn { order: 3; }
}
@media (min-width: 1081px) { .mobile-menu { display: none; } }
@media (max-width: 520px) {
  .header-capsule { gap: var(--s-2); padding-left: var(--s-4); }
  .wordmark .wm-1 { font-size: 18px; }
  .header-capsule .btn { padding: 0 var(--s-4); }
  .header-capsule .btn .long { display: none; }
}
@media (min-width: 521px) { .header-capsule .btn .short { display: none; } }

/* Shared hero parts */
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); margin-top: var(--s-6); }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-6); font-size: var(--fs-small); font-weight: 500; }
.hero-facts li { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero-facts svg { width: 16px; height: 16px; color: var(--gold-500); flex-shrink: 0; }
.on-dark .hero-facts svg { color: var(--gold-200); }
.hero-disclosure { margin-top: var(--s-4); max-width: 34em; }

.pending {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-1) var(--s-3); border: 1px dashed currentColor; border-radius: var(--r-input);
  font-size: var(--fs-caption); font-weight: 600; letter-spacing: 0.02em; opacity: 0.8;
}

/* How it works */
.section { padding: var(--section-y) 0; }
.section-head { display: grid; gap: var(--s-4); max-width: 40rem; margin-bottom: var(--s-8); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--stone-200); }
.steps li { padding: var(--s-6) var(--s-6) 0 0; display: grid; gap: var(--s-3); align-content: start; }
.steps li + li { padding-left: var(--s-6); border-left: 1px solid var(--stone-200); }
.step-num { font-family: var(--font-display); font-size: 56px; line-height: 1; color: var(--gold-500); font-variant-numeric: oldstyle-nums; }
.steps p { color: var(--ink-600); max-width: 30ch; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: var(--s-5) 0; border-left: 0; border-bottom: 1px solid var(--stone-200); }
}


/* Entrance */
.reveal { opacity: 0; transform: translateY(12px); filter: blur(5px); animation: reveal 900ms var(--ease) forwards; }
.reveal.d1 { animation-delay: 120ms; } .reveal.d2 { animation-delay: 240ms; } .reveal.d3 { animation-delay: 360ms; } .reveal.d4 { animation-delay: 480ms; }
@keyframes reveal { to { opacity: 1; transform: none; filter: blur(0); } }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; filter: none; animation: none; } }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* Photos (responsive <picture> from macros.html) */
.photo { display: block; margin: 0; }
.photo img { width: 100%; height: auto; background: var(--navy-800); }

/* Scroll entrance: elements rise into place once, when first seen */
.rise { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.rise.is-in { opacity: 1; transform: none; }
.no-js .rise { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; transition: none; } }

/* Footer */
.site-footer { background: var(--navy-950); padding: var(--s-9) 0 var(--s-7); border-top: 1px solid var(--navy-700); }
.footer-top { display: grid; grid-template-columns: 1.2fr 2fr; gap: var(--s-8); padding-bottom: var(--s-8); border-bottom: 1px solid var(--navy-700); }
.footer-brand { display: grid; gap: var(--s-4); align-content: start; justify-items: start; }
.footer-brand .brand svg { color: var(--gold-400); }
.footer-tagline { color: var(--mist-300); max-width: 28em; }
.footer-phone { font-family: var(--font-display); font-size: 26px; text-decoration: none; color: var(--ivory-100); font-variant-numeric: tabular-nums; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.footer-head { font: 600 var(--fs-caption)/1.5 var(--font-text); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-200); margin: 0 0 var(--s-4); }
.footer-nav ul { list-style: none; display: grid; gap: var(--s-2); }
.footer-nav a { color: var(--mist-300); text-decoration: none; font-size: var(--fs-small); }
.footer-nav a:hover { color: var(--ivory-100); text-decoration: underline; text-underline-offset: 4px; }
.footer-legal { display: grid; gap: var(--s-4); padding-top: var(--s-7); max-width: 80ch; font-size: var(--fs-small); color: var(--mist-400); }
.footer-legal a { color: var(--mist-300); }
.footer-reg { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
@media (max-width: 860px) {
  .footer-top { grid-template-columns: 1fr; gap: var(--s-7); }
  .footer-nav { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) { .footer-nav { grid-template-columns: 1fr; } }

/* Utilities */
.mt-6 { margin-top: var(--s-6); }
.mt-4 { margin-top: var(--s-4); }
.muted { color: var(--mist-400); font-weight: 400; }
[hidden] { display: none !important; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
[tabindex="-1"]:focus { outline: none; }
.site-header.is-scrolled .header-capsule.glass { background: rgba(2, 0, 52, 0.9); border-color: rgba(255, 255, 255, 0.14); }

/* Sticky booking bar: phones only, appears once the hero has scrolled past */
.sticky-cta { display: none; }
@media (max-width: 860px) {
  .sticky-cta {
    position: fixed; left: var(--gutter); right: var(--gutter); bottom: calc(var(--s-3) + env(safe-area-inset-bottom)); z-index: 40;
    display: grid; grid-template-columns: 1fr 52px; gap: var(--s-2);
    transform: translateY(140%); transition: transform 360ms var(--ease);
  }
  .sticky-cta .btn { width: 100%; box-shadow: 0 14px 34px -14px rgba(1, 0, 31, 0.6); }
  .sticky-call { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--navy-900); color: var(--ivory-100); box-shadow: 0 14px 34px -14px rgba(1, 0, 31, 0.6); }
  .sticky-call svg { width: 22px; height: 22px; }
  .site-header.is-scrolled ~ * .sticky-cta, body.cta-visible .sticky-cta { transform: none; }
  .menu-open .sticky-cta { transform: translateY(140%); }
  body.cta-visible { padding-bottom: 84px; }
}

/* Availability strip: real next slot and count (preview data until the schedule is live) */
.availability { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-2) var(--s-4) var(--s-2) var(--s-3); border-radius: var(--r-pill); font-size: var(--fs-small); color: var(--ivory-100); background: rgba(247, 245, 240, 0.1); border: 1px solid rgba(247, 245, 240, 0.18); }
.availability-dot { width: 8px; height: 8px; border-radius: 50%; background: #5fd08a; box-shadow: 0 0 0 0 rgba(95, 208, 138, 0.6); animation: pulse 2.4s var(--ease) infinite; }
.availability strong { font-weight: 600; }
.availability .sep { opacity: 0.5; }
.availability-light { color: var(--navy-900); background: var(--ivory-50); border-color: var(--stone-200); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(95, 208, 138, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(95, 208, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 208, 138, 0); } }
@media (prefers-reduced-motion: reduce) { .availability-dot { animation: none; } }

/* Nav links: hairline grows from the left on hover */
.primary-nav a { position: relative; }
.primary-nav a::after { content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--ease); }
.primary-nav a:hover::after { transform: scaleX(1); }
.primary-nav a:hover { background: transparent; }

/* Buttons lift a touch */
.btn { transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), background-color 200ms var(--ease), border-color 200ms var(--ease); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(194, 154, 46, 0.7); }
@media (prefers-reduced-motion: reduce) { .btn-primary:hover { transform: none; } }

/* Booking steps slide in */
@media (prefers-reduced-motion: no-preference) {
  .booking-step.is-entering { animation: step-in 420ms var(--ease) both; }
}
@keyframes step-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* Hero scroll cue */
.scroll-cue { position: absolute; left: 50%; bottom: var(--s-5); transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; font: 600 10px/1 var(--font-text); letter-spacing: 0.18em; text-transform: uppercase; color: var(--mist-300); opacity: 0.85; transition: opacity 400ms var(--ease); pointer-events: none; }
.scroll-cue::after { content: ""; width: 1px; height: 36px; background: linear-gradient(var(--gold-300), transparent); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.is-scrolled ~ main .scroll-cue, body.cta-visible .scroll-cue { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .scroll-cue::after { animation: none; } }
@media (max-width: 860px) { .scroll-cue { display: none; } }
