/* ============================================================
   Nautilus — ランディングページ
   深海 × ドット / Midnight Abyss
   DESIGN.md のトークンをそのまま :root に定義して使用する。
   配色は深海固定(ダーク固定)。ライトモードは作らない。
   ============================================================ */

:root {
  /* --- カラートークン(DESIGN.md 確定値) --- */
  --bg: #04101C;            /* 基本背景(深い紺の海) */
  --bg-deep: #020B12;       /* 潜水中・最深部 */
  --surface: #071B24;       /* カード・パネル */
  --surface-sunken: #020B12;/* 入力欄 */
  --border: #123440;
  --border-strong: #1B4452;
  --text: #D7E8EA;
  --text-muted: #7FA0AC;
  --text-subtle: #4A7C8C;   /* 装飾限定・本文不可 */

  /* 主役アクセント: 発光シアン(プランクトンの光) */
  --cyan: #4DF3FF;
  --cyan-deep: #1FC3D6;
  --cyan-tint: rgba(77, 243, 255, 0.06);
  --glow-cyan: 0 0 14px rgba(77, 243, 255, 0.30);

  /* 副アクセント: 琥珀(潜水艦の舷窓の灯り) */
  --amber: #FFB454;

  /* 潜水艦スプライト色(ピクセル要素) */
  --sub-hull: #15586B;
  --sub-shadow: #0C3543;

  --danger: #C96B5B;        /* ほぼ使わない */

  /* --- タイポグラフィ --- */
  --font-hud: "DotGothic16", monospace;
  --font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", -apple-system, sans-serif;

  /* --- 余白・レイアウト --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --maxw: 1080px;
  --radius-card: 8px;       /* 通常カード 6-8 */
  --radius-pill: 999px;
}

/* ============================================================
   リセット
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* フォーカスリング: シアンの可視アウトライン。消さない。 */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   共通ユーティリティ
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* スクリーンリーダー専用(視覚的に隠す) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

section {
  position: relative;
}

/* ドット英字 HUD: 大文字 + 字間広め */
.hud {
  font-family: var(--font-hud);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 400;
}

.hud--cyan { color: var(--cyan); }
.hud--amber { color: var(--amber); }
.hud--muted { color: var(--text-muted); }

/* セクション小見出し(ドット英字ラベル) */
.eyebrow {
  font-family: var(--font-hud);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cyan-deep);
  font-size: 0.78rem;
  display: inline-block;
  margin-bottom: var(--space-4);
}

/* 見出し(ヒラギノ 700) */
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: 0.01em;
}

.section-title {
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.1rem);
  margin-bottom: var(--space-5);
  max-width: 22ch;
}

.lead {
  color: var(--text);
  font-size: clamp(1rem, 0.96rem + 0.3vw, 1.08rem);
}

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

.section-pad {
  padding-block: clamp(56px, 9vw, 112px);
}

.divider-top {
  border-top: 1px solid var(--border);
}

/* 区切りシアン細線 */
.cyan-rule {
  height: 1px;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(77, 243, 255, 0.35),
    transparent
  );
  border: 0;
}

/* ============================================================
   セクション0 — ステータスバー
   ============================================================ */
.statusbar {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  position: relative;
  z-index: 20;
}

.statusbar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  justify-content: space-between;
  padding-block: var(--space-3);
  min-height: 44px;
}

.statusbar__msg {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-muted);
}

.blink-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
  flex: 0 0 auto;
  animation: blink 2.4s ease-in-out infinite;
}

.statusbar__link {
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--cyan);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ============================================================
   セクション1 — ヒーロー
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 70% 10%, rgba(31, 195, 214, 0.07), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, #062330 100%);
  padding-block: clamp(48px, 7vw, 88px) clamp(56px, 9vw, 104px);
}

/* 背景の水平水深目盛り線(3本・ほのか) */
.hero__lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
}
.hero__lines span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(77, 243, 255, 0.14), transparent);
}
.hero__lines span:nth-child(1) { top: 32%; }
.hero__lines span:nth-child(2) { top: 56%; }
.hero__lines span:nth-child(3) { top: 78%; }

