/* PeakYears website. Brand: green #1F4D3A, rust #A3471F, cream #F7F1E6, page beige #F0E8DB. Type: Figtree + Atkinson Hyperlegible Next. */
:root {
  --green: #1F4D3A;
  --green-dark: #163a2b;
  --green-mid: #2F6B4F;
  --rust: #A3471F;
  --cream: #F7F1E6;
  --page: #F0E8DB; /* the page background: a little darker than cream (November 14, 2026) */
  --paper: #FFFDF8;
  --mint: #E5EFE7;
  --sand: #F1E6D2;
  --ink: #1D1A16;
  --ink-2: #3F382F;
  --muted: #5B5246;
  --line: #E4DAC8;
  --field-line: #8A7C66;
  --error: #A6261C;
  --error-bg: #FBEAE7;
  --ok-bg: #E5EFE7;
  --display: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.5;
}
img, svg { display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--rust); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 720px; }
@media (max-width: 380px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: 12px; top: -80px; z-index: 10; background: var(--green); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; }
.skip:focus { top: 12px; color: #fff; }

.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 24px; border-radius: 14px; border: 2px solid transparent;
  font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.2;
  text-decoration: none; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-primary:disabled { background: #6F8A7D; cursor: wait; }
.btn-secondary { background: var(--paper); color: var(--green); border-color: var(--green); }
.btn-secondary:hover { background: var(--mint); color: var(--green-dark); }
.btn-block { width: 100%; }

/* Header */
.top { padding: 14px 0; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 48px; }
.logo { flex: none; width: 56px; height: 56px; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -0.01em; color: var(--green); }
.btn-contact { min-height: 48px; padding: 0 16px; font-size: 18px; background: var(--green); color: #fff; white-space: nowrap; }
.btn-contact:hover { background: var(--green-dark); color: #fff; }
.btn-contact .i { width: 22px; height: 22px; }
.contact-word { display: none; }
/* The number needs a wide header: smaller screens say "Call us", and phones just "Call". */
@media (max-width: 699px) {
  .contact-full { display: none; }
  .contact-word { display: inline; }
}
@media (max-width: 539px) {
  .contact-us { display: none; }
}

/* Hero */
.hero { position: relative; padding: 28px 0 0; }
.hero h1 { font-size: clamp(42px, 10.5vw, 76px); line-height: 1.03; letter-spacing: -0.02em; font-weight: 700; max-width: 12em; }
.green { color: var(--green); }
.lede { margin-top: 18px; font-size: clamp(20px, 2.6vw, 24px); line-height: 1.4; color: var(--ink-2); max-width: 34em; }
/* What sets PeakYears apart from home care agencies, right under the first sentence (Nov 23, 2026).
   Each promise stays on one line; on phones they stack. */
.promise { margin-top: 12px; font-size: clamp(20px, 2.6vw, 24px); line-height: 1.4; font-weight: 700; color: var(--green-dark); max-width: 34em; }
.promise span { white-space: nowrap; }
.soon-note { margin: 18px 0 0; padding: 12px 16px; max-width: 34em; border-radius: 12px; background: var(--mint); color: var(--green-dark); font-size: 18px; line-height: 1.45; }
.soon-note strong { color: var(--green); }
/* Until PeakYears opens to families, the "opening soon" parts show. site.js adds .is-open once it's open. */
html.is-open [data-when="soon"], html:not(.is-open) [data-when="open"] { display: none; }
.hero-actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { flex: 1 1 220px; max-width: 320px; }
@media (max-width: 520px) { .hero-actions .btn { max-width: none; } }
.facts { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-2); font-size: 18px; }
/* Each fact is one run of text after its dot, so a long one wraps as a sentence on phones (not side by side). */
.facts li { position: relative; padding-left: 16px; }
.facts li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--rust); }
/* Forest and mountains at the bottom of the hero (Nov 14, 2026). The drawing is 6:1; on phones it's taller
   than that and trims its sides, so the trees stay big enough to see. */
.mountains { display: block; width: 100%; height: clamp(104px, 16.67vw, 320px); margin-top: 36px; }

/* Sections */
.section { padding: 56px 0; }
.section-paper { background: var(--paper); }
.section-mint { background: var(--mint); }
.section-form { background: var(--paper); border-top: 2px solid var(--line); }
.section-form:focus { outline: none; }
.eyebrow { font-size: 16px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rust); }
.section h2 { margin-top: 8px; font-size: clamp(30px, 5vw, 42px); line-height: 1.12; letter-spacing: -0.01em; }
.section-lede { margin-top: 12px; font-size: 20px; color: var(--ink-2); max-width: 36em; }

