/* AgeSphere landing site — palette derived from app icon (warm orange dial, gold ring, green segment, cream field) */
:root {
  --bg: #fbf5ec;
  --surface: #ffffff;
  --surface-2: #f6ead9;
  --text: #2b2118;
  --muted: #635444;
  --primary: #e2610d;
  --primary-deep: #b04a04;
  --primary-ink: #9c4104;
  --gold: #f0a818;
  --green: #57821c;
  --green-soft: #eef3e0;
  --ring: #f3c257;
  --border: #e8d9c3;
  --shadow: 0 10px 30px rgba(120, 72, 16, 0.12);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1811;
    --surface: #2a2118;
    --surface-2: #332920;
    --text: #f6ede1;
    --muted: #c9b8a3;
    --primary: #ff8b3d;
    --primary-deep: #ffa057;
    --primary-ink: #ffb271;
    --gold: #f5bd4a;
    --green: #a9cf62;
    --green-soft: #2c3220;
    --ring: #8a6a2c;
    --border: #4a3c2d;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.0625rem;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary-ink); }
a:hover { color: var(--primary); }
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary-deep);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 1.25rem; }

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  font-size: 1.05rem;
}
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav ul {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--primary); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: none;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 0.5rem 1.25rem 1rem; }
  .site-nav li { border-bottom: 1px solid var(--border); }
  .site-nav li:last-child { border-bottom: 0; }
  .site-nav a { display: block; padding: 0.8rem 0; }
}

/* Hero */
.hero { padding: 3.5rem 0 3rem; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2rem; }
}
.eyebrow {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
h1 .accent { color: var(--primary); }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 1.75rem; max-width: 34em; }
.store-badges { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #1c1410;
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  padding: 0.6rem 1.1rem;
  line-height: 1.2;
  border: 1px solid #3a2c20;
}
.badge-btn:hover { background: #33261b; color: #fff; }
.badge-btn svg { width: 26px; height: 26px; flex: none; }
.badge-btn .badge-text small { display: block; font-size: 0.65rem; opacity: 0.85; letter-spacing: 0.02em; }
.badge-btn .badge-text strong { font-size: 1.02rem; font-weight: 600; }
.hero-note { margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }
.hero-note strong { color: var(--green); }

/* Live counter mock (text-based; no fabricated screenshots) */
.counter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.counter-card .app-icon { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 1rem; display: block; }
.counter-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 0.4rem;
}
.counter-value {
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 800;
  color: var(--primary);
  margin: 0;
  word-break: break-word;
}
.counter-sub {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.6rem 0 0;
}
.counter-foot {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

/* Sections */
section { padding: 3.25rem 0; }
.section-alt { background: var(--surface-2); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 0.5rem; letter-spacing: -0.015em; }
.section-intro { color: var(--muted); max-width: 44em; margin: 0 0 2rem; }

/* Problem / solution */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.panel h3 { margin-top: 0; font-size: 1.15rem; }
.panel.problem h3 { color: var(--primary-deep); }
.panel.solution { border-color: var(--ring); }
.panel.solution h3 { color: var(--green); }
.panel ul { margin: 0; padding-left: 1.2rem; }
.panel li { margin: 0.45rem 0; }

/* Feature grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .features-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
}
.feature .glyph {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--gold), var(--primary));
  color: #fff;
  margin-bottom: 0.8rem;
}
.feature h3 { margin: 0 0 0.4rem; font-size: 1.06rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.25rem;
}
@media (max-width: 720px) { .stats-strip { grid-template-columns: repeat(2, 1fr); } }
.stat {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 0.8rem;
}
.stat b { display: block; font-size: 1.5rem; color: var(--primary); font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.85rem; color: var(--muted); }

/* How it helps */
.helps-list { display: grid; gap: 1.1rem; max-width: 46em; padding: 0; margin: 0; list-style: none; counter-reset: helps; }
.helps-list li {
  counter-increment: helps;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem 1.1rem 3.4rem;
  position: relative;
}
.helps-list li::before {
  content: counter(helps);
  position: absolute;
  left: 1rem;
  top: 1.1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.helps-list b { display: block; margin-bottom: 0.15rem; }
.helps-list p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* FAQ accordion */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-item summary, .faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  padding: 1rem 3rem 1rem 1.25rem;
  cursor: pointer;
  position: relative;
  display: block;
}
.faq-q::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 400;
  transition: transform 0.2s ease;
}
.faq-q[aria-expanded="true"]::after { content: "–"; }
.faq-a { padding: 0 1.25rem 1.1rem; color: var(--muted); }
.faq-a[hidden] { display: none; }
.faq-a p { margin: 0 0 0.6rem; }
.faq-a p:last-child { margin-bottom: 0; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary) 60%, var(--gold));
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.92); max-width: 36em; margin: 0.5rem auto 1.5rem; }
.cta-band .store-badges { justify-content: center; }
.cta-band .badge-btn { background: #241a12; border-color: rgba(255,255,255,0.25); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { font-size: 0.95rem; color: var(--text); margin: 0 0 0.6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.4rem 0; }
.privacy-note {
  background: var(--green-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.fineprint { font-size: 0.82rem; }

/* Guide article pages */
.breadcrumb { font-size: 0.88rem; color: var(--muted); padding: 1.25rem 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 0.4rem; color: var(--muted); }
.article { padding: 1.5rem 0 3rem; }
.article .wrap { max-width: 760px; }
.article h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.article h2 { margin-top: 2.4rem; }
.article h3 { margin-top: 1.8rem; font-size: 1.15rem; }
.article .byline { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.article th, .article td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.8rem;
  text-align: left;
}
.article th { background: var(--surface-2); }
.table-scroll { overflow-x: auto; }
.callout {
  background: var(--surface);
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.callout.app {
  border-left-color: var(--green);
  background: var(--green-soft);
}
.callout h3 { margin-top: 0; }
.related { background: var(--surface-2); padding: 2.5rem 0; }
.related ul { padding-left: 1.2rem; margin: 0.5rem 0 0; }
.related li { margin: 0.4rem 0; }
blockquote {
  border-left: 3px solid var(--primary);
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--muted);
  font-style: italic;
}
code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  font-size: 0.92em;
}