.hero__grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}

.hero__tagline {
  font-family: var(--font-hud);
  letter-spacing: 0.18em;
  color: var(--cyan);
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
}

.hero__taglinesub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-5);
}

.hero__title {
  font-size: clamp(1.85rem, 1.2rem + 3.2vw, 3.1rem);
  line-height: 1.28;
  margin-bottom: var(--space-5);
  letter-spacing: 0.005em;
}

.hero__sub {
  color: var(--text);
  font-size: clamp(1rem, 0.96rem + 0.4vw, 1.12rem);
  max-width: 40ch;
  margin-bottom: var(--space-6);
}

.hero__trust {
  margin-top: var(--space-4);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ヒーロー画(潜水艦 + HUD) */
.hero__art {
  position: relative;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  overflow: hidden;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero__hud {
  font-family: var(--font-hud);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cyan);
  font-size: clamp(0.72rem, 0.66rem + 0.4vw, 0.92rem);
  position: relative;
  z-index: 3;
}
.hero__hud .sep { color: var(--text-subtle); margin-inline: 0.4em; }

.hero__sub-sprite {
  position: relative;
  z-index: 3;
  width: clamp(180px, 42%, 260px);
  margin-inline: auto;
  animation: bob 5.5s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* CTA フォーム(ヒーロー & 本命 共通) */
.waitlist {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  max-width: 480px;
}

.waitlist__field {
  flex: 1 1 220px;
  min-width: 0;
}

.waitlist input[type="email"] {
  width: 100%;
  background: var(--surface-sunken);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 16px;
  min-height: 48px;
}
.waitlist input[type="email"]::placeholder {
  color: var(--text-subtle);
}
.waitlist input[type="email"]:focus {
  border-color: var(--cyan);
  outline: none;
}

/* 潜るボタン: ピクセル風角丸 + シアン縁 + glow + オフセット影 */
.btn-dive {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--cyan);
  background: var(--surface);
  border: 1px solid var(--cyan);
  border-radius: 8px;
  box-shadow: var(--glow-cyan), 4px 4px 0 var(--sub-shadow);
  padding: 13px 22px;
  min-height: 48px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.btn-dive:hover {
  transform: translate(1px, 1px);
  box-shadow: var(--glow-cyan), 3px 3px 0 var(--sub-shadow);
}
.btn-dive:active {
  transform: translate(4px, 4px);
  box-shadow: var(--glow-cyan), 0 0 0 var(--sub-shadow);
}
.btn-dive .tri {
  font-family: var(--font-hud);
}
.btn-dive[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.cta-note {
  margin-top: var(--space-3);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* 「今すぐベータを試す」TestFlight導線(公開リンク) */
.try-beta {
  margin-top: var(--space-3);
  font-size: 1rem;
}
.try-beta a {
  color: var(--cyan);
  font-weight: 600;
  border-bottom: 1px solid rgba(77, 243, 255, 0.4);
  padding-bottom: 2px;
}
.try-beta a:hover {
  border-bottom-color: var(--cyan);
  text-shadow: var(--glow-cyan);
}

/* フォーム状態メッセージ */
.form-status {
  margin-top: var(--space-3);
  font-size: 0.9rem;
  min-height: 1.4em;
}
.form-status[data-state="success"] { color: var(--cyan); }
.form-status[data-state="duplicate"] { color: var(--amber); }
.form-status[data-state="error"] { color: var(--danger); }
.form-status[data-state="idle"] { color: transparent; }

/* ============================================================
   セクション2 — 問題提起
   ============================================================ */
.problem .pain {
  display: grid;
  gap: var(--space-4);
  max-width: 58ch;
  margin-bottom: var(--space-6);
}
.problem .pain p {
  color: var(--text);
  position: relative;
  padding-left: var(--space-5);
}
.problem .pain p::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.7em;
  width: 6px;
  height: 6px;
  background: var(--cyan-deep);
  /* ピクセル要素 = 角丸0 */
}
.problem .closing {
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.25rem);
  font-weight: 700;
  max-width: 36ch;
}

/* ============================================================
   セクション3 — 3つの柱
   ============================================================ */
.pillars__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-7);
}

