/* Carrie Kim, IBCLC — design system
   Tokens derived in brand/identity/palette.md and typography.md */

:root {
  --paper: #f3ede2;
  --ink: #241a1f;
  --muted: #8a7680;
  --line: #e3d9d0;
  --surface: #fdfbf8;
  --plum: #5a2a3d;
  --gold: #c99a4b;

  --font-headline: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Public Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;

  --measure: 62ch;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 72px;
  --space-7: 104px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-headline);
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 var(--space-2);
}
h1 { font-size: clamp(32px, 5vw, 52px); }
h2 { font-size: clamp(24px, 3.4vw, 34px); }
h3 { font-size: 20px; }

p { margin: 0 0 var(--space-2); max-width: var(--measure); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--plum);
  margin: 0 0 var(--space-1);
}

.lede {
  color: var(--muted);
  font-size: 17px;
  max-width: var(--measure);
}

/* --- Skip link, accessibility --- */
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--plum); color: var(--paper);
  padding: 10px 16px; border-radius: var(--radius-sm);
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

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

/* --- Header --- */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
}
header.site .bar {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 24px;
}
header.site .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
header.site .brand svg { width: 32px; height: 26px; flex-shrink: 0; }
header.site .brand span {
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  letter-spacing: .1em; text-transform: uppercase;
  white-space: nowrap;
}
header.site nav.primary a {
  font-size: 14px; color: var(--ink); text-decoration: none;
  border-radius: 999px;
  white-space: nowrap;
}
header.site nav.primary a:hover,
header.site nav.primary a[aria-current="page"] { background: var(--surface); }
header.site nav.primary a.cta {
  background: var(--plum); color: var(--paper); font-weight: 600;
}
header.site nav.primary a.cta:hover { opacity: .92; background: var(--plum); }
.menu-toggle { display: none; }

/* Desktop-only nav layout, explicitly scoped so it can never outrank the
   mobile display:none / .open rules below on specificity. It previously
   wasn't scoped to a media query at all, so header.site nav.primary
   (2 classes) beat the mobile nav.primary (1 class) regardless of
   viewport width, permanently pinning the "closed" mobile menu open. */
@media (min-width: 901px) {
  header.site nav.primary { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
  header.site nav.primary a { padding: 8px 12px; }
  header.site nav.primary a.cta { padding: 10px 20px; }
}

/* Switch to the hamburger well before the full nav (logo + 5 links + a pill
   button) runs out of room; the old 720px breakpoint left a squeezed zone
   where nav items and the CTA button text wrapped awkwardly. */
@media (max-width: 900px) {
  header.site .bar { flex-wrap: wrap; }
  .menu-toggle {
    display: inline-flex; margin-left: auto; border: 1px solid var(--line);
    background: transparent; border-radius: var(--radius-sm); padding: 8px 10px;
    font-size: 13px; cursor: pointer; color: var(--ink);
  }
  nav.primary {
    display: none; width: 100%; flex-direction: column; align-items: flex-start;
    gap: 2px; margin-top: 12px;
  }
  nav.primary.open { display: flex; }
  nav.primary a { width: 100%; padding: 12px; }
}

/* --- Hero --- */
.hero { padding: var(--space-6) 0 var(--space-5); }
.hero .grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: var(--space-5); align-items: center; }
.hero .actions { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-3); }
.hero figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; }
.hero figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/4.6; }
.credential-line {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin-top: var(--space-2);
}

/* Stacked single-column hero runs further up than the site's usual 900px
   nav breakpoint: the hero h1 is two full sentences at display size, and
   the two-column layout doesn't have enough width for the second sentence
   to stay on one line until the container hits its own 1120px cap. Below
   that, stacking avoids a mid-sentence wrap onto an orphan third line. */
@media (max-width: 1180px) {
  .hero .grid { grid-template-columns: 1fr; }
  .hero figure { order: -1; max-width: 320px; }
}

/* Below ~480px the h1's own clamp() floor (32px) is still too wide for the
   second sentence to fit on one line at full container width, causing the
   same orphan-third-line wrap as the desktop squeeze above. */
@media (max-width: 480px) {
  .hero h1 { font-size: 26px; }
}

/* --- The Thread: nodes are real HTML elements so the SVG's non-uniform
   preserveAspectRatio="none" stretch (needed so the line fills any width)
   can't distort them into ellipses. --- */
