/* Kakeruyo site styles. Dark only, like the app: cream ink on the app icon's navy.
   The five level colours are the app's mastery scale (MasteryGrid.swift), used for the drift. */
:root {
  --bg: #121219;
  --surface: #1a1a23;
  --line: #2a2a35;
  --ink: #f4f1ea;
  --muted: #9b98a5;
  --faint: #6c6a76;
  --link: #8fb8ff;
  --failed: #7a0d8c;
  --low: #3b528c;
  --fair: #21918c;
  --good: #5ec961;
  --excellent: #fde826;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 880px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
p, ul { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header ------------------------------------------------------------- */
.site-header { position: relative; z-index: 2; }
.site-header .wrap { display: flex; align-items: center; height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.wordmark:hover { text-decoration: none; }
.wordmark img { width: 30px; height: 30px; border-radius: 7px; }
.site-nav { margin-left: auto; display: flex; gap: 20px; font-size: 15px; }
.site-nav a { color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }

/* Hero: the handwriting over the drift -------------------------------- */
.hero { position: relative; min-height: 100svh; margin-top: -64px; display: grid; place-items: center; overflow: hidden; }
.hero canvas.drift { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: relative; z-index: 1; text-align: center; padding: 96px 16px 72px; width: min(100%, 720px); }
.hero-copy canvas.handwriting { display: block; width: 100%; margin: 0 auto 28px; }
.tagline { text-wrap: balance; font-size: clamp(1.15rem, 2.4vw, 1.4rem); color: var(--ink); margin: 0 0 22px; }
.soon { display: inline-block; padding: 9px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.scroll-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 1; color: var(--faint); font-size: 13px; }

/* Features ------------------------------------------------------------ */
.features { padding: 96px 0 40px; }
.feature { display: grid; grid-template-columns: 56px 1fr; gap: 4px 20px; padding: 28px 0; border-top: 1px solid var(--line); }
.feature:first-child { border-top: 0; }
.feature .glyph { grid-row: span 2; width: 56px; height: 56px; }
.feature h2 { font-size: 1.3rem; align-self: end; }
.feature p { color: var(--muted); margin: 0; max-width: 38em; }
.levels { grid-column: 2; display: flex; gap: 6px; margin-top: 12px; align-items: center; font-size: 13px; color: var(--faint); }
.levels span.dot { flex: none; width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* Plain pages (data, 404) --------------------------------------------- */
main.page { padding: 40px 0 72px; }
main.page h1 { font-size: 2rem; margin: 0 0 .5em; }
main.page h2 { font-size: 1.2rem; margin: 2em 0 .5em; }
main.page .wrap { max-width: 720px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 0 0 1em; }

/* Footer -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 44px; color: var(--faint); font-size: 14px; }
.site-footer a { color: var(--muted); }
.site-footer .wrap > div + div { margin-top: 6px; }

@media (max-width: 560px) {
  .feature { grid-template-columns: 44px 1fr; gap: 4px 14px; }
  .feature .glyph { width: 44px; height: 44px; }
  .features { padding-top: 64px; }
}
