/* =========================================================
   Milton Family Dental — Glass Floor Studio
   Built to Glass Floor polish invariants.
   ========================================================= */

/* ------ Tokens ------ */
:root {
  /* Neutrals — warm gray scale */
  --n-0:   #ffffff;
  --n-50:  #fafaf9;
  --n-100: #f5f5f4;
  --n-200: #e7e5e4;
  --n-300: #d6d3d1;
  --n-400: #a8a29e;
  --n-500: #78716c;
  --n-600: #57534e;
  --n-700: #44403c;
  --n-800: #292524;
  --n-900: #1c1917;
  --n-950: #0a0a0a;

  /* Accent — single deep teal */
  --accent:        #0d6b6b;
  --accent-hover:  #0a5757;
  --accent-soft:   #e6f1f1;
  --accent-light:  #7dd3d3;

  /* Secondary UI tokens */
  --star:          #f5a623;

  /* Semantic */
  --bg:         var(--n-50);
  --bg-raised: var(--n-0);
  --fg:         var(--n-900);
  --fg-muted:   var(--n-600);
  --border:     rgba(28, 25, 23, 0.08);

  /* Type scale — 1.25 ratio; 6 sizes */
  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-32: 2rem;
  --fs-48: 3rem;
  --fs-64: 4rem;

  /* Spacing — 4/8pt grid */
  --s-4:   0.25rem;
  --s-8:   0.5rem;
  --s-12:  0.75rem;
  --s-16:  1rem;
  --s-24:  1.5rem;
  --s-32:  2rem;
  --s-48:  3rem;
  --s-64:  4rem;
  --s-96:  6rem;
  --s-128: 8rem;

  /* Radii */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-full: 999px;

  /* Elevation — 3 levels only */
  --e-1: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.03);
  --e-2: 0 2px 4px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  --e-3: 0 4px 8px rgba(0, 0, 0, 0.06), 0 16px 48px rgba(0, 0, 0, 0.08);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);
  --ease-io:  cubic-bezier(0.4, 0, 0.2, 1);
  --dur-1: 150ms;
  --dur-2: 250ms;
  --dur-3: 400ms;

  /* Layout */
  --content-max: 1200px;
  --prose-max: 65ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        var(--n-950);
    --bg-raised: var(--n-900);
    --fg:        var(--n-50);
    --fg-muted:  var(--n-400);
    --border:    rgba(255, 255, 255, 0.08);
    --accent-soft: rgba(13, 107, 107, 0.16);
  }
}

/* ------ Base ------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
               "Segoe UI", Roboto, sans-serif;
  font-size: var(--fs-16);
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--fg);
}

h1 { font-size: clamp(var(--fs-32), 5vw, var(--fs-64)); letter-spacing: -0.025em; line-height: 1.05; }
h2 { font-size: clamp(var(--fs-24), 3.5vw, var(--fs-48)); }
h3 { font-size: var(--fs-24); letter-spacing: -0.015em; }
h4 { font-size: var(--fs-20); letter-spacing: -0.01em; }

p { margin: 0; max-width: var(--prose-max); }
a { color: var(--accent); text-decoration: none; transition: color var(--dur-1) var(--ease-out); }
a:hover { color: var(--accent-hover); }

img, svg { display: block; max-width: 100%; height: auto; }

::selection { background: var(--accent); color: var(--n-0); }

/* ------ Layout primitives ------ */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-inline: var(--s-24);
}

section { padding-block: var(--s-64); }
@media (min-width: 768px) { section { padding-block: var(--s-96); } }

