/* Sensei by EdNinja: shared styles for every page of the site.
   Contrast (WCAG 2.x) of the text pairs used here is listed next to each color. */

:root {
  --blue-900: #08324f; /* white on it 13.3:1; headings on paper 13.3:1 */
  --blue-800: #0b4a73; /* white on it 9.4:1 */
  --blue-700: #0a6aa8; /* links: 5.8:1 on paper, 5.6:1 on cream, 5.3:1 on sky-50; white on it 5.8:1 */
  --blue-500: #2a9fd8; /* decoration only */
  --sky-100: #d7edfa;
  --sky-50: #eaf6fd;
  --orange: #f28c28; /* the sensei's robe; dark ink on it 5.9:1 */
  --orange-ink: #a24d00; /* orange dark enough for text: 5.8:1 on paper, 5.6:1 on cream */
  --yellow: #ffc905; /* large text on blue-800/900 only (6.1:1 / 8.6:1; 3.7:1 on blue-700) */
  --green: #2e7d3a; /* 5.1:1 on paper */
  --ink: #142c3d; /* 13.9:1 on cream */
  --ink-soft: #4a6070; /* 6.3:1 on cream, 6.6:1 on paper, 6.0:1 on sky-50 */
  --paper: #ffffff;
  --cream: #fffaf2;
  --line: #d9e7f0;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(8, 50, 79, 0.12);
  --shadow-sm: 0 4px 14px rgba(8, 50, 79, 0.10);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-display: "Arial Rounded MT Bold", ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-700); }
a:hover { color: var(--blue-900); }
/* Orange ring with a dark halo: the halo gives >= 3:1 on the light sections, the orange >= 3:1 on the dark ones. */
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; box-shadow: 0 0 0 6px var(--blue-900); border-radius: 8px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--paper); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 16px; }
.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; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 250, 242, 0.92);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--blue-900); font-family: var(--font-display); font-size: 19px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.top nav a { text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.top nav a:hover { background: var(--sky-50); color: var(--ink); }
.lang {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line); color: var(--ink); font: inherit; font-weight: 800; font-size: 14px;
  padding: 6px 30px 6px 12px; border-radius: 999px; cursor: pointer; margin-left: 6px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%234a6070'/%3E%3C/svg%3E") right 8px center / 18px no-repeat;
}
.lang:hover { background-color: var(--sky-50); }
@media (max-width: 820px) { .top nav a.hide-sm { display: none; } }

/* ---------- Buttons ---------- */
.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; text-decoration: none;
  padding: 10px 20px 10px 16px; border-radius: 14px; line-height: 1.1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease;
}
.store:hover { color: #fff; transform: translateY(-2px); }
.store svg { width: 26px; height: 26px; fill: currentColor; }
.store small { display: block; font-size: 11px; opacity: 0.85; }
/* Not a link until the App Store listing exists (see the comment next to it in index.html). */
.store.soon { cursor: default; box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.35); }
.store.soon:hover { transform: none; }
.store strong { font-size: 20px; letter-spacing: -0.2px; }
@media (prefers-reduced-motion: reduce) { .store { transition: none; } .store:hover { transform: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(122, 200, 240, 0.30), transparent 45%),
    radial-gradient(circle at 10% 110%, rgba(242, 140, 40, 0.22), transparent 40%),
    linear-gradient(160deg, var(--blue-800), var(--blue-900) 75%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.10;
  background-image: radial-gradient(#fff 1.4px, transparent 1.6px); background-size: 26px 26px;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 72px 0 96px; }
.eyebrow { display: inline-block; font-weight: 800; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; background: rgba(255, 255, 255, 0.14); padding: 6px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.07; margin: 18px 0 16px; letter-spacing: -1px; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p.lead { font-size: clamp(18px, 2vw, 21px); max-width: 38ch; margin: 0 0 28px; }
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hero .cta .note { font-size: 14px; opacity: 0.9; }
.hero-art { position: relative; justify-self: center; width: min(460px, 100%); padding-top: 112px; }
/* The sensei peeks over the top of the dashboard card. */
.hero-art .sensei { position: absolute; width: 150px; right: 12%; top: 0; z-index: 0; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.3)); }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; padding: 48px 0 96px; }
  .hero p.lead { margin-inline: auto; }
  .hero .cta { justify-content: center; }
  .hero-art { width: min(420px, 100%); text-align: left; padding-top: 100px; }
  .hero-art .sensei { width: 136px; }
}

