/*
 * pinfall.benbasha.com
 * Tokens are the app's "maple & cosmic" palette, verbatim from
 * docs/specs/DESIGN-BRIEF.md §3 (and src/theme). Light and dark both first-class;
 * dark is navy with a violet glow, like the app.
 * Type: Barlow Semi Condensed for numbers and display, Inter for UI, Noto Sans JP for ja.
 */
:root {
  --bg: #F4EFE6;
  --surface: #FFFDF9;
  --ink: #16203A;
  --ink-2: #5B6275;
  --line: #E4DDD0;
  --cosmic: #5B3FD0;
  --on-cosmic: #FFFFFF;
  --maple: #C98A3E;
  --maple-text: #8A5A1C;
  --spare: #1F7A57;
  --foul: #B42318;
  --pin-down: rgba(22, 32, 58, 0.08);
  --pin-down-line: rgba(22, 32, 58, 0.55);
  --pin-shadow: rgba(22, 32, 58, 0.35);
  --grain: rgba(22, 32, 58, 0.07);
  --deck-shade: rgba(22, 32, 58, 0.14);
  --glow: transparent;
  --shadow: 0 1px 2px rgba(22, 32, 58, 0.06), 0 10px 30px rgba(22, 32, 58, 0.08);
  --phone-body: #16203A;
  --display: "Barlow Semi Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --ui: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 22px;
  --wrap: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1020;
    --surface: #1A1B31;
    --ink: #EEEAF6;
    --ink-2: #A3A4BD;
    --line: #2A2B45;
    --cosmic: #A08CFF;
    --on-cosmic: #0F1020;
    --maple: #E0A95E;
    --maple-text: #E0A95E;
    --spare: #5CCB9A;
    --foul: #FF7A6E;
    --glow: rgba(160, 140, 255, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 40px rgba(0, 0, 0, 0.35);
    --phone-body: #05050C;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(900px 520px at 78% -8%, var(--glow), transparent 70%);
  background-repeat: no-repeat;
  color: var(--ink);
  font: 400 16px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
}
:lang(ja) body, body:lang(ja) {
  font-family: Inter, "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-break: strict;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--cosmic); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
.num { font-family: var(--display); font-variant-numeric: tabular-nums; font-weight: 700; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: 20px;
}

/* ---------- header ---------- */
.site-header { padding-block: 18px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand strong { font: 700 22px/1 var(--display); letter-spacing: 0.01em; }
.mark { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.header-nav { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 500; }
.header-nav a { color: var(--ink-2); text-decoration: none; }
.header-nav a:hover { color: var(--ink); }
.header-nav .lang {
  color: var(--ink); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px;
}
@media (max-width: 640px) { .header-nav .opt { display: none; } }

/* ---------- hero ---------- */
.hero { padding-block: 28px 64px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } }
.kicker {
  display: inline-block; margin: 0 0 14px; color: var(--maple-text);
  font: 700 13px/1 var(--ui); letter-spacing: 0.12em; text-transform: uppercase;
}
:lang(ja) .kicker { letter-spacing: 0.04em; }
h1 {
  margin: 0 0 18px; font: 700 clamp(38px, 5.6vw, 62px)/1.02 var(--display);
  letter-spacing: -0.01em; text-wrap: balance;
}
:lang(ja) h1 { word-break: keep-all; overflow-wrap: anywhere; font-family: var(--display), "Noto Sans JP", sans-serif; font-size: clamp(32px, 4.6vw, 50px); line-height: 1.2; letter-spacing: 0; }
h1 em { font-style: normal; color: var(--cosmic); }
.lead { margin: 0 0 22px; font-size: 18px; color: var(--ink-2); max-width: 36em; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding: 0; }
.chips li {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px;
  font-size: 14px; font-weight: 600;
}
.chips svg { width: 16px; height: 16px; stroke: var(--spare); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  min-width: 172px; padding: 9px 18px 9px 14px; border-radius: 12px;
  background: var(--ink); color: var(--bg); text-decoration: none;
}
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge .badge-copy { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge small { font-size: 11px; opacity: 0.85; }
.store-badge strong { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.store-badge.soon::after {
  content: attr(data-soon); position: absolute; top: 0; right: 10px; transform: translateY(-62%);
  padding: 2px 8px; border-radius: 999px; background: var(--maple); color: #16203A;
  font-size: 11px; font-weight: 700;
}
.hero-note { margin: 18px 0 0; font-size: 14px; color: var(--ink-2); max-width: 34em; }

/* ---------- phone slot ---------- */
.hero-shot { display: flex; justify-content: center; }
.phone {
  width: min(340px, 82vw); aspect-ratio: 400 / 866; padding: 12px;
  border-radius: 54px; background: var(--phone-body);
  box-shadow: var(--shadow), 0 0 0 1.5px rgba(255, 255, 255, 0.06) inset;
  position: relative;
}
.phone::before {
  content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 26px; border-radius: 999px; background: var(--phone-body); z-index: 2;
}
.phone > svg, .phone > img { width: 100%; height: 100%; border-radius: 42px; object-fit: cover; }

/* deck illustration (inline SVG, uses the tokens above so it follows light/dark) */
.deck-art .scr { fill: var(--bg); }
.deck-art .srf { fill: var(--surface); }
.deck-art .ln { stroke: var(--line); fill: none; }
.deck-art .ink { fill: var(--ink); }
.deck-art .ink2 { fill: var(--ink-2); }
.deck-art .cos { fill: var(--cosmic); }
.deck-art .cos-s { stroke: var(--cosmic); fill: none; }
.deck-art .onc { fill: var(--on-cosmic); }
.deck-art .spr { fill: var(--spare); }
.deck-art .mpl { fill: var(--maple); }
.deck-art .mplt { fill: var(--maple-text); }
.deck-art .grain { stroke: var(--grain); }
.deck-art .pin { fill: #FFFDF9; stroke: #16203A; stroke-width: 2; }
.deck-art .pin-ring { fill: none; stroke: #5B3FD0; stroke-width: 3; }
.deck-art .pin-sh { fill: var(--pin-shadow); }
.deck-art .pin-n { fill: #16203A; }
.deck-art text { font-family: var(--ui); }
.deck-art .d { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- sections ---------- */
section { scroll-margin-top: 16px; }
.section-title { margin: 0 0 10px; font: 700 clamp(30px, 3.6vw, 42px)/1.08 var(--display); text-wrap: balance; }
:lang(ja) .section-title { font-family: var(--display), "Noto Sans JP", sans-serif; line-height: 1.3; }
.section-sub { margin: 0 0 32px; color: var(--ink-2); font-size: 17px; max-width: 42em; }

.features { padding-block: 56px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 24px; box-shadow: var(--shadow);
}
.feature .icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--cosmic) 12%, transparent); margin-bottom: 16px;
}
.feature .icon svg circle { stroke-width: 1.3; }
.feature .icon svg { width: 24px; height: 24px; stroke: var(--cosmic); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature.maple .icon { background: color-mix(in srgb, var(--maple) 22%, transparent); }
.feature.maple .icon svg { stroke: var(--maple-text); }
.feature h3 { margin: 0 0 8px; font: 700 24px/1.15 var(--display); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
:lang(ja) .feature h3 { font-family: var(--display), "Noto Sans JP", sans-serif; font-size: 21px; }
.feature p { margin: 0; color: var(--ink-2); }
.pro-tag {
  font: 700 11px/1 var(--ui); letter-spacing: 0.12em; color: var(--cosmic);
  border: 1.5px solid var(--cosmic); border-radius: 999px; padding: 4px 8px;
}
.feature .fine { margin-top: 12px; font-size: 14px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 12px; }

.rulesets { padding-block: 8px 40px; }
.ruleset-band {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding: 18px 24px; border-radius: var(--radius); border: 1.5px dashed var(--line);
}
.ruleset-band strong { font: 700 22px/1.2 var(--display); }
.ruleset-band span { color: var(--ink-2); font-size: 15px; }

/* ---------- pricing ---------- */
.pricing { padding-block: 40px 56px; }
.price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .price-grid { grid-template-columns: 1fr; } }
.price-col {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.price-col.pro { border: 2px solid var(--cosmic); }
.price-col .tag { font: 700 12px/1 var(--ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--maple-text); }
.price-col.pro .tag { color: var(--cosmic); }
.price-col .price { margin: 10px 0 4px; font: 700 48px/1 var(--display); }
.price-col .price-sub { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; }
.price-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.price-col li { position: relative; padding-left: 26px; }
.price-col li::before {
  content: ""; position: absolute; left: 2px; top: 0.5em; width: 12px; height: 7px;
  border-left: 2.5px solid var(--spare); border-bottom: 2.5px solid var(--spare); transform: rotate(-45deg);
}
.covenant {
  margin-top: 16px; padding: 18px 22px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--maple) 16%, var(--surface)); color: var(--ink);
  font-weight: 500;
}
.covenant strong { font-family: var(--display); font-size: 19px; }

/* ---------- faq / contact ---------- */
.faq { padding-block: 24px 56px; }
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
@media (max-width: 760px) { .faq-grid { grid-template-columns: 1fr; } }
.faq h3 { margin: 18px 0 4px; font-size: 17px; font-weight: 600; }
.faq p { margin: 0; color: var(--ink-2); }
.mail {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; font-weight: 600; font-size: 17px;
}
.mail svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }

.final-cta { padding-block: 32px 72px; text-align: center; }
.final-cta h2 { margin: 16px auto 22px; font: 700 clamp(28px, 3.4vw, 40px)/1.1 var(--display); max-width: 18em; }
:lang(ja) .final-cta h2 { font-family: var(--display), "Noto Sans JP", sans-serif; line-height: 1.35; }
.final-cta .mark { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto; }
.final-cta .store-badges { justify-content: center; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 28px 40px; font-size: 14px; color: var(--ink-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--ink-2); }
.site-footer p { margin: 0; width: 100%; }

/* ---------- legal ---------- */
.legal-main { padding-block: 16px 64px; }
.legal-main .wrap { max-width: 780px; }
.legal-toggle { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.legal-toggle a { padding: 6px 16px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.legal-toggle a.active { background: var(--cosmic); color: var(--on-cosmic); }
.legal-doc { scroll-margin-top: 16px; }
.legal-doc + .legal-doc { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--line); }
.legal-doc h1 { font-size: clamp(34px, 5vw, 48px); }
.legal-doc h2 { margin: 34px 0 8px; font: 700 24px/1.2 var(--display); }
:lang(ja) .legal-doc h2 { font-family: var(--display), "Noto Sans JP", sans-serif; font-size: 21px; }
.legal-doc p, .legal-doc li { color: var(--ink); }
.legal-doc ul, .legal-doc ol { padding-left: 22px; }
.legal-doc h3 { margin: 22px 0 6px; font-size: 17px; font-weight: 600; }
.legal-doc li { margin-bottom: 6px; }
.legal-doc code { font-size: 0.92em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.effective { color: var(--ink-2); font-size: 14px; }
.callout {
  margin: 20px 0 8px; padding: 18px 20px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--cosmic);
}
