/* Self-hosted, no third-party requests. Source Serif 4 for display type — its
   classical serif echoes the logo's engraved wordmark, so modernizing the type
   reinforces the existing brand rather than fighting it. Source Sans 3 for body:
   large x-height and open apertures, which matters for a 65+ audience. */
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* Senior Plan Advisors — modeled on the original seniorplanadvisors.com:
   boxed white content on a gray page, blue header band, navy uppercase page
   titles with a rule, red serif accent. Modernized where the original hurt
   readability — see "Deliberate departures" at the bottom. */

:root {
  --blue: #3d6cb0;          /* header / nav band */
  --blue-dark: #305a96;     /* hover, footer bar */
  --navy: #1f5c9e;          /* logo blue, headings */
  --navy-deep: #17456f;
  --red: #c0272d;           /* the "TRUSTED. RELIABLE." accent */
  --ink: #3f4448;           /* body text */
  --muted: #6b7280;
  --page: #eceef0;          /* gray behind the boxed content */
  --line: #e0e4e8;
  --soft: #f5f7f9;
  --shell: 1180px;
  --gutter: clamp(1rem, 4vw, 2.75rem);

  --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--font-sans);
  font-synthesis-weight: none;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); }
a:hover { color: var(--blue-dark); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: #fff; padding: .75rem 1rem;
}
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ---------- shell / layout ---------- */
.shell {
  max-width: var(--shell);
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 24px rgba(0,0,0,.07);
}
.wrap { max-width: 1010px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- ticker ---------- */
.ticker {
  background: var(--navy-deep); color: #fff;
  font-size: .9375rem; text-align: center; padding: .5rem 0;
}
.ticker a { color: #fff; font-weight: 600; white-space: nowrap; display: inline-block; }

/* ---------- header + nav ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
/* Header contents share the same measure as the page body, so the logo, the nav
   and the page heading all start on one left edge. */
.header-inner {
  max-width: 1010px; margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center;
}
.brand { padding: 1.15rem 0; display: block; line-height: 0; }
.brand img { width: clamp(230px, 40vw, 420px); height: auto; }

/* The header's right-hand side was empty white space. Giving it the phone number
   balances the band, and it earns its place: this audience calls rather than
   fills in forms. The phone was removed from the ticker above so it isn't
   repeated twice in the same 100px. */
.header-contact { margin-left: auto; text-align: right; }
.header-contact__phone {
  display: block; font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem); color: var(--navy-deep);
  text-decoration: none; letter-spacing: .01em;
}
.header-contact__phone:hover { color: var(--blue); text-decoration: underline; }
.header-contact__meta { display: block; font-size: .85rem; color: var(--muted); margin-top: .15rem; }

.nav-toggle {
  margin-left: auto;
  width: 46px; height: 46px; display: none;
  background: none; border: 2px solid var(--blue); border-radius: 4px;
  cursor: pointer;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block; width: 22px; height: 2px; background: var(--blue); margin: 0 auto;
  content: ""; position: relative;
}
.nav-toggle__bar::before { top: -7px; }
.nav-toggle__bar::after { top: 5px; }

.nav { flex: 1 0 100%; background: var(--blue); }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul {
  display: flex; flex-wrap: wrap; align-items: center;
  max-width: 1010px; margin: 0 auto; padding: 0 var(--gutter);
}
.nav__item { position: relative; }
.nav__item > a {
  display: block; color: #fff; text-decoration: none;
  padding: .9rem .85rem; font-size: .97rem; letter-spacing: .012em;
}
@media (min-width: 861px) { .nav > ul > .nav__item:first-child > a { padding-left: 0; } }
.nav__item > a:hover { color: #fff; background: var(--blue-dark); }
.nav__item > a[aria-current="page"] { box-shadow: inset 0 -3px 0 #fff; }

.nav__expand {
  position: absolute; right: -2px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: 0; background: none; cursor: pointer;
}
.nav__expand::after {
  content: ""; display: block; width: 7px; height: 7px; margin: 0 auto;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(-2px,-2px);
}
.nav__submenu {
  position: absolute; left: 0; top: 100%; min-width: 230px; z-index: 20;
  background: var(--blue-dark); display: none; box-shadow: 0 6px 18px rgba(0,0,0,.2);
}
.nav__submenu a {
  display: block; color: #fff; text-decoration: none; padding: .7rem 1rem;
  font-size: .96rem;
}
.nav__submenu a:hover { color: #fff; background: var(--navy-deep); }
.nav__item--has-sub > a { padding-right: 1.9rem; }
.nav__item--has-sub:hover .nav__submenu,
.nav__item--has-sub:focus-within .nav__submenu { display: block; }

/* ---------- page title ---------- */
.page-title { padding: clamp(1.75rem, 5vw, 3rem) 0 0; }
.page-title h1 {
  margin: 0 0 .6rem;
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.85rem, 4.6vw, 2.45rem);
  letter-spacing: .045em; text-transform: uppercase;
  color: var(--navy-deep); line-height: 1.18;
}
/* Short rule directly under the heading, matching the original .com treatment.
   It must hang off the h1 (not .page-title) so it aligns to the text, not the page. */
.page-title h1::after {
  content: ""; display: block; width: 74px; height: 3px;
  background: var(--line); margin-top: .85rem;
}
.page-title .wrap > p { color: var(--muted); margin: 0 0 .5rem; }
/* A page title already carries its own bottom space; don't stack the section's
   padding on top of it. */
.page-title + .section { padding-top: 1.25rem; }

/* ---------- sections + prose ---------- */
.section { padding: clamp(1.5rem, 4vw, 2.5rem) 0; }
.section--soft { background: var(--soft); }
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  font-family: var(--font-serif); font-weight: 600;
  color: var(--navy-deep); letter-spacing: 0;
  font-size: clamp(1.35rem, 3vw, 1.65rem); margin: 2.25rem 0 .55rem;
  line-height: 1.25;
}
.prose h3 {
  color: var(--navy-deep); font-weight: 600;
  font-size: 1.08rem; margin: 1.6rem 0 .35rem; letter-spacing: .005em;
}
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin: .35rem 0; }
.prose strong { color: var(--navy-deep); }

/* ---------- callout ---------- */
.callout {
  border-left: 4px solid var(--blue);
  background: var(--soft);
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
}
.callout > *:first-child { margin-top: 0; }
.callout > *:last-child { margin-bottom: 0; }
.callout__label {
  display: block; text-transform: uppercase; letter-spacing: .07em;
  font-size: .78rem; font-weight: 700; color: var(--red); margin-bottom: .3rem;
}

/* ---------- phase / step cards ---------- */
.cards { display: grid; gap: 1rem; margin: 1.5rem 0; }
@media (min-width: 720px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  border: 1px solid var(--line); border-top: 4px solid var(--blue);
  padding: 1.1rem 1.15rem; background: #fff;
}
.card h3 { margin: 0 0 .35rem; color: var(--navy-deep); font-size: 1.05rem; font-weight: 600; }
.card p { margin: 0; }
.card__num {
  display: inline-block; font-size: .78rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: .25rem;
}

/* ---------- figures / tables ---------- */
/* position:relative is load-bearing, not decorative. The .visually-hidden spans
   inside table cells are position:absolute; an overflow container only clips
   absolutely-positioned descendants if it is itself positioned. Without this the
   spans keep their static position out at ~700px and drag the whole DOCUMENT
   into horizontal scroll, even though the table itself scrolls correctly. */
.table-scroll { overflow-x: auto; margin: 1.5rem 0; position: relative; }
table { border-collapse: collapse; width: 100%; min-width: 420px; }
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
th { background: var(--soft); color: var(--navy-deep); font-weight: 600; }

/* Benefit matrix: 10 plan columns. Kept narrow enough (~760px) to fit the
   content column on desktop without scrolling; scrolls inside .table-scroll on
   smaller screens. Column headers are the plan LETTER only — "Plan C †" wrapped
   onto two lines and made the whole grid bloated. */
.table--matrix { min-width: 760px; font-size: .95rem; }
.table--matrix td { text-align: center; white-space: nowrap; padding: .55rem .4rem; }
.table--matrix thead th {
  text-align: center; white-space: nowrap; padding: .55rem .4rem; width: 52px;
}
.table--matrix thead th abbr { text-decoration: none; border-bottom: 0; cursor: help; }
/* Superscript, smaller, and spaced off the letter — at full size it collided
   with the plan letter. line-height:0 keeps it from growing the header row. */
.matrix__dagger {
  font-size: .7em; margin-left: .22em; vertical-align: super; line-height: 0;
  color: var(--muted); font-weight: 400;
}
.table--matrix th[scope="row"] {
  text-align: left; font-weight: 500; width: 240px; padding: .55rem .8rem;
}
.matrix__dagger { color: var(--muted); font-weight: 400; }

/* ---------- buttons + CTA ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; /* form <button> fell just under the tap-target minimum */
  background: var(--blue); color: #fff;
  padding: .7rem 1.6rem; border: 0; border-radius: 3px; cursor: pointer;
  font-size: 1rem; text-decoration: none;
}
.btn:hover { background: var(--blue-dark); color: #fff; }
.cta {
  background: var(--navy-deep); color: #fff; text-align: center;
  padding: clamp(1.75rem, 5vw, 2.75rem) 0;
}
.cta h2 { margin: 0 0 .5rem; font-family: var(--font-serif); font-weight: 600; color: #fff; letter-spacing: .01em; }
.cta p { margin: 0 0 1.25rem; }
.cta a:not(.btn) { color: #fff; }
.cta .btn { background: #fff; color: var(--navy-deep); font-weight: 600; }
.cta .btn:hover { background: var(--soft); color: var(--navy-deep); }

/* Standalone contact links in body copy. Broken out of the sentence so each
   tel:/mailto: is a real 44px tap target rather than an inline word. */
.contact-lines { list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.contact-lines li { margin: .1rem 0; }
.contact-lines a { display: inline-block; font-weight: 600; }

/* ---------- home hero ----------
   Replaces the original's four-image stock-photo slider. Keeps its red serif
   "Trusted. Reliable. Experienced." line, which is the one bit of the old hero
   with any character. A photo slot goes here once the client sends one. */
.hero {
  background: linear-gradient(180deg, #f6f8fa 0%, #eef2f6 100%);
  border-bottom: 1px solid var(--line);
  padding: clamp(2rem, 6vw, 3.75rem) 0;
}
.hero__accent {
  margin: 0 0 .55rem; color: var(--red);
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.05rem, 2.6vw, 1.4rem); letter-spacing: .04em;
}
.hero h1 {
  margin: 0 0 .8rem; color: var(--navy-deep);
  font-family: var(--font-serif); font-weight: 600;
  text-transform: uppercase; letter-spacing: .045em;
  font-size: clamp(1.95rem, 5vw, 2.7rem); line-height: 1.12;
}
.hero__lede { margin: 0 0 1.5rem; max-width: 44rem; font-size: 1.1rem; }
.hero__grid { display: grid; gap: 1.75rem; align-items: center; }
@media (min-width: 880px) { .hero__grid { grid-template-columns: 1.3fr .7fr; } }
/* The source JPEG has marketing text burned into its right-hand side. Cropping
   to the left portion shows only the photograph; the wording lives in .hero__accent
   as real text. object-position keeps the couple in frame at every width. */
.hero__media { overflow: hidden; border-radius: 4px; }
.hero__media img {
  display: block; width: 100%; height: 260px;
  object-fit: cover; object-position: 0% center;
}
@media (max-width: 879px) { .hero__media img { height: 300px; } }
.hero__services {
  margin: 0 0 1.4rem; color: var(--muted);
  font-size: .92rem; letter-spacing: .07em; text-transform: uppercase;
}
.hero__actions { margin: 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.btn--ghost {
  background: transparent; color: var(--navy-deep);
  box-shadow: inset 0 0 0 2px var(--navy-deep);
}
.btn--ghost:hover { background: var(--navy-deep); color: #fff; }

.section__title {
  margin: 0 0 1.25rem; color: var(--navy-deep);
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
}
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }

/* ---------- client quotes ---------- */
.quote {
  margin: 0; background: #fff; border: 1px solid var(--line);
  border-top: 4px solid var(--blue); padding: 1.2rem 1.25rem;
  display: flex; flex-direction: column;
}
.quote blockquote { margin: 0 0 .8rem; flex: 1; }
.quote blockquote p { margin: 0; font-family: var(--font-serif); font-size: 1.02rem; line-height: 1.55; }
.quote figcaption { font-weight: 600; color: var(--navy-deep); font-size: .93rem; }
.quote figcaption span { font-weight: 400; color: var(--muted); }

/* ---------- homepage local presence band ---------- */
.local-band { display: grid; gap: 1.75rem; align-items: start; }
@media (min-width: 780px) { .local-band { grid-template-columns: 1.6fr .9fr; } }
.local-band__nap { line-height: 1.9; }
.local-band__links a { display: block; margin: .3rem 0; font-weight: 600; }
.local-band__aside {
  background: #fff; border: 1px solid var(--line);
  padding: 1.25rem 1.35rem; text-align: center;
}
.local-band__stars { margin: 0 0 .35rem; color: #e8a33d; font-size: 1.3rem; letter-spacing: .12em; }

/* ---------- contact block + form ---------- */
.contact-block { background: var(--soft); border-top: 1px solid var(--line); padding: clamp(1.75rem, 5vw, 2.75rem) 0; }
.contact-block h2 { margin: 0 0 .6rem; color: var(--navy-deep); font-family: var(--font-serif); font-weight: 600; }
.contact-block__grid { display: grid; gap: 2rem; }
@media (min-width: 820px) { .contact-block__grid { grid-template-columns: 1fr 1.1fr; } }

.contact-details { display: grid; gap: 1.5rem; margin: 1.5rem 0; }
@media (min-width: 700px) { .contact-details { grid-template-columns: 1fr 1fr; } }
.contact-details h2 { margin-top: 0; }

.contact-form label { display: block; margin: 0 0 .85rem; font-size: .95rem; color: var(--navy-deep); }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; margin-top: .3rem;
  padding: .7rem .75rem; font: inherit; color: var(--ink);
  border: 1px solid #c6cdd5; border-radius: 3px; background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue); }
.contact-form__row { display: grid; gap: 0 1rem; }
@media (min-width: 520px) { .contact-form__row { grid-template-columns: 1fr 1fr; } }
.contact-form__status { margin: .85rem 0 0; padding: .7rem .8rem; border-radius: 3px; }
.contact-form__status.is-success { background: #e6f4ea; color: #1e4620; }
.contact-form__status.is-error { background: #fdecea; color: #7f1d1d; }

/* ---------- map ---------- */
.map-embed { position: relative; padding-top: 56.25%; margin: 1rem 0; border: 1px solid var(--line); }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- fine print ---------- */
.fineprint { font-size: .875rem; color: var(--muted); line-height: 1.6; }
.reviewed { font-size: .8125rem; color: var(--muted); margin-top: 1.25rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-top: 2.25rem; }
.site-footer__grid { display: grid; gap: 2rem; padding-bottom: 1.5rem; }
@media (min-width: 780px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { text-align: center; border-left: 1px solid var(--line); padding-left: 2rem; }
}
.site-footer h2 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: 1.1rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--navy-deep); margin: 0 0 .75rem;
}
.footer-nap { margin: 0 0 .75rem; line-height: 1.9; }
.address-block { margin: 0 0 .75rem; line-height: 1.65; }
.footer-nap a { display: inline-block; }
.footer-hours, .footer-tagline { margin: 0 0 .4rem; color: var(--muted); }
.footer-tagline { font-style: italic; }
.site-footer__brand img { width: 300px; }
.footer-copy { margin: .75rem 0 .35rem; font-weight: 600; color: var(--navy-deep); }
.footer-links { margin: 0; }

.disclaimer {
  border-top: 1px solid var(--line); margin-top: .5rem;
  padding-top: 1.25rem; padding-bottom: 2rem;
  font-size: .8125rem; color: var(--muted); line-height: 1.6;
}
.disclaimer p { margin: 0 0 .6rem; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; flex: 0 0 auto; }
  /* Not enough width for logo + phone + hamburger; the phone stays reachable in
     the nav, the hero, the footer and every CTA. */
  .header-contact { display: none; }
  /* Let the logo use the full width the toggle leaves behind — at 390px it was
     sitting at 230px inside a 328px box, small for a 65+ audience. Capped at 300px
     so it stays under the source image's native 489px and doesn't go soft. */
  .brand { flex: 1 1 auto; min-width: 0; padding: .85rem 0; }
  .brand img { width: 100%; max-width: 258px; }
  .nav { display: none; }
  .nav.is-open { display: block; }
  .nav > ul { display: block; max-width: none; padding: 0 0 .5rem; }
  .nav__item > a { padding: .95rem var(--gutter); border-top: 1px solid rgba(255,255,255,.18); }
  .nav__item > a[aria-current="page"] { box-shadow: inset 4px 0 0 #fff; }
  .nav__expand { right: .75rem; width: 44px; height: 44px; }
  .nav__submenu { position: static; display: none; box-shadow: none; min-width: 0; }
  .nav__submenu.is-open { display: block; }
  .nav__item--has-sub:hover .nav__submenu { display: none; }
  .nav__item--has-sub:hover .nav__submenu.is-open { display: block; }
  .nav__submenu a { padding-left: clamp(2rem, 8vw, 3.5rem); }

  /* Touch only. Sized to ~37px rather than 44px: 44 is the AAA target (WCAG
     2.5.5) and at this font size it forced double-spaced rows that read as
     broken. 37px clears the AA requirement of 24px (2.5.8) comfortably, and the
     phone is a large button in the header, the hero and every CTA anyway. */
  /* line-height alone sizes these. Adding padding on top made each link 49px
     tall inside 37px rows, so adjacent tap zones overlapped. */
  .footer-nap { line-height: 2.2; }
  .contact-lines li { margin: .35rem 0; }
  .contact-lines a { padding: .55rem 0; }
  .ticker a { padding: .5rem .35rem; }
}

/* ---------- Deliberate departures from the original .com ----------
   1. Body text was a very light gray (~#8a8a8a) on white — below AA contrast.
      Darkened to --ink. This audience is 65+; legibility beats fidelity.
   2. The original is fixed-width and unusable on a phone. Everything here is
      fluid, tap targets are >=44px, and tables scroll inside .table-scroll
      rather than forcing the page sideways.
   3. Nav gained one dropdown ("Learn") to hold the three revived orphan pages
      without breaking Jason's familiar top-level order.
   Everything else intentionally tracks the original. */

/* Contact page already lists phone/email/address above the form, so the block
   collapses to a single column there rather than repeating them. */
.contact-block__grid--single { grid-template-columns: 1fr; max-width: 640px; }
