/* ============================================================
   Flash Log Design System — flashlog.css
   サイト本体と Design System プレビューが共有する単一ソース。
   構成: 1) Design Tokens  2) Base  3) Components  4) Sections
   ============================================================ */

/* ---------- 1) Design Tokens ---------- */
:root {
  /* Brand */
  --fl-bolt-top: #3eb0ff;
  --fl-bolt-bottom: #0a6cf0;
  --fl-brand: #0a6cf0;
  --fl-brand-hover: #0857c4;
  --fl-brand-glow: rgba(10, 108, 240, 0.14);

  /* Semantic（アプリと同じ意味色: 予定=青 / 実績=オレンジ / 実行中=ピンク） */
  --fl-plan: #007aff;
  --fl-plan-soft: rgba(0, 122, 255, 0.10);
  --fl-actual: #ff9500;
  --fl-actual-soft: rgba(255, 149, 0, 0.13);
  --fl-running: #ff375f;
  --fl-running-soft: rgba(255, 55, 95, 0.10);
  --fl-done: #34c759;
  --fl-reminder: #f2b705;

  /* Surfaces */
  --fl-bg: #ffffff;
  --fl-surface-1: #f5f6f8;
  --fl-surface-2: #fafbfc;
  --fl-glass: rgba(255, 255, 255, 0.82);
  --fl-ink: #16181d;
  --fl-text: #1d1d1f;
  --fl-text-muted: #5f646e;
  --fl-text-subtle: #8a8f99;
  --fl-border: rgba(20, 30, 50, 0.09);
  --fl-border-strong: rgba(20, 30, 50, 0.16);

  /* Scenery gradients（ショーケース背景 — 利用シーンの空気感） */
  --fl-scene-morning: linear-gradient(155deg, #fff4e0 0%, #ffe3ec 55%, #f4e8ff 100%);
  --fl-scene-day:     linear-gradient(155deg, #e3f1ff 0%, #dbe9ff 55%, #e8e2ff 100%);
  --fl-scene-focus:   linear-gradient(155deg, #ffe7ef 0%, #f3e3ff 60%, #e3e9ff 100%);
  --fl-scene-dusk:    linear-gradient(155deg, #e0ecff 0%, #e8e0ff 50%, #ffe4ef 100%);
  --fl-scene-night:   linear-gradient(155deg, #1b2440 0%, #2a2550 60%, #3d2b52 100%);
  --fl-scene-mint:    linear-gradient(155deg, #e0fff4 0%, #dff4ff 60%, #e6ecff 100%);

  /* Elevation */
  --fl-shadow-sm: 0 1px 2px rgba(10, 20, 40, 0.05), 0 1px 1px rgba(10, 20, 40, 0.03);
  --fl-shadow-md: 0 6px 18px rgba(10, 20, 40, 0.08), 0 2px 6px rgba(10, 20, 40, 0.05);
  --fl-shadow-lg: 0 18px 50px rgba(10, 20, 40, 0.14), 0 6px 16px rgba(10, 20, 40, 0.07);
  --fl-shadow-device: 0 32px 80px rgba(10, 30, 80, 0.22), 0 10px 28px rgba(10, 30, 80, 0.12);

  /* Radii */
  --fl-radius-xs: 6px;
  --fl-radius-sm: 10px;
  --fl-radius-md: 16px;
  --fl-radius-lg: 24px;
  --fl-radius-xl: 36px;
  --fl-radius-pill: 100px;

  /* Type scale */
  --fl-font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "ヒラギノ角ゴシック", "Yu Gothic", system-ui, sans-serif;
  --fl-font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans", "ヒラギノ角ゴシック", "Yu Gothic", system-ui, sans-serif;
  --fl-font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --fl-text-hero: clamp(38px, 7vw, 64px);
  --fl-text-title: clamp(28px, 4.6vw, 40px);
  --fl-text-subtitle: clamp(19px, 2.6vw, 24px);
  --fl-text-body: 16px;
  --fl-text-caption: 13.5px;

  /* Spacing scale (4pt) */
  --fl-space-1: 4px;
  --fl-space-2: 8px;
  --fl-space-3: 12px;
  --fl-space-4: 16px;
  --fl-space-5: 24px;
  --fl-space-6: 32px;
  --fl-space-7: 48px;
  --fl-space-8: 72px;
  --fl-space-9: 112px;

  /* Motion */
  --fl-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fl-dur-fast: 0.18s;
  --fl-dur: 0.32s;
}

/* ---------- 2) Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fl-bg);
  color: var(--fl-text);
  font-family: var(--fl-font-text);
  font-size: var(--fl-text-body);
  line-height: 1.75;
  letter-spacing: 0.01em;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
}
p { margin: 0 0 14px; }
strong { font-weight: 650; }
img { max-width: 100%; display: block; }
a {
  color: var(--fl-brand);
  text-decoration: none;
  transition: color var(--fl-dur-fast) ease;
}
a:hover { color: var(--fl-brand-hover); }
a:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--fl-brand-glow);
  border-radius: var(--fl-radius-sm);
}
.fl-container { width: min(1200px, 100% - 48px); margin-inline: auto; }
.fl-container-narrow { width: min(760px, 100% - 48px); margin-inline: auto; }
@media (max-width: 640px) {
  .fl-container, .fl-container-narrow { width: calc(100% - 36px); }
}

/* ---------- 3) Components ---------- */

/* Buttons */
.fl-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--fl-font-display);
  font-size: 15px; font-weight: 620;
  padding: 12px 22px; border-radius: var(--fl-radius-pill);
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform var(--fl-dur-fast) var(--fl-ease), box-shadow var(--fl-dur-fast) ease, background var(--fl-dur-fast) ease;
}
.fl-btn:active { transform: scale(0.97); }
.fl-btn-primary { background: var(--fl-brand); color: #fff; box-shadow: var(--fl-shadow-md); }
.fl-btn-primary:hover { background: var(--fl-brand-hover); color: #fff; }
.fl-btn-ghost { background: transparent; color: var(--fl-brand); border-color: var(--fl-brand); }
.fl-btn-ghost:hover { background: var(--fl-brand-glow); }
.fl-btn-quiet { background: var(--fl-surface-1); color: var(--fl-text); }
.fl-btn-quiet:hover { background: #ecedf1; }

/* App Store badge（公式風・自前描画） */
.fl-store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--fl-ink); color: #fff !important;
  border-radius: 12px; padding: 9px 18px 9px 14px;
  box-shadow: var(--fl-shadow-md);
  transition: transform var(--fl-dur-fast) var(--fl-ease), box-shadow var(--fl-dur-fast) ease;
}
.fl-store-badge:hover { transform: translateY(-1px); box-shadow: var(--fl-shadow-lg); }
.fl-store-badge svg { width: 22px; height: 22px; }
.fl-store-badge .t { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.fl-store-badge .t .s { font-size: 10.5px; opacity: 0.85; }
.fl-store-badge .t .b { font-family: var(--fl-font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

/* Chips（メタ情報・意味色バッジ） */
.fl-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fl-text-caption); font-weight: 560;
  color: var(--fl-text-muted);
  background: var(--fl-surface-1);
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius-pill);
  padding: 5px 13px;
}
.fl-chip-plan   { color: var(--fl-plan);   background: var(--fl-plan-soft);   border-color: transparent; }
.fl-chip-actual { color: var(--fl-actual); background: var(--fl-actual-soft); border-color: transparent; }
.fl-chip-running{ color: var(--fl-running);background: var(--fl-running-soft);border-color: transparent; }

/* 時間バッジ（アプリの行末バッジの再現 — 装飾やDSデモに使う） */
.fl-timebadge { display: inline-flex; font-family: var(--fl-font-display); font-weight: 650; font-size: 13px; border-radius: 8px; overflow: hidden; }
.fl-timebadge .plan { background: #9aa3af; color: #fff; padding: 3px 8px; }
.fl-timebadge .actual { background: var(--fl-plan); color: #fff; padding: 3px 8px; }

/* Device frame（実機スクショ用 iPhone ベゼル） */
.fl-device {
  position: relative;
  width: var(--device-w, 300px);
  border-radius: calc(var(--device-w, 300px) * 0.155);
  padding: calc(var(--device-w, 300px) * 0.028);
  background: linear-gradient(160deg, #3a3d44, #17181c 60%);
  box-shadow: var(--fl-shadow-device), inset 0 0 0 2px rgba(255,255,255,0.06);
}
.fl-device::after {
  /* Dynamic Island */
  content: "";
  position: absolute;
  top: calc(var(--device-w, 300px) * 0.052);
  left: 50%; transform: translateX(-50%);
  width: calc(var(--device-w, 300px) * 0.30);
  height: calc(var(--device-w, 300px) * 0.088);
  border-radius: var(--fl-radius-pill);
  background: #0b0c0e;
}
.fl-device img {
  width: 100%;
  /* ⚠️ height: auto 必須 — <img> の height 属性（intrinsic）だけだと、CSS の width:100% で
     縮んだときに高さが属性値のまま残って縦に伸びる（実機レビュー報告 2026-07-03）。 */
  height: auto;
  border-radius: calc(var(--device-w, 300px) * 0.128);
}

/* Floating caption chips（ショーケースの装飾 — 画面の要点を外に吹き出す） */
.fl-float {
  position: absolute;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--fl-glass);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: var(--fl-shadow-md);
  border-radius: var(--fl-radius-md);
  padding: 9px 14px;
  font-size: 13.5px; font-weight: 600; line-height: 1.45;
  color: var(--fl-text);
  max-width: 240px;
}
.fl-float .ico { font-size: 16px; line-height: 1; }
.fl-float small { display: block; font-weight: 500; color: var(--fl-text-muted); font-size: 12px; }

/* Showcase（情景グラデ＋デバイス＋吹き出しの1枚絵） */
.fl-showcase {
  position: relative;
  border-radius: var(--fl-radius-xl);
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
  display: flex; align-items: center; justify-content: center;
  min-height: 420px;
}
.fl-showcase .scene-deco {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(420px 220px at 12% 8%, rgba(255,255,255,0.55), transparent 70%),
    radial-gradient(360px 240px at 88% 92%, rgba(255,255,255,0.4), transparent 70%);
}
.fl-showcase.scene-morning { background-image: var(--fl-scene-morning); }
.fl-showcase.scene-day     { background-image: var(--fl-scene-day); }
.fl-showcase.scene-focus   { background-image: var(--fl-scene-focus); }
.fl-showcase.scene-dusk    { background-image: var(--fl-scene-dusk); }
.fl-showcase.scene-mint    { background-image: var(--fl-scene-mint); }
.fl-showcase.scene-night   { background-image: var(--fl-scene-night); }
.fl-showcase.scene-night .fl-float { background: rgba(30,34,52,0.75); border-color: rgba(255,255,255,0.14); color: #f2f4ff; }
.fl-showcase.scene-night .fl-float small { color: rgba(235,238,255,0.66); }

/* Feature grid card */
.fl-card {
  background: var(--fl-bg);
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius-lg);
  padding: 26px 24px;
  box-shadow: var(--fl-shadow-sm);
  transition: transform var(--fl-dur) var(--fl-ease), box-shadow var(--fl-dur) ease;
}
.fl-card:hover { transform: translateY(-3px); box-shadow: var(--fl-shadow-md); }
.fl-card .ico {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--fl-plan-soft); font-size: 19px;
  margin-bottom: 12px;
}
.fl-card h3 { margin: 0 0 6px; font-family: var(--fl-font-display); font-size: 16.5px; font-weight: 660; }
.fl-card p { margin: 0; font-size: 14px; color: var(--fl-text-muted); line-height: 1.7; }

/* Callout（帯型の主張ブロック） */
.fl-callout {
  border-radius: var(--fl-radius-lg);
  background: var(--fl-surface-1);
  border: 1px solid var(--fl-border);
  padding: clamp(24px, 4vw, 40px);
}

/* Stat tile（数字＋ラベル。将来: 実績サマリ・比較表示） */
.fl-stat { text-align: center; }
.fl-stat .num {
  font-family: var(--fl-font-display);
  font-size: clamp(30px, 4.5vw, 42px); font-weight: 700; letter-spacing: -0.02em;
  background: linear-gradient(180deg, var(--fl-bolt-top), var(--fl-bolt-bottom));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fl-stat .lbl { font-size: var(--fl-text-caption); color: var(--fl-text-muted); font-weight: 560; }

/* Language switch */
.fl-lang-switch {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--fl-surface-1);
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius-pill);
}
.fl-lang-switch button {
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--fl-text-muted);
  background: transparent; border: 0; cursor: pointer;
  padding: 4px 12px; border-radius: var(--fl-radius-pill);
  transition: background var(--fl-dur-fast) ease, color var(--fl-dur-fast) ease;
}
.fl-lang-switch button.active { background: var(--fl-bg); color: var(--fl-text); box-shadow: var(--fl-shadow-sm); }

/* Topbar */
.fl-topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--fl-glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--fl-border);
}
.fl-topbar-inner {
  width: min(1200px, 100% - 48px); margin-inline: auto;
  padding: 10px 0; display: flex; align-items: center; gap: 18px;
}
.fl-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--fl-font-display); font-size: 15px; font-weight: 650;
  color: var(--fl-text) !important;
}
.fl-brand svg { width: 18px; height: 18px; }
.fl-topnav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.fl-topnav a { font-size: 13.5px; font-weight: 540; color: var(--fl-text-muted); }
.fl-topnav a:hover { color: var(--fl-text); }
.fl-topnav[hidden] { display: none; }

