@charset "utf-8";

/* ============================================================
   gem-hunter Landing Page
   トークンの出自: app/globals.css（アプリ本体のセマンティックトークン）。
   ライト/ダークとも oklch 実値をアプリと揃えている。🔴 意図的な逸脱は次の 3 つだけ:
     - --ring: アプリはグレー（light 0.6 / dark 0.556）。LP はアクセント色にしてフォーカスリングの
       コントラストを 8.36:1 / 7.95:1 まで上げている（LP は装飾面が広く 3:1 では埋もれるため）
     - --bg-subtle（dark）: アプリの --muted（0.269）ではなく --card 相当（0.205）。
       LP は交互のセクション背景として使うので、より暗い側が読みやすい
     - --radius-* の段階名: アプリの --radius-xl 相当が LP の --radius-lg。LP は使う段が少ないため
       段数を詰めている（同名別値なので、アプリの値をそのまま持ち込まないこと）
   ============================================================ */

@font-face {
  font-family: 'Geist LP';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  /* --- カラー（ライト。app/globals.css :root と同値） --- */
  --bg: oklch(1 0 0);
  --bg-subtle: oklch(0.97 0 0);
  --fg: oklch(0.145 0 0);
  --fg-muted: oklch(0.5 0 0);
  --accent: oklch(0.42 0.14 250);
  --accent-fg: oklch(1 0 0);
  --accent-soft: oklch(0.95 0.03 250);
  --border: oklch(0.6 0 0);
  --hairline: oklch(0.89 0 0);
  --ring: oklch(0.42 0.14 250);
  --shadow: 0 1px 2px oklch(0.145 0 0 / 0.06), 0 12px 32px oklch(0.145 0 0 / 0.08);
  --shadow-lg: 0 2px 4px oklch(0.145 0 0 / 0.06), 0 24px 60px oklch(0.145 0 0 / 0.14);
  --glow-a: oklch(0.62 0.19 250 / 0.28);
  --glow-b: oklch(0.72 0.14 190 / 0.2);
  --code-bg: oklch(0.96 0 0);

  /* --- 形状・寸法（app/globals.css の --radius / --size-control-* に対応） --- */
  --radius: 0.625rem;
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-lg: calc(var(--radius) * 1.4);
  --radius-xl: calc(var(--radius) * 2.2);
  --tap: 44px; /* 主要導線。WCAG 2.2 SC 2.5.5 相当 */
  --header-h: 60px;
  --maxw: 1120px;

  --font-sans: 'Geist LP', system-ui, -apple-system, 'Hiragino Sans',
    'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic UI', Meiryo, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* app/globals.css .dark と同値 */
    --bg: oklch(0.145 0 0);
    --bg-subtle: oklch(0.205 0 0);
    --fg: oklch(0.985 0 0);
    --fg-muted: oklch(0.708 0 0);
    --accent: oklch(0.72 0.16 250);
    --accent-fg: oklch(0.1 0 0);
    --accent-soft: oklch(0.27 0.05 250);
    --border: oklch(0.55 0 0);
    --hairline: oklch(0.3 0 0);
    --ring: oklch(0.72 0.16 250);
    --shadow: 0 1px 2px oklch(0 0 0 / 0.5), 0 16px 40px oklch(0 0 0 / 0.45);
    --shadow-lg: 0 24px 60px oklch(0 0 0 / 0.6);
    --glow-a: oklch(0.62 0.19 250 / 0.35);
    --glow-b: oklch(0.72 0.14 190 / 0.22);
    --code-bg: oklch(0.24 0 0);
    color-scheme: dark;
  }
}

/* ============================ base ============================ */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  /* 🔴 px で固定しない（ユーザーのブラウザ既定フォントサイズに追従させる。
     アプリ本体の --text-control-min: 1rem と同じ方針）。 */
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
  line-break: strict;
}

@supports (word-break: auto-phrase) {
  h1,
  h2,
  h3,
  .hero-lead,
  .section-head p {
    word-break: auto-phrase; /* 日本語を文節で折り返す */
  }
}

p {
  margin: 0;
  text-wrap: pretty;
}

img {
  max-width: 100%;
  height: auto;
}

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

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

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--code-bg);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.4em;
}

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* sticky ヘッダーがフォーカス中の要素を隠さないようにする（WCAG 2.2 SC 2.4.11） */
:target,
section[id],
a,
button,
summary {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -100px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 8px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ============================ header ============================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--bg); /* color-mix() 非対応ブラウザ向けフォールバック（無いと完全透明になる） */
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 24px;
  height: 24px;
}

.header-nav {
  display: none;
  gap: 4px;
}

