/* =========================================================================
   SITE COMPONENTS  --  The Town Practice  --  "The Greenwich Standard"
   Editorial heritage: type-led, generous whitespace, doctor-light. All colors/
   fonts/spacing from theme.css tokens. Newsreader serif headings (sentence case,
   negative tracking), bronze overlines, one clay action color.
   ========================================================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg-2); font-family: var(--font-body);
  font-size: var(--base-font-size); line-height: var(--base-line); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-display); color: var(--fg); font-weight: 500;
  line-height: 1.1; letter-spacing: var(--tracking-display); }
blockquote, .legacy-num, .svc-t { letter-spacing: var(--tracking-display); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.ic { width: 20px; height: 20px; flex-shrink: 0; }

.overline { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-body);
  font-size: 0.74rem; font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--meta); }
.overline::before { content: ""; width: 28px; height: 1px; background: var(--accent-soft); }

/* ---- Buttons --------------------------------------------------------- */
.btn-cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--cta); color: var(--cta-on); font-family: var(--font-body); font-weight: 600; font-size: 0.98rem;
  padding: 15px 30px; border-radius: var(--radius-pill); border: 1px solid var(--cta); box-shadow: var(--elev-cta); transition: background 150ms ease; }
.btn-cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.btn-ghost { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 0.96rem;
  color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 13px 24px; transition: border-color 150ms ease; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-call { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--fg); }
.btn-call .ic { color: var(--accent); }
@media (max-width: 639px) { .btn-cta, .btn-ghost { width: 100%; } }

/* ---- Header (lean; nowrap so it never breaks) ------------------------ */
header.nav { position: sticky; top: 0; z-index: 40; background: rgba(247,243,236,0.92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border-soft); }
.nav-in { display: flex; align-items: center; gap: 24px; padding-top: 18px; padding-bottom: 18px; flex-wrap: nowrap; }
.brand { display: inline-flex; flex-direction: column; line-height: 1.04; margin-right: auto; flex-shrink: 0; }
.brand b { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--fg); letter-spacing: -0.01em; white-space: nowrap; }
.brand small { font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--meta); margin-top: 4px; font-weight: 600; white-space: nowrap; }
.nav-links { display: flex; gap: 30px; font-size: 0.95rem; font-weight: 500; color: var(--fg); flex-shrink: 0; }
.nav-links a { white-space: nowrap; }
.nav-links a:hover, .nav-links a.is-current { color: var(--accent); }
.nav-phone { font-weight: 600; color: var(--fg); font-size: 0.95rem; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; flex-shrink: 0; }
.nav-phone .ic { color: var(--accent); }
.nav .nav-cta { padding: 11px 22px; font-size: 0.92rem; box-shadow: none; white-space: nowrap; }
@media (max-width: 1040px) { .nav-links { display: none; } .nav-phone { margin-left: auto; } .nav .nav-cta { display: none; } }
@media (max-width: 600px) { .nav-in { gap: 12px; } .brand b { font-size: 1.05rem; } .brand small { letter-spacing: 0.16em; } .nav-phone { font-size: 0.84rem; } .nav-phone .ic { width: 14px; height: 14px; } }

/* ---- Hero (oversized typographic statement; the signature move) ------ */
.hero-ed { padding-top: 96px; padding-bottom: 84px; }
@media (max-width: 720px) { .hero-ed { padding-top: 56px; padding-bottom: 52px; } }
.hero-ed-h { font-size: clamp(2.7rem, 6.4vw, 5rem); font-weight: 500; line-height: 1.04; margin: 24px 0 26px; max-width: 17ch; }
.hero-ed-h em { font-style: italic; color: var(--accent); }
.hero-ed-sub { font-size: clamp(1.1rem, 1.6vw, 1.32rem); color: var(--fg-2); max-width: 48ch; margin-bottom: 34px; }
.hero-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.hero-plate { position: relative; width: 100%; height: clamp(340px, 52vh, 600px); margin-top: 64px; background-size: cover; background-position: center 30%; }
.ph-badge { position: absolute; right: 14px; bottom: 14px; z-index: 2; background: rgba(24,43,38,0.78);
  color: var(--on-dark); font-family: var(--font-body); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 12px; border-radius: var(--radius-pill); backdrop-filter: blur(2px); }
