/* 色は DESIGN.md のトークン（ライト: Warm Ivory・Deep Navy、ダーク: Midnight・Champagne）。端末の設定で切り替える */
:root {
  --primary: #17243a;
  --primary-active: #0f1929;
  --on-primary: #ffffff;
  --primary-subtle: #e8ebef;
  --ai-accent: #b8955a;
  /* 色を付けた面。ダークで primary-subtle を広い面に使うと Champagne の面になるため、ダークは Elevated にする */
  --tint: #e8ebef;
  --canvas: #f7f5f0;
  --surface-card: #ffffff;
  --surface-elevated: #ffffff;
  --band: #efebe3;
  --hairline: #ddd8cf;
  --hairline-strong: #c9c3b8;
  --ink: #1b2029;
  --body: #626872;
  --muted: #858a92;
  --radius-card: 12px;
  --radius-control: 8px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #d2b47c;
    --primary-active: #bfa066;
    --on-primary: #171717;
    --primary-subtle: #332f27;
    --ai-accent: #d2b47c;
    --tint: #242d3a;
    --canvas: #0d1118;
    --surface-card: #1a222e;
    --surface-elevated: #242d3a;
    --band: #1a222e;
    --hairline: #2a3341;
    --hairline-strong: #3d4757;
    --ink: #f2efe8;
    --body: #b5bac3;
    --muted: #8d949f;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    'Noto Sans JP',
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
}
/* 見出しは日本語の文節で折り返し、行の長さをそろえる */
h1,
h2 {
  word-break: auto-phrase;
  text-wrap: balance;
}
h2 {
  font-size: 24px;
  letter-spacing: 0.01em;
}
h3 {
  font-size: 16px;
}
p,
ul,
ol {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
@media (min-width: 768px) {
  h2 {
    font-size: 30px;
  }
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
.narrow {
  max-width: 760px;
}
.eyebrow {
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.lead {
  margin-top: 16px;
  max-width: 32em;
  color: var(--body);
  font-size: 16px;
}
.note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

/* ヘッダー（高さ60px） */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
/* ロゴの枠の透明な余白は、ヘッダーの上下の縁にはみ出させる（DESIGN.md「Brand Wordmark」） */
.brand img {
  display: block;
  width: 160px;
  height: auto;
}
.site-nav {
  display: none;
  gap: 24px;
  margin-left: auto;
  font-size: 14px;
  white-space: nowrap;
}
.site-nav a {
  /* 押せる範囲を44px以上にする（GitLabイシュー#511） */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--body);
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--ink);
}
.header-inner .button {
  margin-left: auto;
}
@media (min-width: 768px) {
  .site-nav {
    display: flex;
  }
  .header-inner .button {
    margin-left: 0;
  }
}

/* ボタン・テキストリンク */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.1s ease;
}
.button:active {
  transform: translateY(1px);
}
.button-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.button-primary:hover {
  background: var(--primary-active);
}
.button-secondary {
  background: var(--surface-card);
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.text-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-underline-offset: 4px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
}

/* 節 */
.section {
  padding: 88px 0;
}
.section-band {
  background: var(--band);
}

/* 1. ファーストビュー */
.hero {
  padding: 40px 0 56px;
}
.hero-inner {
  display: grid;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: 34px;
  line-height: 1.2;
}
.hero-phone {
  display: flex;
  justify-content: center;
}
/* スマホの形の枠に画面を入れる（画面の縦横比 725x1568） */
.phone {
  display: block;
  width: min(300px, 76vw);
  padding: 8px;
  border-radius: 40px;
  border: 1px solid var(--hairline-strong);
  background: var(--surface-card);
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
}
@media (min-width: 768px) {
  .hero {
    padding: 72px 0 80px;
  }
  .hero-inner {
    grid-template-columns: 3fr 2fr;
  }
  .hero h1 {
    font-size: 48px;
  }
}

/* 2. 始めやすさ（ファーストビューの直下。上下の線だけ） */
.ease {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.ease-inner {
  display: grid;
  gap: 0;
}
.ease p {
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}
.ease p + p {
  border-top: 1px solid var(--hairline);
}
.ease strong {
  font-size: 16px;
}
.ease span {
  font-size: 13px;
  color: var(--body);
}
@media (min-width: 768px) {
  .ease-inner {
    grid-template-columns: repeat(3, 1fr);
  }
  .ease p {
    padding: 24px 24px 24px 0;
  }
  .ease p + p {
    border-top: none;
    border-left: 1px solid var(--hairline);
    padding-left: 24px;
  }
}

/* 3. お店の一夜の流れ（左に時間、縦の線でつなぐ） */
.timeline {
  list-style: none;
  padding: 0;
  margin-top: 40px;
}
.timeline li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  position: relative;
  padding-bottom: 36px;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: 35px;
  top: 30px;
  bottom: 0;
  width: 1px;
  background: var(--hairline-strong);
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline li:last-child::before {
  display: none;
}
.time {
  justify-self: start;
  align-self: start;
  padding: 2px 10px;
  border-radius: 9999px;
  background: var(--primary-subtle);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.timeline p {
  margin-top: 6px;
  color: var(--body);
  font-size: 14px;
}

/* 4. 看板の機能（左に文、右に画面） */
.feature {
  display: grid;
  gap: 40px;
  align-items: center;
}
.checks {
  list-style: none;
  padding: 0;
  margin-top: 24px;
  display: grid;
  gap: 10px;
}
.checks li {
  padding-left: 22px;
  position: relative;
}
.checks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg);
}
/* 節の中のスマホの画面（キープボトル・会員QR）。ファーストビューより少し小さく、中央に置く */
.phone-feature {
  width: min(260px, 70vw);
  justify-self: center;
}
@media (min-width: 768px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

/* 5. 客アプリとの連携（大小2枚） */
.pair {
  display: grid;
  gap: 12px;
  margin-top: 40px;
}
.pair-main,
.pair-side {
  padding: 28px;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  background: var(--surface-card);
}
.pair-side {
  background: var(--tint);
  border-color: transparent;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.pair p {
  margin-top: 8px;
  color: var(--body);
  font-size: 14px;
}
@media (min-width: 768px) {
  .pair {
    grid-template-columns: 3fr 2fr;
  }
}

/* 6. AIのサポート（DESIGN.md の AI カード: 左に2pxのChampagneの線、星のアイコンだけChampagne） */
.ai-card {
  padding: 32px 28px;
  border-radius: var(--radius-card);
  background: var(--surface-elevated);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--ai-accent);
}
.ai-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--body);
}
.ai-label svg {
  color: var(--ai-accent);
}
.ai-card > p:last-child {
  margin-top: 16px;
  color: var(--body);
}

