/* Baby Kick Tracker public pages. Theme follows the earlier privacy page:
   rose gradient header, white card, rose headings. No scripts: the
   hosting CSP allows none, so the language switch uses :target. */
:root {
  color-scheme: light;
  --bg: #fff0f5;
  --card: #ffffff;
  --text: #475569;
  --strong: #334155;
  --muted: #64748b;
  --rose: #e11d48;
  --rose-dark: #be123c;
  --rose-soft: #ffe4e6;
  --rose-bg: #fff1f2;
  --line: #e2e8f0;
  --panel: #f8fafc;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.05rem;
  line-height: 1.75;
}

.page { max-width: 820px; margin: 0 auto; padding: 2.5rem 1rem 3rem; }

.card {
  background: var(--card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(225, 29, 72, 0.08);
}

/* ── Header ─────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #fb7185, #fda4af);
  padding: 2.75rem 1.5rem 2rem;
  text-align: center;
  color: #fff;
}

.logo {
  display: inline-block;
  background: #fff;
  border-radius: 50%;
  padding: 14px;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.logo img { display: block; width: 80px; height: 80px; object-fit: contain; }

.hero h1 {
  margin: 0 0 0.35rem;
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.subtitle { margin: 0; font-size: 1.15rem; font-weight: 500; color: #fff1f2; }

.pills {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 1.4rem;
  padding: 0.25rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.22);
}

.pills a {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1.1rem;
  border-radius: 99px;
  font-size: 0.92rem;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.pills a:hover { background: rgba(255, 255, 255, 0.15); }

.pills a[aria-current='page'] {
  background: #fff;
  color: var(--rose);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ── Language switch (#ms is the default) ───────────── */

section.en { display: none; }
section.en:target { display: block; }
body:has(section.en:target) section.ms { display: none; }
body:has(section.en:target) .lang a[href='#en'],
body:not(:has(section.en:target)) .lang a[href='#ms'] {
  background: #fff;
  color: var(--rose);
}

/* ── Content ────────────────────────────────────────── */
.content { padding: 2.5rem 2.75rem 2rem; }

.updated { margin: 0 0 2rem; font-size: 0.95rem; color: #94a3b8; font-style: italic; }

h2 {
  color: var(--rose);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 2.25rem 0 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--rose-soft);
}

section > h2:first-of-type { margin-top: 0; }

h3 { color: var(--strong); font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }

p { margin: 0 0 1.1rem; }

strong { color: var(--strong); }

a { color: var(--rose); font-weight: 500; overflow-wrap: anywhere; }
a:hover { color: var(--rose-dark); }

ul, ol { padding-left: 1.4rem; margin: 0 0 1.2rem; }
li { margin-bottom: 0.45rem; }
li::marker { color: #fb7185; }

.alert {
  background: var(--rose-bg);
  border-left: 4px solid #fb7185;
  border-radius: 0 10px 10px 0;
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
}
.alert p { margin: 0; color: var(--rose-dark); font-size: 0.98rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.3rem 1.5rem;
  margin: 1.5rem 0;
}
.panel h3 { margin-top: 0; }
.panel p:last-child { margin-bottom: 0; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 1.6rem;
  border-radius: 99px;
  background: var(--rose);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.2);
}
.button:hover { background: var(--rose-dark); color: #fff; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: 0.9rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--rose-soft);
  color: var(--rose);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.8rem;
}

/* ── Footer ─────────────────────────────────────────── */
footer {
  background: var(--panel);
  border-top: 1px solid #f1f5f9;
  padding: 1.4rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.2rem; margin-bottom: 0.5rem; }

/* Section title for screen readers; the page header already shows it */
.sr-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible { outline: 3px solid #9161dc; outline-offset: 3px; border-radius: 6px; }

@media (max-width: 640px) {
  .page { padding: 1rem 0.5rem 2rem; }
  .hero { padding: 2rem 1rem 1.6rem; }
  .hero h1 { font-size: 1.8rem; }
  .content { padding: 1.6rem 1.1rem 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
