/* Tottr website — one stylesheet for every page. */

:root {
  --ink: #14312f;
  --body: #34504c;
  --muted: #5b726e;
  --teal: #0b6e6a;
  --teal-deep: #08504d;
  --paper: #f6faf8;
  --grid: #dcece6;
  --grid-strong: #c4ddd5;
  --blush: #d9827a;
  --sky: #6f9fcc;
  --white: #ffffff;

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --text: "Atkinson Hyperlegible", "Noto Sans", "Segoe UI", system-ui, sans-serif;

  --measure: 64ch;
  --gutter: clamp(16px, 4vw, 40px);
}

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

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

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

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus { left: var(--gutter); top: 12px; background: var(--white); padding: 8px 12px; z-index: 10; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

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

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
/* The two t's lean like a toddler's first steps. */
.wordmark .t1, .wordmark .t2 { display: inline-block; }
.wordmark .t1 { transform: rotate(-7deg) translateY(1px); }
.wordmark .t2 { transform: rotate(6deg); }
.wordmark:hover { color: var(--teal); }

.site-nav { display: flex; gap: clamp(14px, 3vw, 28px); flex-wrap: wrap; }
.site-nav a { color: var(--body); text-decoration: none; font-weight: 700; font-size: 0.98rem; }
.site-nav a:hover { color: var(--teal); text-decoration: underline; }

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

.hero {
  padding: clamp(24px, 5vw, 56px) 0 clamp(48px, 8vw, 96px);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
  border-bottom: 1px solid var(--grid-strong);
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.6vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0 0 22px;
  max-width: 13ch;
}
.hero .lede {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  max-width: 40ch;
  margin: 0 0 30px;
  color: var(--body);
}

.actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }

.button {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 10px;
  line-height: 1.2;
}
.button:hover { background: var(--teal-deep); color: var(--white); }
.text-link { font-weight: 700; }

.chart-card {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--grid-strong);
  border-radius: 14px;
  padding: 18px 18px 10px;
  box-shadow: 0 1px 0 var(--grid-strong);
}
.chart-card figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 6px 4px 4px;
}
.chart { display: block; width: 100%; height: auto; }
.chart .axis { stroke: var(--grid-strong); stroke-width: 1; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .tick { font: 600 12px var(--text); fill: var(--muted); }
.chart .band { fill: #e7f2ee; }
.chart .centile { fill: none; stroke: var(--sky); stroke-width: 1.5; opacity: 0.75; }
.chart .centile.p50 { stroke-width: 2.25; opacity: 1; }
.chart .centile-label { font: 700 11px var(--text); fill: var(--sky); }
.chart .trail { fill: none; stroke: var(--teal); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .dot { fill: var(--white); stroke: var(--teal); stroke-width: 2.5; }
.chart .dot.today { fill: var(--teal); }
.chart .callout-box { fill: var(--ink); }
.chart .callout-text { font: 700 13px var(--text); fill: var(--white); }
.chart .callout-sub { font: 400 12px var(--text); fill: #cfe3de; }

/* One orchestrated moment: the child's growth line draws itself once. */
@media (prefers-reduced-motion: no-preference) {
  .chart .trail { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.6s 0.3s ease-out forwards; }
  .chart .dot { opacity: 0; animation: pop 0.25s ease-out forwards; }
  .chart .dot:nth-of-type(1) { animation-delay: 0.30s; }
  .chart .dot:nth-of-type(2) { animation-delay: 0.50s; }
  .chart .dot:nth-of-type(3) { animation-delay: 0.70s; }
  .chart .dot:nth-of-type(4) { animation-delay: 0.90s; }
  .chart .dot:nth-of-type(5) { animation-delay: 1.10s; }
  .chart .dot:nth-of-type(6) { animation-delay: 1.35s; }
  .chart .dot:nth-of-type(7) { animation-delay: 1.65s; }
  .chart .callout { opacity: 0; animation: pop 0.3s 1.9s ease-out forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 9vw, 104px) 0; }
.section + .section { border-top: 1px solid var(--grid-strong); }

.section-head { max-width: var(--measure); margin-bottom: clamp(28px, 4vw, 44px); }
.section h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 14px;
}
.section-head p { margin: 0; font-size: 1.15rem; }
.product-name { font-weight: 700; color: var(--teal); }

/* Features: a definition list on a ruled grid, not cards. */
.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(28px, 5vw, 64px);
  margin: 0;
}
.feature {
  padding: 22px 0 24px;
  border-top: 2px solid var(--ink);
}
.feature dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.25;
}
.feature dd { margin: 0; max-width: 46ch; }

/* Parents: a phone-shaped panel next to the copy. */
.parents {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.parent-list { list-style: none; padding: 0; margin: 0 0 28px; }
.parent-list li { padding: 12px 0 12px 30px; border-bottom: 1px solid var(--grid-strong); position: relative; }
.parent-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 21px;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2.5px solid var(--teal);
  background: var(--white);
}
.langs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.langs li {
  font-weight: 700;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--grid-strong);
  border-radius: 999px;
  padding: 6px 16px;
}
.langs li[lang="te"] { font-family: "Noto Sans Telugu", var(--text); }
.langs li[lang="hi"] { font-family: "Noto Sans Devanagari", var(--text); }

.phone {
  background: var(--ink);
  border-radius: 34px;
  padding: 14px;
  color: var(--white);
}
.phone-screen { background: var(--white); border-radius: 24px; padding: 20px 18px 22px; color: var(--body); }
.phone-screen .who { font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--ink); margin: 0; }
.phone-screen .age { margin: 0 0 16px; color: var(--muted); font-size: 0.95rem; }
.slot { border-radius: 12px; padding: 12px 14px; margin-top: 10px; background: var(--paper); }
.slot strong { display: block; color: var(--ink); }
.slot span { font-size: 0.93rem; }
.slot.due { background: #fdecea; }
.slot.due strong { color: #9a3328; }

/* Privacy */
.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); margin: 0; padding: 0; list-style: none; }
.promises h3 { font-family: var(--display); font-size: 1.2rem; color: var(--ink); margin: 0 0 6px; line-height: 1.25; }
.promises p { margin: 0; }

/* Pilot */
.pilot { background: var(--teal); color: #e6f3f0; }
.pilot h2 { color: var(--white); }
.pilot .section-head p { color: #e6f3f0; }
.pilot .button { background: var(--white); color: var(--teal-deep); }
.pilot .button:hover { background: #e6f3f0; }
.pilot a:not(.button) { color: var(--white); }

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

.site-footer { padding: 36px 0 48px; font-size: 0.95rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--body); }

/* ---------- Policy pages ---------- */

.doc { padding: clamp(24px, 5vw, 56px) 0 80px; }
.doc .wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.doc h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem, 4.5vw, 3rem); letter-spacing: -0.03em; color: var(--ink); line-height: 1.05; margin: 0 0 8px; }
.doc h2 { font-family: var(--display); font-size: 1.35rem; color: var(--ink); margin: 40px 0 8px; line-height: 1.25; }
.doc .updated { color: var(--muted); margin: 0 0 24px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.notice {
  background: #fff6e8;
  border: 1px solid #f0d3a6;
  border-radius: 12px;
  padding: 14px 16px;
  color: #6b4a14;
  margin: 0 0 28px;
}

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .hero .wrap, .parents { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 16ch; }
  .phone { max-width: 340px; }
}
@media (max-width: 680px) {
  .features, .promises { grid-template-columns: minmax(0, 1fr); }
  body { font-size: 1rem; }
}
