/* =========================================================================
   Usha Care Guide — apex marketing site
   Brand matched to app.ushacareguide.com (extracted values):
     bg cream #fbf7ef · espresso text #2a221c · Fraunces serif headings
     Inter body · terracotta accent #c87a3a · calm green #2b6e4f
   ========================================================================= */

/* ---- Fonts (self-declared, from Fontshare / Google via @font-face fallback) ---- */
/* Fraunces (serif display) + Inter (body) loaded via <link> in each page head. */

:root {
  /* Type scale (fluid) */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.85rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.6vw, 1.4rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.3rem + 2.4vw, 3.4rem);
  --text-3xl:  clamp(2.5rem, 1.4rem + 3.6vw, 4.4rem);

  /* Spacing */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  /* Brand colors (exact app match) */
  --cream:            #fbf7ef;   /* page background */
  --cream-2:          #f6efe3;   /* offset section */
  --card:             #ffffff;   /* white card surface */
  --card-soft:        #f3ead9;   /* soft warm card */
  --espresso:         #2a221c;   /* headings / primary text */
  --ink:              #3a332b;   /* body text */
  --ink-muted:        #6f665b;   /* muted text */
  --ink-faint:        #9a9186;   /* captions */
  --terracotta:       #c87a3a;   /* accent — CTA + eyebrow */
  --terracotta-hover: #b56a2e;
  --terracotta-soft:  #efd9c2;   /* soft accent bg */
  --green:            #2b6e4f;   /* secondary calm accent */
  --border:           #e7ddcd;
  --border-strong:    #d9cbb4;

  --radius-sm: .5rem; --radius-md: .75rem; --radius-lg: 1.1rem; --radius-xl: 1.6rem; --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(74,54,32,.06);
  --shadow-md: 0 8px 24px rgba(74,54,32,.08);
  --shadow-lg: 0 22px 50px rgba(74,54,32,.14);

  --content: 1140px;
  --content-narrow: 720px;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;

  --transition: 200ms cubic-bezier(.16,1,.3,1);
}

/* ---- Base reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: none; text-size-adjust: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}
img, picture, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--espresso);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
p { text-wrap: pretty; }

::selection { background: rgba(200,122,58,.22); color: var(--espresso); }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: var(--radius-sm); }

a, button { transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.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 helpers ---- */
.wrap { width: 100%; max-width: var(--content); margin-inline: auto; padding-inline: var(--space-6); }
.narrow { max-width: var(--content-narrow); margin-inline: auto; }
.section { padding-block: clamp(var(--space-16), 9vw, var(--space-32)); }
.section--tight { padding-block: clamp(var(--space-12), 6vw, var(--space-20)); }
.section--cream2 { background: var(--cream-2); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: var(--space-4);
}

.lede { font-size: var(--text-lg); color: var(--ink-muted); line-height: 1.6; max-width: 60ch; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-base);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.1;
}
.btn--primary {
  background: var(--terracotta); color: #fff;
  box-shadow: 0 10px 22px rgba(200,122,58,.28);
}
.btn--primary:hover { background: var(--terracotta-hover); transform: translateY(-1px); box-shadow: 0 14px 28px rgba(200,122,58,.34); }
.btn--ghost {
  background: transparent; color: var(--espresso);
  border: 1px solid var(--border-strong);
}
.btn--ghost:hover { border-color: var(--terracotta); color: var(--terracotta); }
.btn-note { display:block; margin-top: var(--space-3); font-size: var(--text-sm); color: var(--ink-muted); }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,247,239,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: var(--space-4); }
.brand { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; color: var(--espresso); letter-spacing: -.01em; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: var(--space-6); }
.site-nav a { font-size: var(--text-sm); font-weight: 500; text-decoration: none; color: var(--ink); }
.site-nav a:hover { color: var(--terracotta); }
.site-nav .btn { padding: var(--space-3) var(--space-6); font-size: var(--text-sm); }
.nav-links { display: flex; gap: var(--space-6); align-items: center; }
@media (max-width: 720px) {
  .nav-links { display: none; }
  .site-nav .btn { white-space: nowrap; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 1.1rem; }
  .site-header .wrap { padding-inline: var(--space-4); gap: var(--space-3); }
  .site-nav .btn { padding: var(--space-3) var(--space-4); }
}