.eyebrow {
  font-size: var(--fs-12);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.lede {
  font-size: var(--fs-20);
  color: var(--fg-muted);
  line-height: 1.5;
  max-width: var(--prose-max);
}

/* ------ Buttons ------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
  padding: var(--s-12) var(--s-24);
  border-radius: var(--r-full);
  font-size: var(--fs-16);
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease-out),
              transform var(--dur-1) var(--ease-out),
              border-color var(--dur-1) var(--ease-out);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: var(--n-0);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--n-0);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--fg-muted);
  color: var(--fg);
}

/* ------ Nav ------ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out);
}
.nav.is-over-hero {
  background: linear-gradient(180deg, rgba(10, 25, 23, 0.55), rgba(10, 25, 23, 0));
  border-bottom-color: transparent;
}
.nav.is-over-hero .logo,
.nav.is-over-hero .nav-links a,
.nav.is-over-hero .nav-burger span { color: var(--n-0); background: transparent; }
.nav.is-over-hero .nav-links a { color: rgba(255, 255, 255, 0.85); }
.nav.is-over-hero .nav-links a:hover { color: var(--n-0); }
.nav.is-over-hero .logo-mark { background: var(--accent-light); color: var(--n-900); }
.nav.is-over-hero .nav-burger span { background: var(--n-0); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  font-weight: 600;
  color: var(--fg);
  font-size: var(--fs-16);
  letter-spacing: -0.01em;
}
.logo-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--n-0);
  font-weight: 600;
  font-size: var(--fs-14);
}
.nav-links {
  display: none;
  gap: var(--s-32);
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--fg-muted);
  font-size: var(--fs-14);
  font-weight: 600;
}
.nav-links a:hover { color: var(--fg); }
.nav-cta { display: none; }

/* Mobile hamburger + sheet */
.nav-toggle {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  pointer-events: none;
}
.nav-toggle:focus-visible ~ .nav-burger {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  left: var(--s-16);
  top: var(--s-16);
  background: var(--fg);
  color: var(--bg);
  padding: var(--s-12) var(--s-16);
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: var(--fs-14);
  transform: translateY(-200%);
  transition: transform var(--dur-2) var(--ease-out);
  z-index: 100;
}
.skip-link:focus {
  transform: translateY(0);
  color: var(--bg);
}
.nav-burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-4);
  width: 44px; height: 44px; /* WCAG 2.5.5 minimum touch target */
  padding: var(--s-12) var(--s-8);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease-out);
}
.nav-burger:hover { background: var(--n-100); }
.nav-burger span {
  display: block;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform var(--dur-2) var(--ease-out),
              opacity var(--dur-1) var(--ease-out);
  transform-origin: center;
}
/* X-rotation offsets are visual-center math, not spacing — below grid scale by intent */
.nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
body:has(#nav-toggle:checked) { overflow: hidden; }

.nav-sheet {
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--bg);
  padding-block: var(--s-32);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-out),
              visibility 0s linear var(--dur-2);
  z-index: 49;
}
.nav-sheet > .container {
  display: grid;
  gap: var(--s-16);
  align-content: start;
}
.nav-sheet ul {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: var(--s-4);
}
.nav-sheet ul a {
  display: block;
  padding: var(--s-16) var(--s-8);
  font-size: var(--fs-20);
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--border);
}
.nav-sheet-cta {
  margin-top: var(--s-16);
  width: 100%;
}
body:has(#nav-toggle:checked) .nav-sheet {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-out),
              visibility 0s;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-burger, .nav-sheet, .nav-toggle { display: none; }
}

