/* =====================================================================
   Mattie's Metabolic Method — Hormonal & Metabolic Health Coaching
   Design system. Change the brand by editing the variables in :root.
   Palette: "warm & calming" — cream / sand / terracotta + sage accent.
   ===================================================================== */

:root {
  /* ---- Color (edit these once the brand is locked) ---- */
  --c-bg:        #fbf6ef;   /* page background — soft cream            */
  --c-surface:   #ffffff;   /* cards / panels                          */
  --c-sand:      #f1e7d8;   /* section tint                            */
  --c-primary:   #c97f5f;   /* terracotta — buttons, accents           */
  --c-primary-d: #b56847;   /* darker terracotta — hover               */
  --c-accent:    #7c9070;   /* calm sage green — secondary accent      */
  --c-ink:       #3c2f27;   /* warm charcoal — headings/body text      */
  --c-ink-soft:  #6a5a4e;   /* muted text                              */
  --c-line:      #e7dccd;   /* hairline borders                        */

  /* ---- Type ---- */
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  /* ---- Spacing & shape ---- */
  --radius:   18px;
  --radius-sm:12px;
  --shadow:   0 12px 40px rgba(60, 47, 39, 0.10);
  --shadow-sm:0 4px 16px rgba(60, 47, 39, 0.08);
  --maxw:     1140px;
  --gutter:   clamp(1.25rem, 5vw, 4rem);
  --section-y:clamp(3.5rem, 8vw, 7rem);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: 1.65;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--c-primary-d); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  color: var(--c-ink);
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.3rem, 1.6rem + 3.4vw, 4rem); }
h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); }
p  { margin: 0 0 1rem; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--c-sand); }
.section__head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.eyebrow {
  display: inline-block; font-family: var(--font-body); font-weight: 600;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--c-accent); margin-bottom: 0.85rem;
}
.lede { font-size: 1.15rem; color: var(--c-ink-soft); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; font-family: var(--font-body);
  padding: 0.85rem 1.6rem; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none; font-size: 1rem; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
/* Deeper terracotta so white label text meets WCAG AA contrast (the lighter
   --c-primary is kept for accents on light backgrounds, where it reads fine). */
.btn--primary { background: #a3502d; color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: #8c4224; }
.btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--c-line); }
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary-d); }
.btn--lg { padding: 1.05rem 2.4rem; font-size: 1.1rem; }

/* =====================================================================
   Navigation
   ===================================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 246, 239, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 72px; }
.nav__brand { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; color: var(--c-ink); white-space: nowrap; }
.nav__brand:hover { text-decoration: none; }
.nav__links { display: flex; align-items: center; gap: 1.35rem; list-style: none; margin: 0; padding: 0; }
/* :not(.btn) so this text color doesn't override the primary button's white label */
.nav__links a:not(.btn) { color: var(--c-ink-soft); font-weight: 500; font-size: 0.95rem; white-space: nowrap; }
.nav__links a:not(.btn):hover { color: var(--c-primary-d); text-decoration: none; }
.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 0.4rem;
  color: var(--c-ink);
}
.nav__toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--c-surface); border-bottom: 1px solid var(--c-line);
    padding: 0.5rem var(--gutter) 1.25rem;
    box-shadow: var(--shadow); display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { padding: 0.6rem 0; border-bottom: 1px solid var(--c-line); }
  .nav__links li:last-child { border-bottom: 0; padding-top: 1rem; }
  .nav__links .btn { width: 100%; justify-content: center; }
}

/* =====================================================================
   Hero
   ===================================================================== */
.hero { padding-block: clamp(3rem, 6vw, 5.5rem); }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__sub { font-size: 1.2rem; color: var(--c-ink-soft); max-width: 30ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.75rem; }
.hero__note { margin-top: 1.1rem; font-size: 0.92rem; color: var(--c-ink-soft); }
.hero__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
@media (max-width: 800px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
}

/* ---- Hero eyebrow with credentials: full-width above the headline ----
   Mobile-first: wraps by default; forced onto one line only on wider screens
   where a full-width line actually fits at a readable size. */