/* ---- Hero ---- */
.hero { padding-block: clamp(var(--space-16), 8vw, var(--space-24)); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(var(--space-8), 5vw, var(--space-20)); align-items: center; }
.hero h1 { font-size: var(--text-3xl); margin-bottom: var(--space-6); }
.hero .lede { margin-bottom: var(--space-6); }
.trust-line {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); color: var(--green); font-weight: 600;
  margin-bottom: var(--space-8);
}
.trust-line svg { flex: none; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }

/* Framed phone screenshot */
.phone-frame {
  position: relative;
  border-radius: 34px;
  padding: 10px;
  background: linear-gradient(160deg, #efe4d2, #e2d2b8);
  box-shadow: var(--shadow-lg);
  max-width: 340px;
  margin-inline: auto;
}
.phone-frame img { border-radius: 26px; display: block; width: 100%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.hero-visual { position: relative; }
.hero-visual .phone-frame { transform: rotate(1.5deg); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-visual { margin-top: var(--space-8); }
  .hero-visual .phone-frame { transform: none; }
}

/* ---- Feature sections (alternating) ---- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
}
.feature + .feature { border-top: 1px solid var(--border); }
.feature__media { order: 2; }
.feature__body { order: 1; }
.feature--reverse .feature__media { order: 1; }
.feature--reverse .feature__body { order: 2; }
.feature h2 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.feature p { color: var(--ink-muted); max-width: 46ch; }
.feature .phone-frame { max-width: 300px; }
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; }
  .feature__media, .feature__body,
  .feature--reverse .feature__media, .feature--reverse .feature__body { order: initial; }
  .feature__media { margin-top: var(--space-6); }
}

/* ---- Feature grid (small cards) ---- */
.feature-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); margin-top: var(--space-12); }
.fcard {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}
.fcard h3 { font-family: var(--font-body); font-weight: 700; color: var(--espresso); font-size: var(--text-lg); margin-bottom: var(--space-3); }
.fcard p { color: var(--ink-muted); font-size: var(--text-base); }
.fcard .ficon { width: 40px; height: 40px; margin-bottom: var(--space-5); color: var(--terracotta); }
@media (max-width: 820px) { .feature-cards { grid-template-columns: 1fr; } }

/* ---- How it works ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); margin-top: var(--space-12); counter-reset: step; }
.step { position: relative; padding-top: var(--space-8); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: var(--terracotta-soft); color: var(--terracotta);
  font-family: var(--font-display); font-weight: 600; font-size: 1.35rem;
  margin-bottom: var(--space-4);
}
.step h3 { font-family: var(--font-body); font-weight: 700; font-size: var(--text-lg); color: var(--espresso); margin-bottom: var(--space-2); }
.step p { color: var(--ink-muted); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; gap: var(--space-6); } }

/* ---- Founder teaser ---- */
.founder {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-8); align-items: center;
  background: var(--card-soft); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: clamp(var(--space-8), 5vw, var(--space-16));
}
.founder-avatar {
  width: 96px; height: 96px; border-radius: var(--radius-full); flex: none;
  background: var(--terracotta); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 600;
}
.founder h2 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.founder p { color: var(--ink); margin-bottom: var(--space-4); max-width: 60ch; }
.textlink { color: var(--terracotta); font-weight: 600; text-decoration: none; border-bottom: 1px solid transparent; }
.textlink:hover { border-bottom-color: var(--terracotta); }
@media (max-width: 640px) { .founder { grid-template-columns: 1fr; text-align: left; } }

/* ---- Trust strip ---- */
.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.trust-item { text-align: left; }
.trust-item .ficon { width: 32px; height: 32px; color: var(--green); margin-bottom: var(--space-4); }
.trust-item h3 { font-family: var(--font-body); font-weight: 700; font-size: var(--text-base); color: var(--espresso); margin-bottom: var(--space-2); }
.trust-item p { color: var(--ink-muted); font-size: var(--text-sm); }
@media (max-width: 720px) { .trust-strip { grid-template-columns: 1fr; gap: var(--space-6); } }