/* ------ Cinematic hero ------ */
.hero-cinematic {
  position: relative;
  min-height: 640px;
  height: 80vh;
  max-height: 860px;
  overflow: hidden;
  display: grid;
  align-items: end;
  color: var(--n-0);
  isolation: isolate;
  background: linear-gradient(135deg, #0a3838 0%, #0d6b6b 60%, #0a3838 100%);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 22s var(--ease-io) infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.02) translate(0, 0); }
  to   { transform: scale(1.12) translate(-2%, -1%); }
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 25, 23, 0.55) 0%, rgba(10, 25, 23, 0.35) 35%, rgba(10, 25, 23, 0.75) 100%),
    radial-gradient(ellipse at 30% 60%, transparent 30%, rgba(10, 25, 23, 0.45) 100%);
  pointer-events: none;
}
.hero-cinematic-inner {
  position: relative;
  padding-block: var(--s-96) var(--s-128);
  max-width: 820px;
}
@media (min-width: 768px) {
  .hero-cinematic-inner { padding-block: var(--s-128); }
}
.hero-eyebrow {
  color: var(--accent-light);
  display: inline-block;
  margin-bottom: var(--s-16);
}
.hero-headline {
  color: var(--n-0);
  font-size: clamp(var(--fs-32), 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: var(--s-24);
  max-width: 18ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.hero-lede {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: var(--s-32);
  max-width: 52ch;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-16);
  margin-bottom: var(--s-48);
}
.btn-lg {
  padding: var(--s-16) var(--s-32);
  font-size: var(--fs-16);
}
.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
  padding: var(--s-16) var(--s-32);
  border-radius: var(--r-full);
  font-size: var(--fs-16);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.06);
  color: var(--n-0);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--dur-1) var(--ease-out),
              border-color var(--dur-1) var(--ease-out),
              transform var(--dur-1) var(--ease-out);
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--n-0);
  transform: translateY(-1px);
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--s-24);
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--fs-14);
}
.hero-meta-dot {
  display: inline-block;
  width: var(--s-4); height: var(--s-4);
  background: var(--accent-light);
  border-radius: 50%;
  margin-right: var(--s-8);
  box-shadow: 0 0 12px rgba(125, 211, 211, 0.6);
}
.hero-scroll-cue {
  position: absolute;
  bottom: var(--s-24);
  left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  animation: scroll-cue-float 2.2s var(--ease-io) infinite;
  transition: background var(--dur-1) var(--ease-out),
              border-color var(--dur-1) var(--ease-out);
}
.hero-scroll-cue:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--n-0);
}
.hero-scroll-cue svg { width: 18px; height: 18px; }
@keyframes scroll-cue-float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* ------ Philosophy strip ------ */
.philosophy {
  padding-block: var(--s-96);
}
.philosophy-grid {
  display: grid;
  gap: var(--s-48);
  align-items: center;
}
@media (min-width: 960px) {
  .philosophy-grid { grid-template-columns: 1fr 1.2fr; gap: var(--s-96); }
}
.philosophy-text { max-width: 48ch; }
.philosophy-image {
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--accent-soft);
  box-shadow: var(--e-2);
}
.philosophy-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease-out);
}
.philosophy-image:hover img { transform: scale(1.02); }

/* ------ Services ------ */
.services-header { margin-bottom: var(--s-48); }
.services-header .eyebrow { margin-bottom: var(--s-12); display: block; }
.services-grid {
  display: grid;
  gap: var(--s-24);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service {
  padding: var(--s-32);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  transition: border-color var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-out);
}
.service:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.service-icon {
  width: 40px; height: 40px;
  margin-bottom: var(--s-16);
  color: var(--accent);
}
.service h3 {
  font-size: var(--fs-20);
  margin-bottom: var(--s-8);
}
.service p {
  color: var(--fg-muted);
  font-size: var(--fs-14);
  line-height: 1.6;
}

/* ------ Why us ------ */
.why {
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.why-grid {
  display: grid;
  gap: var(--s-48);
}
@media (min-width: 960px) {
  .why-grid { grid-template-columns: 1fr 1fr; gap: var(--s-96); align-items: center; }
}
.why-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-32);
  margin-top: var(--s-48);
}
.stat-value {
  font-size: var(--fs-48);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stat-unit {
  font-size: var(--fs-20);
  color: var(--fg-muted);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.stat-label {
  margin-top: var(--s-8);
  font-size: var(--fs-14);
  color: var(--fg-muted);
}

/* ------ Team ------ */
.team-grid {
  display: grid;
  gap: var(--s-32);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }

.team-card {
  text-align: left;
}
.team-portrait {
  position: relative;
  margin: 0 0 var(--s-16);
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--accent-soft);
  box-shadow: var(--e-1);
}
.team-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-3) var(--ease-out);
}
.team-card:hover .team-portrait img { transform: scale(1.03); }
.team-initials {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  font-size: var(--fs-48);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  background: var(--accent-soft);
}
@media (prefers-color-scheme: dark) {
  .team-initials { color: var(--accent-light); }
}
.team-name {
  font-size: var(--fs-20);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--s-4);
}
.team-role {
  color: var(--accent);
  font-size: var(--fs-14);
  font-weight: 600;
  margin-bottom: var(--s-8);
}
.team-bio {
  color: var(--fg-muted);
  font-size: var(--fs-14);
  line-height: 1.6;
}

