/* ============================================================
   Wellspring Physician Acupuncture — Warm Stone direction
   Shared stylesheet for: index / about / services / first-visit / contact
   ============================================================ */

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/playfair-display.woff2') format('woff2');
}

:root {
  /* Palette — Warm Stone */
  --bg:        oklch(94% 0.014 80);
  --bg-deep:   oklch(91% 0.016 80);
  --surface:   oklch(99% 0.006 80);
  --surface-2: oklch(96% 0.010 80);
  --border:    oklch(86% 0.012 80);
  --border-strong: oklch(78% 0.018 80);
  --muted:     oklch(50% 0.025 80);
  --fg:        oklch(25% 0.025 80);
  --fg-deep:   oklch(18% 0.025 80);
  --accent:    oklch(58% 0.10 35);
  --accent-deep: oklch(48% 0.11 35);
  --accent-soft: oklch(92% 0.04 35);

  /* Type */
  --font-display: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* Scale (fluid) */
  --step--1: clamp(0.875rem, 0.85rem + 0.12vw, 0.95rem);
  --step-0:  clamp(1rem, 0.97rem + 0.18vw, 1.0625rem);
  --step-1:  clamp(1.125rem, 1.07rem + 0.3vw, 1.25rem);
  --step-2:  clamp(1.375rem, 1.27rem + 0.5vw, 1.625rem);
  --step-3:  clamp(1.75rem, 1.55rem + 1vw, 2.25rem);
  --step-4:  clamp(2.25rem, 1.85rem + 2vw, 3.25rem);
  --step-5:  clamp(2.75rem, 2.1rem + 3.2vw, 4.5rem);
  --step-6:  clamp(3.5rem, 2.4rem + 5vw, 6.25rem);

  /* Spacing */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --s-9: 6.5rem;

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px oklch(20% 0.025 80 / 0.06);
  --shadow:    0 8px 24px oklch(20% 0.025 80 / 0.08);
  --shadow-lg: 0 20px 60px oklch(20% 0.025 80 / 0.15);

  --max: 1200px;
  --max-text: 64ch;
  --header-h: 76px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover { color: var(--accent-deep); }

::selection { background: var(--accent-soft); color: var(--fg-deep); }

p { text-wrap: pretty; }

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--fg-deep);
}

h1 { font-size: var(--step-5); letter-spacing: -0.02em; font-weight: 400; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }

/* Visible keyboard-focus outline for all interactive elements */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 3px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: var(--s-4);
  display: inline-block;
}

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--fg);
  max-width: var(--max-text);
}

.muted { color: var(--muted); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--alt { background: var(--bg-deep); }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center;
  height: var(--header-h);
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  background: oklch(94% 0.014 80 / 0);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(0px);
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled,
.site-header.is-solid {
  background: oklch(94% 0.014 80 / 0.92);
  border-bottom-color: var(--border);
  backdrop-filter: saturate(140%) blur(10px);
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: var(--max); margin-inline: auto;
  gap: var(--s-5);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg-deep);
  display: flex; align-items: center; gap: var(--s-3);
}

.brand__mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--accent);
  flex-shrink: 0;
}

.brand__mark svg { width: 16px; height: 16px; }

.brand__name { line-height: 1.1; }
.brand__name small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

.nav { display: flex; align-items: center; gap: var(--s-6); }

.nav__links {
  display: flex; align-items: center; gap: var(--s-6);
  list-style: none;
  font-size: 0.94rem;
}

.nav__links a {
  position: relative;
  color: var(--fg);
  padding-block: 0.25rem;
}

.nav__links a::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}

.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }

.nav__cta {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--surface);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav__cta:hover { background: var(--accent-deep); color: var(--surface); }
.nav__cta svg { width: 14px; height: 14px; }

/* Mobile menu */
.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  cursor: pointer;
  align-items: center; justify-content: center;
  color: var(--fg-deep);
}

.nav__toggle svg { width: 18px; height: 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: var(--surface);
}
.btn--primary:hover {
  background: var(--accent-deep);
  color: var(--surface);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--fg-deep);
  border-color: var(--border-strong);
}
.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--fg);
}

.btn svg { width: 16px; height: 16px; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: clamp(560px, 86vh, 820px);
  display: grid; align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(0.85);
}

.hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom,
      oklch(94% 0.014 80 / 0.55) 0%,
      oklch(94% 0.014 80 / 0.25) 40%,
      oklch(94% 0.014 80 / 0.78) 92%,
      oklch(94% 0.014 80 / 1) 100%
    ),
    linear-gradient(135deg,
      oklch(94% 0.014 80 / 0.35),
      oklch(58% 0.10 35 / 0.05)
    );
}