/* ---- Final CTA ---- */
.final-cta {
  text-align: center;
  background: var(--espresso); color: var(--cream);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-12), 7vw, var(--space-24)) var(--space-6);
}
.final-cta h2 { color: var(--cream); font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.final-cta p { color: rgba(251,247,239,.8); margin: 0 auto var(--space-8); max-width: 48ch; }
.final-cta .btn--primary { box-shadow: 0 12px 30px rgba(0,0,0,.3); }

/* ---- Footer ---- */
.site-footer { background: var(--cream-2); border-top: 1px solid var(--border); padding-block: var(--space-16); margin-top: var(--space-8); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-8); align-items: flex-start; }
.footer-brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.footer-brand .brand-mark { width: 28px; height: 28px; }
.footer-brand span { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--espresso); }
.footer-nav { display: flex; gap: var(--space-6); }
.footer-nav a { font-size: var(--text-sm); text-decoration: none; color: var(--ink-muted); }
.footer-nav a:hover { color: var(--terracotta); }
.footer-meta { width: 100%; margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); }
.footer-meta p { font-size: var(--text-xs); color: var(--ink-faint); }
.footer-love { font-family: var(--font-display); font-style: italic; color: var(--ink-muted); }

/* =========================================================================
   Interior pages (about / privacy / articles / article template)
   ========================================================================= */
.page-hero { padding-block: clamp(var(--space-16), 8vw, var(--space-24)) clamp(var(--space-8), 4vw, var(--space-12)); }
.page-hero h1 { font-size: var(--text-2xl); margin-bottom: var(--space-5); }
.page-hero .lede { font-size: var(--text-lg); }

/* Prose */
.prose { max-width: 68ch; }
.prose p { margin-bottom: var(--space-6); font-size: var(--text-base); color: var(--ink); line-height: 1.75; }
.prose h2 { font-size: var(--text-xl); margin: var(--space-12) 0 var(--space-4); }
.prose h3 { font-family: var(--font-body); font-weight: 700; color: var(--espresso); font-size: var(--text-lg); margin: var(--space-8) 0 var(--space-3); }
.prose ul { margin: 0 0 var(--space-6) var(--space-6); }
.prose li { margin-bottom: var(--space-2); color: var(--ink); }
.prose a { color: var(--terracotta); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--espresso); }

/* About: credentials block */
.about-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: clamp(var(--space-8), 5vw, var(--space-16)); align-items: start; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } }
.creds {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-8);
  box-shadow: var(--shadow-sm); position: sticky; top: 6rem;
}
.creds h2 { font-family: var(--font-body); font-weight: 700; font-size: var(--text-base); text-transform: uppercase; letter-spacing: .1em; color: var(--terracotta); margin-bottom: var(--space-5); }
.creds dl { display: grid; gap: var(--space-5); }
.creds dt { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-bottom: var(--space-1); }
.creds dd { font-size: var(--text-base); color: var(--espresso); font-weight: 600; }
.creds .sources-note { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--border); font-size: var(--text-sm); color: var(--ink-muted); font-weight: 400; }
@media (max-width: 900px) { .creds { position: static; } }

/* Articles index */
.article-list { display: grid; gap: var(--space-6); margin-top: var(--space-12); }
.article-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-8);
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-6); align-items: start;
}
.article-item .tag {
  font-size: var(--text-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint); background: var(--card-soft);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); white-space: nowrap;
}
.article-item h2 { font-size: var(--text-lg); font-family: var(--font-display); margin-bottom: var(--space-2); color: var(--espresso); }
.article-item p { color: var(--ink-muted); font-size: var(--text-sm); }
.article-item .tag--new { background: var(--terracotta); color: #fff; }
.article-item h2 a { color: inherit; text-decoration: none; }
.article-item h2 a:hover { color: var(--terracotta); }
.article-item .item-date { display: block; margin-top: var(--space-3); font-size: var(--text-xs); color: var(--ink-faint); letter-spacing: .04em; }
@media (max-width: 640px) { .article-item { grid-template-columns: 1fr; } }

/* Article template (byline block) — ready for drop-in publishing */
.article-page { max-width: 720px; margin-inline: auto; }
.byline { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-6) 0; border-block: 1px solid var(--border); margin-block: var(--space-8); }
.byline-avatar { width: 52px; height: 52px; border-radius: var(--radius-full); background: var(--terracotta); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.4rem; flex: none; }
.byline-name { font-weight: 700; color: var(--espresso); }
.byline-name a { color: var(--espresso); text-decoration: none; border-bottom: 1px solid var(--terracotta); }
.byline-meta { font-size: var(--text-sm); color: var(--ink-muted); }

