/* ============================================================
   Revere (MA) — Ocean / Coral / Sand / Navy
   Hero: 3 landscape photos crossfading full-width (4s each, 12s cycle)
   behind a soft ocean overlay, with centered text
   ============================================================ */

:root {
  --ocean: #1F6FA0;
  --ocean-deep: #16527A;
  --ocean-soft: #E4F0F7;
  --coral: #F2785C;
  --coral-deep: #D65A3E;
  --coral-pale: #FDEDE7;
  --sand: #EBD8B0;
  --sand-pale: #FAF4E8;
  --navy: #162D48;
  --white: #FFFFFF;
  --ink: #18222E;
  --muted: #58626E;
  --muted-2: #97A0AB;
  --line: #E5E0D4;
  --danger-bg: #FBEAE7;
  --danger-border: #E3A79B;
  --danger-text: #8A3A2A;
  --success-bg: #E9F5EE;
  --success-border: #9FCFB4;
  --success-text: #1F5C3D;
  --r: 12px;
  --r-lg: 20px;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Outfit', -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(--sand-pale); line-height: 1.64; -webkit-font-smoothing: antialiased; font-size: 1.04rem; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; color: var(--navy); line-height: 1.08; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.cr { max-width: 1140px; margin: 0 auto; padding: 0 2.5rem; }
.sr2 { padding: 5.5rem 0; }
.sr2-w { background: var(--white); }
.sr2-n { background: var(--navy); }
.sr2-o { background: var(--ocean-soft); }
@media (max-width: 860px) { .cr { padding: 0 1.3rem; } .sr2 { padding: 3.5rem 0; } }

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

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 0.95rem 1.55rem; border-radius: 999px; font-family: var(--sans);
  font-weight: 600; font-size: 0.97rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn-coral { background: var(--coral); color: var(--white); }
.btn-coral:hover { background: var(--coral-deep); }
.btn-ocean { background: var(--ocean); color: var(--white); }
.btn-ocean:hover { background: var(--ocean-deep); }
.btn-wl { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.85); }
.btn-wl:hover { background: var(--white); color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: #0C1B2D; }

/* ---------- Headings ---------- */
.ey { display: inline-block; font-weight: 600; font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--coral-deep); margin-bottom: 0.9rem; }
.h2 { font-size: clamp(2.3rem, 4vw, 3.3rem); 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: full-bleed crossfade ---------- */
.xf { position: relative; min-height: clamp(540px, 82vh, 760px); display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--ocean-deep); }
.xf-s { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; animation: xfade 12s infinite; }
.xf-s:nth-child(1) { animation-delay: 0s; }
.xf-s:nth-child(2) { animation-delay: 4s; }
.xf-s:nth-child(3) { animation-delay: 8s; }
@keyframes xfade { 0% { opacity: 0; } 8% { opacity: 1; } 33.33% { opacity: 1; } 41.33% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .xf-s { animation: none; } .xf-s:first-child { opacity: 1; } }
.xf-ov { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,45,72,0.60) 0%, rgba(22,45,72,0.42) 50%, rgba(22,82,122,0.75) 100%); }
.xf-in { position: relative; z-index: 2; text-align: center; max-width: 860px; padding: 0 2rem; }
.xf-in .ey { color: #FFC3B3; }
.xf-in h1 { color: var(--white); font-size: clamp(3rem, 6vw, 5.2rem); margin-bottom: 1.2rem; }
.xf-in h1 em { color: #FFC3B3; }
.xf-in p { color: rgba(255,255,255,0.93); font-size: 1.12rem; max-width: 36rem; margin: 0 auto 2.2rem; }
.xf-b { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Numbered step cards ---------- */
.nc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.nc-i { background: var(--sand-pale); border-radius: var(--r-lg); padding: 1.7rem 1.4rem; position: relative; overflow: hidden; }
.nc-i::before { content: attr(data-n); position: absolute; right: 0.8rem; top: -0.6rem; font-family: var(--serif); font-size: 5.5rem; color: var(--sand); line-height: 1; }
.nc-i h3 { font-size: 1.6rem; margin-bottom: 0.4rem; position: relative; }
.nc-i p { color: var(--muted); font-size: 0.96rem; position: relative; }
.nc-note { margin-top: 1.4rem; text-align: center; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 960px) { .nc { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .nc { grid-template-columns: 1fr; } }

/* ---------- Beach, car & card ---------- */
.sr2-n .ey { color: var(--coral); }
.sr2-n .h2 { color: var(--white); }
.sr2-n .ld { color: rgba(255,255,255,0.82); }
.rl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.rl-c { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.16); border-radius: var(--r-lg); padding: 1.9rem 1.6rem; }
.rl-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--coral); display: flex; align-items: center; justify-content: center; margin-bottom: 1.1rem; }
.rl-ic svg { width: 26px; height: 26px; stroke: var(--white); }
.rl-c h3 { color: var(--white); font-size: 1.7rem; margin-bottom: 0.5rem; }
.rl-c p { color: rgba(255,255,255,0.82); font-size: 0.97rem; }
.rl-note { color: rgba(255,255,255,0.6); font-size: 0.88rem; margin-top: 1.3rem; }
.rl-note a { color: var(--coral); font-weight: 600; }
@media (max-width: 860px) { .rl { grid-template-columns: 1fr; } }

/* ---------- Nearest counter ---------- */
.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(--ocean); }
.lc-c.b { background: var(--coral-pale); }
.lc-c h3 { font-size: 1.9rem; margin-bottom: 0.3rem; }
.lc-c address { font-style: normal; font-weight: 600; color: var(--ocean); margin-bottom: 0.7rem; }
.lc-c p { color: var(--muted); }
.lc-c a { color: var(--ocean-deep); font-weight: 600; }
@media (max-width: 860px) { .lc { grid-template-columns: 1fr; } }

