/*
 * Okomi's marketing site — Washi & Ink, on the web.
 *
 * The tokens are the app's, copied rather than imported because there is nothing here to
 * import them with: this is one HTML file and one stylesheet, no build step, no dependencies.
 * That is a deliberate trade — a landing page that needs `npm ci` before anyone can look at it
 * is a landing page that rots — and the cost is that these hexes have a twin in
 * `app/src/theme.ts`. If a colour changes there, it changes here; DESIGN_SYSTEM.md is the
 * record both of them answer to.
 */

:root {
  /* Surfaces — paper, in three weights. */
  --surface-0: #e9e2d2;
  --surface-1: #f3efe4;
  --surface-2: #fdfbf6;
  /* Ink. */
  --ink: #33302a;
  --ink-2: #726d60;
  --ink-muted: #9c9686;
  --rule: #8b7f62;
  /* 藍 indigo — the brand's one accent. */
  --accent: #35506b;
  --accent-deep: #2c445c;
  --on-accent: #fbf8f1;
  /* 朱 vermilion — the seal, and nothing else. */
  --seal: #bc4a35;
  --seal-ink: #973723;
  --seal-bg: #f4e3dc;

  /* Track tints, as dyed card stock (DESIGN_SYSTEM §2). */
  --survival-bg: #f8f1e4;
  --survival-line: #b39a6e;
  --survival-ink: #6b5734;
  --daily-bg: #f0f4ec;
  --daily-line: #8fa37d;
  --daily-ink: #46583a;
  --social-bg: #f7eef0;
  --social-line: #b58c93;
  --social-ink: #6e4750;
  --work-bg: #edf1f6;
  --work-line: #8598ae;
  --work-ink: #3b4e64;

  --voice: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Karla", system-ui, -apple-system, sans-serif;
  /* Japanese in the display voice: mincho, because Fraunces has no kana (DESIGN_SYSTEM §4).
     No webfont — a Japanese face is megabytes, and every device that matters ships one. */
  --jp-voice: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "MS Mincho", serif;
  --jp: "Hiragino Sans", "Noto Sans JP", sans-serif;

  --page: 1088px;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--surface-0);
  /* Washi has a grain; a flat fill does not. One dot every 24px, at the edge of visible —
     it should register as texture rather than as a pattern anyone can count. */
  background-image: radial-gradient(rgba(139, 127, 98, 0.18) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
}

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

/* ── the mark ─────────────────────────────────────────────────────────────────────── */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.badge {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-family: var(--jp);
  font-size: 22px;
  flex: none;
}

.wordmark {
  font-family: var(--voice);
  font-size: 26px;
  letter-spacing: 0.03em;
}

/* ── nav ──────────────────────────────────────────────────────────────────────────── */

header.top {
  padding: 22px 0;
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
}

.top nav {
  margin-left: auto;
  display: flex;
  gap: 28px;
}

.top nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 16px;
}

.top nav a:hover {
  color: var(--accent);
}

/* ── buttons ──────────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.28s ease, color 0.28s ease, border-color 0.28s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-deep);
}

.btn-quiet {
  background: var(--surface-2);
  color: var(--ink);
  border-color: rgba(139, 127, 98, 0.45);
}

.btn-quiet:hover {
  border-color: var(--rule);
}

.btn-paper {
  background: var(--surface-1);
  color: var(--accent);
}

.btn-sm {
  padding: 11px 22px;
  font-size: 16px;
}

/* ── hero ─────────────────────────────────────────────────────────────────────────── */

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: 72px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 88px;
}

.kicker {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 18px;
}

.kicker .jp {
  font-family: var(--jp);
  text-transform: none;
}

