/* ==========================================================================
   Client Day — Public booking
   Editorial warmth: Fraunces display + DM Sans body, cream + terracotta.
   ========================================================================== */

:root {
  --cream:        #F5EEE2;
  --cream-deep:   #ECE1CE;
  --cream-edge:   #E3D3B8;
  --ink:          #1F1A14;
  --ink-soft:     #5C5448;
  --ink-mute:     #948875;
  --terracotta:   #B04A2E;
  --terracotta-2: #8A3721;
  --terracotta-w: #EFD6C5;
  --sage:         #67785B;
  --hair:         rgba(31, 26, 20, 0.14);
  --hair-soft:    rgba(31, 26, 20, 0.07);
  --shadow:       0 24px 60px -30px rgba(31, 26, 20, 0.35);
  --shadow-warm:  0 12px 40px -18px rgba(176, 74, 46, 0.35);

  --font-display: 'Fraunces', 'Iowan Old Style', 'Palatino', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, system-ui, 'Segoe UI', sans-serif;

  --ease:         cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(circle at 82% -10%, rgba(176, 74, 46, 0.10), transparent 55%),
    radial-gradient(circle at -10% 18%, rgba(103, 120, 91, 0.09), transparent 50%),
    linear-gradient(180deg, var(--cream) 0%, #EFE7D6 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "ss02", "kern";
  letter-spacing: 0.005em;
  min-height: 100vh;
}

/* Subtle paper grain overlay */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.55;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0.12  0 0 0 0 0.10  0 0 0 0 0.08  0 0 0 0.14 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 260px 260px;
}

.page {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) clamp(22px, 5vw, 56px) 120px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-bottom: 48px;
  margin-bottom: 72px;
}

.overline {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--terracotta);
  margin-bottom: 18px;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 11vw, 108px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
  font-variation-settings: "opsz" 120, "SOFT" 30;
}
.display-italic {
  font-style: italic;
  font-variation-settings: "opsz" 120, "SOFT" 50, "WONK" 1;
  display: inline-block;
}

.hero-role {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 28px 0 0;
  font-weight: 500;
}

.hero-bio {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 24px 0 0;
  text-indent: 2.4em;
  font-variation-settings: "opsz" 32, "SOFT" 30;
}
.hero-bio::first-letter {
  font-size: 1.25em;
  color: var(--terracotta);
}

.hero-rule {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 88px;
  height: 2px;
  background: var(--ink);
}

/* --------------------------------------------------------------------------
   Step scaffolding
   -------------------------------------------------------------------------- */

.step {
  margin-bottom: 84px;
}

.step-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--hair);
}
.step-index {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--terracotta);
  font-variation-settings: "opsz" 48;
}
.step-label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}

.step-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 28px;
  font-variation-settings: "opsz" 72, "SOFT" 40;
}
.step-title em {
  font-style: italic;
  font-variation-settings: "opsz" 72, "SOFT" 60, "WONK" 1;
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */

.services {
  display: flex;
  flex-direction: column;
}

.loading {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-mute);
  font-size: 18px;
}

.service {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0 22px;
  border-top: 1px solid var(--hair);
  cursor: pointer;
  text-align: left;
  background: transparent;
  border-left: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
  color: inherit;
  font: inherit;
  transition: padding-left 0.45s var(--ease);
}
.service:last-of-type { border-bottom: 1px solid var(--hair); }

.service::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--terracotta);
  transition: width 0.45s var(--ease);
  transform: translateY(-50%);
}

.service:hover { padding-left: 28px; }
.service:hover::before { width: 18px; }
.service:hover .service-name { color: var(--terracotta); }

.service.active { padding-left: 28px; }
.service.active::before {
  width: 18px;
  height: 2px;
  background: var(--ink);
}
.service.active .service-name { color: var(--ink); }
.service.active .service-meta { color: var(--ink); }
.service.active .service-arrow { opacity: 1; transform: translateX(0); }

.service-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  transition: color 0.4s var(--ease);
  font-variation-settings: "opsz" 60, "SOFT" 30;
}
.service-name em {
  font-style: italic;
  font-variation-settings: "opsz" 60, "SOFT" 50, "WONK" 1;
}

.service-meta {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.4s var(--ease);
}
.service-meta .dot { opacity: 0.35; margin: 0 6px; }

.service-arrow {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

/* --------------------------------------------------------------------------
   Week navigation
   -------------------------------------------------------------------------- */

.week-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
}
.nav-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.35s var(--ease);
}
.nav-arrow:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
  transform: scale(1.05);
}
.nav-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
.week-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--ink);
  font-variation-settings: "opsz" 48, "SOFT" 50;
  min-width: 220px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Week grid
   -------------------------------------------------------------------------- */

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(4px, 1vw, 10px);
  margin-bottom: 56px;
}

.day-btn {
  position: relative;
  border: 1px solid var(--hair);
  background: transparent;
  border-radius: 2px;
  padding: 16px 6px 22px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.35s var(--ease);
  color: var(--ink);
}
.day-btn::after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--terracotta);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.day-btn:not(.empty):hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}
.day-btn:not(.empty)::after { opacity: 0.6; }