/* ---------- Compare table ---------- */
.cmp-wrap { overflow-x: auto; }
.cmp { width: 100%; min-width: 620px; border-collapse: separate; border-spacing: 0; background: var(--white); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.cmp th, .cmp td { text-align: left; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); }
.cmp thead th { font-weight: 600; font-size: 0.86rem; letter-spacing: 0.05em; text-transform: uppercase; background: var(--navy); color: var(--white); }
.cmp thead th.hl { background: var(--ocean); }
.cmp tbody td:first-child { font-weight: 600; color: var(--navy); width: 30%; }
.cmp tbody td.hl { background: var(--ocean-soft); font-weight: 500; }
.cmp tbody tr:last-child td { border-bottom: none; }

/* ---------- 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: 500; color: var(--navy); }
.cond-plus { background: var(--ocean); border-radius: var(--r-lg); padding: 1.8rem; }
.cond-plus h3 { color: var(--white); font-size: 1.6rem; margin-bottom: 0.5rem; }
.cond-plus p { color: rgba(255,255,255,0.86); font-size: 0.97rem; }
@media (max-width: 860px) { .cond { grid-template-columns: 1fr; gap: 1.6rem; } }

/* ---------- Testimonials ---------- */
.t3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.t3-c { background: var(--white); border-radius: var(--r-lg); padding: 1.8rem; border-bottom: 5px solid var(--coral); }
.t3-c p { font-family: var(--serif); font-size: 1.3rem; line-height: 1.4; margin-bottom: 1rem; color: var(--ink); }
.t3-c span { font-weight: 600; font-size: 0.88rem; color: var(--ocean); }
@media (max-width: 860px) { .t3 { grid-template-columns: 1fr; } }

/* ---------- Accordion ---------- */
.ac { max-width: 880px; margin: 0 auto; }
.ac details { background: var(--white); border-left: 4px solid var(--line); border-radius: var(--r); margin-bottom: 0.7rem; }
.ac details[open] { border-left-color: var(--coral); }
.ac summary { list-style: none; cursor: pointer; padding: 1.15rem 3rem 1.15rem 1.4rem; font-weight: 600; font-size: 1.05rem; color: var(--navy); position: relative; }
.ac summary::-webkit-details-marker { display: none; }
.ac summary::after { content: "+"; position: absolute; right: 1.3rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--coral-deep); }
.ac details[open] summary::after { content: "\2212"; }
.ac details p { padding: 0 1.4rem 1.3rem; color: var(--muted); }
.ac a { color: var(--ocean-deep); font-weight: 600; }

/* ---------- Overview ---------- */
.ov { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3.5rem; align-items: start; }
.ov h3 { font-size: 1.7rem; 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(--ocean-deep); font-weight: 600; }
.sl { background: var(--navy); border-radius: var(--r-lg); padding: 1.6rem; }
.sl h4 { font-family: var(--sans); font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--coral); margin-bottom: 0.8rem; }
.sl a { display: block; padding: 0.9rem 0; border-top: 1px solid rgba(255,255,255,0.14); text-decoration: none; }
.sl a strong { display: block; color: var(--white); font-weight: 600; }
.sl a small { color: rgba(255,255,255,0.64); font-size: 0.86rem; }
.sl a:hover strong { color: var(--coral); }
@media (max-width: 860px) { .ov { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Closing ---------- */
.fin { background: var(--coral); padding: 4.5rem 0; text-align: center; }
.fin h2 { color: var(--white); font-size: clamp(2.3rem, 4vw, 3.2rem); margin-bottom: 0.6rem; }
.fin 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; }
.fr { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.fr 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(--sans); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--coral); 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(--coral); }
.fr-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) { .fr { grid-template-columns: 1fr; } }

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