/*
 * 公開LP(root, 未ログイン向け)専用スタイル。ダッシュボード側の application.css とは
 * 独立させる(トーンが違う=白ベースの洗練されたSaaS的トーン vs 紙色+抹茶グリーンの家計簿トーン。
 * .btn 等の同名クラスが両方に出るため混在ロードすると打ち消し合う)。
 * Propshaft でそのまま配信(プリプロセスなし)のため素の CSS で書く。
 */

:root {
  --bg: #ffffff;
  --surface: #f7f8f7;
  --card: #ffffff;
  --border: #e5e7eb;
  --ink: #16181d;
  --ink-soft: #5b6169;
  --ink-faint: #9298a1;
  --accent: #16a34a;
  --accent-strong: #0f7a37;
  --accent-tint: #e8f7ec;
  --accent-ink: #ffffff;
  --shadow: rgba(20, 23, 27, 0.08);
  --font-jp: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "YuGothic", "Yu Gothic", "Noto Sans JP", "Meiryo", sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-jp);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: no-preference) {
  a, button, summary { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease; }
}

.mono { font-family: var(--font-mono); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }

h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; }

/* ---- header ---- */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.05rem 0;
}
.logo {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.logo .dot { color: var(--accent); }
nav.links { display: flex; gap: 2rem; font-size: 0.92rem; color: var(--ink-soft); }
nav.links a { text-decoration: none; }
nav.links a:hover { color: var(--accent); }
@media (max-width: 720px) { nav.links { display: none; } }

.nav-actions { display: flex; align-items: center; gap: 1.4rem; }
.nav-login { font-size: 0.92rem; color: var(--ink-soft); text-decoration: none; }
.nav-login:hover { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-jp); font-weight: 700; font-size: 0.95rem;
  padding: 0.75rem 1.4rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.small { padding: 0.55rem 1.05rem; font-size: 0.85rem; }

/* ---- hero ---- */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 8vw, 5.5rem);
}
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.28; font-weight: 800; letter-spacing: -0.01em;
}
.hero .lead {
  margin-top: 1.4rem; font-size: 1.06rem; color: var(--ink-soft); max-width: 34rem;
}
.hero .cta-row { margin-top: 2.1rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.hero .fineprint { margin-top: 1rem; font-size: 0.82rem; color: var(--ink-faint); }

/* ---- receipt mockup ---- */
.receipt-stage { position: relative; display: flex; justify-content: center; padding: 1rem 0; }
.receipt-card {
  position: relative; width: min(300px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 40px -20px var(--shadow);
  padding: 1.9rem 1.6rem 2.1rem;
}
.receipt-brand { text-align: center; font-weight: 700; letter-spacing: 0.06em; font-size: 0.85rem; }
.receipt-meta { text-align: center; font-size: 0.72rem; color: var(--ink-faint); margin-top: 0.35rem; }
.receipt-rule { height: 1px; background: var(--border); margin: 1rem 0; }
.receipt-items { list-style: none; margin: 0; padding: 0; font-size: 0.86rem; }
.receipt-items li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.32rem 0; color: var(--ink-soft); }
.receipt-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; margin-top: 0.2rem; }
.receipt-check { margin-top: 0.6rem; font-size: 0.72rem; color: var(--accent); text-align: right; }
.stamp {
  position: absolute; right: 1.1rem; top: -0.9rem;
  padding: 0.4rem 0.85rem; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.72rem; letter-spacing: 0.02em;
  line-height: 1.3; text-align: center; white-space: nowrap;
  box-shadow: 0 8px 16px -8px var(--shadow);
}

/* ---- sections ---- */
section { padding: clamp(3rem, 7vw, 5rem) 0; }
section.section-alt { background: var(--surface); }
.section-head { max-width: 40rem; margin-bottom: 2.6rem; }
.section-head .eyebrow { margin-bottom: 0.8rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); font-weight: 800; }
.section-head p { margin-top: 0.9rem; color: var(--ink-soft); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

.pain-card { padding: 1.7rem 1.6rem; background: var(--card); border: 1px solid var(--border); border-radius: 12px; }
.pain-card h3 { font-size: 1.02rem; font-weight: 700; }
.pain-card p { margin-top: 0.6rem; color: var(--ink-soft); font-size: 0.94rem; }

.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: grid; grid-template-columns: 3.4rem 1fr; gap: 1.4rem; padding: 1.7rem 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: none; }
.step .num-tag { font-family: var(--font-mono); font-weight: 700; font-size: 1.6rem; color: var(--accent); }
.step h3 { font-size: 1.1rem; font-weight: 700; }
.step p { margin-top: 0.5rem; color: var(--ink-soft); max-width: 42rem; }

.feature-card { padding: 1.7rem 1.6rem; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; background: var(--card); }
.feature-card h3 { font-size: 1.02rem; font-weight: 700; }
.feature-card p { margin-top: 0.6rem; color: var(--ink-soft); font-size: 0.94rem; }
.feature-card .tag { display: inline-block; margin-bottom: 0.7rem; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; color: var(--ink-faint); text-transform: uppercase; }

/* ---- pricing ---- */
.price-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: clamp(2rem, 5vw, 3rem); max-width: 640px;
  box-shadow: 0 20px 40px -24px var(--shadow);
  display: grid; gap: 1.8rem;
}
.price-head { display: flex; align-items: baseline; gap: 1.4rem; flex-wrap: wrap; }
.price-value { font-family: var(--font-mono); font-weight: 700; font-size: clamp(3rem, 7vw, 4.2rem); line-height: 1; }
.price-unit { color: var(--ink-soft); font-size: 1rem; }
.price-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.price-list li { display: flex; gap: 0.7rem; color: var(--ink-soft); font-size: 0.95rem; }
.price-list li .ok { font-family: var(--font-mono); color: var(--accent); font-weight: 700; }
.price-note { font-size: 0.82rem; color: var(--ink-faint); border-top: 1px solid var(--border); padding-top: 1.1rem; }

/* ---- faq ---- */
.faq-list { max-width: 46rem; }
details { border-bottom: 1px solid var(--border); padding: 1.15rem 0; }
details summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem;
  align-items: baseline; font-weight: 700; font-size: 1rem;
}
details summary::-webkit-details-marker { display: none; }
details summary .icon { font-family: var(--font-mono); color: var(--accent); font-size: 1.1rem; flex-shrink: 0; }
details summary .icon::before { content: "+"; }
details[open] summary .icon::before { content: "\2212"; }
details p { margin-top: 0.75rem; color: var(--ink-soft); max-width: 42rem; font-size: 0.95rem; }

/* ---- final cta ---- */
.final-cta {
  background: var(--accent-tint);
  padding: clamp(2rem, 5vw, 2.8rem) 0;
}
.final-cta .row {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
}
.final-cta h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 800; }
.final-cta p { margin-top: 0.4rem; color: var(--ink-soft); }

/* ---- footer ---- */
footer.site { padding: clamp(2.5rem, 6vw, 3.5rem) 0 3rem; border-top: 1px solid var(--border); }
.footer-row { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 1.6rem; flex-wrap: wrap; font-size: 0.88rem; color: var(--ink-soft); }
.footer-links a:hover { color: var(--accent); }
.footer-note { margin-top: 1.6rem; font-size: 0.82rem; color: var(--ink-faint); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; }

/* ---- flash(marketing layout 用の最小限のスタイル) ---- */
.flash { padding: 0.85rem var(--wrap-pad, 1.25rem); text-align: center; font-size: 0.9rem; }
.flash-notice { background: var(--accent-tint); color: var(--accent-strong); }
.flash-alert { background: #fbeae7; color: #a13a26; }