/* ---------- Dashboard mock (illustration made with HTML, sample data) ---------- */
.mock { background: var(--paper); color: var(--ink); border-radius: 26px; padding: 20px; box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28); position: relative; z-index: 1; }
.mock-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mock-avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--orange); color: var(--ink); display: grid; place-items: center; font-family: var(--font-display); font-size: 19px; }
.mock-head strong { display: block; font-size: 18px; line-height: 1.2; color: var(--blue-900); }
.mock-head span { font-size: 13px; color: var(--ink-soft); }
.mock-tag { margin-left: auto; font-size: 11px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--orange-ink); background: #fff1de; padding: 4px 9px; border-radius: 999px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 14px; }
.stat { background: var(--sky-50); border-radius: 14px; padding: 9px 10px; }
.stat dt { font-size: 12px; color: var(--ink-soft); line-height: 1.3; }
.stat dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 21px; color: var(--blue-900); line-height: 1.1; }
.chart { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 6px; margin-bottom: 12px; }
.chart p { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.chart svg { display: block; width: 100%; height: auto; }
.chart .legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-soft); margin: 2px 0 4px; }
.chart .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.chart .legend .key-acc { background: var(--blue-700); }
.chart .legend .key-hint { background: var(--orange); border: 1px solid var(--orange-ink); }
.mock-apps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.mock-apps li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 7px 10px; border-radius: 10px; background: var(--cream); }
.mock-apps li span:last-child { color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 420px) { .stats { grid-template-columns: repeat(2, 1fr); } .mock { padding: 16px; } }

/* Numbered circle */
.num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--orange); color: var(--ink); font-family: var(--font-display); font-size: 19px; /* dark digits: 5.9:1 on orange */
  border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

/* ---------- Sections ---------- */
main, section { scroll-margin-top: 64px; }
section { padding: 88px 0; }
section.alt { background: var(--paper); }
.kicker { color: var(--orange-ink); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; font-size: 13px; margin: 0 0 8px; }
h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.12; letter-spacing: -0.5px; margin: 0 0 14px; color: var(--blue-900); }
.sub { color: var(--ink-soft); font-size: 19px; max-width: 62ch; margin: 0 0 40px; }
.center { text-align: center; }
.center .sub { margin-inline: auto; }
.sub-tight { margin-bottom: 24px; }
.sub-center { margin-inline: auto; }
@media (max-width: 720px) { section { padding: 64px 0; } }