h1 {
  font-family: var(--voice);
  font-weight: 600;
  font-size: clamp(40px, 5.4vw, 58px);
  line-height: 1.14;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

h1 .second {
  display: block;
  color: var(--accent);
}

.lede {
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink-2);
  max-width: 30em;
  margin: 0 0 32px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.fineprint {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0;
}

/* ── the app, standing in for itself ──────────────────────────────────────────────── */

.preview {
  position: relative;
  border: 1px solid rgba(139, 127, 98, 0.4);
  border-radius: 28px;
  background: var(--surface-1);
  padding: 14px;
  box-shadow: 0 24px 48px -32px rgba(51, 48, 42, 0.4);
}

.preview-head {
  display: flex;
  align-items: center;
  gap: 10px;
  /* Room on the right for the seal, which hangs off the corner and would otherwise sit on
     top of the count. */
  padding: 6px 56px 16px 8px;
}

.preview-head .badge {
  width: 34px;
  height: 34px;
  font-size: 17px;
}

.preview-head .wordmark {
  font-size: 21px;
}

/*
 * The app's own capability count, not a streak.
 *
 * The reference put a flame and a number here, three sections above a headline that says this
 * app is built for memory and *not* for streaks. The app has no streak by design — a streak
 * measures attendance, and showing one on the way in would promise a product we deliberately
 * did not build. This is what the app actually shows: how many things you can now do.
 */
.candid {
  margin-left: auto;
  background: #e7eaf0;
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 4px 12px;
  font-weight: 700;
  font-size: 14px;
}

.card {
  background: var(--surface-2);
  border: 1px solid rgba(139, 127, 98, 0.4);
  border-radius: var(--radius);
  padding: 16px;
}

.chip {
  display: inline-block;
  background: #e7eaf0;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 999px;
  padding: 4px 10px;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.speaker {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e7eaf0;
  display: grid;
  place-items: center;
  color: var(--accent-deep);
}

.word {
  font-family: var(--jp);
  font-size: 40px;
  font-weight: 600;
  margin: 10px 0 2px;
}

.reading {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0 0 14px;
}

.options {
  display: flex;
  gap: 10px;
}

.option {
  flex: 1;
  border: 1px solid rgba(139, 127, 98, 0.45);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  font-size: 15px;
  background: var(--surface-1);
}

.option.right {
  border-color: #5e7a4e;
  background: #e6ebdd;
  color: #3f5533;
  font-weight: 600;
}

.option.dim {
  opacity: 0.5;
}

.bubbles {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.bubble {
  max-width: 78%;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 15px;
}

.bubble .jp {
  font-family: var(--jp);
  display: block;
}

.bubble .en {
  font-size: 13px;
  opacity: 0.75;
}

.bubble.aria {
  background: var(--surface-2);
  border: 1px solid rgba(139, 127, 98, 0.35);
  border-bottom-left-radius: 3px;
}

.bubble.you {
  background: var(--accent);
  color: var(--on-accent);
  justify-self: end;
  border-bottom-right-radius: 3px;
}

.progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 4px 4px;
}

.progress .track {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(139, 127, 98, 0.3);
  overflow: hidden;
}

.progress .fill {
  display: block;
  height: 100%;
  width: 75%;
  background: var(--accent);
}

.progress .count {
  font-size: 12px;
  color: var(--ink-muted);
}

/* The stamp: rare, and always naming something rather than decorating it. */
.seal {
  position: absolute;
  top: -20px;
  right: -22px;
  width: 66px;
  height: 66px;
  border-radius: 999px;
  border: 2px solid var(--seal);
  background: var(--seal-bg);
  color: var(--seal-ink);
  display: grid;
  place-items: center;
  font-family: var(--jp-voice);
  font-size: 20px;
  transform: rotate(-8deg);
}

.seal-inline {
  position: static;
  transform: rotate(-6deg);
}

/* ── the numbers ──────────────────────────────────────────────────────────────────── */

.stats {
  background: var(--surface-1);
  border-top: 1px solid rgba(139, 127, 98, 0.3);
  border-bottom: 1px solid rgba(139, 127, 98, 0.3);
}

.stats .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  padding: 44px 24px;
}

.stats div + div {
  border-left: 1px solid rgba(139, 127, 98, 0.3);
}

.stat-n {
  font-family: var(--voice);
  font-size: 34px;
  margin: 0;
}

.stat-n .jp {
  font-family: var(--jp-voice);
}

.stat-l {
  font-size: 14px;
  color: var(--ink-2);
  margin: 6px 0 0;
}

/* ── sections ─────────────────────────────────────────────────────────────────────── */

section {
  padding: 88px 0;
}

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 14px;
}

