/* ============================================================
   SPB Weight Loss & Primary Care — design tokens
   Palette grounded in St. Pete Beach: gulf teal + warm sand,
   with an editorial serif for a physician-led, personal-practice
   feel rather than a generic med-spa look.
   ============================================================ */

:root {
  --navy: #16324A;
  --navy-ink: #0F2333;
  --teal: #1C6E68;
  --teal-dark: #144F4B;
  --sand: #F4EFE4;
  --sand-deep: #EAE1CC;
  --gold: #C99A3B;
  --gold-dark: #A87D28;
  --ink: #1E242B;
  --ink-soft: #4B5560;
  --white: #FFFFFF;
  --line: #DAD2BE;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.3rem, 4.2vw, 3.5rem); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 500; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-soft); }
p.lede { font-size: 1.15rem; color: var(--ink); max-width: 54ch; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
section.alt { background: var(--sand); }
section.navy { background: var(--navy); color: var(--white); }
section.navy h1, section.navy h2, section.navy h3 { color: var(--white); }
section.navy p { color: rgba(255,255,255,0.78); }

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--teal);
  margin-bottom: 0.9rem;
  font-weight: 600;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-gold { background: var(--gold); color: var(--navy-ink); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { border-color: var(--white); }
.btn-outline-navy { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }

/* ---------- Header / nav ---------- */
header.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.topbar {
  background: var(--navy-ink);
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.topbar a { color: rgba(255,255,255,0.9); text-decoration: none; }
.topbar a:hover { color: var(--gold); }
.topbar .topbar-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* padding-block, not the padding shorthand: .nav-row sits on the same
   element as .container, and the shorthand zeroed its side gutters. */
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.1rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy-ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand span { color: var(--teal); }

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;   /* 1.9rem ran 4px past the container once the row had gutters */
  margin: 0;
  padding: 0;
  align-items: center;
}
nav.main-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--teal); }
nav.main-nav a.btn { color: var(--navy-ink); }
nav.main-nav a.btn:hover { color: var(--white); }

.nav-toggle {
  display: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy-ink);
  background: transparent;
  border: 1px solid var(--navy);
  border-radius: 3px;
  padding: 0.6rem 1rem;
  cursor: pointer;
}

/* Tighten the row before it runs out of room. */
@media (max-width: 1140px) {
  nav.main-nav ul { gap: 1.15rem; }
  nav.main-nav a.btn { padding-inline: 1rem; }
}

/* Below this the brand, five links and the button no longer fit on one
   line (measured: the tightened row needs about 950px inside the gutters,
   which a 1050px window with a scrollbar just provides). Without
   JavaScript the links wrap onto a second row; with it (html.js, set in
   <head>) they collapse behind the Menu button. */
@media (max-width: 1060px) {
  .nav-row { flex-wrap: wrap; }
  /* The brand takes the space left of the Menu button and wraps inside it,
     so the button stays on the first row instead of dropping below. */
  .brand { white-space: normal; flex: 1 1 0; min-width: 0; line-height: 1.25; }
  nav.main-nav { flex-basis: 100%; }
  nav.main-nav ul { flex-wrap: wrap; gap: 0.5rem 1.25rem; }

  .js .nav-toggle { display: inline-block; }
  .js nav.main-nav { display: none; }
  .js nav.main-nav.open { display: block; }
  .js nav.main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 1px solid var(--line);
  }
  .js nav.main-nav li > a:not(.btn) {
    display: block;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }
  .js nav.main-nav li > a.btn { display: block; text-align: center; margin-top: 1rem; }
}

/* Phones: the bar keeps the two numbers, as comfortable tap targets. The
   email and address repeat in the footer and on the contact page. */
@media (max-width: 600px) {
  .topbar .container { justify-content: center; }
  .topbar .topbar-links { gap: 1.5rem; }
  .topbar a { display: inline-block; padding: 0.35rem 0; font-size: 0.9rem; }
  .topbar-addr, .topbar a.topbar-email { display: none; }
}

/* ---------- Hero (asymmetric, not centered) ---------- */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0;
  background: var(--sand);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.hero-copy .eyebrow { color: var(--teal-dark); }