/* Service tiles */
.tiles { margin-top: 26px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.tile { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 20px; }
/* Little drawings on the help cards and the family features (Nov 14, 2026): flat brand colors with a soft
   dark-green outline on a round tinted backdrop, 64 x 64. */
.tile .spot, .features .spot { flex: none; width: 64px; height: 64px; }
.tile h3 { font-size: 21px; line-height: 1.2; }
.tile p { margin-top: 3px; color: var(--muted); font-size: 17.5px; line-height: 1.4; }

/* How it works */
.steps { margin-top: 26px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: how; }
.steps li { counter-increment: how; position: relative; padding: 20px 20px 22px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { content: counter(how); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; font-family: var(--display); font-weight: 800; font-size: 20px; margin-bottom: 12px; }
.steps h3 { font-size: 22px; }
.steps p { margin-top: 6px; color: var(--ink-2); }

/* Families */
.features { margin-top: 26px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 22px 28px; }
.features li { display: flex; align-items: flex-start; gap: 16px; }
.features h3 { font-size: 21px; line-height: 1.25; }
.features p { margin-top: 2px; color: var(--ink-2); }

/* Good to know */
.know { margin-top: 26px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.know-card { padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.know-card h3 { font-size: 16px; font-family: var(--body); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.know-big { margin-top: 6px; font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.15; color: var(--green); }
.know-card p + p { margin-top: 6px; }
.know-card > p:not(.know-big) { color: var(--ink-2); }
.know-card h3 + p:not(.know-big) { margin-top: 8px; }
.emergency { margin-top: 18px; color: var(--ink-2); }

/* "Is it right for us?" (Nov 23, 2026): when PeakYears is a good fit, as a ticked list in one mint card.
   Only what PeakYears offers: no comparison with home care agencies or anyone else. */
.fit { margin-top: 22px; padding: 22px 24px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 12px 32px; background: var(--mint); border: 1px solid #C3D8C9; border-radius: var(--radius); }
.fit li { position: relative; padding-left: 30px; font-size: 20px; line-height: 1.4; color: var(--ink); }
.fit li::before { content: ''; position: absolute; left: 7px; top: 0.2em; width: 8px; height: 14px; border: solid var(--green); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.fit-note { margin-top: 18px; font-size: 20px; color: var(--ink-2); max-width: 36em; }
.fit-note a { font-weight: 700; white-space: nowrap; }

/* "Why I started PeakYears": the owner's photo and his own words. The photo sits beside the words on a
   wide screen and above them on a phone. */
.owner { margin-top: 20px; display: grid; grid-template-columns: 184px minmax(0, 34em); gap: 8px 36px; align-items: start; }
.owner-photo { width: 184px; height: 184px; border-radius: 50%; box-shadow: 0 0 0 5px var(--paper), 0 0 0 6px var(--line); }
@media (max-width: 720px) {
  .owner { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .owner-photo { width: 152px; height: 152px; margin-left: 5px; }
}
.owner-story { max-width: 34em; }
.owner-story p { font-size: 20px; line-height: 1.55; color: var(--ink-2); }
.owner-story p + p { margin-top: 14px; }
.owner-story .owner-first { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 3vw, 27px); line-height: 1.3; color: var(--ink); }
.owner-story strong { color: var(--ink); }
.owner-story .owner-name { margin-top: 22px; font-family: var(--display); font-weight: 800; font-size: 23px; line-height: 1.25; color: var(--green); }
.owner-role { display: block; font-family: var(--body); font-weight: 400; font-size: 17.5px; color: var(--muted); }

/* Area check */
.area-check { margin-top: 22px; }
.field label { display: block; font-weight: 700; font-size: 19px; margin-bottom: 6px; }
input[type="text"] {
  width: 100%; min-height: 56px; padding: 12px 14px; font: inherit; font-size: 19px; color: var(--ink);
  background: #fff; border: 2px solid var(--field-line); border-radius: 12px; appearance: none;
}
input::placeholder { color: #8A7C66; opacity: 1; }
input:focus-visible { outline: 3px solid var(--rust); outline-offset: 2px; border-color: var(--ink); }
.field-zip input { max-width: 200px; }
.section-cta { margin-top: 26px; }
.section-cta .btn { min-width: 240px; }
@media (max-width: 520px) { .section-cta .btn { width: 100%; } }
main:focus { outline: none; }

/* ZIP check. The result box stays in the page even when empty, so screen readers announce each result. */
.zip-status { margin-top: 10px; padding: 12px 14px; border-radius: 12px; font-size: 18px; }
.zip-status:empty { margin-top: 0; padding: 0; }
.zip-status.ok { background: var(--ok-bg); color: var(--green-dark); }
.zip-status.out { background: var(--sand); color: var(--ink); }
.zip-status strong { display: block; }
.zip-status a { font-weight: 700; }
/* "See all the towns we serve": opens in place (the hero and "Where we help" link here too; site.js opens it). */
.towns { margin-top: 18px; scroll-margin-top: 16px; }
.towns summary { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 700; font-size: 19px; color: var(--green); cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: 4px; }
.towns summary::-webkit-details-marker { display: none; }
.towns summary::after { content: ''; width: 9px; height: 9px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.towns[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.towns summary:focus-visible { outline: 3px solid var(--rust); outline-offset: 4px; border-radius: 6px; }
.towns-body { margin-top: 6px; padding: 18px 20px 20px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.towns-group + .towns-group { margin-top: 18px; }
.towns-group h3 { font-size: 19px; line-height: 1.25; }
.towns-list { margin-top: 6px; columns: 3 170px; column-gap: 24px; color: var(--ink-2); font-size: 17.5px; line-height: 1.55; }
.towns-list li { break-inside: avoid; }
.towns-note { margin-top: 16px; color: var(--muted); font-size: 17px; }
/* On phones the towns flow as a comma list, so long names don't wrap in narrow columns. */
@media (max-width: 560px) {
  .towns-body { padding: 16px; }
  .towns-list { columns: auto; }
  .towns-list li { display: inline; }
  .towns-list li:not(:last-child)::after { content: ", "; }
}

.or-contact { margin-top: 22px; font-size: 19px; color: var(--ink-2); }
.or-contact a { font-weight: 700; }
.nowrap, .or-contact a, .simple a { white-space: nowrap; }

/* Footer */
.foot { background: var(--green); color: var(--cream); padding: 40px 0 44px; }
.foot-inner > * + * { margin-top: 10px; }
.brand-light .wordmark { color: var(--cream); }
.foot a { color: var(--cream); }
.foot a:hover { color: #fff; }
.foot-contact { font-family: var(--display); font-weight: 800; font-size: 26px; text-decoration: none; white-space: nowrap; }
.foot-reach { font-size: 18px; }
.foot-reach a { font-weight: 700; overflow-wrap: anywhere; }
.foot .small { font-size: 16px; color: #DCE6DE; }
.foot :focus-visible { outline-color: #F2C3A9; }

/* 404 page */
.simple { padding: 40px 0 64px; }
.simple h1 { font-size: clamp(34px, 7vw, 52px); line-height: 1.08; }
.simple p { margin-top: 14px; font-size: 20px; color: var(--ink-2); }
.simple .hero-actions { margin-top: 26px; }

/* Terms for families and the helper agreement (built from app/src/legal.ts) */
.legal { padding: 40px 0 64px; }
.legal h1 { font-size: clamp(32px, 6vw, 46px); line-height: 1.1; }
.legal .updated { margin-top: 10px; font-size: 17px; color: var(--muted); }
.legal .intro { margin-top: 18px; font-size: 20px; }
.legal h2 { margin-top: 34px; font-size: 25px; line-height: 1.2; }
.legal p, .legal li { font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.legal section p { margin: 10px 0 0; }
.legal ul { margin: 10px 0 0; padding-left: 26px; }
.legal li + li { margin-top: 8px; }
.legal .back { margin-top: 40px; font-weight: 700; }

/* Sign-in link beside the Call button (shown once the app is set up). */
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 10px; font-weight: 700; font-size: 18px; color: var(--green); text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
.top-link:hover { color: var(--green-dark); }
@media (max-width: 539px) {
  .top-inner { gap: 6px; }
  .brand { gap: 8px; }
  .logo { width: 44px; height: 44px; }
  .wordmark { font-size: 24px; }
  .top-actions { gap: 2px; }
  .top-link { padding: 0 5px; font-size: 17px; }
  .btn-contact { padding: 0 10px; gap: 5px; }
}
/* On the narrowest phones the header keeps just the logo and Call; "Sign in" is in the footer, and the big button opens the app. */
@media (max-width: 389px) {
  .top-link { display: none; }
}
.foot-links { font-weight: 700; }
/* Footer links are easy to tap: at least 44px tall. */
.foot-links a { display: inline-block; padding: 10px 0; min-height: 44px; }
