/* 公式サイトの見た目。色はアプリのデザインガイド（docs/design/06-design-guide.md）3章のトークンだけを使う。
   値は正本（ガイド）と同じでなければならない（site/site.test.ts が確かめる）。独自の色は足さない。
   文字に使ってよい色は --text・--text-muted・--accent-strong だけ。--accent と景色のトークンは面と装飾に使う。
   動きは付けない（デザインガイド 2章）。外部の読み込みは無い（フォントも同じサイトのファイル）。 */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f8f6f3;
  --side: #f1eeea;
  --surface: #ffffff;
  --text: #25222c;
  --text-muted: #5e5a68;
  --text-faint: #9a95a3;
  --rule: #e4dcd8;
  --ring: #948a85;
  --accent: #e0904e;
  --accent-strong: #9a4f1c;
  --warn: #9c3a24;
  --done: #66616e;
  --agent: #6a53ae;
  --sea: #285f77;
  --sky-1: #f5dcc8;
  --sky-2: #f1e8ee;
  --sun-core: #ffe2c2;
  --sun-glow: rgba(236, 150, 86, 0.32);
  --sun-halo: rgba(224, 144, 78, 0.18);
  --horizon: rgba(120, 80, 60, 0.35);
  --wave: #5d8ca3;
  --sea-tint: rgba(160, 190, 205, 0.25);
  --sel: rgba(224, 144, 78, 0.08);
  --hover: rgba(37, 34, 44, 0.05);
  --field: rgba(255, 255, 255, 0.6);
  --scrim: rgba(248, 246, 243, 0.72);
  /* 主なボタンの文字。ライトは面の白、ダークは背景（どちらも上のトークンの値） */
  --on-accent: var(--surface);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1320;
    --side: #0b0f19;
    --surface: #171c2b;
    --text: #ece8f1;
    --text-muted: #9ba0b5;
    --text-faint: #6d7290;
    --rule: #262b3d;
    --ring: #6b7390;
    --accent: #f0a562;
    --accent-strong: #f0a562;
    --warn: #f28b6e;
    --done: #8d93aa;
    --agent: #b9a8f4;
    --sea: #8ec3d8;
    --sky-1: #2a2440;
    --sky-2: #1a1b30;
    --sun-core: #ffd9ae;
    --sun-glow: rgba(240, 165, 98, 0.28);
    --sun-halo: rgba(240, 165, 98, 0.16);
    --horizon: rgba(255, 226, 200, 0.55);
    --wave: #8ec3d8;
    --sea-tint: rgba(30, 44, 74, 0.55);
    --sel: rgba(240, 165, 98, 0.07);
    --hover: rgba(255, 255, 255, 0.06);
    --field: rgba(255, 255, 255, 0.04);
    --scrim: rgba(15, 19, 32, 0.72);
    --on-accent: var(--bg);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans CJK JP", sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  padding: 8px 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap {
    padding: 0 48px;
  }
}

/* ヘッダー */
.site-header {
  border-bottom: 1px solid var(--rule);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.logo svg {
  width: 28px;
  height: 28px;
  flex: none;
}

.logo span {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  font-size: 13px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
}

.lang {
  display: inline-flex;
  gap: 4px;
  padding: 2px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 12px;
}

.lang a,
.lang span {
  padding: 2px 10px;
  border-radius: 6px;
}

.lang a {
  color: var(--text-muted);
  text-decoration: none;
}

.lang a:hover {
  background: var(--hover);
  text-decoration: underline;
}

.lang span {
  background: var(--hover);
  color: var(--text);
  font-weight: 600;
}

/* 英字ラベル（デザインガイド 4章） */
.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ヒーロー：空と海の景色（凪メーターと同じ。動きなし） */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(var(--sky-1), var(--sky-2));
}

.hero-scene {
  display: block;
  width: 100%;
  height: 220px;
}

.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 48px;
  padding-bottom: 40px;
  max-width: 600px;
}

.hero-copy h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.3;
  font-weight: 300;
}

.hero-copy p {
  margin: 0;
}