.hero__inner {
  padding-block: clamp(8rem, 14vh, 11rem) clamp(3.5rem, 8vh, 5.5rem);
  width: 100%; max-width: var(--max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.hero__content { max-width: 38ch; }
.hero h1 { margin-bottom: var(--s-5); color: var(--fg-deep); }
.hero .lede { margin-bottom: var(--s-6); color: var(--fg); }

.hero--short { min-height: clamp(380px, 52vh, 480px); }
.hero--short h1 { font-size: var(--step-4); }
.hero--short .hero__inner { padding-block: clamp(8rem, 14vh, 10rem) clamp(2.5rem, 6vh, 4rem); }

/* ---------- intro / two-column ---------- */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .split { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 6vw, 6rem); }
  .split--asym { grid-template-columns: 5fr 7fr; }
  .split--rasym { grid-template-columns: 7fr 5fr; }
}

.split__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__media--wide { aspect-ratio: 5 / 4; }

.split__cap {
  display: block;
  margin-top: var(--s-3);
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.prose p { margin-block: var(--s-4); max-width: var(--max-text); }
.prose p:first-child { margin-top: 0; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--fg-deep); font-weight: 600; }

/* ---------- service grid ---------- */
.service-grid {
  display: grid; gap: var(--s-5);
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .service-grid { grid-template-columns: repeat(4, 1fr); } }

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-6) var(--s-5);
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.service-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }

.service-card__num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: var(--s-4);
  display: block;
}

.service-card h3 {
  font-size: var(--step-1);
  font-family: var(--font-display);
  font-weight: 500;
  margin-bottom: var(--s-3);
  color: var(--fg-deep);
}

.service-card p { font-size: 0.94rem; color: var(--muted); line-height: 1.55; }

/* ---------- conditions list ---------- */
.cond-grid {
  display: grid; gap: var(--s-4) var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cond-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cond-grid { grid-template-columns: repeat(3, 1fr); } }

.cond {
  padding: var(--s-5) 0;
  border-top: 1px solid var(--border);
}
.cond h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  color: var(--fg-deep);
  margin-bottom: var(--s-3);
  letter-spacing: -0.005em;
}
.cond ul { list-style: none; }
.cond li {
  font-size: 0.94rem;
  color: var(--muted);
  padding-block: 0.25rem;
  line-height: 1.5;
}

/* ---------- FAQ ---------- */
.faq {
  border-top: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  padding: var(--s-5) 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  color: var(--fg-deep);
  list-style: none;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-4);
  border-bottom: 1px solid var(--border);
  transition: color 0.15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  width: 18px; height: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23805840' stroke-width='1.5' stroke-linecap='round'><path d='M12 5v14M5 12h14'/></svg>");
  background-repeat: no-repeat; background-position: center;
  flex-shrink: 0;
  margin-top: 0.4rem;
  transition: transform 0.25s ease;
}
.faq[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent-deep); }
.faq__body {
  padding-block: var(--s-5);
  color: var(--muted);
  max-width: var(--max-text);
  line-height: 1.7;
  border-bottom: 1px solid var(--border);
}
.faq__body p + p { margin-top: var(--s-4); }

/* ---------- pull quote ---------- */
.pullquote {
  border-left: 2px solid var(--accent);
  padding-left: var(--s-5);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-2);
  font-weight: 400;
  line-height: 1.4;
  color: var(--fg-deep);
  max-width: 32ch;
}
.pullquote cite {
  display: block;
  margin-top: var(--s-3);
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- testimonials placeholder ---------- */
.reviews-stub {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: var(--s-6);
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background:
    linear-gradient(135deg, oklch(35% 0.025 80) 0%, oklch(25% 0.022 80) 100%);
  color: oklch(96% 0.012 80);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  gap: var(--s-6);
  align-items: center;
  position: relative;
  overflow: hidden;
}
@media (min-width: 820px) {
  .cta-band { grid-template-columns: 1.4fr 1fr; gap: clamp(2.5rem, 5vw, 5rem); }
}
.cta-band__body h2 {
  color: oklch(98% 0.008 80);
  font-size: var(--step-3);
  margin-bottom: var(--s-4);
}
.cta-band__body p {
  color: oklch(82% 0.014 80);
  font-size: var(--step-1);
  max-width: 36ch;
  line-height: 1.55;
}
.cta-band__actions { display: flex; flex-direction: column; gap: var(--s-3); }
.cta-band .btn--primary { background: var(--accent); }
.cta-band .btn--primary:hover { background: var(--accent-deep); }
.cta-band .btn--ghost {
  color: oklch(96% 0.012 80);
  border-color: oklch(70% 0.02 80 / 0.5);
}
.cta-band .btn--ghost:hover {
  background: oklch(50% 0.025 80 / 0.2);
  border-color: oklch(96% 0.012 80);
}
.cta-band__decor {
  position: absolute; right: -80px; bottom: -80px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, oklch(58% 0.10 35 / 0.18), transparent 70%);
  pointer-events: none;
}