.header-nav a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.header-nav a:hover {
  color: var(--fg);
  background: var(--bg-subtle);
}

@media (min-width: 900px) {
  .header-nav {
    display: flex;
  }
}

/* ============================ buttons ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 0 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.btn svg {
  flex: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: color-mix(in oklab, var(--accent) 88%, var(--fg));
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  transform: translateY(-1px);
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}

@media (min-width: 900px) {
  .btn-sm {
    min-height: 40px;
  }
}

/* ============================ hero ============================ */

.hero {
  position: relative;
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(32px, 5vw, 56px);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(48% 60% at 22% 12%, var(--glow-a), transparent 70%),
    radial-gradient(42% 55% at 82% 4%, var(--glow-b), transparent 72%);
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5.4vw, 3.65rem);
  font-weight: 700;
  max-width: 20ch;
}

.hero h1 .em {
  color: var(--accent);
}

.hero-lead {
  margin-top: 20px;
  font-size: clamp(1rem, 1.6vw, 1.175rem);
  color: var(--fg-muted);
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.assurance {
  margin-top: 14px;
  font-size: 0.84375rem;
  color: var(--fg-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  list-style: none;
  padding: 0;
}

.assurance li::before {
  content: '✓' / ''; /* 代替テキスト空指定。読み上げから外す（非対応ブラウザは従来どおり） */
  color: var(--accent);
  font-weight: 700;
  margin-right: 5px;
}

/* サンプルクエリ */
.samples {
  margin-top: 30px;
}

.samples-label {
  font-size: 0.84375rem;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-decoration: none;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- スクリーンショット（スマートフォンのフレーム） ---- */

.phone {
  width: min(248px, 58vw);
  margin-inline: auto;
  padding: 10px 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: 34px;
  background: var(--bg-subtle);
  box-shadow: var(--shadow-lg);
}

.phone-speaker {
  display: block;
  width: 48px;
  height: 5px;
  margin: 2px auto 10px;
  border-radius: 999px;
  background: var(--hairline);
}

.phone-screen {
  border: 1px solid var(--hairline);
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg);
}

.phone-screen img {
  display: block;
  width: 100%;
}

/* ---- スクリーンショット（ブラウザフレーム） ---- */

.shot-stage {
  margin-top: clamp(32px, 4vw, 48px);
  perspective: 1600px;
}

.browser {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: var(--bg-subtle);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-subtle);
}

.dots {
  display: flex;
  gap: 6px;
}

.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hairline);
}

.url-pill {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.78125rem;
  color: var(--fg-muted);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px 12px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-body {
  display: block;
  background: var(--bg);
}

.browser-body img {
  display: block;
  width: 100%;
}

.shot-caption {
  margin-top: 14px;
  font-size: 0.84375rem;
  color: var(--fg-muted);
  text-align: center;
}

/* ============================ sections ============================ */

.section {
  padding-block: clamp(56px, 8vw, 104px);
}

.section-alt {
  background: var(--bg-subtle);
  border-block: 1px solid var(--hairline);
}

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.section-head h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.3rem);
  font-weight: 700;
}

.section-head p {
  margin-top: 14px;
  color: var(--fg-muted);
  font-size: 1.0625rem;
}