.hero-note {
  font-size: 12px;
  color: var(--text-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 4px;
}

.button {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  background: var(--accent-strong);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  text-decoration: underline;
}

.button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--ring);
}

@media (min-width: 880px) {
  .hero {
    min-height: 460px;
  }

  .hero-scene {
    position: absolute;
    inset: 0;
    height: 100%;
  }

  .hero-copy {
    padding-top: 96px;
    padding-bottom: 112px;
  }

  .hero-copy h1 {
    font-size: 44px;
  }
}

/* 景色の図形（色はトークン。属性ではなくクラスで当てるので CSP の style-src を絞れる） */
.sky-top {
  stop-color: var(--sky-1);
}

.sky-bottom {
  stop-color: var(--sky-2);
}

.glow-stop {
  stop-color: var(--sun-glow);
}

.glow-end {
  stop-color: var(--sun-glow);
  stop-opacity: 0;
}

.scene-sky {
  fill: url(#scene-sky);
}

.scene-glow {
  fill: url(#scene-glow);
}

.scene-halo {
  fill: var(--sun-halo);
}

.scene-sun {
  fill: var(--sun-core);
}

.scene-sea {
  fill: var(--sea-tint);
}

.scene-horizon {
  fill: var(--horizon);
}

.scene-path {
  fill: var(--accent);
}

.scene-wave {
  fill: none;
  stroke: var(--wave);
  stroke-width: 1.2;
}

/* 本文の区画 */
.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 880px) {
  .section {
    padding: 80px 0;
  }
}

.section h2 {
  margin: 8px 0 0;
  font-size: 26px;
  font-weight: 300;
  line-height: 1.4;
}

.section-lead {
  margin: 12px 0 0;
  max-width: 640px;
  color: var(--text-muted);
  font-size: 14px;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
}

@media (min-width: 720px) {
  .cards.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  min-width: 0;
}

.card h3 {
  margin: 8px 0 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
}

.card p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.card .eyebrow {
  margin-bottom: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--text-muted);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.facts {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 16px 0;
  border-top: 1px solid var(--rule);
}

.facts li:last-child {
  border-bottom: 1px solid var(--rule);
}

.facts strong {
  display: block;
  font-weight: 500;
}

.facts span {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 48px;
}

@media (min-width: 880px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }

  .split .facts {
    margin-top: 0;
  }
}

/* コマンドとコードの囲み。等幅は OS 標準（UDEV Gothic HS はサイトでは配らない。07 の公式サイトの作り方） */
pre,
code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

code {
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--side);
}

pre {
  margin: 12px 0;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 8px;
  background: var(--side);
  border: 1px solid var(--rule);
  font-size: 13px;
  line-height: 1.6;
}

pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}

/* 文書のページ（ガイド・導入・変更履歴など） */
.doc {
  padding: 48px 0 80px;
  max-width: 760px;
}

.doc h1 {
  margin: 0 0 24px;
  font-size: 30px;
  font-weight: 300;
  line-height: 1.4;
}

.doc h2 {
  margin: 48px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.45;
}

.doc h3 {
  margin: 32px 0 8px;
  font-size: 17px;
  font-weight: 500;
}

.doc h4,
.doc h5,
.doc h6 {
  margin: 24px 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.doc p,
.doc ul,
.doc ol {
  margin: 12px 0;
}

.doc li {
  margin: 4px 0;
}

.toc {
  margin: 0 0 32px;
  padding: 16px 20px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  font-size: 14px;
}

.toc ol {
  margin: 8px 0 0;
  padding-left: 0;
  list-style: none;
  columns: 2 220px;
}

.notice {
  margin: 20px 0;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 14px;
}

.notice p {
  margin: 0;
}

.scroll {
  overflow-x: auto;
  margin: 16px 0;
}

table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 14px;
}

th,
td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

kbd {
  font: inherit;
  font-size: 0.9em;
  padding: 0 5px;
  border: 1px solid var(--ring);
  border-radius: 4px;
}

/* フッター */
.site-footer {
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--text-muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 48px;
  padding-top: 32px;
  padding-bottom: 48px;
}

.site-footer p {
  margin: 4px 0 0;
}

.site-footer .brand {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--text-muted);
}