.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pillar__hud {
  font-family: var(--font-hud);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cyan);
  font-size: 0.82rem;
}

.pillar h3 {
  font-size: 1.18rem;
  line-height: 1.4;
}

.pillar p {
  color: var(--text);
  font-size: 0.96rem;
}

.pillar__tag {
  font-family: var(--font-hud);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  font-size: 0.74rem;
  margin-top: auto;
  padding-top: var(--space-2);
}

/* SVG モック枠(実機スクショ差し替え前提) */
.mockup {
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  display: block;
  width: 100%;
}
.mockup svg { width: 100%; height: 100%; }

.pillars__closing {
  font-weight: 700;
  font-size: clamp(1.02rem, 0.98rem + 0.4vw, 1.2rem);
  text-align: center;
  max-width: 44ch;
  margin-inline: auto;
}

/* ============================================================
   セクション4 — 水深メカニクス
   ============================================================ */
.depth__body {
  max-width: 54ch;
  margin-bottom: var(--space-6);
}
.depth__body p { color: var(--text); }

.depth__demo {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.depth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-5);
}

.depth-card__top {
  font-family: var(--font-hud);
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: 0.6em;
  flex-wrap: wrap;
}
.depth-card__arrow { color: var(--text-subtle); }
.depth-card__result {
  color: var(--cyan);
  text-transform: uppercase;
}

/* 深度ゲージ */
.gauge {
  display: flex;
  gap: var(--space-4);
  align-items: stretch;
}
.gauge__scale {
  font-family: var(--font-hud);
  font-size: 0.62rem;
  color: var(--text-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
  width: 32px;
  flex: 0 0 auto;
}
.gauge__track {
  flex: 1 1 auto;
  position: relative;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: 4px;
  min-height: 140px;
  overflow: hidden;
}
.gauge__fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  background: linear-gradient(180deg, rgba(77, 243, 255, 0.18), rgba(31, 195, 214, 0.05));
  border-bottom: 1px solid var(--cyan);
  transition: height 0.1s linear;
}
.gauge__sub {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: top 0.1s linear;
  width: 56px;
}
.gauge__value {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-family: var(--font-hud);
  color: var(--cyan);
  font-size: 0.92rem;
  letter-spacing: 0.1em;
}
.depth-card--shallow .gauge__fill {
  background: linear-gradient(180deg, rgba(127, 160, 172, 0.16), rgba(127, 160, 172, 0.03));
  border-bottom-color: var(--text-muted);
}
.depth-card--shallow .gauge__value { color: var(--text-muted); }

.depth__closing {
  color: var(--text);
  font-weight: 700;
  text-align: center;
}

/* ============================================================
   セクション5 — 罪悪感ゼロ設計
   ============================================================ */
.noguilt {
  background: var(--bg-deep);
}
.noguilt__list {
  list-style: none;
  display: grid;
  gap: var(--space-3);
  max-width: 46ch;
  margin-bottom: var(--space-6);
}
.noguilt__list li {
  position: relative;
  padding-left: var(--space-6);
  color: var(--text);
}
.noguilt__list li::before {
  content: "✕";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--text-subtle);
  font-size: 0.9em;
}
.noguilt__closing {
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.35rem);
  font-weight: 700;
  max-width: 30ch;
}

/* ============================================================
   セクション6 — 世界観
   ============================================================ */
