/* ============================================================
   Haverhill (MA) — Oxblood / Slate / Parchment / Gold
   Hero: text left, one portrait photo in an arch-topped frame on the
   right with a gold offset outline (nothing overlaps the photo)
   ============================================================ */

:root {
  --ox: #7A2233;
  --ox-deep: #5A1826;
  --ox-pale: #F7E8EA;
  --slate: #4A6378;
  --slate-deep: #33475A;
  --slate-soft: #E8EEF2;
  --gold: #D6AC56;
  --gold-pale: #FAF3E2;
  --parch: #F7F2E9;
  --white: #FFFFFF;
  --ink: #221E22;
  --muted: #625C60;
  --muted-2: #9E979B;
  --line: #E6DED2;
  --danger-bg: #FBEAE7;
  --danger-border: #E3A79B;
  --danger-text: #8A3A2A;
  --success-bg: #E9F5EE;
  --success-border: #9FCFB4;
  --success-text: #1F5C3D;
  --r: 8px;
  --r-lg: 16px;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--ink); background: var(--parch); line-height: 1.66; -webkit-font-smoothing: antialiased; font-size: 1.05rem; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; color: var(--ox-deep); line-height: 1.12; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.ch { max-width: 1140px; margin: 0 auto; padding: 0 2.5rem; }
.sh { padding: 5.5rem 0; }
.sh-w { background: var(--white); }
.sh-s { background: var(--slate-deep); }
.sh-g { background: var(--gold-pale); }
@media (max-width: 860px) { .ch { padding: 0 1.3rem; } .sh { padding: 3.5rem 0; } }

/* ---------- Nav ---------- */
nav { position: sticky; top: 0; z-index: 40; background: var(--ox-deep); border-bottom: 3px solid var(--gold); }
.nh { max-width: 1140px; margin: 0 auto; padding: 0.8rem 2.5rem; display: flex; align-items: center; justify-content: space-between; }
.nh-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nh-logo img { width: 42px; height: 42px; }
.nh-logo span { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--parch); }
.nh-links { list-style: none; display: flex; gap: 2rem; }
.nh-links a { text-decoration: none; font-weight: 600; font-size: 0.95rem; color: rgba(247,242,233,0.74); transition: color .2s; }
.nh-links a:hover { color: var(--parch); }
.nh-links a.active { color: var(--gold); }
.nh-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nh-btn span { width: 22px; height: 2px; background: var(--parch); border-radius: 2px; }
@media (max-width: 860px) {
  .nh { padding: 0.8rem 1.3rem; }
  .nh-links { position: fixed; top: 69px; left: 0; right: 0; background: var(--ox-deep); flex-direction: column; gap: 0; padding: 0.4rem 1.5rem 1.2rem; border-bottom: 3px solid var(--gold);
    opacity: 0; pointer-events: none; transform: translateY(-6px); transition: opacity .2s, transform .2s; }
  .nh-links.open { opacity: 1; pointer-events: auto; transform: none; }
  .nh-links li { padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nh-links li:last-child { border-bottom: none; }
  .nh-btn { display: flex; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 0.95rem 1.5rem; border-radius: var(--r); font-family: var(--sans);
  font-weight: 700; font-size: 0.97rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn-ox { background: var(--ox); color: var(--white); }
.btn-ox:hover { background: var(--ox-deep); }
.btn-gold { background: var(--gold); color: var(--ox-deep); }
.btn-gold:hover { background: #BE9440; color: var(--white); }
.btn-ol { background: transparent; color: var(--ox-deep); border-color: var(--ox); }
.btn-ol:hover { background: var(--ox); color: var(--white); }

/* ---------- Headings ---------- */
.ey { display: inline-block; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--slate); margin-bottom: 0.8rem; }
.h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); 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: arch frame ---------- */
.hero { padding: 4rem 0 4.5rem; }
.hero-g { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3.5rem; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 4.5vw, 3.8rem); margin-bottom: 1.2rem; }
.hero h1 em { font-style: italic; color: var(--slate); }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 31rem; margin-bottom: 2rem; }
.hero-b { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.ar { position: relative; max-width: 420px; width: 100%; margin-left: auto; }
.ar-img { aspect-ratio: 4 / 5; border-radius: 999px 999px var(--r-lg) var(--r-lg); overflow: hidden; background: var(--slate-soft); position: relative; z-index: 1; }
.ar-img img { width: 100%; height: 100%; object-fit: cover; }
.ar::before { content: ""; position: absolute; inset: -14px 14px 14px -14px; border-radius: 999px 999px var(--r-lg) var(--r-lg); border: 2px solid var(--gold); z-index: 0; }
@media (max-width: 860px) { .hero { padding: 2.5rem 0 3.5rem; } .hero-g { grid-template-columns: 1fr; gap: 2.8rem; } .ar { margin: 0 auto; max-width: 320px; } }

/* ---------- Fact strip ---------- */
.fs { background: var(--ox-deep); }
.fs-g { display: grid; grid-template-columns: repeat(4, 1fr); }
.fs-i { padding: 1.5rem 1.4rem; border-left: 1px solid rgba(255,255,255,0.1); }
.fs-i:first-child { border-left: none; }
.fs-i b { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--gold); }
.fs-i span { font-size: 0.9rem; color: rgba(247,242,233,0.75); }
@media (max-width: 860px) { .fs-g { grid-template-columns: 1fr 1fr; } .fs-i:nth-child(3) { border-left: none; } .fs-i:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,0.1); } }

