/* ぬいたび LP(ルート/)専用スタイル。素のCSS(フレームワーク不要・Task#39)。
   世界観=クリーム地・多色線画・破線ステッチ・線路モチーフ(SNS素材/header-v3と同じ文法)。
   モバイルファースト(390px基準)・各セクションはdata-section単位で独立させ、
   並び替え(HTML内でsection丸ごと移動)しても見た目が壊れないようにしている
   (背景色はnth-child等の並び依存セレクタを使わず、各セクションのmodifierクラスで指定)。 */

:root {
  --lp-bg: #fdf0df;
  --lp-surface: #fffaf3;
  --lp-surface-alt: #fbe6cd;
  --lp-border: #e8d2ac;
  --lp-navy: #0d3a6e;
  --lp-orange: #ea5a1c;
  --lp-teal: #01748b;
  --lp-gold: #d6850d;
  --lp-text: #2b2320;
  --lp-text-muted: #7a6f5f;
  --lp-radius-sm: 8px;
  --lp-radius-md: 16px;
  --lp-radius-lg: 26px;
  --lp-space-1: 4px;
  --lp-space-2: 8px;
  --lp-space-3: 16px;
  --lp-space-4: 24px;
  --lp-space-5: 40px;
  --lp-space-6: 64px;
  --lp-max-width: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --lp-bg: #201a12;
    --lp-surface: #2a2217;
    --lp-surface-alt: #33291a;
    --lp-border: #4a3d28;
    --lp-navy: #9ec2ff;
    --lp-orange: #ff9a5c;
    --lp-teal: #5fc9dd;
    --lp-gold: #f0b94a;
    --lp-text: #f4ece0;
    --lp-text-muted: #c3b6a3;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body.lp-body {
  background: var(--lp-bg);
  color: var(--lp-text);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic', 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1,
h2,
h3 {
  color: var(--lp-navy);
  margin: 0 0 var(--lp-space-2);
  line-height: 1.4;
  font-weight: 800;
}

p {
  margin: 0 0 var(--lp-space-2);
}

a {
  color: var(--lp-teal);
}

.lp-container {
  width: 100%;
  max-width: var(--lp-max-width);
  margin: 0 auto;
  padding: 0 var(--lp-space-4);
}

/* セクション共通(順序に依存しないよう、背景は各セクションのmodifierで明示指定する) */
.lp-section {
  padding: var(--lp-space-6) 0;
}

.lp-section--cream {
  background: var(--lp-bg);
}

.lp-section--surface {
  background: var(--lp-surface);
}

.lp-section--band {
  background: var(--lp-surface-alt);
  border-top: 3px dashed var(--lp-border);
  border-bottom: 3px dashed var(--lp-border);
}

.lp-section__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--lp-teal);
  margin-bottom: var(--lp-space-2);
}

.lp-section__title {
  font-size: 1.5rem;
}

.lp-section__lead {
  color: var(--lp-text-muted);
  max-width: 42em;
}

/* レール区切り(線路モチーフ) */
.lp-rail-divider {
  width: 100%;
  height: clamp(28px, 8vw, 64px);
  object-fit: cover;
  object-position: center;
  opacity: 0.9;
}

/* ===== ヒーロー ===== */
.hero {
  padding-top: var(--lp-space-5);
  text-align: center;
}

.hero__badge {
  width: clamp(96px, 28vw, 160px);
  border-radius: 50%;
  margin: 0 auto var(--lp-space-4);
  box-shadow: 0 6px 0 rgba(13, 58, 110, 0.08);
}

.hero__title {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  margin-bottom: var(--lp-space-3);
}

.hero__lead {
  font-size: 1.05rem;
  color: var(--lp-text-muted);
  max-width: 34em;
  margin-left: auto;
  margin-right: auto;
}

.hero__actions {
  margin-top: var(--lp-space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lp-space-3);
}

.btn {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--lp-orange);
  color: #fff8f0;
  box-shadow: 0 4px 0 #b5430f;
}

.btn--primary:hover {
  filter: brightness(1.05);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--lp-teal);
  background: var(--lp-surface);
  border: 2px dashed var(--lp-teal);
  border-radius: 999px;
  padding: 6px 16px;
}

