/* =========================================================
   FamilyDose website — shared styles
   Colours come from the app (blue #2196F3) and the logo (red/green).
   Edit the tokens below to re-theme every page at once.
   ========================================================= */

:root {
  --paper: #F7FAFD;
  --surface: #FFFFFF;
  --ink: #14202E;
  --ink-2: #4A5868;
  --line: #DCE4EE;
  --brand: #F5C518;
  --link: #8A6108;
  --btn-bg: #0C1730;
  --btn-ink: #FFFFFF;
  --tint: #FDF3CF;
  --red: #E53935;
  --green: #2E9E45;
  --band: #0C1730;
  --band-ink: #E7EDF5;
  --band-ink-2: #A9B8C9;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ml: "Noto Sans Malayalam", "Plus Jakarta Sans", sans-serif;
  --font-hi: "Noto Sans Devanagari", "Plus Jakarta Sans", sans-serif;

  --wrap: 1120px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0D1520;
    --surface: #152131;
    --ink: #E7EDF5;
    --ink-2: #A3B3C5;
    --line: #243447;
    --link: #F5C518;
    --btn-bg: #F5C518;
    --btn-ink: #17213A;
    --tint: #2C2405;
    --red: #FF6B6B;
    --green: #5CCB72;
    --band: #152131;
  }
}
:root[data-theme="dark"] {
  --paper: #0D1520;
  --surface: #152131;
  --ink: #E7EDF5;
  --ink-2: #A3B3C5;
  --line: #243447;
  --link: #F5C518;
  --btn-bg: #F5C518;
  --btn-ink: #17213A;
  --tint: #2C2405;
  --red: #FF6B6B;
  --green: #5CCB72;
  --band: #152131;
}

/* ---------- Base ---------- */
*, *::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(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 40px, 720px); margin-inline: auto; }
.muted { color: var(--ink-2); }
.skip {
  position: absolute; left: -999px; top: 8px; padding: 10px 14px;
  background: var(--surface); color: var(--ink); z-index: 100; border-radius: var(--r-sm);
}
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.12rem; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: var(--r-sm);
}
.nav a:not(.btn):hover { color: var(--ink); background: var(--tint); }
.nav a[aria-current="page"] { color: var(--ink); }
.menu-btn { display: none; }

