/* AB Clinic: shared foundation. Black ground, cream type, one gold. */

:root {
  /* Brand palette: black, crème, gold, light gold. Taupe is for light backgrounds only. */
  --ink: #17140f;
  --ink-2: #201c15;
  --ink-3: #2a251c;
  --line: rgba(216, 180, 90, 0.18);
  --line-strong: rgba(216, 180, 90, 0.42);
  --cream: #f5eedc;
  --cream-2: #ddd4bd;   /* secondary copy, still clearly readable on black */
  --cream-3: #b1a482;   /* small labels and hints only */
  --gold: #b8912f;
  --gold-2: #d8b45a;
  --gold-deep: #8f6f22;
  --gold-grad: linear-gradient(100deg, #d8b45a 0%, #f5eedc 100%);   /* monogram, dark background */
  --btn-grad: linear-gradient(100deg, #b8912f 0%, #d8b45a 100%);
  --danger: #e07a5f;
  --ok: #8fc49a;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Arial, Helvetica, "Liberation Sans", sans-serif;
  --script: "Alex Brush", "Snell Roundhand", cursive;
  --radius: 3px;
  --pad: clamp(18px, 5vw, 32px);
  --measure: 40rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
button, a, label, .chip, .seg, .check { -webkit-tap-highlight-color: transparent; }
button, .chip, .seg button, .check, .cal__day, .slot, .star { -webkit-user-select: none; user-select: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: 0; line-height: 1.15; margin: 0; }
p { margin: 0; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }

.wrap { width: 100%; max-width: 44rem; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Brand mark ---------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 42px; width: auto; }
.brand .mono {
  font-family: var(--script);
  font-size: 44px;
  line-height: 1.1;
  padding: 0 8px 2px 2px; /* room for the swashes, which the gradient would otherwise clip */
  margin-right: -4px;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform: translateY(-2px);
}
.brand .word { font-family: var(--serif); font-weight: 600; font-size: 17px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream); line-height: 1.1; }
.brand .word small { display: block; font-family: var(--sans); font-weight: 400; font-size: 9.5px; letter-spacing: 0.26em; color: var(--gold-2); margin-top: 4px; }
@media (max-width: 480px) { .brand .word small { display: none; } .brand .word { font-size: 16px; } }

/* Type ---------------------------------------------------------------- */
.eyebrow { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-2); }
.eyebrow::before { content: ""; display: inline-block; width: 22px; height: 1px; background: var(--gold); vertical-align: middle; margin-right: 10px; }
.muted { color: var(--cream-2); }
.small { font-size: 15px; }
.serif { font-family: var(--serif); }

/* Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 22px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: transparent; color: var(--cream);
  font-family: var(--sans); font-weight: 700; font-size: 16px; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn--gold { background: var(--btn-grad); color: var(--ink); border-color: transparent; }
.btn--gold:hover { filter: brightness(1.04); }
.btn--ghost:hover { border-color: var(--gold); }
.btn--sm { min-height: 40px; padding: 8px 14px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--quiet { border-color: transparent; color: var(--cream-2); padding-left: 8px; padding-right: 8px; }
.btn--danger { border-color: rgba(217, 105, 79, 0.5); color: var(--danger); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Forms --------------------------------------------------------------- */
.field { display: block; margin: 0 0 18px; }
.field > span, .label { display: block; font-size: 15.5px; font-weight: 700; color: var(--cream); margin-bottom: 7px; }
.field .hint, .hint { display: block; font-size: 14.5px; color: var(--cream-2); margin-top: 6px; line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; min-height: 54px; padding: 12px 14px;
  background: var(--ink-2); color: var(--cream);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  font: inherit; font-size: 17px;
  -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23c9a24d' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 77, 0.18); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.error { color: var(--danger); font-size: 15px; margin-top: 6px; line-height: 1.4; }
input[type="date"].input { min-height: 52px; }
input::placeholder { color: var(--cream-3); }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.seg button { min-height: 44px; padding: 8px 18px; background: transparent; border: 0; border-right: 1px solid var(--line); color: var(--cream); font-weight: 700; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--gold-2); color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 15px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--cream); font-size: 15.5px; cursor: pointer; text-align: left; }
.chip[aria-pressed="true"] { background: var(--gold-2); border-color: var(--gold-2); color: var(--ink); }
.chip--parent[aria-expanded="true"] .chip__caret { display: inline-block; transform: rotate(180deg); }
.chips--sub { width: 100%; padding: 4px 0 6px 14px; border-left: 2px solid var(--line-strong); }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { flex: none; width: 24px; height: 24px; margin-top: 1px; border: 1px solid var(--line-strong); border-radius: 3px; display: grid; place-items: center; background: var(--ink-2); }
.check .box svg { width: 14px; height: 14px; opacity: 0; }
.check input:checked + .box { background: var(--gold-2); border-color: var(--gold-2); }
.check input:checked + .box svg { opacity: 1; }
.check input:focus-visible + .box { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.check span.text { font-size: 16px; line-height: 1.5; }

/* Surfaces ------------------------------------------------------------ */
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.rule--gold { border-top-color: var(--gold); }
.panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.notice { padding: 14px 16px; border-left: 2px solid var(--gold); background: rgba(216, 180, 90, 0.09); font-size: 16px; line-height: 1.55; }
.notice--danger { border-left-color: var(--danger); background: rgba(217, 105, 79, 0.1); }
.notice--ok { border-left-color: var(--ok); background: rgba(127, 181, 138, 0.1); }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--line-strong); color: var(--cream-2); }
.pill--gold { background: var(--gold-2); border-color: var(--gold-2); color: var(--ink); }
.pill--ok { border-color: var(--ok); color: var(--ok); }
.pill--warn { border-color: var(--danger); color: var(--danger); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; background: var(--cream); color: var(--ink); padding: 12px 18px; border-radius: 4px; font-size: 15.5px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); max-width: calc(100% - 32px); opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.toast.is-on { opacity: 1; }
.toast--bad { background: var(--danger); color: #fff; }

.spinner { width: 22px; height: 22px; border: 2px solid var(--line-strong); border-top-color: var(--gold-2); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; justify-content: center; padding: 40px 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .toast { transition: none; }
}
