/* Haruki — haruki.run
   Colour and type tokens mirror the app's own design system:
   app/src/main/java/com/haruki/run/ui/theme/Color.kt (2026-08 monochrome-chrome revision)
   and the Haruki Design System canvas.

   Rule of the system: the UI chrome is achromatic — unbleached paper and ink.
   Colour is lit only where it means something: the route actually run, the
   accumulation scale, and "now"/destructive. Nothing here is coloured for decoration. */

/* 自前配信のサブセット（scripts/build-fonts.py が作る）。第三者への通信はこのサイトから一切出さない
   ——計測タグもCookieも置かないという方針は、フォントのCDNにも同じように効く。
   Bodoni Moda / Libre Caslon Text / Archivo は落として、日本語フェイスがラテン文字も受け持つ。
   下の --font-* はその並びのまま——読み込まれなければ次の候補へ落ちる。

   LP とは別のサブセット（/fonts/legal/）を読む。規約の本文は長く、字種も多いので、
   これを LP と1本にまとめると最初に出る1枚が重くなる。 */
@font-face{font-family:'Zen Antique';font-style:normal;font-weight:400;font-display:swap;
  src:url('/fonts/legal/ZenAntique-400.woff2') format('woff2')}
@font-face{font-family:'Shippori Mincho';font-style:normal;font-weight:400;font-display:swap;
  src:url('/fonts/legal/ShipporiMincho-400.woff2') format('woff2')}
@font-face{font-family:'Zen Kaku Gothic New';font-style:normal;font-weight:400;font-display:swap;
  src:url('/fonts/legal/ZenKakuGothicNew-400.woff2') format('woff2')}
@font-face{font-family:'Zen Kaku Gothic New';font-style:normal;font-weight:500;font-display:swap;
  src:url('/fonts/legal/ZenKakuGothicNew-500.woff2') format('woff2')}

:root {
  /* surfaces — warm unbleached paper */
  --bg: #f7f3e9;
  --surface: #efe9da;
  --surface-elevated: #fbf8ef;
  --border: #e4dcc9;

  /* text */
  --ink: #2a2620;
  --muted: #6b6152;

  /* interaction — achromatic on purpose. CTA and links carry no hue. */
  --accent: #2a2620;
  --accent-pressed: #14110d;
  --on-accent: #ffffff;

  /* run data — the route actually run */
  --route-line: #5e9e52;
  --route-marker: #3c6b34;

  /* accumulation scale — 0 / <=3km / <=7km / >7km */
  --data-1: #efe9da;
  --data-2: #d7e8d1;
  --data-3: #5e9e52;
  --data-4: #3c6b34;

  /* "now" and destructive. Never decorative. */
  --critical: #d5583c;

  /* type roles */
  --font-display: 'Zen Antique', 'Hiragino Mincho ProN', serif;
  --font-reading: 'Libre Caslon Text', 'Shippori Mincho', 'Hiragino Mincho ProN', serif;
  --font-ui: 'Archivo', 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', sans-serif;
  --font-voice: 'Shippori Mincho', 'Libre Caslon Text', 'Hiragino Mincho ProN', serif;

  /* scale (px == sp in the app) */
  --text-title: 28px;      --leading-title: 36px;
  --text-heading: 20px;    --leading-heading: 28px;
  --text-subheading: 18px; --leading-subheading: 25px;
  --text-body: 16px;       --leading-body: 26px;
  --text-body-sm: 14px;    --leading-body-sm: 22px;
  --text-label: 14px;      --leading-label: 20px;
  --text-diary: 17px;      --leading-diary: 30px;
  --text-meta: 13px;       --leading-meta: 20px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1e2a33;
    --surface: #26333d;
    --surface-elevated: #2e3b45;
    --border: #3b4854;
    --ink: #f0e9d6;
    --muted: #b7ae97;
    --accent: #f0e9d6;
    --accent-pressed: #d9d2be;
    --on-accent: #14201c;
    --route-line: #7cb86e;
    --route-marker: #5e9e52;
    --data-1: #2e3b45;
    --data-2: #3d5c3a;
    --data-3: #5e9e52;
    --data-4: #7cb86e;
    --critical: #e06b4e;
  }
}

:root[data-theme='dark'] {
  --bg: #1e2a33;
  --surface: #26333d;
  --surface-elevated: #2e3b45;
  --border: #3b4854;
  --ink: #f0e9d6;
  --muted: #b7ae97;
  --accent: #f0e9d6;
  --accent-pressed: #d9d2be;
  --on-accent: #14201c;
  --route-line: #7cb86e;
  --route-marker: #5e9e52;
  --data-1: #2e3b45;
  --data-2: #3d5c3a;
  --data-3: #5e9e52;
  --data-4: #7cb86e;
  --critical: #e06b4e;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  /* 本文＝箱組（Haruki組版契約、tokens/typesetting.json の platform.web.body）。禁則の
     範囲で機械的に折る。このファイルは正本の生成物を読まない手動ミラーなので、
     src/styles/lp.css と同じ値をここへ直接書く。 */
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
}