/* ------ Reviews ------ */
.reviews-grid {
  display: grid;
  gap: var(--s-24);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }

.review {
  padding: var(--s-32);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-raised);
}
.review-stars {
  display: flex;
  gap: 2px; /* micro-adjustment, below grid scale */
  color: var(--star);
  margin-bottom: var(--s-16);
}
.review-stars svg { width: 16px; height: 16px; }
.review p {
  font-size: var(--fs-16);
  line-height: 1.6;
  margin-bottom: var(--s-24);
  color: var(--fg);
}
.review-author {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--fg);
}
.review-location {
  font-size: var(--fs-12);
  color: var(--fg-muted);
}

/* ------ Book ------ */
.book {
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.book-grid {
  display: grid;
  gap: var(--s-48);
}
@media (min-width: 960px) {
  .book-grid { grid-template-columns: 1fr 1fr; gap: var(--s-96); align-items: start; }
}
.book-meta {
  display: grid;
  gap: var(--s-24);
  margin-top: var(--s-16);
}
.book-meta-item {
  display: flex;
  gap: var(--s-16);
  align-items: flex-start;
}
.book-meta-item svg {
  width: 24px; height: 24px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.book-meta-label {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--s-4);
}
.book-meta-value {
  font-size: var(--fs-16);
  color: var(--fg);
  font-weight: 600;
}
a.book-meta-value:hover { color: var(--accent); }

/* Form */
.book-form {
  background: var(--bg);
  padding: var(--s-32);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: grid;
  gap: var(--s-16);
}
@media (min-width: 640px) { .book-form { padding: var(--s-48); } }

.field {
  display: grid;
  gap: var(--s-8);
}
.field-row {
  display: grid;
  gap: var(--s-16);
  grid-template-columns: 1fr;
}
@media (min-width: 480px) { .field-row { grid-template-columns: 1fr 1fr; } }

.field label {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.field-opt {
  color: var(--fg-muted);
  font-weight: 400;
}
.field input,
.field select,
.field textarea {
  font-family: inherit;
  font-size: var(--fs-16);
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-12) var(--s-16);
  width: 100%;
  transition: border-color var(--dur-1) var(--ease-out),
              box-shadow var(--dur-1) var(--ease-out);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--n-500); opacity: 1; }
.field-required {
  color: var(--fg-muted);
  font-weight: 400;
  font-size: var(--fs-12);
}
.form-note {
  font-size: var(--fs-12);
  color: var(--fg-muted);
  margin-bottom: var(--s-8);
}

.book-submit {
  margin-top: var(--s-8);
  width: 100%;
}
.book-disclaimer {
  font-size: var(--fs-12);
  color: var(--fg-muted);
  text-align: center;
  margin: 0;
}

/* ------ Visit / map ------ */
.visit-grid {
  display: grid;
  gap: var(--s-48);
}
@media (min-width: 960px) {
  .visit-grid { grid-template-columns: 1fr 1fr; gap: var(--s-96); align-items: center; }
}
.visit-address {
  font-style: normal;
  font-size: var(--fs-16);
  color: var(--fg);
  margin-bottom: var(--s-24);
  line-height: 1.6;
}
.visit-image {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  box-shadow: var(--e-2);
}
.visit-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-3) var(--ease-out);
}
.visit-image:hover img { transform: scale(1.02); }
.visit-image-caption {
  position: absolute;
  bottom: var(--s-16);
  left: var(--s-16);
  display: flex;
  align-items: center;
  gap: var(--s-8);
  padding: var(--s-8) var(--s-12);
  background: rgba(10, 25, 23, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--n-0);
  font-size: var(--fs-12);
  font-weight: 600;
  border-radius: var(--r-full);
  letter-spacing: -0.005em;
}
.visit-image-dot {
  width: var(--s-8); height: var(--s-8);
  background: var(--accent-light);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(125, 211, 211, 0.8);
  animation: pulse-dot 2.2s var(--ease-io) infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.85); }
}