/* ---------- Vertical timeline ---------- */
.vt { max-width: 820px; position: relative; padding-left: 2.6rem; }
.vt::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 3px; background: var(--line); }
.vt-i { position: relative; padding-bottom: 2.1rem; }
.vt-i:last-child { padding-bottom: 0; }
.vt-i::before { content: ""; position: absolute; left: -2.6rem; top: 4px; width: 25px; height: 25px; border-radius: 50%; background: var(--ox); border: 4px solid var(--white); box-shadow: 0 0 0 2px var(--ox); }
.vt-i small { display: block; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); margin-bottom: 0.25rem; }
.vt-i h3 { font-size: 1.4rem; margin-bottom: 0.35rem; }
.vt-i p { color: var(--muted); }

/* ---------- Tax-free explainer ---------- */
.sh-s .ey { color: var(--gold); }
.sh-s .h2 { color: var(--white); }
.sh-s .ld { color: rgba(255,255,255,0.84); }
.tf { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.tf-c { border-radius: var(--r-lg); padding: 2rem; }
.tf-c.yes { background: var(--white); }
.tf-c.no { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18); }
.tf-c small { display: inline-block; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; border-radius: 999px; padding: 0.25rem 0.75rem; margin-bottom: 0.9rem; }
.tf-c.yes small { background: var(--gold); color: var(--ox-deep); }
.tf-c.no small { background: rgba(255,255,255,0.12); color: var(--white); }
.tf-c h3 { font-size: 1.45rem; margin-bottom: 0.5rem; }
.tf-c.no h3 { color: var(--white); }
.tf-c p { color: var(--muted); }
.tf-c.no p { color: rgba(255,255,255,0.8); }
.tf-map { margin-top: 1.5rem; text-align: center; color: rgba(255,255,255,0.82); }
.tf-map a { color: var(--gold); font-weight: 700; }
@media (max-width: 860px) { .tf { 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(--white); border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 0.95rem; font-size: 0.93rem; font-weight: 600; color: var(--ox-deep); }
.cond-plus { background: var(--slate-soft); border-radius: var(--r-lg); padding: 1.8rem; border-left: 5px solid var(--slate); }
.cond-plus h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.cond-plus p { color: var(--muted); font-size: 0.97rem; }
@media (max-width: 860px) { .cond { grid-template-columns: 1fr; gap: 1.6rem; } }

/* ---------- Local ---------- */
.lc { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.lc-c { border-radius: var(--r-lg); padding: 2rem; }
.lc-c.a { background: var(--white); border: 1px solid var(--line); border-left: 6px solid var(--ox); }
.lc-c.b { background: var(--slate-soft); }
.lc-c h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.lc-c p { color: var(--muted); }
.lc-c a { color: var(--ox); font-weight: 700; }
@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-top: 4px solid var(--gold); }
.tq-c p { font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.5; margin-bottom: 1rem; color: var(--ink); }
.tq-c span { font-weight: 700; font-size: 0.9rem; color: var(--slate); }
@media (max-width: 860px) { .tq { grid-template-columns: 1fr; } }

/* ---------- Two-column accordion ---------- */
.a2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.4rem; align-items: start; }
.a2 details { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); }
.a2 summary { list-style: none; cursor: pointer; padding: 1.15rem 2.8rem 1.15rem 1.3rem; font-weight: 700; font-size: 1.03rem; color: var(--ox-deep); position: relative; }
.a2 summary::-webkit-details-marker { display: none; }
.a2 summary::after { content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--slate); }
.a2 details[open] summary::after { content: "\2212"; }
.a2 details p { padding: 0 1.3rem 1.2rem; color: var(--muted); }
.a2 a { color: var(--ox); font-weight: 700; }
@media (max-width: 860px) { .a2 { grid-template-columns: 1fr; } }

/* ---------- Overview ---------- */
.ov { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3.5rem; align-items: start; }
.ov h3 { font-size: 1.35rem; 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(--ox); font-weight: 700; }
.sr { background: var(--white); border: 2px solid var(--ox); border-radius: var(--r-lg); overflow: hidden; }
.sr h4 { background: var(--ox); color: var(--gold-pale); font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 1rem 1.3rem; }
.sr a { display: block; padding: 1rem 1.3rem; border-top: 1px solid var(--line); text-decoration: none; }
.sr a:first-of-type { border-top: none; }
.sr a strong { display: block; color: var(--ox-deep); }
.sr a small { color: var(--muted-2); font-size: 0.86rem; }
.sr a:hover { background: var(--gold-pale); }
@media (max-width: 860px) { .ov { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Closing ---------- */
.cl { background: var(--ox); padding: 4.5rem 0; }
.cl-in { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.cl h2 { color: var(--white); font-size: clamp(2rem, 3.4vw, 2.7rem); max-width: 34rem; }
.cl p { color: rgba(255,255,255,0.88); margin-top: 0.4rem; }

/* ---------- Footer ---------- */
footer { background: var(--ox-deep); color: rgba(255,255,255,0.72); padding: 3.5rem 0 1.8rem; }
.fh { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.fh p { font-size: 0.93rem; line-height: 1.7; margin-top: 0.9rem; max-width: 24rem; color: rgba(255,255,255,0.62); }
footer h4 { font-family: var(--sans); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); 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.95rem; }
footer a:hover { color: var(--gold); }
.fh-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.86rem; color: rgba(255,255,255,0.5); }
@media (max-width: 860px) { .fh { grid-template-columns: 1fr; } }

/* ---------- Inner page header ---------- */
.ph { background: var(--slate-soft); padding: 3.5rem 0 3rem; border-bottom: 3px solid var(--gold); }
.ph h1 { font-size: clamp(2.2rem, 3.8vw, 3.2rem); 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; } }
