:root {
  --linen: #f1e9dd;
  --cream: #f7f1e8;
  --sand: #e3d5c1;
  --bark: #3a2f26;
  --bark-soft: #6b5d4f;
  --clay: #a4714f;
  --spring: #5f8b84;
  --danger: #9b3b2e;
  --line: rgba(58, 47, 38, 0.16);
  --line-strong: rgba(58, 47, 38, 0.32);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Karla', 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { overflow-x: clip; }

body {
  background: var(--linen);
  color: var(--bark);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100vh;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

::selection { background: var(--sand); }

[hidden] { display: none !important; }

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
button:disabled { cursor: default; }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(18px, 5vw, 48px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand svg { width: 28px; height: 28px; flex-shrink: 0; }
.brand span { font-family: var(--serif); font-size: 20px; letter-spacing: 0.05em; }
.topbar-link {
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bark-soft);
  text-decoration: none;
  white-space: nowrap;
}
.topbar-link:hover { color: var(--bark); }

/* ---------- layout ---------- */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) clamp(18px, 5vw, 32px) 120px;
}

.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--clay);
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before { content: ''; width: 30px; height: 1px; background: var(--clay); flex-shrink: 0; }

h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(42px, 8vw, 64px);
  line-height: 1.04;
  margin: 18px 0 10px;
}
h1 em, h2 em { font-style: italic; color: var(--clay); font-weight: 300; }

.lede { color: var(--bark-soft); max-width: 48ch; }

/* ---------- steps ---------- */
.step {
  margin-top: 52px;
  animation: rise 0.6s cubic-bezier(.2,.7,.2,1) both;
}
.step-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.step-num { font-family: var(--serif); font-style: italic; color: var(--clay); font-size: 18px; min-width: 22px; }
.step-title { font-family: var(--serif); font-weight: 400; font-size: 27px; line-height: 1.2; }
.step-aside { margin-left: auto; font-size: 13px; color: var(--bark-soft); }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- service options ---------- */
.options { display: grid; gap: 10px; }
.option {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: transparent;
  transition: border-color 0.2s, background 0.2s;
}
.option:hover { border-color: var(--line-strong); background: var(--cream); }
.option[aria-pressed="true"] { border-color: var(--bark); background: var(--cream); }
.option-text { flex: 1; min-width: 0; }
.option-name { display: block; font-family: var(--serif); font-size: 22px; font-weight: 400; line-height: 1.2; }
.option-note { display: block; font-size: 14px; color: var(--bark-soft); }
.option-meta { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bark-soft); white-space: nowrap; }
.option-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: background 0.2s, border-color 0.2s;
}
.option[aria-pressed="true"] .option-check { background: var(--bark); border-color: var(--bark); }
.option[aria-pressed="true"] .option-check::after {
  content: '';
  width: 6px; height: 10px;
  border: solid var(--cream);
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-1px) rotate(45deg);
}

/* ---------- calendar ---------- */
.cal { max-width: 420px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-month { font-family: var(--serif); font-size: 23px; }
.cal-nav { display: flex; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  transition: border-color 0.2s, opacity 0.2s;
}
.icon-btn:hover:not(:disabled) { border-color: var(--bark); }
.icon-btn:disabled { opacity: 0.3; }
.icon-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bark-soft); padding-bottom: 6px; }
.cal-day {
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15.5px;
  position: relative;
  transition: background 0.2s, color 0.2s;
}
.cal-day:disabled { color: rgba(58, 47, 38, 0.28); }
.cal-day:not(:disabled) { font-weight: 500; }
.cal-day:not(:disabled)::after {
  content: '';
  position: absolute;
  bottom: 18%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--spring);
}
.cal-day:not(:disabled):hover { background: var(--cream); }
.cal-day.is-today { box-shadow: inset 0 0 0 1px var(--line-strong); }
.cal-day[aria-pressed="true"] { background: var(--bark); color: var(--cream); }
.cal-day[aria-pressed="true"]::after { background: var(--cream); }

/* ---------- time slots ---------- */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; }
.slot {
  padding: 13px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-align: center;
  font-size: 15px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.slot:hover:not(:disabled) { border-color: var(--bark); }
.slot[aria-pressed="true"] { background: var(--bark); border-color: var(--bark); color: var(--cream); }
.slot:disabled { opacity: 0.4; text-decoration: line-through; }

/* ---------- forms ---------- */
.fields { display: grid; gap: 22px; }
.field { display: grid; gap: 6px; }
.field label, .label {
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bark-soft);
}
.field .optional { letter-spacing: 0.04em; text-transform: none; font-style: italic; }
.input {
  width: 100%;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  font-size: 18px;
  font-weight: 400;
  border-radius: 0;
  transition: border-color 0.2s;
}
.input:focus { outline: none; border-bottom-color: var(--bark); }
textarea.input { resize: vertical; min-height: 84px; font-size: 16.5px; line-height: 1.5; }
select.input { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b5d4f' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; padding-right: 24px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 16px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), background 0.2s, border-color 0.2s, opacity 0.2s;
}
.btn-solid { background: var(--bark); color: var(--cream); }
.btn-solid:hover:not(:disabled) { background: var(--clay); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--bark); }
.btn-ghost:hover:not(:disabled) { border-color: var(--bark); }
.btn-danger { border-color: rgba(155, 59, 46, 0.4); color: var(--danger); }
.btn-danger:hover:not(:disabled) { border-color: var(--danger); background: rgba(155, 59, 46, 0.06); }
.btn-danger.btn-solid { background: var(--danger); color: var(--cream); border-color: var(--danger); }
.btn:disabled { opacity: 0.45; }
.btn-sm { padding: 10px 18px; font-size: 11px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.link-btn {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bark-soft);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
}
.link-btn:hover { color: var(--bark); }

/* ---------- summary / messages ---------- */
.summary {
  margin-top: 36px;
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  display: grid;
  gap: 18px;
}
.summary-line { font-family: var(--serif); font-size: 21px; line-height: 1.35; }
.summary-line span { color: var(--bark-soft); }

.msg {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  background: rgba(155, 59, 46, 0.08);
  color: var(--danger);
  border: 1px solid rgba(155, 59, 46, 0.2);
}
.msg.ok { background: rgba(95, 139, 132, 0.1); color: #3f6660; border-color: rgba(95, 139, 132, 0.3); }

.muted { color: var(--bark-soft); }
.small { font-size: 14px; }

/* ---------- cards ---------- */
.card {
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--cream);
}
.detail-list { display: grid; gap: 14px; margin: 18px 0 24px; }
.detail { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: baseline; }
.detail dt { font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bark-soft); }
.detail dd { font-family: var(--serif); font-size: 21px; line-height: 1.3; }

.done-mark { width: 52px; height: 52px; margin-bottom: 6px; }

.spinner {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  border-top-color: var(--bark);
  animation: spin 0.8s linear infinite;
  margin: 30px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { padding: 26px 0; color: var(--bark-soft); font-family: var(--serif); font-style: italic; font-size: 20px; }

.foot-note { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--bark-soft); display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-note a { text-decoration-color: var(--line-strong); text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .step { animation: none; }
}