.day-name {
  font-family: var(--font-body);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.day-num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1;
  color: var(--ink);
  font-variation-settings: "opsz" 60, "SOFT" 30;
}

.day-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: var(--shadow);
}
.day-btn.active .day-name { color: var(--cream-edge); }
.day-btn.active .day-num { color: var(--cream); }
.day-btn.active::after { background: var(--terracotta-w); opacity: 1; }

.day-btn.empty {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.day-btn.empty .day-num { text-decoration: line-through; text-decoration-thickness: 1px; }

/* --------------------------------------------------------------------------
   Slots
   -------------------------------------------------------------------------- */

.slots-area {
  min-height: 120px;
}

.slots-hint {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-mute);
  text-align: center;
  margin: 24px 0 0;
  font-variation-settings: "opsz" 32, "SOFT" 40;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  animation: slotsIn 0.5s var(--ease);
}
@keyframes slotsIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.slot-btn {
  padding: 16px 10px;
  border: 1px solid var(--hair);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--ink);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
  font-variation-settings: "opsz" 48, "SOFT" 30;
}
.slot-btn:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
  transform: translateY(-2px);
  box-shadow: var(--shadow-warm);
}
.slot-btn.active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--cream);
  transform: translateY(-2px);
  box-shadow: var(--shadow-warm);
}

/* --------------------------------------------------------------------------
   Form
   -------------------------------------------------------------------------- */

form {
  max-width: 520px;
}

.field {
  margin-bottom: 36px;
}
.field label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
  margin-bottom: 8px;
}
.field label .optional {
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  font-weight: 400;
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 10px 0 12px;
  border: none;
  border-bottom: 1px solid var(--hair);
  background: transparent;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 22px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.3s var(--ease);
  font-variation-settings: "opsz" 32, "SOFT" 30;
  resize: none;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-mute);
  font-style: italic;
  opacity: 0.7;
}
.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--terracotta);
}

.submit {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 0 0 8px;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--ink);
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--ink);
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: all 0.35s var(--ease);
  font-variation-settings: "opsz" 60, "SOFT" 50, "WONK" 1;
}
.submit svg { transition: transform 0.35s var(--ease); }
.submit:hover {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}
.submit:hover svg { transform: translateX(6px); }
.submit:disabled {
  opacity: 0.4;
  cursor: wait;
}
.submit:disabled svg { animation: spin 1s linear infinite; }
@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-error {
  margin-top: 16px;
  color: var(--terracotta-2);
  font-size: 14px;
  font-family: var(--font-body);
}

/* --------------------------------------------------------------------------
   Confirmation
   -------------------------------------------------------------------------- */

.confirmation {
  padding: 80px 0 60px;
  border-top: 1px solid var(--hair);
  text-align: left;
  animation: confirmIn 0.8s var(--ease);
}
@keyframes confirmIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.confirm-overline { color: var(--sage); }

.confirm-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(60px, 11vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin: 18px 0 40px;
  font-variation-settings: "opsz" 120, "SOFT" 50;
}
.confirm-title em {
  font-style: italic;
  font-variation-settings: "opsz" 120, "SOFT" 60, "WONK" 1;
}

.confirm-body {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.5;
  color: var(--ink);
  max-width: 44ch;
  margin: 0 0 24px;
  font-variation-settings: "opsz" 40, "SOFT" 50;
  padding-left: 24px;
  border-left: 2px solid var(--sage);
}

.confirm-aside {
  font-family: var(--font-body);
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 44ch;
  margin: 40px 0 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.page-foot {
  margin-top: 96px;
  padding-top: 24px;
  border-top: 1px solid var(--hair-soft);
  display: flex;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.page-foot .dot { opacity: 0.5; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.hidden { display: none !important; }

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.9s var(--ease) forwards;
}
[data-reveal][data-delay="1"] { animation-delay: 0.12s; }
[data-reveal][data-delay="2"] { animation-delay: 0.22s; }
[data-reveal][data-delay="3"] { animation-delay: 0.32s; }
@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Responsive touch-ups
   -------------------------------------------------------------------------- */

@media (max-width: 560px) {
  .page { padding: 40px 22px 80px; }
  .hero { margin-bottom: 56px; padding-bottom: 36px; }
  .display { font-size: 56px; }
  .hero-bio { text-indent: 1.2em; }
  .step { margin-bottom: 64px; }
  .service { grid-template-columns: 1fr; gap: 6px; }
  .service-meta { justify-self: start; }
  .week-nav { gap: 20px; }
  .week-label { min-width: unset; font-size: 22px; }
  .day-btn { padding: 12px 2px 18px; }
  .slot-btn { font-size: 20px; padding: 14px 6px; }
  .slots-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
  .confirm-title { font-size: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal], .slots-grid, .confirmation {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  * { transition-duration: 0.01ms !important; }
}
