/* ============================================================
   Somerville (MA) — Ink Navy / Tomato / Mint / Cream
   Hero: centered headline over a triptych of 3 portrait photos side by
   side (no overlap), middle raised; the navy band sits behind the
   photo row only, so it can never reach the headline or buttons
   ============================================================ */

:root {
  --navy: #1F2A44;
  --navy-soft: #2C3A5C;
  --tomato: #E4572E;
  --tomato-deep: #C04420;
  --tomato-pale: #FCEBE4;
  --mint: #BFE3D0;
  --mint-deep: #5FA383;
  --mint-pale: #EAF6EF;
  --cream: #FAF6EE;
  --white: #FFFFFF;
  --ink: #1A2133;
  --muted: #5A6273;
  --muted-2: #98A0AE;
  --line: #E5E1D8;
  --danger-bg: #FBEAE7;
  --danger-border: #E3A79B;
  --danger-text: #8A3A2A;
  --success-bg: #E9F5EE;
  --success-border: #9FCFB4;
  --success-text: #1F5C3D;
  --r: 12px;
  --r-lg: 20px;
  --head: 'Epilogue', -apple-system, BlinkMacSystemFont, sans-serif;
  --body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--body); color: var(--ink); background: var(--cream); line-height: 1.64; -webkit-font-smoothing: antialiased; font-size: 1.03rem; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 800; color: var(--navy); line-height: 1.08; letter-spacing: -0.02em; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.cv { max-width: 1160px; margin: 0 auto; padding: 0 2.5rem; }
.sv { padding: 5.5rem 0; }
.sv-w { background: var(--white); }
.sv-n { background: var(--navy); }
.sv-m { background: var(--mint-pale); }
@media (max-width: 860px) { .cv { padding: 0 1.3rem; } .sv { padding: 3.5rem 0; } }