.eyebrow--creds {
  display: block; max-width: none; white-space: normal; line-height: 1.6;
  letter-spacing: 0.06em; margin-bottom: clamp(1.25rem, 3vw, 2rem);
  font-size: clamp(0.68rem, 0.9vw, 0.8rem);
}
/* Muted pipe separators so the credentials read as one scannable line */
.eyebrow__sep { color: var(--c-line); font-weight: 400; margin: 0 0.35rem; }
/* Wide enough for the full credential line to fit on one row */
@media (min-width: 700px) {
  .eyebrow--creds { white-space: nowrap; line-height: 1.4; }
}

/* =====================================================================
   Cards / grids
   ===================================================================== */
.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--c-ink-soft); margin: 0; }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 1rem;
  display: grid; place-items: center; background: var(--c-sand); color: var(--c-primary-d);
  font-size: 1.4rem;
}

/* ---- Two-column text+media block ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split--reverse .split__media { order: -1; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

/* ---- Checklist ---- */
.checklist { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.7rem; }
.checklist li { position: relative; padding-left: 1.9rem; color: var(--c-ink-soft); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--c-accent); font-weight: 700;
}

/* =====================================================================
   Offer card
   ===================================================================== */
.offer {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.75rem, 4vw, 2.75rem); max-width: 640px; margin-inline: auto;
  position: relative; overflow: hidden;
}
.offer__badge {
  display: inline-block; background: var(--c-accent); color: #fff;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.35rem 0.85rem; border-radius: 999px; margin-bottom: 1rem;
}
.offer__price { font-family: var(--font-head); font-size: 2rem; color: var(--c-ink); margin: 0.5rem 0; }
.offer__price small { font-family: var(--font-body); font-size: 0.95rem; color: var(--c-ink-soft); font-weight: 500; }

