/* ============================================================
   senior-bridge marketing site
   Mobile-first. Warm palette. No tracking, no frameworks.
   ============================================================ */

:root {
  --bg:        #fdfaf3;  /* warm cream */
  --bg-tint:   #f5efe0;  /* slightly darker cream */
  --text:      #2a2520;  /* warm dark brown */
  --text-soft: #5a544c;
  --muted:     #8a847d;
  --sage:      #7a8e6a;  /* primary accent */
  --sage-deep: #647557;
  --terra:     #c9663d;  /* secondary accent / buttons */
  --terra-deep:#a85129;
  --border:    #e3d9c2;
  --shadow:    0 4px 18px rgba(60, 50, 35, 0.08);
  --shadow-lg: 0 10px 30px rgba(60, 50, 35, 0.12);
  --radius:    8px;
  --radius-lg: 12px;

  --font-heading: 'Lora', Georgia, 'Times New Roman', serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; height: auto; display: block; }

a {
  color: var(--terra);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 120ms ease;
}
a:hover { color: var(--terra-deep); }
a:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 2px;
  border-radius: 3px;
}

/* skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: 0 0 6px 0;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* sr-only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   Layout primitives
   ============================================================ */

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}
.container.narrow { max-width: 720px; }

.section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
.section-tinted {
  background: var(--bg-tint);
}
.section h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 20px;
  color: var(--text);
}
.section h2 em {
  color: var(--terra);
  font-style: italic;
}
.section-subhead {
  margin: -8px 0 24px;
  color: var(--muted);
  font-size: 16px;
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
}
.brand:hover { color: var(--text); }
.brand-mark { font-size: 20px; }
.brand-logo { width: 36px; height: 36px; border-radius: 8px; display: block; flex-shrink: 0; }
.hero-logo {
  display: block; margin: 0 auto 24px;
  width: 140px; height: 140px;
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(42, 37, 32, 0.12);
}
@media (min-width: 800px) {
  .hero-logo { width: 180px; height: 180px; margin-bottom: 32px; }
}
.brand-name { font-family: var(--font-heading); }

.nav-cta {
  display: inline-block;
  background: var(--terra);
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}
.nav-cta:hover { background: var(--terra-deep); color: #fff; }

/* Header right-side cluster: "Sign in" + "Join waitlist". The Sign in link
   stays quiet so the primary CTA still dominates for cold visitors, while
   existing caregivers have a persistent entry point. */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-link {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 500;
  padding: 6px 4px;
  font-size: 15px;
  white-space: nowrap;
}
.nav-link:hover { color: var(--terra-deep); text-decoration: underline; }
@media (max-width: 480px) {
  /* On narrow screens, keep "Join waitlist" prominent and shrink "Sign in"
     to a smaller secondary affordance rather than hiding it entirely —
     caregivers using their phone still need to reach the dashboard. */
  .nav-actions { gap: 8px; }
  .nav-link { font-size: 13px; }
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding: 48px 0 56px;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.hero .lede {
  font-size: 17px;
  color: var(--text-soft);
  margin: 0 auto 28px;
  max-width: 540px;
}
.cta-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 18px;
}
.trust-row {
  font-size: 13px;
  color: var(--muted);
  margin: 0 auto 32px;
  max-width: 540px;
  line-height: 1.55;
}
.hero-photo {
  margin: 0;
  text-align: left;
}
.hero-photo img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--bg-tint);
}
.hero-photo figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
  line-height: 1.2;
}
.btn-primary {
  background: var(--terra);
  color: #fff;
}
.btn-primary:hover { background: var(--terra-deep); color: #fff; }
.btn-primary:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 3px;
}
.btn-secondary {
  background: transparent;
  color: var(--sage-deep);
  border-color: var(--sage);
}
.btn-secondary:hover {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}

/* ============================================================
   How it works (steps)
   ============================================================ */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.steps li {
  background: var(--bg-tint);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: var(--radius);
  position: relative;
}
.steps h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--text);
}
.steps p { margin: 0; color: var(--text-soft); }

/* Quiet inline link cluster shown under the How-It-Works steps. Helps
   already-invited caregivers find the sign-in link and the setup guide
   without disrupting the cold-visitor flow above. */
.steps-aside {
  margin-top: 22px;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.55;
  border-top: 1px solid var(--border-soft, rgba(0,0,0,0.08));
  padding-top: 14px;
}
.steps-aside a { color: var(--terra-deep); }
.steps-aside a:hover { text-decoration: underline; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--sage);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 18px;
  margin-bottom: 12px;
}

/* ============================================================
   Checklists (good / bad)
   ============================================================ */

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checklist li {
  position: relative;
  padding-left: 32px;
  line-height: 1.55;
}
.checklist li::before {
  position: absolute;
  left: 0;
  top: 0.05em;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.4;
}
.checklist-good li::before {
  content: "✓";
  color: var(--sage-deep);
}
.checklist-bad li::before {
  content: "✕";
  color: var(--terra);
}
.checklist strong { color: var(--text); }