/* ---------- Nav ---------- */
nav { position: sticky; top: 0; z-index: 40; background: var(--navy); }
.nv { max-width: 1160px; margin: 0 auto; padding: 0.8rem 2.5rem; display: flex; align-items: center; justify-content: space-between; }
.nv-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nv-logo img { width: 42px; height: 42px; }
.nv-logo span { font-family: var(--head); font-weight: 800; font-size: 1.1rem; color: var(--cream); }
.nv-links { list-style: none; display: flex; gap: 0.4rem; }
.nv-links a { text-decoration: none; font-weight: 500; font-size: 0.93rem; color: rgba(250,246,238,0.74); padding: 0.45rem 0.95rem; border-radius: 999px; transition: background .2s, color .2s; }
.nv-links a:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.nv-links a.active { color: var(--navy); background: var(--mint); font-weight: 700; }
.nv-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nv-btn span { width: 22px; height: 2px; background: var(--cream); border-radius: 2px; }
@media (max-width: 860px) {
  .nv { padding: 0.8rem 1.3rem; }
  .nv-links { position: fixed; top: 66px; left: 0; right: 0; background: var(--navy); flex-direction: column; gap: 0.2rem; padding: 0.5rem 1.2rem 1.2rem;
    opacity: 0; pointer-events: none; transform: translateY(-6px); transition: opacity .2s, transform .2s; }
  .nv-links.open { opacity: 1; pointer-events: auto; transform: none; }
  .nv-btn { display: flex; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 0.95rem 1.5rem; border-radius: 999px; font-family: var(--body);
  font-weight: 700; font-size: 0.96rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn-tomato { background: var(--tomato); color: var(--white); }
.btn-tomato:hover { background: var(--tomato-deep); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: #111829; }
.btn-ol { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ol:hover { background: var(--navy); color: var(--white); }
.btn-mint { background: var(--mint); color: var(--navy); }
.btn-mint:hover { background: var(--white); }

/* ---------- Headings ---------- */
.ey { display: inline-block; font-weight: 700; font-size: 0.76rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--tomato-deep); margin-bottom: 0.9rem; }
.h2 { font-size: clamp(1.9rem, 3.3vw, 2.7rem); margin-bottom: 0.9rem; }
.ld { color: var(--muted); max-width: 40rem; }
.hd { margin-bottom: 3rem; }
.hd.c { text-align: center; }
.hd.c .ld { margin: 0 auto; }

/* ---------- Hero: triptych ---------- */
.tri { padding: 4.5rem 0 0; text-align: center; background: var(--cream); overflow: hidden; }
.tri h1 { font-size: clamp(2.2rem, 4.4vw, 3.5rem); max-width: 880px; margin: 0 auto 1.1rem; }
.tri h1 span { color: var(--tomato); }
.tri p { color: var(--muted); font-size: 1.07rem; max-width: 38rem; margin: 0 auto 2rem; }
.tri-b { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3.5rem; }
.tri-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: end; padding-bottom: 4rem; position: relative; z-index: 0; }
.tri-row::before { content: ""; position: absolute; left: -100vw; right: -100vw; top: 42%; bottom: 0; background: var(--navy); z-index: -1; }
.tri-row figure { aspect-ratio: 3 / 4; border-radius: var(--r-lg); overflow: hidden; background: var(--mint-pale); border: 6px solid var(--white); box-shadow: 0 26px 50px -28px rgba(31,42,68,0.6); }
.tri-row figure:nth-child(2) { transform: translateY(-2rem); }
.tri-row img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .tri { padding-top: 2.5rem; }
  .tri-row { gap: 0.6rem; padding-bottom: 2.5rem; }
  .tri-row figure { border-width: 4px; }
  .tri-row figure:nth-child(2) { transform: translateY(-1rem); }
}

/* ---------- Progress steps ---------- */
.pg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.pg-i { background: var(--cream); border-radius: var(--r-lg); padding: 1.6rem 1.4rem; }
.pg-bar { display: flex; gap: 5px; margin-bottom: 1.2rem; }
.pg-bar span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.pg-bar span.on { background: var(--tomato); }
.pg-i small { display: block; font-weight: 700; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 0.35rem; }
.pg-i h3 { font-size: 1.12rem; margin-bottom: 0.4rem; }
.pg-i p { color: var(--muted); font-size: 0.95rem; }
.pg-note { margin-top: 1.4rem; text-align: center; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 960px) { .pg { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pg { grid-template-columns: 1fr; } }

/* ---------- Car-free ---------- */
.sv-n .ey { color: var(--mint); }
.sv-n .h2 { color: var(--white); }
.sv-n .ld { color: rgba(255,255,255,0.82); }
.cf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.cf-c { background: var(--navy-soft); border-radius: var(--r-lg); padding: 1.9rem 1.6rem; }
.cf-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--mint); display: flex; align-items: center; justify-content: center; margin-bottom: 1.1rem; }
.cf-ic svg { width: 26px; height: 26px; stroke: var(--navy); }
.cf-c h3 { color: var(--white); font-size: 1.2rem; margin-bottom: 0.5rem; }
.cf-c p { color: rgba(255,255,255,0.8); font-size: 0.96rem; }
@media (max-width: 860px) { .cf { grid-template-columns: 1fr; } }