/* ---------- How it works ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; }
.steps li { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 26px 26px; position: relative; text-align: left; }
.steps li .num { position: absolute; top: -20px; left: 24px; }
.steps h3 { margin: 4px 0 6px; font-size: 21px; color: var(--blue-900); }
.steps p { margin: 0; color: var(--ink-soft); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--paper); border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.feature .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--sky-50); }
.feature .ic svg { width: 26px; height: 26px; fill: var(--blue-700); }
.feature h3 { margin: 14px 0 6px; font-size: 19px; color: var(--blue-900); }
.feature p { margin: 0; color: var(--ink-soft); font-size: 16px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---------- Privacy ---------- */
.parents { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.checks li::before { content: ""; flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%; background: var(--blue-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6 11-11-1.4-1.4z' fill='%23fff'/%3E%3C/svg%3E") center / 18px no-repeat; }
.trust { background: var(--blue-800); color: #fff; border-radius: 28px; padding: 32px; position: relative; overflow: hidden; }
.trust h3 { margin: 0 0 12px; font-size: 24px; }
.trust p { margin: 0 0 10px; }
.trust a { color: var(--yellow); font-weight: 800; } /* 6.1:1 on blue-800 */
.trust a:hover { color: #fff; }
@media (max-width: 860px) { .parents { grid-template-columns: 1fr; } }

/* ---------- Apps ---------- */
.apps { list-style: none; padding: 0; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 820px; }
.apps li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-weight: 700; color: var(--blue-900); box-shadow: var(--shadow-sm); }
.apps-note { margin: 24px auto 0; font-size: 15px; color: var(--ink-soft); max-width: 62ch; }

/* ---------- Requirements ---------- */
.req { max-width: 820px; margin: 0 auto; background: var(--sky-50); border: 1px solid var(--sky-100); border-radius: 28px; padding: 30px 32px; }
.req h2 { font-size: clamp(26px, 3.4vw, 34px); }
.req ul { margin: 0 0 12px; padding-left: 22px; }
.req li { margin-bottom: 6px; }
.req p { margin: 0 0 10px; color: var(--ink-soft); }
@media (max-width: 560px) { .req { padding: 24px 20px; } }

/* ---------- Help / FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 0 22px; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 800; position: relative; color: var(--blue-900); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 400; color: var(--orange-ink); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 18px; color: var(--ink-soft); }
.faq details > div p { margin: 0 0 10px; }
.faq details > div ol, .faq details > div ul { margin: 0 0 10px; padding-left: 22px; }
.contact-card { max-width: 820px; margin: 28px auto 0; background: var(--sky-50); border-radius: 20px; padding: 22px 26px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.contact-card p { margin: 0; }
.contact-card a { font-weight: 800; }

/* ---------- Get it ---------- */
.get { text-align: center; background: linear-gradient(180deg, var(--cream), #e6f3fc); }
.get img.icon { width: 120px; margin: 0 auto 20px; border-radius: 26px; box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
footer { background: var(--blue-900); color: rgba(255, 255, 255, 0.86); padding: 56px 0 40px; font-size: 15px; } /* 10.2:1 */
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
footer img.logo { width: 170px; margin-bottom: 12px; }
footer .fh { color: #fff; font-weight: 800; margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.8px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
footer a { color: rgba(255, 255, 255, 0.86); text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 20px; font-size: 13px; opacity: 0.8; } /* 7.0:1 */
@media (max-width: 720px) { footer .wrap { grid-template-columns: 1fr 1fr; } footer .wrap > div:first-child { grid-column: 1 / -1; } }

/* ---------- Legal pages ---------- */
.doc-hero { background: linear-gradient(160deg, var(--blue-800), var(--blue-900)); color: #fff; padding: 56px 0 48px; }
.doc-hero h1 { margin: 0 0 6px; font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.5px; }
.doc-hero p { margin: 0; opacity: 0.9; }
.doc-hero .wrap { max-width: 760px; }
.doc { padding: 48px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; letter-spacing: -0.2px; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; color: var(--blue-900); }
.doc p, .doc li { color: #26394a; }
.doc .tldr { background: var(--sky-50); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 8px; }
.doc .tldr h2 { margin-top: 0; }
.doc .note { font-size: 15px; color: var(--ink-soft); border-left: 4px solid var(--blue-500); padding-left: 14px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
.doc th { background: var(--sky-50); }
@media (max-width: 560px) { .doc table { font-size: 14px; } .doc th, .doc td { padding: 8px 4px; } .doc .tldr { padding: 20px; } }

/* ---------- 404 ---------- */
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; background: linear-gradient(160deg, var(--blue-800), var(--blue-900)); color: #fff; padding: 40px 0; }
.lost img { margin: 0 auto 24px; width: 180px; }
.lost h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 10px; }
.lost a { color: var(--yellow); font-weight: 800; }

/* Language switching: elements marked for another language are hidden.
   The page defaults to English (html lang="en"), so it reads fine without JavaScript. */
html:not([lang="en"]) [data-only="en"],
html:not([lang="es"]) [data-only="es"],
html:not([lang="fr"]) [data-only="fr"],
html:not([lang="ja"]) [data-only="ja"] { display: none !important; }
html[lang="ja"] body { line-height: 1.75; }
html[lang="ja"] h1, html[lang="ja"] h2 { letter-spacing: 0; line-break: strict; }