/* ------ Footer ------ */
.footer {
  padding-block: var(--s-48) var(--s-32);
  border-top: 1px solid var(--border);
  font-size: var(--fs-14);
  color: var(--fg-muted);
}
.footer-inner {
  display: grid;
  gap: var(--s-32);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--s-48);
  }
}
.footer h4 {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--fg);
  margin-bottom: var(--s-16);
}
.footer ul {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: var(--s-8);
}
.footer a {
  color: var(--fg-muted);
}
.footer a:hover { color: var(--fg); }
.footer-bottom {
  margin-top: var(--s-32);
  padding-top: var(--s-24);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: var(--s-16);
  flex-wrap: wrap;
  font-size: var(--fs-12);
}

/* ------ Reduced motion ------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover, .service:hover { transform: none; }
}

/* ------ Focus ring (accessibility) ------ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ====== Booking flow ====== */
.bf-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.bf-header {
  margin-bottom: var(--s-48);
  max-width: 60ch;
}
.bf-header h2 { max-width: 22ch; }

/* Progress indicator */
.bf-progress {
  list-style: none;
  margin: 0 0 var(--s-48);
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  position: relative;
}
.bf-step-dot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-8);
  position: relative;
  color: var(--fg-muted);
  font-size: var(--fs-12);
  font-weight: 600;
}
.bf-step-dot::after {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 20px);
  right: calc(-50% + 20px);
  height: 1px;
  background: var(--border);
  z-index: 0;
}
.bf-step-dot:last-child::after { display: none; }
.bf-dot-num {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: var(--fs-12);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out),
              color var(--dur-2) var(--ease-out);
}
.bf-dot-label { letter-spacing: -0.005em; }
.bf-step-dot.is-active .bf-dot-num {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--n-0);
}
.bf-step-dot.is-active { color: var(--fg); }
.bf-step-dot.is-done .bf-dot-num {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: var(--accent);
  font-size: 0;
}
.bf-step-dot.is-done .bf-dot-num::before {
  content: '';
  width: 10px; height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translate(1px, -2px);
}
.bf-step-dot.is-done::after { background: var(--accent-soft); }

@media (max-width: 540px) {
  .bf-dot-label { display: none; }
  .bf-progress { justify-content: center; gap: var(--s-16); }
  .bf-step-dot { flex: 0 0 auto; }
  .bf-step-dot::after {
    left: calc(50% + 18px);
    right: auto;
    width: var(--s-16);
  }
}

/* Summary chip row */
.bf-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
  padding: var(--s-12) var(--s-16);
  margin-bottom: var(--s-24);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
}
.bf-summary[hidden], .bf-summary-item[hidden] { display: none; }
.bf-summary-item {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-8);
  font-size: var(--fs-14);
}
.bf-summary-item + .bf-summary-item {
  padding-left: var(--s-8);
  border-left: 1px solid var(--border);
}
.bf-summary-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--fs-12);
  color: var(--fg-muted);
  font-weight: 600;
}
.bf-summary-value {
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* Stage + step transitions */
.bf-stage { position: relative; }
.bf-step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-32);
  transition: opacity var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-out);
}
@media (min-width: 640px) { .bf-step { padding: var(--s-48); } }
.bf-step[hidden] { display: none; }
.bf-step.is-leaving { opacity: 0; transform: translateX(-8px); }
.bf-step.is-entering { opacity: 0; transform: translateX(8px); }
.bf-step.is-current { opacity: 1; transform: translateX(0); }

.bf-step:focus-visible { outline: none; }
.bf-step-heading {
  font-size: var(--fs-32);
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-8);
}
.bf-step-heading:focus-visible { outline: none; }
.bf-step-sub {
  color: var(--fg-muted);
  margin-bottom: var(--s-32);
  font-size: var(--fs-16);
}

.bf-step-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-16);
  margin-bottom: var(--s-16);
}
.bf-back, .bf-link {
  background: transparent;
  border: 0;
  padding: var(--s-8) var(--s-12);
  margin-left: calc(var(--s-12) * -1);
  color: var(--fg-muted);
  font-size: var(--fs-14);
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--r-md);
  transition: color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out);
}
.bf-back:hover, .bf-link:hover { color: var(--fg); background: var(--n-100); }
.bf-link { color: var(--accent); margin-left: 0; }
.bf-link:hover { color: var(--accent-hover); background: var(--accent-soft); }