/* Callout */
.callout { background: var(--card-soft); border-left: 3px solid var(--terracotta); border-radius: var(--radius-md); padding: var(--space-6) var(--space-8); margin: var(--space-8) 0; }
.callout p { margin: 0; color: var(--ink); }

/* ---- Article visuals (crying curve, clock bars, comparison, brain figure) ---- */
.article-fig { margin: var(--space-10) 0; }
.article-fig img { width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); display: block; }
.article-fig figcaption { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--ink-muted); line-height: 1.5; }

.chart-block { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-8); margin: var(--space-10) 0; box-shadow: var(--shadow-sm); }
.chart-block .chart-title { font-family: var(--font-display); font-size: var(--text-lg); color: var(--espresso); margin-bottom: var(--space-1); }
.chart-block .chart-sub { font-size: var(--text-sm); color: var(--ink-muted); margin-bottom: var(--space-6); }
.chart-block .chart { width: 100%; height: auto; display: block; }
.chart-block .chart-caption { margin-top: var(--space-4); font-size: var(--text-xs); color: var(--ink-faint); }

/* Clock development bars */
.bars { display: grid; gap: var(--space-4); }
.bar-row { display: grid; grid-template-columns: 130px 1fr 48px; align-items: center; gap: var(--space-4); }
.bar-label { font-size: var(--text-sm); color: var(--ink); }
.bar-track { position: relative; height: 14px; background: var(--card-soft); border-radius: var(--radius-full); }
.bar { position: absolute; top: 0; height: 14px; border-radius: var(--radius-full); background: var(--terracotta); opacity: .85; }
.bar-when { font-size: var(--text-xs); color: var(--ink-muted); text-align: right; }
.bar-axis { margin-top: var(--space-3); }
.bar-axis-track { position: relative; height: 18px; margin-left: 146px; }
.bar-axis-track span { position: absolute; transform: translateX(-50%); font-size: var(--text-xs); color: var(--ink-faint); }
@media (max-width: 560px) {
  .bar-row { grid-template-columns: 92px 1fr 40px; gap: var(--space-3); }
  .bar-label { font-size: var(--text-xs); }
  .bar-axis-track { margin-left: 104px; }
}

/* Two-bookends comparison */
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); margin: var(--space-10) 0; }
.cmp-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-6); background: var(--card); }
.cmp-card--infant { border-top: 3px solid var(--terracotta); }
.cmp-card--elderly { border-top: 3px solid var(--ink-muted); }
.cmp-title { font-family: var(--font-display); font-size: var(--text-base); color: var(--espresso); margin-bottom: var(--space-4); }
.cmp-list { list-style: none; display: grid; gap: var(--space-3); }
.cmp-list li { display: grid; gap: 2px; padding-bottom: var(--space-3); border-bottom: 1px solid var(--border); }
.cmp-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.cmp-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.cmp-text { font-size: var(--text-sm); color: var(--ink); }
@media (max-width: 640px) { .cmp { grid-template-columns: 1fr; } }

/* Article prose: wrap long citation URLs on narrow screens */
.prose a { overflow-wrap: anywhere; word-break: break-word; }

/* Cry acoustic spectrum */
.cry-spectrum { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-8); margin: var(--space-10) 0; box-shadow: var(--shadow-sm); }
.cry-spectrum-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; border-radius: var(--radius-full); overflow: hidden; }
.cry-band { padding: var(--space-4) var(--space-2); text-align: center; font-size: var(--text-xs); font-weight: 600; color: var(--espresso); }
.cry-band-1 { background: #f3ead9; }
.cry-band-2 { background: #efd9c2; }
.cry-band-3 { background: #e0a86f; }
.cry-band-4 { background: #c87a3a; color: #fff; }
.cry-axis { display: flex; justify-content: space-between; margin-top: var(--space-3); font-size: var(--text-xs); color: var(--ink-faint); }
.cry-spectrum p { margin-top: var(--space-5); font-size: var(--text-sm); color: var(--ink); }

/* Privacy contact */
.contact-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-8); margin-top: var(--space-8); }
.contact-box a { color: var(--terracotta); font-weight: 600; }