/* FAQ（サポートページ用・将来） */
.fl-faq { border-bottom: 1px solid var(--fl-border); }
.fl-faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 4px; font-weight: 620; font-size: 15.5px;
}
.fl-faq summary::-webkit-details-marker { display: none; }
.fl-faq summary::after { content: "＋"; color: var(--fl-text-subtle); font-weight: 400; transition: transform var(--fl-dur-fast) ease; }
.fl-faq[open] summary::after { transform: rotate(45deg); }
.fl-faq .a { padding: 0 4px 18px; color: var(--fl-text-muted); font-size: 14.5px; }

/* Release timeline（将来: 更新履歴ページ） */
.fl-timeline { position: relative; padding-left: 26px; }
.fl-timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--fl-border-strong); border-radius: 2px; }
.fl-timeline-item { position: relative; padding-bottom: 26px; }
.fl-timeline-item::before {
  content: ""; position: absolute; left: -26px; top: 7px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--fl-brand); border: 3px solid var(--fl-bg);
  box-shadow: 0 0 0 2px var(--fl-brand-glow);
}
.fl-timeline-item .v { font-family: var(--fl-font-display); font-weight: 680; font-size: 15px; }
.fl-timeline-item .d { font-size: 12.5px; color: var(--fl-text-subtle); margin-left: 8px; }
.fl-timeline-item p { font-size: 14px; color: var(--fl-text-muted); margin: 4px 0 0; }