/* ---- Step 1: Services ---- */
.bf-services {
  display: grid;
  gap: var(--s-16);
  grid-template-columns: 1fr;
}
@media (min-width: 540px) { .bf-services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .bf-services { grid-template-columns: repeat(3, 1fr); } }

.bf-service-card {
  display: flex;
  align-items: flex-start;
  gap: var(--s-16);
  text-align: left;
  padding: var(--s-24);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color var(--dur-2) var(--ease-out),
              transform var(--dur-2) var(--ease-out),
              background var(--dur-2) var(--ease-out);
}
.bf-service-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.bf-service-icon {
  width: 36px; height: 36px;
  color: var(--accent);
  flex-shrink: 0;
}
.bf-service-body h4 {
  font-size: var(--fs-16);
  margin: 0 0 var(--s-4);
  letter-spacing: -0.01em;
}
.bf-service-body p {
  color: var(--fg-muted);
  font-size: var(--fs-14);
  margin: 0 0 var(--s-8);
  line-height: 1.5;
}
.bf-service-meta {
  display: inline-block;
  font-size: var(--fs-12);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---- Step 2: Calendar ---- */
.bf-cal {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-16);
  background: var(--bg-raised);
}
@media (min-width: 640px) { .bf-cal { padding: var(--s-24); } }
.bf-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-16);
  margin-bottom: var(--s-16);
}
.bf-cal-title {
  font-size: var(--fs-20);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.bf-cal-nav {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font-size: var(--fs-20);
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out),
              background var(--dur-1) var(--ease-out);
}
.bf-cal-nav:hover { border-color: var(--accent); color: var(--accent); }

.bf-cal-weekdays, .bf-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--s-4);
}
.bf-cal-weekdays {
  margin-bottom: var(--s-8);
  padding-inline: var(--s-4);
}
.bf-cal-weekdays span {
  text-align: center;
  font-size: var(--fs-12);
  color: var(--fg-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.bf-cal-cell {
  aspect-ratio: 1 / 1;
  max-height: 56px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg);
  border-radius: var(--r-md);
  font: inherit;
  font-size: var(--fs-14);
  font-weight: 500;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out),
              border-color var(--dur-1) var(--ease-out);
}
.bf-cal-cell.is-blank { cursor: default; }
.bf-cal-cell:hover:not(:disabled):not(.is-selected) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.bf-cal-cell.is-today {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.bf-cal-cell.is-selected {
  background: var(--accent);
  color: var(--n-0);
  border-color: var(--accent);
}
.bf-cal-cell.is-past { color: var(--n-400); cursor: not-allowed; }
.bf-cal-cell.is-closed { color: var(--n-400); cursor: not-allowed; }
.bf-cal-cell.is-unavail {
  color: var(--n-400);
  text-decoration: line-through;
  cursor: not-allowed;
}
.bf-cal-cell.is-pulse { animation: bfPulse var(--dur-3) var(--ease-out) 2; }
@keyframes bfPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); }
  50% { box-shadow: 0 0 0 6px var(--accent-soft); }
}

.bf-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-16);
  margin-top: var(--s-16);
  padding-top: var(--s-16);
  border-top: 1px solid var(--border);
  font-size: var(--fs-12);
  color: var(--fg-muted);
}
.bf-cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: var(--s-8);
}
.bf-legend-swatch {
  width: 14px; height: 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  display: inline-block;
}
.bf-legend-swatch.is-today { border-color: var(--accent); }
.bf-legend-swatch.is-unavail { background: repeating-linear-gradient(135deg, var(--n-200), var(--n-200) 2px, transparent 2px, transparent 4px); }
.bf-legend-swatch.is-closed { background: var(--n-100); }

/* ---- Step 3: Time slots ---- */
.bf-slots-group + .bf-slots-group { margin-top: var(--s-24); }
.bf-slots-heading {
  font-size: var(--fs-14);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  font-weight: 600;
  margin: 0 0 var(--s-12);
}
.bf-slots {
  display: grid;
  gap: var(--s-8);
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}
.bf-slot {
  padding: var(--s-12) var(--s-16);
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--fg);
  font: inherit;
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease-out),
              background var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out),
              transform var(--dur-1) var(--ease-out);
}
.bf-slot:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.bf-slot.is-selected {
  background: var(--accent);
  color: var(--n-0);
  border-color: var(--accent);
}
.bf-slot.is-booked {
  color: var(--n-400);
  text-decoration: line-through;
  cursor: not-allowed;
  background: var(--n-100);
}