.thread-wrap { position: relative; margin-bottom: var(--space-5); }
.thread-node {
  position: absolute; top: 50%; width: 12px; height: 12px;
  margin-left: -6px; margin-top: -6px;
  border-radius: 50%; background: var(--gold);
  opacity: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 14.5px;
  padding: 13px 26px; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--plum); color: var(--paper); }
.btn-primary:hover { background: #4a2231; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--plum); color: var(--plum); }
.btn-on-dark { background: var(--gold); color: var(--plum); }
.btn-on-dark:hover { background: #d6ac63; }

/* --- Sections, cards --- */
section { padding: var(--space-6) 0; }
section.tight { padding: var(--space-5) 0; }
section + section { border-top: 1px solid var(--line); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: var(--space-3);
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 800px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* --- The Thread pattern --- */
.thread-line { display: block; width: 100%; height: 34px; overflow: visible; }
.thread-line path { fill: none; stroke: var(--plum); stroke-width: 3; stroke-linecap: round; }
.thread-divider { margin: var(--space-4) 0; }
.thread-divider svg { display: block; width: 100%; height: 24px; }
.thread-divider path { fill: none; stroke: var(--plum); stroke-width: 2.4; stroke-linecap: round; opacity: .85; }

/* --- Closing / dark band --- */
.band-dark {
  background: var(--plum); color: var(--paper);
}
.band-dark .muted-on-dark { color: #e3cdd4; }
.band-dark h2 { color: var(--paper); }
.band-mark { width: 84px; height: auto; margin: 0 auto var(--space-2); display: block; }

/* --- Footer --- */
footer.site {
  border-top: 1px solid var(--line);
  padding: var(--space-4) 0;
  font-size: 13px; color: var(--muted);
}
footer.site .bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
footer.site a { color: var(--muted); text-decoration: underline; }

/* --- Booking reassurance line, under a prominent Book button ---
   This line appears in two different contexts: centered (dark closing
   bands) and left-aligned (page-hero CTAs on Services/Contact). The
   generic `p { max-width: var(--measure) }` rule below computes 62ch
   against THIS element's own smaller font-size (12.5px vs normal body
   text), so it was capping the box at ~474px, narrower than its sibling
   paragraph's natural width, in both contexts. In the centered bands
   that made the whole (narrower, non-centered) box sit flush-left
   instead of matching its sibling. The fix is to remove the constraint,
   not to force margin:auto, since margin:auto would incorrectly center
   the box in the left-aligned contexts too. Full width + inherited
   text-align makes it match whichever context it's in. --- */
.book-reassurance {
  font-size: 12.5px; color: var(--muted); margin-top: var(--space-1);
  max-width: none;
}
.band-dark .book-reassurance { color: #e3cdd4; }

/* --- Testimonials: short pull-quotes, not full reviews. DM Serif Display
   is built for headline-length text; a full ~700-character review set at
   display size reads as a dense wall of text and fights the site's
   unhurried pacing. One resonant sentence, verbatim from the real review,
   does the trust-building job without the reading commitment, and the
   full review is always one click away via the linked attribution. --- */
.testimonial-strip { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
@media (max-width: 800px) { .testimonial-strip { grid-template-columns: 1fr; gap: var(--space-4); } }

.pull-quote { margin: 0; padding-left: var(--space-3); border-left: 2px solid var(--gold); }
.pull-quote blockquote {
  margin: 0 0 var(--space-2); font-family: var(--font-headline); font-weight: 400;
  font-size: clamp(19px, 2.2vw, 23px); line-height: 1.4; color: var(--ink);
  text-wrap: balance;
}
.pull-quote figcaption { font-size: 12.5px; color: var(--muted); }
.pull-quote figcaption a { color: var(--plum); text-decoration: underline; }

/* Single inline pull-quote (used on the Services page next to the
   tongue-tie content), same visual language, no left rule since it sits
   inside an existing text column rather than a dedicated strip. */
.pull-quote-inline {
  margin: var(--space-3) 0 0; font-family: var(--font-headline); font-weight: 400;
  font-size: 19px; line-height: 1.4; color: var(--ink); text-wrap: balance;
}
.pull-quote-inline figcaption {
  font-family: var(--font-body); font-size: 12.5px; color: var(--muted); margin-top: var(--space-1);
}
.pull-quote-inline figcaption a { color: var(--plum); text-decoration: underline; }

/* --- Utility --- */
.center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: var(--space-2); }
.small { font-size: 13px; color: var(--muted); }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding-left: 18px; position: relative; margin-bottom: 8px; font-size: 14.5px; }
ul.plain li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