/* Footer */
.fl-footer {
  border-top: 1px solid var(--fl-border);
  padding: 36px 0 48px;
  font-size: 13px; color: var(--fl-text-subtle);
}
.fl-footer .links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 10px; }
.fl-footer a { color: var(--fl-text-muted); }

/* ---------- 4) Sections ---------- */
.fl-section { padding: var(--fl-space-9) 0; }
.fl-section-tight { padding: var(--fl-space-8) 0; }
.fl-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 680; letter-spacing: 0.06em;
  color: var(--fl-brand); text-transform: uppercase;
  margin-bottom: 10px;
}
.fl-title {
  font-family: var(--fl-font-display);
  font-size: var(--fl-text-title); font-weight: 720; line-height: 1.28;
  letter-spacing: -0.015em; margin: 0 0 14px;
}
.fl-lede { font-size: var(--fl-text-subtitle); line-height: 1.65; color: var(--fl-text-muted); font-weight: 460; }

/* Hero */
.fl-hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 9vw, 104px) 0 0;
  background:
    radial-gradient(900px 480px at 78% -10%, rgba(62,176,255,0.16), transparent 70%),
    radial-gradient(700px 420px at 8% 12%, rgba(255,149,0,0.08), transparent 70%),
    var(--fl-bg);
}
.fl-hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 5vw, 64px); align-items: center;
}
@media (max-width: 900px) { .fl-hero-grid { grid-template-columns: 1fr; } }
.fl-hero-title {
  font-family: var(--fl-font-display);
  font-size: var(--fl-text-hero); font-weight: 760; line-height: 1.16;
  letter-spacing: -0.02em; margin: 14px 0 18px;
}
.fl-hero-title .grad {
  background: linear-gradient(120deg, var(--fl-bolt-top), var(--fl-bolt-bottom));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fl-hero-stage { position: relative; display: flex; justify-content: center; padding: 12px 0 0; }

/* Reveal animation（reduced-motion 尊重） */
.reveal { opacity: 1; transform: none; }
.js-anim .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--fl-ease), transform 0.7s var(--fl-ease); transition-delay: var(--d, 0s); }
.js-anim .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal { opacity: 1; transform: none; transition: none; }
}