@media (max-width: 820px) {
  .menu-btn {
    display: inline-flex; margin-left: auto; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--surface); color: var(--ink); cursor: pointer;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 4px; font-size: 1rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-weight: 700; font-size: 0.95rem;
  padding: 10px 18px; border-radius: 999px; text-decoration: none; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-ink); border: 0;
}
.btn:hover { filter: brightness(1.06); }
.btn-play {
  background: #000; color: #fff; padding: 10px 22px 10px 16px; border-radius: 14px;
  border: 1px solid #3a3a3a; line-height: 1.1;
}
.btn-play svg { width: 26px; height: 28px; flex: none; }
.btn-play small { display: block; font-size: 0.68rem; font-weight: 600; opacity: 0.85; letter-spacing: 0.02em; }
.btn-play span { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 { margin-bottom: 0.35em; max-width: 15ch; }
.said-in { margin: 0 0 28px; padding: 0; list-style: none; display: grid; gap: 6px; }
.said-in li { color: var(--ink-2); font-weight: 600; font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.45; }
.said-in li:lang(ml) { font-family: var(--font-ml); }
.said-in li:lang(hi) { font-family: var(--font-hi); }
.hero .lede { font-size: 1.12rem; color: var(--ink-2); max-width: 46ch; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; font-size: 0.92rem; font-weight: 600; color: var(--ink-2); }
.facts li { display: flex; align-items: center; gap: 6px; }
.facts svg { width: 16px; height: 16px; color: var(--green); flex: none; }
.hero-phone {
  display: block; justify-self: center; width: min(100%, 460px);
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-phone { width: min(100%, 340px); order: 2; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { font-size: 1.08rem; color: var(--ink-2); margin: 0; }

/* Features grouped by the app's own tabs */
.tab-groups { display: grid; gap: 0; border-top: 1px solid var(--line); }
.tab-group {
  display: grid; grid-template-columns: 220px 1fr 1fr; gap: 12px 40px;
  padding: 28px 0; border-bottom: 1px solid var(--line); align-items: start;
}
.tab-name { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.2rem; }
.tab-icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--tint); color: var(--brand); flex: none;
}
.tab-icon svg { width: 20px; height: 20px; }
.tab-group p { margin: 0; color: var(--ink-2); }
.tab-group ul { margin: 0; padding-left: 1.1em; }
.tab-group li { margin-bottom: 4px; }
.tab-group li::marker { color: var(--brand); }
@media (max-width: 900px) {
  .tab-group { grid-template-columns: 1fr; gap: 10px; }
}

/* Screens */
.screens {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.screens figure { margin: 0; }
.screens img { border-radius: var(--r-md); border: 1px solid var(--line); aspect-ratio: 9 / 16; object-fit: cover; width: 100%; }
@media (max-width: 820px) {
  .screens {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%;
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
    margin-inline: -20px; padding-inline: 20px; scroll-padding-inline: 20px;
  }
  .screens figure { scroll-snap-align: start; }
}

/* Privacy band */
.band { background: var(--band); color: var(--band-ink); }
:root[data-theme="dark"] .band { border-block: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .band { border-block: 1px solid var(--line); } }
.band h2 { max-width: 20ch; }
.band p, .band li { color: var(--band-ink-2); }
.band a { color: #9FD2FB; }
.band-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: end; }
.promise { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.promise li { padding-left: 34px; position: relative; }
.promise strong { color: var(--band-ink); display: block; font-size: 1.05rem; }
.promise li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 20px; height: 20px; border-radius: 50%;
  background: #2E9E45 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}
@media (max-width: 820px) { .band-grid { grid-template-columns: 1fr; gap: 28px; } }

/* Steps (a real sequence, so numbers carry meaning) */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--btn-bg); color: var(--btn-ink); font-weight: 800; margin-bottom: 14px;
}
.steps h3 { font-size: 1.08rem; margin-bottom: 6px; }
.steps p { color: var(--ink-2); margin: 0; font-size: 0.97rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.video-row {
  margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
}
.video-row p { margin: 0; }

/* FAQ (native details/summary: keyboard + screen-reader friendly) */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 700; font-size: 1.07rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px;
  border-right: 2.5px solid var(--ink-2); border-bottom: 2.5px solid var(--ink-2);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }
.faq .answer { padding: 0 0 20px; color: var(--ink-2); max-width: 68ch; }
.faq .answer p:last-child { margin-bottom: 0; }

/* CTA */
.cta { text-align: center; }
.cta img { width: 72px; height: 72px; margin: 0 auto 18px; }
.cta p { color: var(--ink-2); max-width: 44ch; margin: 0 auto 26px; }
.cta .btn-play { margin: 0 auto; }

/* ---------- Inner pages ---------- */
.page-head { padding: clamp(40px, 6vw, 72px) 0 12px; }
.page-head p { font-size: 1.1rem; color: var(--ink-2); max-width: 60ch; }
.prose { padding-bottom: clamp(56px, 8vw, 96px); }
.prose h2 { font-size: 1.45rem; margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { max-width: 68ch; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.meta { font-size: 0.92rem; color: var(--ink-2); }
.note {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-md);
  padding: 18px 20px; margin: 24px 0;
}
.note p:last-child { margin-bottom: 0; }
.contact-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--tint); border-radius: var(--r-lg); padding: 24px; margin: 24px 0;
}
.contact-card h2 { margin: 0 0 4px; font-size: 1.25rem; }
.contact-card p { margin: 0; color: var(--ink-2); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.toc a {
  display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.92rem;
}
.toc a:hover { border-color: var(--brand); }

/* Changelog */
.release { border-top: 1px solid var(--line); padding: 28px 0; display: grid; grid-template-columns: 180px 1fr; gap: 12px 32px; }
.release h2 { font-size: 1.35rem; margin: 0; }
.release .when { color: var(--ink-2); font-size: 0.95rem; margin: 4px 0 0; }
.release h3 { font-size: 1rem; margin: 0 0 6px; }
.release ul { margin: 0 0 16px; padding-left: 1.2em; }
.current { display: inline-block; margin-top: 8px; font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--link); }
@media (max-width: 640px) { .release { grid-template-columns: 1fr; } }

/* Blog */
.posts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.posts li { border-bottom: 1px solid var(--line); }
.posts a { display: block; padding: 26px 0; text-decoration: none; color: inherit; }
.posts a:hover h2 { color: var(--link); }
.posts h2 { font-size: 1.35rem; margin: 0 0 6px; }
.posts p { color: var(--ink-2); margin: 0 0 8px; max-width: 64ch; }
.posts .meta { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font-size: 0.95rem; letter-spacing: 0; margin: 0 0 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--ink-2); text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-grid .about { color: var(--ink-2); max-width: 34ch; }
.footer-base { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.88rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- About the developer ---------- */
.about-dev { border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.eyebrow-plain { font-weight: 700; color: var(--ink-2); margin: 0 0 6px; }
.about-dev p { color: var(--ink-2); max-width: 60ch; }
.dev-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 20px; }
.about-dev h3 { font-size: 1.05rem; margin-bottom: 12px; }
.app-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.app-list a { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); text-decoration: none; color: var(--ink); }
.app-list a:hover { border-color: var(--brand); }
.app-list a[aria-current="page"] { border-color: var(--brand); background: var(--tint); }
.app-list span { color: var(--ink-2); font-size: 0.92rem; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Guide pages ---------- */
.lead-answer { font-size: 1.18rem; color: var(--ink); max-width: 60ch; }
.guide-link { margin-top: 28px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.checklist { width: 100%; border-collapse: collapse; margin: 8px 0 12px; }
.checklist th, .checklist td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.checklist th { font-weight: 600; color: var(--ink-2); width: 55%; }
.checklist td { font-weight: 700; }