.abyss {
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.abyss__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.abyss .wrap { position: relative; z-index: 2; }
.abyss__body {
  color: var(--text-muted);
  max-width: 30ch;
  margin: var(--space-5) auto var(--space-7);
}
.abyss__flag {
  font-size: clamp(1.6rem, 1.1rem + 2.6vw, 2.6rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.abyss__big {
  font-size: clamp(1.4rem, 1rem + 2vw, 2.2rem);
  font-weight: 700;
  color: var(--cyan);
  margin-top: var(--space-5);
}

/* ============================================================
   セクション7 — 作者の物語
   ============================================================ */
.author__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
}
.author__body p {
  color: var(--text);
  margin-bottom: var(--space-4);
  max-width: 56ch;
}
.author__body p:last-child { margin-bottom: 0; }
.author__link {
  margin-top: var(--space-5);
  font-size: 0.92rem;
  color: var(--text-muted);
}
.author__link .hash {
  font-family: var(--font-hud);
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-left: 0.6em;
}
.author__portrait {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}
.author__portrait svg { width: 120px; }
.author__portrait .cap {
  font-family: var(--font-hud);
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  font-size: 0.7rem;
}

/* ============================================================
   セクション8 — CTA 本命
   ============================================================ */
.cta {
  background:
    radial-gradient(110% 90% at 50% 0%, rgba(31, 195, 214, 0.08), transparent 60%),
    var(--bg);
  text-align: center;
}
.cta__title {
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
  margin-bottom: var(--space-5);
}
.cta__sub {
  color: var(--text);
  max-width: 48ch;
  margin: 0 auto var(--space-6);
}
.cta .waitlist {
  margin-inline: auto;
  justify-content: center;
}
.cta .form-status { text-align: center; }
.cta__privacy {
  margin-top: var(--space-4);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.cta__scarcity {
  margin-top: var(--space-6);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.cta__scarcity .hud {
  color: var(--cyan-deep);
  font-size: 0.78rem;
  margin-right: 0.6em;
}
.cta__count {
  margin-top: var(--space-3);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================================
   セクション9 — FAQ
   ============================================================ */
.faq__list {
  max-width: 64ch;
  margin-inline: auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding-block: var(--space-4);
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "Q";
  font-family: var(--font-hud);
  color: var(--cyan);
  flex: 0 0 auto;
  font-size: 0.9em;
  letter-spacing: 0.1em;
}
.faq-item .marker {
  margin-left: auto;
  color: var(--text-subtle);
  font-family: var(--font-hud);
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}
.faq-item[open] .marker { transform: rotate(45deg); }
.faq-item .answer {
  color: var(--text-muted);
  padding: 0 0 var(--space-5) calc(0.9em + var(--space-3));
  font-size: 0.96rem;
}

/* ============================================================
   セクション10 — フッター
   ============================================================ */
.footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.footer__brand {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: var(--space-1);
}
.footer__tag {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-5);
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
  font-size: 0.92rem;
}
.footer__legal {
  color: var(--text-subtle);
  font-size: 0.8rem;
  line-height: 1.9;
}
.footer__legal a { color: var(--text-muted); }
.footer__hud {
  font-family: var(--font-hud);
  letter-spacing: 0.15em;
  color: var(--text-subtle);
  font-size: 0.72rem;
  margin-top: var(--space-6);
}
.footer__sub-sprite {
  width: 92px;
  margin-top: var(--space-5);
  opacity: 0.8;
  animation: sink 9s ease-in-out infinite;
}
@keyframes sink {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(8px); opacity: 0.55; }
}

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (min-width: 720px) {
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
  .depth__demo {
    grid-template-columns: 1fr 1fr;
  }
  .author__grid {
    grid-template-columns: 1.6fr 0.8fr;
  }
}

@media (min-width: 1024px) {
  .pillars__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   prefers-reduced-motion: 全アニメ停止
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .blink-dot { opacity: 1; }
  .hero__sub-sprite,
  .footer__sub-sprite { transform: none; }
}

/* ============================================================
   デモ動画セクション(英語LPのみ・実機収録の主役素材)
   ============================================================ */
.demo__frame {
  margin: var(--space-6) auto 0;
  max-width: 280px;
  padding: var(--space-2);
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-card);
  box-shadow: var(--glow-cyan);
}
.demo__video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #000;
}
.demo__cap {
  margin: var(--space-4) auto 0;
  max-width: 520px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
}