h2 {
  font-family: var(--voice);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 40px);
  line-height: 1.18;
  margin: 0 0 18px;
}

.centered {
  text-align: center;
}

.centered .eyebrow,
.centered h2 {
  text-align: center;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}

.step {
  background: var(--surface-2);
  border: 1px solid rgba(139, 127, 98, 0.4);
  border-radius: var(--radius);
  padding: 26px;
}

.step-n {
  font-family: var(--voice);
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 0.16em;
  margin: 0 0 12px;
}

.step h3,
.feature h3 {
  font-family: var(--voice);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  margin: 0 0 8px;
}

.step p,
.feature p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.62;
}

/* Why: prose on the left, a grid of four on the right. */
.why {
  background: var(--surface-1);
}

.why .wrap {
  display: grid;
  /* The prose is a column; the four cards want the rest. At an even split their headings wrap
     to two lines, which turns a tidy grid into eight ragged ones. */
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 56px;
  align-items: start;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature {
  background: var(--surface-2);
  border: 1px solid rgba(139, 127, 98, 0.4);
  border-radius: var(--radius);
  padding: 24px;
}

.feature .icon {
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}

/* Tracks: dyed card stock, one per thing a learner is here for. */
.tracks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 44px;
}

.track-card {
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid;
}

.track-card .jp {
  font-family: var(--jp-voice);
  font-size: 30px;
  display: block;
  margin-bottom: 10px;
}

.track-card h3 {
  font-family: var(--voice);
  font-weight: 600;
  font-size: 19px;
  margin: 0 0 8px;
}

.track-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.track-survival {
  background: var(--survival-bg);
  border-color: var(--survival-line);
  color: var(--survival-ink);
}

.track-daily {
  background: var(--daily-bg);
  border-color: var(--daily-line);
  color: var(--daily-ink);
}

.track-social {
  background: var(--social-bg);
  border-color: var(--social-line);
  color: var(--social-ink);
}

.track-work {
  background: var(--work-bg);
  border-color: var(--work-line);
  color: var(--work-ink);
}

/* ── the ask ──────────────────────────────────────────────────────────────────────── */

.finish {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 28px;
  padding: 72px 32px;
  text-align: center;
}

.finish .jp {
  font-family: var(--jp-voice);
  font-size: 19px;
  opacity: 0.85;
  margin: 0 0 16px;
}

.finish h2 {
  max-width: 16em;
  margin: 0 auto 18px;
}

.finish p {
  max-width: 34em;
  margin: 0 auto 32px;
  opacity: 0.88;
}

/* ── footer ───────────────────────────────────────────────────────────────────────── */

footer {
  padding: 40px 0 56px;
}

footer .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

footer nav {
  margin: 0 auto;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

footer a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
}

footer a:hover {
  color: var(--accent);
}

.copyright {
  font-size: 14px;
  color: var(--ink-muted);
}

/* ── narrow ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero .wrap,
  .why .wrap {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .preview {
    max-width: 420px;
    margin: 0 auto;
  }

  .steps,
  .features,
  .tracks {
    grid-template-columns: 1fr 1fr;
  }

  .top nav {
    display: none;
  }
}

@media (max-width: 560px) {
  section {
    padding: 56px 0;
  }

  .steps,
  .features,
  .tracks,
  .stats .wrap {
    grid-template-columns: 1fr;
  }

  .stats div + div {
    border-left: 0;
    border-top: 1px solid rgba(139, 127, 98, 0.3);
    padding-top: 24px;
    margin-top: 24px;
  }

  .finish {
    padding: 48px 22px;
  }

  footer .wrap {
    justify-content: center;
    text-align: center;
  }

  footer nav {
    order: 3;
    margin: 0;
    justify-content: center;
  }
}