.hero-actions { display: flex; gap: 1rem; margin-top: 1.75rem; flex-wrap: wrap; }

.trust-card {
  background: var(--navy);
  color: var(--white);
  padding: 2rem;
  border-radius: 2px;
}
.trust-card h3 { color: var(--white); font-size: 1.05rem; margin-bottom: 1.2rem; }
.trust-list { list-style: none; margin: 0; padding: 0; }
.trust-list li {
  padding: 0.85rem 0;
  border-top: 1px solid rgba(255,255,255,0.16);
  font-size: 0.92rem;
  color: rgba(255,255,255,0.88);
}
.trust-list li:first-child { border-top: none; }
.trust-list strong { display: block; color: var(--white); font-family: var(--font-display); font-size: 1rem; font-weight: 500; margin-bottom: 0.15rem; }

@media (max-width: 800px) {
  .hero .container { grid-template-columns: 1fr; }
}

/* ---------- Row-style service listing (not card grid) ---------- */
.service-list { border-top: 1px solid var(--line); margin-top: 2.5rem; }
.service-row {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.service-row h3 { margin: 0; }
.service-row p { margin: 0; color: var(--ink-soft); }
.service-row a.row-link {
  text-decoration: none;
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
.service-row a.row-link:hover { color: var(--gold-dark); }
@media (max-width: 700px) {
  .service-row { grid-template-columns: 1fr; gap: 0.4rem; }
}

/* ---------- Two column content ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* Capped at the photo's native width: the copy on hand is only 326px wide,
   and stretching it to the column would blur it. Raise this when a
   higher-resolution original arrives. */
.portrait {
  width: 100%;
  max-width: 326px;
  height: auto;
  margin-inline: auto;
  border-radius: 2px;
}

/* A full-column photo (services.html). */
.photo {
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.figure-block {
  background: var(--navy);
  border-radius: 2px;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
}

/* ---------- Map (contact page) ---------- */
.map iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.map-link {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.25rem 0;
  color: var(--teal-dark);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.map-link:hover { color: var(--gold-dark); }

/* ---------- Stat strip ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 3rem 0;
}
.stat-strip div { padding: 1.75rem 1.5rem; border-left: 1px solid var(--line); }
.stat-strip div:first-child { border-left: none; }
.stat-strip .num { font-family: var(--font-display); font-size: 2rem; color: var(--teal-dark); display: block; }
.stat-strip .label { font-size: 0.85rem; color: var(--ink-soft); }
@media (max-width: 700px) {
  .stat-strip { grid-template-columns: 1fr; }
  .stat-strip div { border-left: none; border-top: 1px solid var(--line); }
  .stat-strip div:first-child { border-top: none; }
}

/* ---------- Testimonial ---------- */
.testimonial {
  border-left: 3px solid var(--gold);
  padding-left: 1.5rem;
  margin: 0;
}
.testimonial p { font-family: var(--font-display); font-size: 1.25rem; font-style: italic; color: var(--navy-ink); margin-bottom: 0.6rem; }
.testimonial cite { font-style: normal; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); padding: 1.5rem 0; }
.faq-item h3 { margin-bottom: 0.5rem; font-size: 1.05rem; }
.faq-item p { margin: 0; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--navy-ink); margin-bottom: 0.4rem; }
input, select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
}
textarea { resize: vertical; min-height: 110px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--navy-ink); color: rgba(255,255,255,0.75); padding: 3.5rem 0 2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.footer-grid h4 { color: var(--white); font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.02em; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.6rem; font-size: 0.9rem; }
.footer-grid a { text-decoration: none; color: rgba(255,255,255,0.75); }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 1.5rem; font-size: 0.8rem; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Utility ---------- */
.center { text-align: center; }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.mt-0 { margin-top: 0; }
.divider { height: 1px; background: var(--line); border: none; margin: 3rem 0; }

/* Skip link for accessibility */
.skip-link {
  position: absolute; left: -999px; top: auto;
  background: var(--navy); color: var(--white); padding: 0.75rem 1.25rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Visible keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