/* ---- Step 4: Form ---- */
.bf-form { display: grid; gap: var(--s-16); }
.bf-field { display: grid; gap: var(--s-8); }
.bf-field-row {
  display: grid;
  gap: var(--s-16);
  grid-template-columns: 1fr;
}
@media (min-width: 540px) { .bf-field-row { grid-template-columns: 1fr 1fr; } }
.bf-field label {
  font-size: var(--fs-14);
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.bf-opt { color: var(--fg-muted); font-weight: 400; }
.bf-req { color: var(--accent); font-weight: 600; }
.bf-field input,
.bf-field select,
.bf-field textarea {
  font-family: inherit;
  font-size: var(--fs-16);
  line-height: 1.5;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-12) var(--s-16);
  width: 100%;
  transition: border-color var(--dur-1) var(--ease-out),
              box-shadow var(--dur-1) var(--ease-out);
}
.bf-field textarea { resize: vertical; min-height: 96px; }
.bf-field input:focus,
.bf-field select:focus,
.bf-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.bf-field input.is-invalid,
.bf-field select.is-invalid,
.bf-field textarea.is-invalid {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.bf-toggle {
  display: inline-flex;
  gap: var(--s-4);
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--bg);
  width: fit-content;
}
.bf-toggle-btn {
  padding: var(--s-8) var(--s-24);
  border: 0;
  background: transparent;
  color: var(--fg-muted);
  font: inherit;
  font-size: var(--fs-14);
  font-weight: 600;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.bf-toggle-btn:hover { color: var(--fg); }
.bf-toggle-btn.is-active {
  background: var(--accent);
  color: var(--n-0);
}

.bf-submit { margin-top: var(--s-8); width: 100%; }
.bf-disclaimer {
  font-size: var(--fs-12);
  color: var(--fg-muted);
  text-align: center;
  margin: 0;
}

/* ---- Step 5: Confirmation ---- */
.bf-confirm { text-align: center; }
.bf-check-circle {
  width: 80px; height: 80px;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin: 0 auto var(--s-24);
}
.bf-check-circle svg { width: 40px; height: 40px; }
.bf-confirm .bf-step-heading { text-align: center; }
.bf-confirm .bf-step-sub { text-align: center; margin-left: auto; margin-right: auto; }

.bf-recap {
  display: grid;
  gap: var(--s-12);
  max-width: 420px;
  margin: var(--s-32) auto;
  padding: var(--s-24);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  text-align: left;
}
.bf-recap > div {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--s-16);
  align-items: baseline;
}
.bf-recap > div + div { border-top: 1px solid var(--border); padding-top: var(--s-12); }
.bf-recap dt {
  font-size: var(--fs-12);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  font-weight: 600;
  margin: 0;
}
.bf-recap dd {
  font-size: var(--fs-16);
  color: var(--fg);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0;
}

.bf-next {
  max-width: 480px;
  margin: var(--s-32) auto;
  text-align: left;
  padding: var(--s-24);
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--fg);
}
.bf-next h4 {
  font-size: var(--fs-14);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 var(--s-12);
  color: var(--accent);
}
.bf-next ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--s-8);
}
.bf-next li {
  display: flex;
  gap: var(--s-12);
  align-items: flex-start;
  font-size: var(--fs-14);
  color: var(--fg);
  line-height: 1.5;
}
.bf-bullet {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: var(--r-full);
  margin-top: 8px;
  flex-shrink: 0;
}

.bf-confirm-actions {
  display: flex;
  gap: var(--s-12);
  justify-content: center;
  flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
  .bf-step.is-leaving, .bf-step.is-entering { opacity: 1; transform: none; }
  .bf-service-card:hover, .bf-slot:hover:not(:disabled) { transform: none; }
  .bf-cal-cell.is-pulse { animation: none; }
}