.exp-photo { position: relative; }
@media (max-width: 720px) { .hero-plate { margin-top: 40px; height: 320px; } }

/* ---- Legacy strip ---------------------------------------------------- */
.legacy { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.legacy-row { display: grid; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 720px) { .legacy-row { grid-template-columns: 1fr 1fr; } }
.legacy-item { padding: 30px 26px; border-left: 1px solid var(--border-soft); }
.legacy-item:first-child { border-left: 0; }
@media (max-width: 720px) { .legacy-item:nth-child(odd) { border-left: 0; } .legacy-item:nth-child(n+3) { border-top: 1px solid var(--border-soft); } }
.legacy-num { font-family: var(--font-display); font-size: 1.9rem; font-weight: 500; color: var(--fg); display: block; line-height: 1; }
.legacy-lab { font-size: 0.84rem; color: var(--muted); margin-top: 8px; display: block; }

/* ---- Sections -------------------------------------------------------- */
.sec { padding-top: var(--sec-pad); padding-bottom: var(--sec-pad); }
.sec-soft { background: var(--surface-warm); }
.sec-head { max-width: 60ch; margin-bottom: 46px; }
.sec h2 { font-size: clamp(2rem, 3.8vw, 2.9rem); font-weight: 500; margin: 14px 0 16px; }
.sub { color: var(--fg-2); font-size: 1.08rem; max-width: 56ch; }

/* ---- Services index (editorial rows, NOT cards) ---------------------- */
.svc-index { border-top: 1px solid var(--border); }
.svc-row { display: grid; grid-template-columns: 56px 0.9fr 1.4fr 32px; align-items: center; gap: 24px;
  padding: 26px 8px; border-bottom: 1px solid var(--border); transition: background 140ms ease, padding 140ms ease; }
.svc-row:hover { background: var(--surface); padding-left: 18px; padding-right: 18px; }
.svc-n { font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; color: var(--accent-soft); }
.svc-t { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 500; color: var(--fg); }
.svc-d { font-size: 0.98rem; color: var(--fg-2); }
.svc-a { color: var(--accent); justify-self: end; }
@media (max-width: 760px) {
  .svc-row { grid-template-columns: 40px 1fr; row-gap: 6px; }
  .svc-d { grid-column: 2; } .svc-a { display: none; }
}

/* ---- Experience (image + statement) ---------------------------------- */
.exp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .exp-grid { grid-template-columns: 1fr; gap: 32px; } }
.exp-photo img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--elev); aspect-ratio: 4/3; object-fit: cover; }
.exp-h { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 500; max-width: 18ch; margin: 14px 0 28px; }
.exp-row { display: grid; grid-template-columns: 1fr; gap: 20px; }
.exp-pt { border-top: 2px solid var(--accent-soft); padding-top: 16px; }
.exp-pt b { font-family: var(--font-display); font-size: 1.24rem; font-weight: 500; color: var(--fg); display: block; margin-bottom: 8px; letter-spacing: var(--tracking-display); }
.exp-pt span { font-size: 0.98rem; color: var(--fg-2); }

/* ---- Quotes (stacked editorial pull-quotes) -------------------------- */
.quotes { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 820px) { .quotes { grid-template-columns: 1fr; } }
.quote { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg); padding: 36px 38px; box-shadow: var(--elev); }
.qstars { display: flex; gap: 3px; color: var(--star); margin-bottom: 18px; }
.qstars .ic { width: 18px; height: 18px; }
.quote blockquote { font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.45; color: var(--fg); }
.quote figcaption { margin-top: 22px; font-family: var(--font-body); font-weight: 600; color: var(--fg); font-size: 0.95rem; }
.quote figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: 0.84rem; margin-top: 3px; }