.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plain-list li {
  padding-left: 18px;
  position: relative;
  color: var(--text-soft);
}
.plain-list li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--sage-deep);
  font-weight: 700;
}

/* ============================================================
   Cards (stories, pricing, waitlist)
   ============================================================ */

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.section-tinted .card { background: var(--bg); }

.story-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.story-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 0 0 12px;
  color: var(--text);
}
.story-card p { margin: 0 0 12px; color: var(--text-soft); }
.story-card .byline {
  margin-top: 12px;
  font-style: italic;
  color: var(--muted);
}
.story-card .footnote {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

/* Pricing */
.pricing-card {
  margin-bottom: 28px;
}
.pricing-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pricing-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
}
.pricing-list li:last-child { border-bottom: 0; }
.pricing-list strong { color: var(--text); }
.muted { color: var(--muted); }

/* Waitlist form */
.waitlist-card h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin: 0 0 8px;
  color: var(--text);
}
.waitlist-card p { margin: 0 0 16px; color: var(--text-soft); }
.form-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.form-row input[type="email"] {
  font: inherit;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  width: 100%;
}
.form-row input[type="email"]:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(122, 142, 106, 0.18);
}
.form-row button {
  width: 100%;
}
.form-status {
  margin: 12px 0 0;
  font-size: 14px;
  min-height: 1.5em;
}
.form-status.ok    { color: var(--sage-deep); }
.form-status.error { color: var(--terra-deep); }

/* ============================================================
   FAQ
   ============================================================ */

.faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq details {
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 16px;
  transition: background 120ms ease;
}
.faq details[open] { background: var(--bg); box-shadow: var(--shadow); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 17px;
  position: relative;
  padding-right: 32px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "＋";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--sage-deep);
  font-weight: 400;
  transition: transform 120ms ease;
}
.faq details[open] summary::after {
  content: "－";
}
.faq summary:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 2px;
  border-radius: 3px;
}
.faq-body {
  padding: 0 0 14px 0;
  color: var(--text-soft);
}
.faq-body p { margin: 0; }

/* ============================================================
   About
   ============================================================ */

#about p { color: var(--text-soft); margin: 0 0 16px; }
.signature {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--text);
  margin-top: 24px !important;
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--text);
  color: #ece5d4;
  padding: 48px 0 36px;
  text-align: center;
}
.site-footer .container { padding: 0 20px; }
.footer-cta {
  margin-bottom: 20px;
}
.footer-line {
  margin: 0 0 16px;
  font-size: 15px;
  color: #d8cfb8;
}
.site-footer a {
  color: #f3deca;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer a:hover { color: #fff; }
.footer-links {
  margin: 0 0 16px;
  font-size: 14px;
}
.footer-links .dot { color: #8a8478; margin: 0 6px; }
.disclaimer {
  font-size: 12px;
  color: #b9b09b;
  margin: 12px auto 12px;
  max-width: 480px;
  line-height: 1.5;
}
.copyright {
  font-size: 12px;
  color: #8a8478;
  margin: 0;
}

/* ============================================================
   Plain-content pages (privacy.html / terms.html)
   ============================================================ */

.plain-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}
.plain-page h1 {
  font-family: var(--font-heading);
  font-size: 30px;
  margin: 0 0 8px;
}
.plain-page .last-updated {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
  font-style: italic;
}
.plain-page h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin: 32px 0 8px;
}
.plain-page h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin: 24px 0 6px;
}
.plain-page p, .plain-page li { color: var(--text-soft); }
.plain-page ul { padding-left: 22px; }
.plain-page .back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--sage-deep);
}

/* ============================================================
   Responsive overrides — desktop
   ============================================================ */

@media (min-width: 600px) {
  .cta-row {
    flex-direction: row;
    justify-content: center;
    gap: 14px;
  }
  .cta-row .btn { min-width: 200px; }

  .form-row {
    flex-direction: row;
  }
  .form-row input[type="email"] { flex: 1; }
  .form-row button { width: auto; padding-left: 28px; padding-right: 28px; }

  .hero h1 { font-size: 40px; }
  .hero .lede { font-size: 19px; }
  .section h2 { font-size: 32px; }
}

@media (min-width: 800px) {
  .story-grid {
    flex-direction: row;
  }
  .story-grid .story-card { flex: 1; }
}

@media (min-width: 960px) {
  .hero h1 { font-size: 48px; line-height: 1.1; }
  .section { padding: 96px 0; }
  .hero { padding: 80px 0 88px; }
  .section h2 { font-size: 36px; }
  .steps {
    flex-direction: row;
  }
  .steps li { flex: 1; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