/* 7. 料金 */
.plans {
  display: grid;
  gap: 12px;
  margin-top: 40px;
}
.plan {
  position: relative;
  padding: 28px 24px;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  background: var(--surface-card);
}
.plan-featured {
  border-color: var(--primary);
}
.badge {
  position: absolute;
  top: -11px;
  left: 24px;
  padding: 1px 10px;
  border-radius: 9999px;
  background: var(--primary-subtle);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}
.price {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.price small {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.plan ul {
  list-style: none;
  padding: 16px 0 0;
  margin-top: 16px;
  border-top: 1px solid var(--hairline);
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--body);
}
@media (min-width: 640px) {
  .plans {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .plans {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 8. 安心（左に見出し、右に3つの事実） */
.safety {
  display: grid;
  gap: 32px;
}
.safety ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 20px;
  color: var(--body);
  font-size: 14px;
}
.safety strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}
@media (min-width: 768px) {
  .safety {
    grid-template-columns: 2fr 3fr;
    gap: 64px;
    align-items: start;
  }
}

/* 9. よくある質問（ブラウザ標準の details/summary で開閉） */
.faq-title {
  margin-bottom: 40px;
  font-size: 30px;
}
.faq-group + .faq-group {
  margin-top: 56px;
}
.faq-group h2 {
  font-size: 20px;
}
.faq {
  margin-top: 32px;
  border-top: 1px solid var(--hairline);
}
.faq details {
  border-bottom: 1px solid var(--hairline);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 4px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font-weight: 400;
  font-size: 20px;
  color: var(--muted);
}
.faq details[open] summary::after {
  content: '\2212';
}
.faq details p {
  padding: 0 4px 18px;
  color: var(--body);
}
.more {
  margin-top: 24px;
}

/* 章の始まり（お店の方へ・お客様へ）。上の線と大きめの余白で章の区切りを示す */
.chapter {
  padding: 96px 0 24px;
  border-top: 1px solid var(--hairline);
}
.chapter-title {
  font-size: 30px;
}
.sub {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 600;
}
.more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
@media (min-width: 768px) {
  .chapter-title {
    font-size: 40px;
  }
}

/* お店の章の終わり */
.chapter-end .closing-inner,
.closing-inner {
  text-align: center;
}
.closing-inner .actions {
  justify-content: center;
}

/* お客様の章: 「無料で使えます」を一番大きく。左に文、右に会員QR */
.chapter-guest {
  padding-bottom: 72px;
}
.guest-hero {
  display: grid;
  gap: 40px;
  align-items: center;
}
.guest-title {
  font-size: 34px;
  line-height: 1.25;
}
.guest-features {
  display: grid;
  gap: 24px 40px;
  margin: 40px 0 0;
}
.guest-features dt {
  font-weight: 600;
}
.guest-features dd {
  margin: 4px 0 0;
  color: var(--body);
  font-size: 14px;
}
/* 「導入店を見る」。押せる範囲を44pxにする */
.feature-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
@media (min-width: 768px) {
  .guest-hero {
    grid-template-columns: 3fr 2fr;
  }
  .guest-title {
    font-size: 48px;
  }
  .guest-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* フッター */
.site-footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 16px;
}
.footer-links a {
  color: var(--body);
}

/* スクロールで節がふわっと出る（CSSのスクロール連動。対応していないブラウザ・動きを減らす設定では表示したまま） */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
  }
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .button {
    transition: none;
  }
  .button:active {
    transform: none;
  }
}

/* 規約・プライバシーポリシー（scripts/build-legal.mjs が作るページ） */
.legal {
  font-size: 14px;
}
.legal h1 {
  margin-bottom: 24px;
  font-size: 26px;
}
.legal h2 {
  margin: 40px 0 12px;
  font-size: 18px;
}
.legal p,
.legal ol,
.legal ul {
  margin-top: 12px;
}
.legal ol,
.legal ul {
  padding-left: 1.6em;
}
.legal li + li {
  margin-top: 8px;
}
.legal li > ol,
.legal li > ul,
.legal li > p {
  margin-top: 8px;
}
.legal a {
  word-break: break-all;
}
/* 列の多い表は横にスクロールする（ページ全体は横にはみ出さない） */
.legal-table {
  margin-top: 12px;
  overflow-x: auto;
}
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.6;
}
.legal th,
.legal td {
  padding: 8px 10px;
  border: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}
/* 4列以上の表は狭い画面で詰まりすぎるため、横にスクロールさせる */
.legal table:has(th:nth-child(4)) {
  min-width: 640px;
}
.legal th {
  background: var(--band);
  font-weight: 600;
  white-space: nowrap;
}