/* ---- Pricing plans (3-tier) ---- */
.plans { align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan h3 { margin-bottom: 0.35rem; }
.plan__price { font-family: var(--font-head); font-size: 2rem; color: var(--c-primary-d); margin: 0.25rem 0 0.9rem; }
.plan__price small { font-family: var(--font-body); font-size: 0.9rem; color: var(--c-ink-soft); font-weight: 500; }
.plan__persession {
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  color: var(--c-primary-d); margin: -0.4rem 0 0.9rem;
}
.plan__desc { color: var(--c-ink-soft); margin: 0; }
.plan--featured { border-color: var(--c-primary); box-shadow: 0 8px 30px rgba(201, 127, 95, 0.18); }
.plan__flag {
  position: absolute; top: -0.75rem; left: 1.5rem;
  background: var(--c-primary); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3rem 0.75rem; border-radius: 999px;
}

/* ---- Reviews / testimonials ---- */
.review { display: flex; flex-direction: column; }
.review p { color: var(--c-ink-soft); }
.review__who { margin: auto 0 0; padding-top: 0.75rem; font-size: 0.9rem; color: var(--c-ink); }
.review__who strong { color: var(--c-ink); }

/* ---- Booking page (free intro call) ---- */
.booking-expect {
  max-width: 620px; margin-inline: auto; margin-bottom: 2.5rem;
}
.booking-cta { margin-top: 1rem; }
/* Responsive wrapper for an embedded Google Calendar booking iframe. */
.booking-embed {
  max-width: 820px; margin: 0 auto;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.booking-embed iframe {
  width: 100%; min-height: 720px; border: 0; display: block;
}
@media (max-width: 600px) { .booking-embed iframe { min-height: 640px; } }

/* ---- Reviews marquee (auto-scroll right-to-left) ---- */
.marquee {
  overflow: hidden; width: 100%;
  /* Soft fade on both edges so cards ease in/out of view */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex; gap: 1.25rem; width: max-content;
  padding-block: 0.75rem; /* room for card shadow */
  will-change: transform;
}
.marquee__track > .review {
  flex: 0 0 340px; width: 340px; /* fixed-width cards so the loop is smooth */
}
/* Animate only when JS has cloned the set (adds .is-animated) — keeps a clean fallback otherwise */
.marquee.is-animated .marquee__track {
  animation: marquee-scroll 66s linear infinite;
}
.marquee.is-animated:hover .marquee__track,
.marquee.is-animated:focus-within .marquee__track {
  animation-play-state: paused;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  /* JS sets --marquee-shift to exactly one original set's width for a seamless wrap */
  to   { transform: translateX(calc(var(--marquee-shift, 50%) * -1)); }
}
/* No-JS / not-yet-initialized fallback: a normal swipeable row */
.marquee:not(.is-animated) .marquee__track {
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 600px) {
  .marquee__track > .review { flex-basis: 82vw; width: 82vw; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee.is-animated .marquee__track { animation: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee .marquee__track { overflow-x: auto; }
}

/* =====================================================================
   Contact
   ===================================================================== */
.form { display: grid; gap: 1rem; max-width: 560px; }
.form label { font-weight: 600; font-size: 0.92rem; display: block; margin-bottom: 0.35rem; }
.form input, .form textarea, .form select {
  width: 100%; padding: 0.8rem 1rem; border: 1px solid var(--c-line);
  border-radius: var(--radius-sm); font: inherit; background: var(--c-surface); color: var(--c-ink);
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 2px solid var(--c-primary); border-color: transparent; }
.form__hint { font-weight: 400; color: var(--c-ink-soft); font-size: 0.86rem; }

/* Grouped questions (checkbox / radio sets) */
.form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form legend { font-weight: 600; font-size: 0.92rem; margin-bottom: 0.5rem; padding: 0; }
.form__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem 1.25rem; }
@media (max-width: 600px) { .form__options { grid-template-columns: 1fr; } }
.form__options--inline { display: flex; flex-wrap: wrap; gap: 0.45rem 1.5rem; }
/* Option rows: the label wraps its own checkbox/radio, so override the stacked label style */
.form .form__check {
  display: flex; align-items: flex-start; gap: 0.6rem;
  font-weight: 400; font-size: 0.95rem; margin: 0; cursor: pointer;
}
.form .form__check input {
  width: 1.1rem; height: 1.1rem; padding: 0; margin: 0.22rem 0 0; flex: none;
  accent-color: var(--c-primary-d);
}
/* min-width:0 stops wide inputs (e.g. date pickers) from pushing grid columns past the screen edge */
.form > *, .form__row > * { min-width: 0; }
.form__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.form__consent {
  background: var(--c-sand); border-radius: var(--radius-sm); padding: 0.9rem 1rem;
}
.form fieldset.form__consent { padding: 1.25rem; display: grid; gap: 1.1rem; }
.form fieldset.form__consent legend { float: left; width: 100%; margin: 0; } /* keeps legend inside the tinted box */
.form__consent .form__hint { margin: 0; }
.form__agree { display: grid; gap: 0.6rem; justify-items: start; }
.form__agree .btn { white-space: normal; font-size: 0.92rem; padding: 0.6rem 1.1rem; background: var(--c-surface); }
.form__agree.is-locked .form__check { opacity: 0.6; }
.form__agree-msg { margin: 0; font-size: 0.85rem; color: #b4462f; }

/* ---- Intake page ---- */
.intake .form { max-width: 680px; margin-inline: auto; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }

/* ---- Legal pages (privacy policies) ---- */
.legal > .container { max-width: 760px; }
.legal h2 { font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem); margin-top: 2.25rem; }
.legal ul { padding-left: 1.25rem; color: var(--c-ink-soft); }
.legal li { margin-bottom: 0.4rem; }
.footer__legal { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.form__note { font-size: 0.86rem; color: var(--c-ink-soft); }
.form__note:empty { display: none; }
.form__reassure {
  font-size: 0.92rem; color: var(--c-ink-soft); max-width: 560px;
  margin: 0 0 1.25rem; padding-left: 0.9rem;
  border-left: 3px solid var(--c-accent);
}

/* =====================================================================
   Footer / disclaimer
   ===================================================================== */
.footer { background: var(--c-ink); color: #e9ddd1; padding-block: clamp(2.5rem, 5vw, 4rem); }
.footer a { color: #f0e2d3; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; }
.footer h3 { color: #fff; font-size: 1.3rem; }
.footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.disclaimer {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm); padding: 1.1rem 1.25rem; font-size: 0.86rem;
  color: #d9c9b9; line-height: 1.55; margin-top: 1.25rem;
}
.footer__bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.85rem; color: #c5b4a4; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
@media (max-width: 700px) { .footer__grid { grid-template-columns: 1fr; } }

/* =====================================================================
   Placeholder marker — makes "fill me in" text obvious
   ===================================================================== */
.ph {
  background: #fff4cc; color: #7a5c00; border: 1px dashed #d9b54a;
  padding: 0.05em 0.4em; border-radius: 6px; font-size: 0.9em; font-weight: 600;
  font-family: var(--font-body);
}

/* =====================================================================
   Scroll reveal animation (progressive enhancement)
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Skip link (accessibility) ---- */
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--c-primary); color: #fff;
  padding: 0.6rem 1rem; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* =====================================================================
   Blog: clickable article cards (homepage #blog section)
   .card--link wraps an <a> so a whole card is clickable while matching
   the existing .card look. Adds a hover lift + a "Read article" affordance.
   ===================================================================== */
a.card--link {
  display: block; color: inherit; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
a.card--link:hover {
  text-decoration: none; transform: translateY(-4px);
  box-shadow: var(--shadow); border-color: var(--c-primary);
}
a.card--link h3 { color: var(--c-ink); }
.card__more {
  display: inline-block; margin-top: 0.9rem;
  font-weight: 600; font-size: 0.95rem; color: var(--c-primary-d);
}
a.card--link:hover .card__more { text-decoration: underline; }

/* "Coming soon" placeholder cards — intentional, not a fill-me-in marker */
.card--soon { border-style: dashed; background: transparent; box-shadow: none; }
.card--soon h3 { color: var(--c-ink-soft); }
.card__soon {
  display: inline-block; margin-bottom: 0.75rem;
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--c-accent);
  background: var(--c-sand); border-radius: 999px; padding: 0.3rem 0.75rem;
}

/* =====================================================================
   Article page (blog/*.html) — comfortable long-form reading layout
   ===================================================================== */
.article { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.article > .container { max-width: 760px; }

.article__back {
  display: inline-block; margin-bottom: 1.75rem;
  font-weight: 600; font-size: 0.95rem; color: var(--c-ink-soft);
}
.article__back:hover { color: var(--c-primary-d); text-decoration: none; }

.article__header { margin-bottom: 2.5rem; }
.article__header h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); margin-bottom: 0.75rem;
}
.article__meta {
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--c-accent); margin: 0;
}

/* Long-form prose: measured line length + generous rhythm */
.article__body { font-size: 1.075rem; }
.article__body > p { margin: 0 0 1.4rem; max-width: 68ch; }
.article__body h2 {
  margin: 2.75rem 0 1rem; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}
.article__body ul {
  list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 1rem;
  max-width: 68ch;
}
.article__body ul li {
  position: relative; padding-left: 1.9rem; color: var(--c-ink-soft);
}
.article__body ul li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--c-accent); font-weight: 700;
}
.article__body ul li strong { color: var(--c-ink); }

/* Inline figure (the insulin-resistance diagram) */
.article__figure {
  margin: 2rem 0; padding: 1.25rem; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.article__figure img {
  width: 100%; max-width: 520px; margin-inline: auto; border-radius: var(--radius-sm);
}
.article__figure figcaption {
  margin-top: 0.9rem; text-align: center; font-size: 0.9rem;
  color: var(--c-ink-soft); line-height: 1.5;
}

.article__cta { margin-top: 2.5rem; }