.kicker {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ---- why セクションの区切り装飾（文字なし・alt=""） ---- */

.why-divider {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: clamp(20px, 4vw, 32px) auto;
}

/* ---- 対比（star vs 被依存数） ---- */

.compare {
  display: grid;
  gap: 16px;
}

@media (min-width: 820px) {
  .compare {
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
  }
}

.compare-card {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.compare-card h3 {
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-card p {
  margin-top: 10px;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

.compare-card.is-good .stat b {
  color: var(--accent);
}

.compare-card.is-good {
  border-color: color-mix(in oklab, var(--accent) 55%, var(--hairline));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 20%, transparent);
}

.compare-arrow {
  display: grid;
  place-items: center;
  color: var(--fg-muted);
  font-size: 22px;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: auto;
  padding-block-start: 16px;
  border-top: 1px solid var(--hairline);
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat b {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 0.8125rem;
  color: var(--fg-muted);
}

/* ---- 手順 ---- */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
  counter-reset: step;
}

@media (min-width: 820px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

.steps li {
  counter-increment: step;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 24px;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 14px;
}

.steps h3 {
  font-size: 1.0625rem;
}

.steps p {
  margin-top: 8px;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

/* ---- 数式カード ---- */

.formula {
  margin-top: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: clamp(20px, 3vw, 32px);
}

/* 🔴 overflow-x / white-space: nowrap を置かない。狭幅でキーボード操作できない
   スクロール領域（SC 2.1.1）になり、式の後半が読めなくなる。折り返すほうが読める。 */
.formula-expr {
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 2.1vw, 1.25rem);
  font-weight: 600;
  line-height: 1.6;
  background: var(--code-bg);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.formula p {
  margin-top: 14px;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

/* ---- bento ---- */

.bento {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .bento {
    grid-template-columns: repeat(3, 1fr);
  }
  .bento .span-2 {
    grid-column: span 2;
  }
  .bento .span-3 {
    grid-column: span 3;
  }
  .tile-wide p {
    max-width: 72ch;
  }
}

.tile {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-alt .tile {
  background: var(--bg);
}

.tile h3 {
  font-size: 1.0625rem;
  display: flex;
  align-items: center;
  gap: 9px;
}

.tile p {
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

.tile-figure {
  margin: auto 0 0; /* タイル下端へ寄せて、同じ行のタイルと下辺を揃える */
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-subtle);
}

.tile-figure img {
  display: block;
  width: 100%;
}


.icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex: none;
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 4px 0 0;
}

.tag-list li {
  font-size: 0.78125rem;
  color: var(--fg-muted);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 2px 10px;
}

/* ---- 透明性 ---- */

.facts {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .facts {
    grid-template-columns: repeat(4, 1fr);
  }
}

.fact {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--bg);
}

.fact b {
  display: block;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.fact span {
  display: block;
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--fg-muted);
}

.limits {
  margin-top: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  background: color-mix(in oklab, var(--bg-subtle) 55%, var(--bg));
}

.limits h3 {
  font-size: 1rem;
}

.limits ul {
  margin: 12px 0 0;
  padding-left: 1.25em;
  color: var(--fg-muted);
  font-size: 0.9375rem;
  max-width: 76ch;
}

.limits li + li {
  margin-top: 6px;
}

/* ---- FAQ ---- */

.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq details {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 22px;
  font-weight: 600;
  position: relative;
  min-height: var(--tap);
  display: flex;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--fg-muted);
  border-bottom: 2px solid var(--fg-muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: translateY(-20%) rotate(-135deg);
}

.faq .answer {
  padding: 0 22px 20px;
  color: var(--fg-muted);
  font-size: 0.9375rem;
}

/* ---- 最終 CTA ---- */

.final-cta {
  position: relative;
  text-align: center;
  padding-block: clamp(64px, 9vw, 112px);
  border-top: 1px solid var(--hairline);
  overflow: hidden;
}

.final-cta::before {
  content: '';
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 460px;
  background: radial-gradient(45% 70% at 50% 100%, var(--glow-a), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
  z-index: -1;
}

.final-cta img.gem {
  width: 132px;
  height: auto;
  margin-inline: auto;
  display: block;
}

.final-cta h1,
.final-cta h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  margin-top: 12px;
}

.final-cta p {
  margin-top: 14px;
  color: var(--fg-muted);
}

.final-cta .hero-actions {
  justify-content: center;
}

.final-cta .assurance {
  justify-content: center;
}

/* ---- footer ---- */

.site-footer {
  border-top: 1px solid var(--hairline);
  background: var(--bg-subtle);
  padding-block: 40px;
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-grid h2 {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 10px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li + li {
  margin-top: 4px;
}

.footer-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--fg);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-note {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  color: var(--fg-muted);
  font-size: 0.8125rem;
}

.footer-note a {
  color: var(--fg-muted);
}

/* ============================ motion ============================ */

/* スクロール連動の出現。🔴 opacity は動かさない（対応ブラウザで範囲外に留まった
   要素が「不可視のまま」になる事故を構造的に起こさないため。移動だけに留める）。 */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 46%;
      animation-duration: 1ms; /* Firefox は duration 0 だと発火しない */
    }
    @keyframes reveal-in {
      from {
        transform: translateY(22px);
      }
      to {
        transform: none;
      }
    }
  }
}

/* 読み込み直後のヒーローだけは時間ベースでフェードさせる（必ず終わる） */
@media (prefers-reduced-motion: no-preference) {
  /* .hero-copy 自身は除く（親子で同じ移動が二重に掛かるのを避ける） */
  .hero > .wrap > *:not(.hero-copy),
  .hero-copy > * {
    animation: hero-in 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
  .hero .eyebrow {
    animation-delay: 0.02s;
  }
  .hero h1 {
    animation-delay: 0.06s;
  }
  .hero-lead {
    animation-delay: 0.1s;
  }
  .hero-actions {
    animation-delay: 0.14s;
  }
  .assurance {
    animation-delay: 0.18s;
  }
  .samples {
    animation-delay: 0.22s;
  }
  .shot-stage {
    animation-delay: 0.26s;
  }
  /* 🔴 opacity は動かさない（.reveal と同じ規律）。初回描画で opacity: 0 だと
     h1 とヒーロー画像が LCP 候補から永久に除外され、白画面の時間も伸びる。 */
  @keyframes hero-in {
    from {
      transform: translateY(14px);
    }
    to {
      transform: none;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    animation-timeline: none !important;
  }
}

@media print {
  .site-header,
  .hero::before,
  .final-cta::before {
    display: none;
  }
}

/* 出典・注釈の 1 行 */
.source-note {
  margin-top: 20px;
  font-size: 0.84375rem;
  color: var(--fg-muted);
  max-width: 78ch;
}

/* ============================ モバイル調整 ============================ */

@media (max-width: 819px) {
  /* 縦積みになったら矢印も縦を向く */
  .compare-arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 520px) {
  /* 主要導線を全幅にして幅の不揃いをなくす（タップ面積も広がる） */
  .hero-actions .btn {
    width: 100%;
  }
}

/* 縦が短いビューポート（＝ 400% ズーム相当）では sticky をやめ、
   ヘッダーがフォーカス中の要素を覆う余地を構造的になくす（SC 2.4.11）。 */
@media (max-height: 26rem) {
  .site-header {
    position: static;
  }
}

/* ============ ダークテーマでのスクリーンショットの額装（VD-1） ============
   アプリ本体にテーマ切替が無く、ダーク版の画面は実在しない。撮り直して出し分けると
   「到達できない画面」を見せることになるため、ライトの画面を意図して額装する。 */
@media (prefers-color-scheme: dark) {
  :root {
    --shot-frame-bg: oklch(0.97 0 0);
    --shot-frame-border: oklch(0.87 0 0);
    --shot-frame-ring: oklch(1 0 0 / 0.14);
  }

  .browser,
  .browser-bar,
  .phone,
  .phone-screen {
    background: var(--shot-frame-bg);
    border-color: var(--shot-frame-border);
  }

  .browser,
  .phone {
    box-shadow:
      0 0 0 1px var(--shot-frame-ring),
      0 24px 60px oklch(0 0 0 / 0.6);
  }

  .phone-speaker {
    background: var(--shot-frame-border);
  }

  .url-pill {
    background: oklch(1 0 0);
    color: oklch(0.42 0 0);
    border-color: var(--shot-frame-border);
  }

  .dots span {
    background: var(--shot-frame-border);
  }

  .tile-figure {
    background: var(--shot-frame-bg);
    border-color: var(--shot-frame-border);
    padding: 8px;
    box-shadow: 0 0 0 1px var(--shot-frame-ring);
  }
}

/* ============================ 追加コンポーネント ============================ */

/* ヒーロー内の要素順（コピー → 実画面 → キーワード例。DOM 順がそのまま表示順） */
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.hero .eyebrow {
  align-self: flex-start;
}

.hero-alt-link {
  margin-top: 12px;
  font-size: 0.9375rem;
}

/* 広い画面ではヒーローを 2 カラムにし、スマートフォンの実画面をファーストビューへ収める */
@media (min-width: 1000px) {
  .hero > .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
    column-gap: clamp(32px, 5vw, 72px);
    align-items: start;
  }

  .hero-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .hero .shot-stage {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    margin-top: 0;
  }

  .hero .samples {
    grid-column: 1;
    grid-row: 2;
    margin-top: clamp(24px, 3vw, 36px);
  }
}

@media (max-width: 640px) {
  .hero .samples {
    margin-top: 24px;
  }

  /* fold を詰める。MIT ライセンスは最終 CTA とフッターに出ている */
  .assurance-extra {
    display: none;
  }
}

/* bento タイル内の実データ（画像に頼らず数字をテキストでも出す） */
.tile-datum {
  font-size: 0.9375rem;
  color: var(--fg);
}

.tile-datum b {
  font-variant-numeric: tabular-nums;
}

.tile-datum-note {
  display: block;
  margin-top: 2px;
  font-size: 0.78125rem;
  color: var(--fg-muted);
}

/* 技術スタックは数値カードから外してバッジ行にする */
.facts-stack {
  margin-top: 16px;
  gap: 8px;
}

.facts-stack li {
  font-size: 0.84375rem;
  padding: 4px 12px;
}

.formula-heading {
  font-size: 1.0625rem;
  margin-bottom: 12px;
}

.footer-brand {
  margin-bottom: 8px;
}

.footer-tagline {
  color: var(--fg-muted);
  max-width: 44ch;
}

/* 404 ページ（単独レイアウト） */
.page-404 {
  min-height: 100vh;
  display: grid;
  align-content: center;
}
