/*
 * Mali Ritam / Little Rhythm — maliritam.com
 * Calm Premium v3 (ADR-024) static stylesheet.
 * Zero web fonts, zero external assets, zero JavaScript. Tokens mirror
 * ios/LittleRhythmApp/Design/NurseryTheme.swift (Day + Night v3).
 */

:root {
  color-scheme: light dark;
  --bg: #F7F4EF;
  --surface: #FCFBF8;
  --elevated: #EFEAE1;
  --border: #DDD5C7;
  --text: #212B2A;
  --text-2: #3B4D49;
  --accent: #216052;
  --on-accent: #FFFFFF;
  --warning: #9E3B2B;
  --tint-feed: #F2E7E0;
  --tint-feed-ink: #944926;
  --tint-diaper: #E2ECE7;
  --tint-diaper-ink: #216052;
  --tint-sleep: #E4E9EE;
  --tint-sleep-ink: #3B505C;
  --radius-card: 20px;
  --radius-control: 12px;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101413;
    --surface: #171F1D;
    --elevated: #1D2422;
    --border: #2C3532;
    --text: #E4E6E1;
    --text-2: #A3AEA7;
    --accent: #98D1BA;
    --on-accent: #101413;
    --warning: #E08A79;
    --tint-feed: #2E2B25;
    --tint-feed-ink: #E29E78;
    --tint-diaper: #26312D;
    --tint-diaper-ink: #98D1BA;
    --tint-sleep: #232B30;
    --tint-sleep-ink: #8BA9BC;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  font-family: var(--font-rounded);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.85rem);
  font-weight: 650;
}

h3 {
  font-size: 1.15rem;
  font-weight: 650;
}

p {
  margin: 0 0 1em;
}

h1 > span,
h2 > span,
h3 > span,
figcaption > span {
  display: block;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--elevated);
  border-radius: 6px;
  padding: 0.08em 0.36em;
  overflow-wrap: anywhere;
}

/* ---------- Zero-JS language toggle (/#sr default, /#en English) ---------- */

.lang-anchor {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
}

@supports selector(html:has(a)) {
  html:not(:has(#en:target)) .l-en {
    display: none;
  }

  html:has(#en:target) .l-sr {
    display: none;
  }

  html:not(:has(#en:target)) .lang-switch a[href="#sr"],
  html:has(#en:target) .lang-switch a[href="#en"] {
    background: var(--accent);
    color: var(--on-accent);
  }
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--surface);
  color: var(--accent);
  padding: 8px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Layout ---------- */

.wrap {
  width: min(100% - 40px, 1040px);
  margin-inline: auto;
}

.wrap-narrow {
  width: min(100% - 40px, 760px);
  margin-inline: auto;
}

.site-header {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.site-header .wrap,
.site-header .wrap-narrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-rounded);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.brand .sub {
  color: var(--text-2);
  font-weight: 500;
}

.lang-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.lang-switch a {
  display: inline-block;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

main {
  display: block;
}

section {
  padding: 56px 0;
}

.section-hairline {
  border-top: 1px solid var(--border);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-rounded);
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 14px;
}

.lead {
  font-size: 1.18rem;
  color: var(--text-2);
  max-width: 36em;
}

.muted {
  color: var(--text-2);
}

/* ---------- Mascot (day/night via <picture>, calm breathe) ---------- */

.mascot {
  width: 100%;
  max-width: 300px;
  margin-inline: auto;
}

.mascot-sm {
  max-width: 180px;
}

@media (prefers-reduced-motion: no-preference) {
  .breathe {
    animation: breathe 3.2s ease-in-out infinite alternate;
    transform-origin: 50% 80%;
  }
}

@keyframes breathe {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.02);
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

@media (min-width: 820px) {
  .hero-grid {
    grid-template-columns: 1.25fr 0.9fr;
  }
}

/* ---------- Trust strip ---------- */

.trust-strip {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-strip li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--tint-diaper);
  color: var(--tint-diaper-ink);
  font-family: var(--font-rounded);
  font-weight: 650;
  font-size: 0.95rem;
}

.trust-strip li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px;
}

.card p:last-child {
  margin-bottom: 0;
}

.chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--font-rounded);
  font-size: 0.85rem;
  font-weight: 650;
  margin-bottom: 12px;
}

.tint-feed {
  background: var(--tint-feed);
  color: var(--tint-feed-ink);
}

.tint-diaper {
  background: var(--tint-diaper);
  color: var(--tint-diaper-ink);
}

.tint-sleep {
  background: var(--tint-sleep);
  color: var(--tint-sleep-ink);
}

/* ---------- Screenshot showcase (6 slots, 6.9" 1320 x 2868) ---------- */

.shots {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 28px;
}

@media (min-width: 900px) {
  .shots {
    grid-template-columns: repeat(3, 1fr);
  }
}

.shot {
  margin: 0;
}

.shot-frame {
  aspect-ratio: 1320 / 2868;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--elevated);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  text-align: center;
  color: var(--text-2);
  font-size: 0.9rem;
}

.shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot-frame .shot-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.shot figcaption {
  margin-top: 10px;
  font-size: 0.95rem;
}

.shot figcaption strong {
  display: block;
  font-family: var(--font-rounded);
}

/* ---------- Privacy split ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

@media (min-width: 820px) {
  .split {
    grid-template-columns: 0.8fr 1.4fr;
  }
}

.ledger {
  list-style: none;
  margin: 0 0 1.2em;
  padding: 0;
}

.ledger li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.ledger li:first-child {
  border-top: 1px solid var(--border);
}

/* ---------- CTA ---------- */

.cta {
  text-align: center;
}

.cta .card {
  max-width: 640px;
  margin-inline: auto;
  padding: 32px 24px;
}

.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-rounded);
  font-weight: 700;
  opacity: 0.92;
}

/* ---------- Notice / callout ---------- */

.notice {
  border-left: 4px solid var(--tint-feed-ink);
  background: var(--tint-feed);
  color: var(--text);
  border-radius: var(--radius-control);
  padding: 16px 18px;
  margin: 0 0 1.4em;
}

.notice p:last-child {
  margin-bottom: 0;
}

.mail-button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-rounded);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Legal prose ---------- */

.legal {
  padding-top: 40px;
}

.legal ol {
  padding-left: 1.3em;
}

.legal ol > li {
  margin-bottom: 1.1em;
}

.legal ul {
  padding-left: 1.2em;
  margin: 0.4em 0 0;
}

.legal ul > li {
  margin-bottom: 0.5em;
}

.legal .updated {
  color: var(--text-2);
  font-size: 0.95rem;
}

.legal h2 {
  margin-top: 1.6em;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
  color: var(--text-2);
  font-size: 0.95rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 14px;
}

.footer-nav a {
  display: inline-block;
  min-height: 44px;
  padding: 10px 0;
  font-weight: 600;
}