/* ---- Team teaser (one line, one photo; doctor-LIGHT) ----------------- */
.team-teaser { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 48px; align-items: center; }
@media (max-width: 760px) { .team-teaser { grid-template-columns: 1fr; gap: 28px; } }
.tt-photo img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--elev); aspect-ratio: 5/4; object-fit: cover; }
.tt-body h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin: 12px 0 16px; }
.tt-body p { font-size: 1.08rem; color: var(--fg-2); max-width: 48ch; margin-bottom: 22px; }

/* ---- Location -------------------------------------------------------- */
.loc-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: start; }
@media (max-width: 820px) { .loc-grid { grid-template-columns: 1fr; } }
.loc-line { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; font-size: 1rem; color: var(--fg-2); }
.loc-line .ic { color: var(--accent); margin-top: 3px; }
.loc-line b { color: var(--fg); }
.loc-hours { margin: 8px 0 24px; }
.hours-row { display: flex; justify-content: space-between; max-width: 280px; padding: 7px 0; border-bottom: 1px solid var(--border-soft); font-size: 0.95rem; }
.hours-row span:first-child { color: var(--fg); }
.map-frame { border: 0; width: 100%; height: 380px; border-radius: var(--radius-lg); box-shadow: var(--elev); background: var(--surface-warm); }

/* ---- Consult band ---------------------------------------------------- */
.consult { background: linear-gradient(135deg, var(--ink-grad-from) 0%, var(--ink-grad-to) 100%); color: var(--on-dark); }
.consult .wrap { padding-top: 84px; padding-bottom: 84px; text-align: center; }
.consult h2 { color: var(--on-dark); font-size: clamp(2rem, 3.8vw, 2.8rem); margin-bottom: 14px; }
.consult p { color: var(--on-dark-soft); max-width: 52ch; margin: 0 auto 30px; font-size: 1.08rem; }
.consult-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.consult-call { color: var(--on-dark); font-weight: 600; display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid rgba(247,243,236,0.4); border-radius: var(--radius-pill); padding: 15px 28px; }

/* ---- Footer ---------------------------------------------------------- */
footer { background: var(--ink-deep); color: var(--on-dark-soft); padding-top: 60px; padding-bottom: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.1fr; gap: 32px; margin-bottom: 40px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; row-gap: 30px; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
footer b.fbrand { font-family: var(--font-display); color: var(--on-dark); font-size: 1.45rem; display: block; margin-bottom: 12px; }
.foot-creds { font-size: 0.82rem; color: var(--on-dark-soft); opacity: 0.75; margin-top: 14px; max-width: 40ch; line-height: 1.6; }
footer h4 { font-family: var(--font-body); color: var(--on-dark); font-size: 0.76rem; letter-spacing: var(--tracking-caps); text-transform: uppercase; margin-bottom: 16px; }
footer ul { list-style: none; }
footer li { margin-bottom: 10px; font-size: 0.93rem; }
footer a:hover { color: var(--on-dark); }
footer .hours-row { max-width: 100%; border-color: rgba(247,243,236,0.14); }
footer .hours-row span:first-child { color: var(--on-dark); }
.foot-bottom { border-top: 1px solid rgba(247,243,236,0.14); padding-top: 24px; font-size: 0.8rem; opacity: 0.8;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---- Sticky mobile bar ----------------------------------------------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: none;
  background: var(--surface); border-top: 1px solid var(--border); padding: 8px 10px; gap: 8px; }
.bar a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; border-radius: var(--radius-pill); padding: 13px; }
.bar .b-call { border: 1px solid var(--accent); color: var(--accent); }
.bar .b-cta { background: var(--cta); color: var(--cta-on); }
@media (max-width: 1040px) { .bar { display: flex; } footer { padding-bottom: 84px; } }