.hero__character {
  width: clamp(140px, 40vw, 220px);
  margin: var(--lp-space-5) auto 0;
}

/* ===== できることは3つ ===== */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--lp-space-4);
  margin-top: var(--lp-space-4);
}

.feature-card {
  background: var(--lp-surface);
  border: 2px dashed var(--lp-border);
  border-radius: var(--lp-radius-lg);
  padding: var(--lp-space-4);
  text-align: center;
}

.feature-card__icon {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin: 0 auto var(--lp-space-3);
}

.feature-card__title {
  color: var(--lp-navy);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: var(--lp-space-2);
}

.feature-card__text {
  color: var(--lp-text-muted);
  font-size: 0.95rem;
}

.feature-card__gallery {
  display: flex;
  gap: var(--lp-space-2);
  overflow-x: auto;
  margin: var(--lp-space-3) 0;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}

.feature-card__gallery img {
  width: clamp(120px, 32vw, 160px);
  border-radius: var(--lp-radius-sm);
  border: 2px solid var(--lp-border);
  scroll-snap-align: start;
  flex: none;
}

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

/* ===== しおりの作り方3ステップ ===== */
.steps {
  margin-top: var(--lp-space-4);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--lp-space-3);
  counter-reset: step;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: var(--lp-space-3);
  background: var(--lp-surface);
  border-radius: var(--lp-radius-md);
  padding: var(--lp-space-3) var(--lp-space-4);
}

.step__number {
  counter-increment: step;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--lp-navy);
  color: var(--lp-bg);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step__number::before {
  content: counter(step);
}

.step__body h3 {
  font-size: 1.05rem;
  margin-bottom: 2px;
}

.step__body p {
  color: var(--lp-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .step {
    flex-direction: column;
  }
}

/* ===== ウェイトリストフォーム ===== */
.waitlist {
  max-width: 480px;
  margin: var(--lp-space-4) auto 0;
  background: var(--lp-surface);
  border: 2px dashed var(--lp-teal);
  border-radius: var(--lp-radius-lg);
  padding: var(--lp-space-4);
  text-align: center;
}

.waitlist__form {
  margin-top: var(--lp-space-3);
  display: flex;
  flex-direction: column;
  gap: var(--lp-space-2);
}

.waitlist__input {
  font-size: 1rem;
  padding: 12px 16px;
  border-radius: 999px;
  border: 2px solid var(--lp-border);
  background: var(--lp-bg);
  color: var(--lp-text);
}

.waitlist__input:focus {
  outline: 2px solid var(--lp-teal);
  outline-offset: 2px;
}

/* honeypot: 人間には見えない(botだけが埋めてしまう)入力欄 */
.waitlist__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.waitlist__submit {
  margin-top: var(--lp-space-1);
}

.waitlist__message {
  margin-top: var(--lp-space-2);
  font-size: 0.9rem;
  min-height: 1.4em;
}

.waitlist__message--ok {
  color: var(--lp-teal);
}

.waitlist__message--error {
  color: var(--lp-orange);
}

/* ===== さいきんのぬいたび(更新履歴・最小実装) ===== */
.updates-list {
  list-style: none;
  margin: var(--lp-space-4) auto 0;
  padding: 0;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: var(--lp-space-2);
}

.updates-list__item {
  display: flex;
  gap: var(--lp-space-3);
  align-items: baseline;
  background: var(--lp-surface);
  border-radius: var(--lp-radius-sm);
  padding: var(--lp-space-2) var(--lp-space-3);
}

.updates-list__date {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: var(--lp-text-muted);
  font-size: 0.85rem;
}

.updates-list__text {
  color: var(--lp-text);
  font-size: 0.95rem;
}

/* ===== データの扱い ===== */
.privacy-note {
  max-width: 42em;
  margin: var(--lp-space-3) auto 0;
}

.privacy-note__links {
  margin-top: var(--lp-space-3);
  display: flex;
  gap: var(--lp-space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== フッター ===== */
.site-footer {
  padding: var(--lp-space-5) 0 var(--lp-space-6);
  text-align: center;
  color: var(--lp-text-muted);
  font-size: 0.85rem;
}

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

.lp-center {
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