/* ---------- Stat tiles ---------- */
.st { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.st-c { background: var(--white); border-radius: var(--r-lg); padding: 1.7rem 1.4rem; border: 1px solid var(--line); }
.st-c b { display: block; font-family: var(--head); font-weight: 800; font-size: 2.2rem; color: var(--tomato); line-height: 1; margin-bottom: 0.6rem; }
.st-c h3 { font-size: 1.02rem; margin-bottom: 0.35rem; }
.st-c p { color: var(--muted); font-size: 0.93rem; }
@media (max-width: 960px) { .st { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .st { grid-template-columns: 1fr; } }

/* ---------- Conditions ---------- */
.cond { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
.cond-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cond-chips span { background: var(--mint-pale); border: 1px solid var(--mint); border-radius: 999px; padding: 0.45rem 0.95rem; font-size: 0.93rem; font-weight: 600; color: var(--navy); }
.cond-plus { background: var(--navy); border-radius: var(--r-lg); padding: 1.8rem; }
.cond-plus b { display: block; font-family: var(--head); font-size: 3rem; color: var(--mint); line-height: 0.9; margin-bottom: 0.4rem; }
.cond-plus h3 { color: var(--white); font-size: 1.2rem; margin-bottom: 0.5rem; }
.cond-plus p { color: rgba(255,255,255,0.8); font-size: 0.96rem; }
@media (max-width: 860px) { .cond { grid-template-columns: 1fr; gap: 1.6rem; } }

/* ---------- Local ---------- */
.lc { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.4rem; }
.lc-c { border-radius: var(--r-lg); padding: 2rem; }
.lc-c.a { background: var(--white); border: 2px solid var(--tomato); }
.lc-c.b { background: var(--mint-pale); }
.lc-c h3 { font-size: 1.35rem; margin-bottom: 0.3rem; }
.lc-c address { font-style: normal; font-weight: 700; color: var(--tomato-deep); margin-bottom: 0.7rem; }
.lc-c p { color: var(--muted); }
.lc-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--white); background: var(--tomato); border-radius: 999px; padding: 0.22rem 0.7rem; margin-bottom: 0.8rem; }
@media (max-width: 860px) { .lc { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.tq { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
.tq-c { background: var(--white); border-radius: var(--r-lg); padding: 2rem; border-left: 5px solid var(--mint-deep); }
.tq-c p { font-size: 1.07rem; margin-bottom: 1rem; }
.tq-c span { font-weight: 700; font-size: 0.9rem; color: var(--tomato-deep); }
@media (max-width: 860px) { .tq { grid-template-columns: 1fr; } }

/* ---------- Tabbed FAQ ---------- */
.tabs { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.tab { font-family: var(--body); font-weight: 700; font-size: 0.93rem; padding: 0.7rem 1.3rem; border-radius: 999px; border: 2px solid var(--navy); background: transparent; color: var(--navy); cursor: pointer; transition: background .2s, color .2s; }
.tab.on { background: var(--navy); color: var(--white); }
.panel { display: none; max-width: 860px; margin: 0 auto; }
.panel.on { display: block; }
.qa { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem 1.6rem; margin-bottom: 0.9rem; }
.qa h3 { font-family: var(--body); font-weight: 700; font-size: 1.04rem; color: var(--ink); margin-bottom: 0.4rem; letter-spacing: 0; }
.qa p { color: var(--muted); }
.qa a { color: var(--tomato-deep); font-weight: 700; }

/* ---------- Overview ---------- */
.ov { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3.5rem; align-items: start; }
.ov h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.ov h3:first-of-type { margin-top: 0; }
.ov p { color: var(--muted); line-height: 1.8; }
.ov a { color: var(--tomato-deep); font-weight: 700; }
.sr { background: var(--navy); border-radius: var(--r-lg); padding: 1.6rem; }
.sr h4 { font-family: var(--body); font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint); margin-bottom: 0.8rem; }
.sr a { display: block; padding: 0.9rem 0; border-top: 1px solid rgba(255,255,255,0.14); text-decoration: none; }
.sr a strong { display: block; color: var(--white); }
.sr a small { color: rgba(255,255,255,0.64); font-size: 0.86rem; }
.sr a:hover strong { color: var(--mint); }
@media (max-width: 860px) { .ov { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Closing ---------- */
.cl { background: var(--tomato); padding: 4.5rem 0; text-align: center; }
.cl h2 { color: var(--white); font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin-bottom: 0.6rem; }
.cl p { color: rgba(255,255,255,0.92); margin-bottom: 1.8rem; }

/* ---------- Footer ---------- */
footer { background: var(--navy); color: rgba(255,255,255,0.72); padding: 3.5rem 0 1.8rem; }
.fv { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.fv p { font-size: 0.92rem; line-height: 1.7; margin-top: 0.9rem; max-width: 24rem; color: rgba(255,255,255,0.62); }
footer h4 { font-family: var(--body); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--mint); margin-bottom: 0.9rem; }
footer ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
footer a { color: rgba(255,255,255,0.86); text-decoration: none; font-size: 0.94rem; }
footer a:hover { color: var(--mint); }
.fv-b { margin-top: 2.6rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.14); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; font-size: 0.84rem; color: rgba(255,255,255,0.5); }
@media (max-width: 860px) { .fv { grid-template-columns: 1fr; } }

/* ---------- Inner page header ---------- */
.ph { background: var(--mint-pale); padding: 3.5rem 0 3rem; border-bottom: 4px solid var(--tomato); }
.ph h1 { font-size: clamp(2.1rem, 3.6vw, 3rem); margin-bottom: 0.6rem; }
.ph p { color: var(--muted); max-width: 40rem; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease-out, transform .5s ease-out; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