/* 見出し・ラベル＝文節改行組（platform.web.indicator）。語句の切れ目でだけ折る。 */
h1, h2, h3, .wordmark, .eyebrow, .section-title, .step h3,
.site-header nav a, .site-footer nav a, .page-header .updated {
  line-break: strict;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 欧文の行末分割（platform.web.hyphenation）。値は正本（--hyphenation-* = 6 / 2 / 3）。
   :lang(en) は英語セクション（<section lang="en">）にだけ効く。上の文節改行組は
   ハイフネーションの対象ではないので hyphens を manual へ戻す。 */
:lang(en) {
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-limit-chars: 6 2 3;
}
:lang(en) :is(h1, h2, h3, .wordmark, .eyebrow, .section-title, .step h3,
  .site-header nav a, .site-footer nav a, .page-header .updated) {
  -webkit-hyphens: manual;
  hyphens: manual;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--ink); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--surface-elevated);
  color: var(--ink);
  padding: 12px 16px;
  z-index: 10;
}
.skip-link:focus { left: 16px; top: 16px; }

/* Header — hairline rule, no card, no colour */

.site-header { border-bottom: 1px solid var(--border); }

.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}

.site-header nav {
  display: flex;
  align-items: baseline;
  gap: 20px;
  font-size: var(--text-label);
  line-height: var(--leading-label);
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.site-header nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--border);
}

/* Hero — the route is the one place colour is lit */

.hero { padding: 64px 0 56px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: var(--text-meta);
  line-height: var(--leading-meta);
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 16px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-title);
  line-height: var(--leading-title);
  margin: 0 0 20px;
  text-wrap: balance;
}

.lede {
  font-family: var(--font-reading);
  font-size: var(--text-subheading);
  line-height: var(--leading-subheading);
  color: var(--muted);
  max-width: 34em;
  margin: 0;
}

.hero-figure { display: flex; justify-content: center; }
.route { width: 100%; height: auto; max-width: 360px; }
.route .line {
  fill: none;
  stroke: var(--route-line);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.route .marker { fill: var(--route-marker); }

@media (prefers-reduced-motion: no-preference) {
  .route .line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw 1.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  }
  .route .marker { opacity: 0; animation: fade 0.4s ease-out 1.5s forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* Sections */

.section { padding: 0 0 72px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-heading);
  line-height: var(--leading-heading);
  margin: 0 0 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-lede {
  font-family: var(--font-reading);
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
  color: var(--muted);
  margin: 0 0 56px;
}

/* Five steps — the screenshots carry the page */

.steps {
  display: grid;
  gap: 72px;
}

.step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.step:nth-child(even) > .step-media { order: -1; }

.step-media { display: flex; justify-content: center; }

.step-media img {
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;
}

.step h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-title);
  line-height: var(--leading-title);
  margin: 0 0 12px;
}

.step p {
  font-family: var(--font-reading);
  font-size: var(--text-subheading);
  line-height: var(--leading-subheading);
  color: var(--ink);
  margin: 0;
  max-width: 30em;
}

.step p.detail {
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
  color: var(--muted);
  margin-top: 14px;
}

/* Data handling note */

.note {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}
.note p {
  font-family: var(--font-reading);
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
  color: var(--muted);
  margin: 0;
}
.note a { color: var(--ink); }

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 20px; }

/* Legal pages */

.page-header {
  border-bottom: 1px solid var(--border);
  padding: 48px 0 20px;
}
.page-header h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-title);
  line-height: var(--leading-title);
  margin: 0 0 8px;
}
.page-header .updated {
  font-size: var(--text-meta);
  line-height: var(--leading-meta);
  color: var(--muted);
  margin: 0;
}

article.policy {
  max-width: 680px;
  padding: 32px 0 56px;
}
article.policy h2 {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--text-subheading);
  line-height: var(--leading-subheading);
  margin: 36px 0 8px;
}
article.policy p {
  font-family: var(--font-ui);
  line-height: var(--leading-body);
  color: var(--muted);
  margin: 0 0 16px;
}
article.policy a { color: var(--ink); }

article.policy section + section {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
article.policy h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-title);
  line-height: var(--leading-title);
  margin: 0 0 16px;
}
article.policy ul {
  margin: 0 0 16px;
  padding-left: 1.25em;
}
article.policy li {
  font-family: var(--font-ui);
  line-height: var(--leading-body);
  color: var(--muted);
  margin-bottom: 8px;
}
article.policy strong {
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--ink);
}
article.policy code {
  font-family: ui-monospace, monospace;
  font-size: 0.92em;
  background: var(--surface);
  padding: 1px 5px;
  color: var(--ink);
}

@media (max-width: 760px) {
  .hero { padding: 40px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-figure { order: -1; }
  .route { max-width: 260px; }
  .steps { gap: 56px; }
  .step { grid-template-columns: 1fr; gap: 24px; }
  .step:nth-child(even) > .step-media { order: 0; }
  .step-media img { max-width: 280px; }
  .note { grid-template-columns: 1fr; gap: 16px; }
  .site-header .wrap { flex-wrap: wrap; gap: 12px; }
}