/* ---------- info card / location ---------- */
.info {
  display: grid; gap: var(--s-7);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .info { grid-template-columns: 1fr 1.2fr; } }

.info__list { list-style: none; }
.info__item {
  display: grid;
  gap: var(--s-1);
  padding-block: var(--s-4);
  border-top: 1px solid var(--border);
}
.info__item:last-child { border-bottom: 1px solid var(--border); }
.info__label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
.info__value {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 500;
  color: var(--fg-deep);
  line-height: 1.4;
}
.info__value a { color: var(--accent-deep); }
.info__value a:hover { color: var(--accent); }

.map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  min-height: 360px;
  position: relative;
}
.map iframe { display: block; width: 100%; height: 100%; min-height: 360px; border: 0; }

/* ---------- form ---------- */
.form {
  display: grid;
  gap: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.form__row {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
.field label .req { color: var(--accent); margin-left: 4px; }
.field input,
.field textarea,
.field select {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--fg-deep);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(58% 0.10 35 / 0.18);
}
.form__legal {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
  margin-top: var(--s-2);
}
.form__success {
  display: none;
  padding: var(--s-5);
  background: oklch(58% 0.10 35 / 0.08);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--fg-deep);
  font-size: 0.95rem;
  line-height: 1.55;
}
.form.is-sent .form__success { display: block; }
.form.is-sent > .form__row,
.form.is-sent > .field,
.form.is-sent > .form__legal,
.form.is-sent > .form__submit { display: none; }

/* ---------- footer ---------- */
.site-footer {
  background: oklch(22% 0.022 80);
  color: oklch(80% 0.012 80);
  padding-block: var(--s-8) var(--s-6);
}
.site-footer a { color: oklch(94% 0.012 80); }
.site-footer a:hover { color: oklch(82% 0.06 35); }

.footer-grid {
  display: grid; gap: var(--s-7);
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer__brand {
  font-family: var(--font-display);
  color: oklch(96% 0.012 80);
  font-size: var(--step-2);
  line-height: 1.2;
  margin-bottom: var(--s-3);
}
.footer__tag {
  font-size: 0.9rem;
  color: oklch(70% 0.018 80);
  max-width: 36ch;
  line-height: 1.55;
}
.footer__heading {
  font-family: var(--font-body);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: oklch(70% 0.018 80);
  margin-bottom: var(--s-4);
  font-weight: 600;
}
.footer__list { list-style: none; display: grid; gap: var(--s-3); font-size: 0.94rem; }
.footer__bottom {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid oklch(35% 0.022 80);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4);
  font-size: 0.84rem; color: oklch(65% 0.018 80);
}

/* ---------- breakpoints ---------- */

/* Tablet down */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column;
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: var(--s-5) clamp(1.25rem, 4vw, 2.5rem) var(--s-6);
    gap: var(--s-4);
    align-items: flex-start;
    font-size: 1.1rem;
  }
  .nav.is-open .nav__links a {
    padding-block: var(--s-3);
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
}

@media (max-width: 600px) {
  .hero { min-height: 92vh; }
  .hero__content { max-width: 100%; }
  .hero h1 { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .nav__cta { padding: 0.5rem 0.9rem; font-size: 0.84rem; }
  .nav__cta .nav__cta-text-full { display: none; }
}

@media (min-width: 600px) {
  .nav__cta .nav__cta-text-short { display: none; }
}

/* No-horizontal-scroll guard */
@media (max-width: 360px) {
  :root { --header-h: 64px; }
  .hero h1 { font-size: 2rem; }
}

/* Print baseline */
@media print {
  .site-header, .nav__cta, .cta-band, .hero__bg, .hero__overlay { display: none !important; }
  body { background: white; color: black; }
}

/* Motion preferences */
@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;
  }
}

/* Skip link */
.skip {
  position: absolute; left: -9999px;
  background: var(--fg-deep); color: var(--surface);
  padding: var(--s-3) var(--s-4); z-index: 100;
  border-radius: var(--radius-sm);
}
.skip:focus-visible { left: var(--s-4); top: var(--s-4); }
