/* ============================================================
   START ANYWAY — landing page
   Poster-brutalism: cobalt on paper, 2px ink lines, hard zero-blur
   offset shadows that sink when pressed. Anton shouts, lowercase talks.
   Tokens mirror the app design system (tokens/*.css).
   ============================================================ */

:root {
  /* base palette */
  --ink: #0A0A0A;
  --paper: #F2F1EC;
  --paper-raised: #FBFAF6;
  --cobalt: #2038E8;
  --cobalt-deep: #1B30C9;
  --cobalt-tint: #DEE3FC;

  /* reward metals — reserved for the streak/badge moment only */
  --bronze: #C1731F;
  --silver: #8F9AAE;
  --gold: #E8A912;

  /* goal accents (used lightly for badge discs) */
  --vermilion: #E8542F;
  --mint: #35E39B;
  --sun: #F2B418;
  --orchid: #8C63E8;

  /* type */
  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Space Grotesk', 'Helvetica Neue', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;
  --leading-display: 0.92;
  --track-display: 0.005em;
  --track-kicker: 0.16em;

  /* shape */
  --border-w: 2px;
  --border-w-heavy: 3px;
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* elevation — hard offsets, ZERO blur. --sh flips per section. */
  --sh: var(--ink);
  --shadow-press: 2px 2px 0 var(--sh);
  --shadow-card: 4px 4px 0 var(--sh);
  --shadow-raised: 6px 6px 0 var(--sh);
  --shadow-pop: 8px 8px 0 var(--sh);
  --shadow-modal: 10px 10px 0 var(--sh);

  /* motion */
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-glide: cubic-bezier(0.22, 1, 0.36, 1);
  --t-tap: 150ms;

  --maxw: 1120px;
  --nav-h: 66px;
  --control-h: 56px;   /* shared height for email fields + their buttons, all screen sizes */
}

/* ---------- reset-ish ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;            /* clip horizontal overflow without making body a scroll container */
}
html { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: var(--font-body); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
::selection { background: var(--cobalt); color: var(--paper); }

/* ============================================================
   SECTION THEMES — the alternating poster stack
   ============================================================ */
.sec { position: relative; overflow: hidden; }
.sec--paper  { background: var(--paper);  color: var(--ink);   --sh: var(--ink);    --stroke: var(--ink);   --ghost: rgba(10,10,10,0.05);   --muted: rgba(10,10,10,0.60); --hairline: rgba(10,10,10,0.18); }
.sec--cobalt { background: var(--cobalt);  color: var(--paper); --sh: var(--ink);    --stroke: var(--paper); --ghost: rgba(242,241,236,0.11); --muted: rgba(242,241,236,0.80); --hairline: rgba(242,241,236,0.30); }
.sec--ink    { background: var(--ink);     color: var(--paper); --sh: var(--cobalt); --stroke: var(--paper); --ghost: rgba(242,241,236,0.06); --muted: rgba(242,241,236,0.66); --hairline: rgba(242,241,236,0.22); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: clamp(64px, 11vw, 128px) clamp(20px, 5vw, 64px); position: relative; z-index: 2; }
.wrap--tight { max-width: 860px; }

/* decorative CJK garnish — one per section, never carries meaning */
.ghost-jp {
  position: absolute; z-index: 0; pointer-events: none; user-select: none;
  font-family: var(--font-jp); font-weight: 900; line-height: 1;
  color: var(--ghost);
  font-size: clamp(180px, 34vw, 460px);
}

/* ============================================================
   TYPE
   ============================================================ */
.kicker {
  font-size: clamp(10px, 1.6vw, 11.5px); font-weight: 700;
  letter-spacing: var(--track-kicker); text-transform: uppercase;
  color: var(--muted);
}
.kicker--cobalt { color: var(--cobalt); }
.sec--cobalt .kicker--cobalt,
.sec--ink .kicker--cobalt { color: var(--paper); opacity: .85; }

.display {
  font-family: var(--font-display); font-weight: 400;
  text-transform: uppercase; line-height: var(--leading-display);
  letter-spacing: var(--track-display); margin: 0;
  text-wrap: balance;
}
.display .out { color: transparent; -webkit-text-stroke: 2px var(--stroke, var(--ink)); text-stroke: 2px var(--stroke, var(--ink)); }
.display .cobalt { color: var(--cobalt); }
.sec--cobalt .display .cobalt { color: var(--ink); }

.d-xl { font-size: clamp(54px, 13vw, 118px); }
.d-lg { font-size: clamp(42px, 9vw, 84px); }
.d-md { font-size: clamp(32px, 6.4vw, 56px); }
.d-sm { font-size: clamp(26px, 5vw, 38px); }

.lead { font-size: clamp(15.5px, 2.4vw, 19px); line-height: 1.5; font-weight: 500; color: var(--muted); }
.lead--strong { color: inherit; }
.body  { font-size: clamp(15px, 2.1vw, 17px); line-height: 1.55; font-weight: 500; }
.small { font-size: 13px; line-height: 1.5; color: var(--muted); }

.measure { max-width: 30ch; }
.measure-wide { max-width: 46ch; }

/* ============================================================
   BUTTONS — press = sink into the shadow
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; min-width: 48px; padding: 0 22px;
  font-family: var(--font-body); font-size: 14.5px; font-weight: 700; letter-spacing: .01em;
  border: var(--border-w) solid var(--ink); border-radius: var(--radius-sm);
  cursor: pointer; user-select: none; text-decoration: none; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-tap) var(--ease-glide), box-shadow var(--t-tap) var(--ease-glide), background var(--t-tap);
}
/* cobalt fill — for paper sections */
.btn--primary { background: var(--cobalt); color: var(--paper); box-shadow: 4px 4px 0 var(--ink); }
.btn--primary:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }
/* paper fill — for cobalt / ink sections */
.btn--paper { background: var(--paper); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn--paper:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--ink); }
.sec--ink .btn--paper { box-shadow: 4px 4px 0 var(--cobalt-deep); }
.sec--ink .btn--paper:active { box-shadow: 2px 2px 0 var(--cobalt-deep); }
/* hero — Anton, bigger sink */
.btn--hero {
  font-family: var(--font-display); font-size: clamp(18px, 2.6vw, 22px); font-weight: 400;
  text-transform: uppercase; letter-spacing: .04em; min-height: 64px; padding: 0 30px;
  background: var(--cobalt); color: var(--paper); box-shadow: 8px 8px 0 var(--ink);
}
.btn--hero:active { transform: translate(6px,6px); box-shadow: 2px 2px 0 var(--ink); }
.btn--hero.btn--paper { background: var(--paper); color: var(--ink); }
.sec--cobalt .btn--hero.btn--paper { box-shadow: 8px 8px 0 var(--ink); }
.sec--cobalt .btn--hero.btn--paper:active { box-shadow: 2px 2px 0 var(--ink); }
/* ghost / text link */
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; padding: 0 6px; }
.btn--ghost:active { transform: scale(.96); }
.btn .arw { display: inline-block; }

/* ============================================================
   FORMS — email capture (mailto)
   ============================================================ */
.signup { display: flex; gap: 12px; width: 100%; max-width: 480px; }
.signup .field {
  flex: 1 1 auto; min-width: 0;
  height: var(--control-h); min-height: var(--control-h); /* min-height stops flex from collapsing it in the mobile column layout */
  padding: 0 16px;
  font-family: var(--font-body); font-size: 16px; font-weight: 500; color: var(--ink);
  background: var(--paper-raised); border: var(--border-w) solid var(--ink); border-radius: var(--radius-sm);
  outline: none; transition: box-shadow var(--t-tap) var(--ease-glide);
}
.signup .field::placeholder { color: rgba(10,10,10,.42); }
.signup .field:focus { box-shadow: 4px 4px 0 var(--ink); }
.sec--ink .signup .field:focus { box-shadow: 4px 4px 0 var(--cobalt-deep); }
.signup .btn { height: var(--control-h); min-height: var(--control-h); flex: 0 0 auto; }
.form-note { margin-top: 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.form-note .tick { color: var(--cobalt); }
.sec--cobalt .form-note .tick, .sec--ink .form-note .tick { color: currentColor; }
.form-ok { color: inherit; font-weight: 700; }

/* ============================================================
   CARDS / PIECES
   ============================================================ */
.card {
  background: var(--paper-raised); color: var(--ink);
  border: var(--border-w) solid var(--ink); border-radius: var(--radius-md);
  box-shadow: 4px 4px 0 var(--sh); padding: 22px 22px 24px;
}

/* numbered step (echoes onboarding "we chop it" panel) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2.4vw, 22px); }
.step { display: flex; flex-direction: column; gap: 12px; }
.step__disc {
  width: 52px; height: 52px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: var(--paper); color: var(--cobalt); border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-pill); box-shadow: 3px 3px 0 var(--sh);
  font-family: var(--font-display); font-size: 22px;
}
.step__t { font-size: clamp(15px, 2.2vw, 17px); font-weight: 700; line-height: 1.35; }

/* marquee ribbon */
.marquee { background: var(--cobalt); border-top: 2px solid var(--paper); border-bottom: 2px solid var(--paper); overflow: hidden; height: 54px; display: flex; align-items: center; }
.marquee--ink { background: var(--ink); border-color: var(--cobalt); }
.marquee__inner { display: flex; white-space: nowrap; animation: sa-marquee 18s linear infinite; will-change: transform; }
.marquee span { font-size: 15px; font-weight: 700; letter-spacing: .14em; color: var(--paper); padding-right: 34px; text-transform: uppercase; }

/* rotated stamp — big news lands */
.stamp {
  display: inline-block; background: var(--paper-raised); color: var(--ink);
  border: var(--border-w-heavy) solid var(--ink); box-shadow: 10px 10px 0 var(--sh);
  border-radius: var(--radius-md); padding: 22px 22px; transform: rotate(-5deg);
}

/* points chip + badges (rewards proof) */
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 13px; background: var(--ink); color: var(--paper); border-radius: var(--radius-pill); font-size: 13px; font-weight: 700; border: 2px solid var(--ink); }
.sec--ink .chip { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.chip .lv { opacity: .6; font-weight: 600; }

.badges { display: flex; flex-wrap: wrap; gap: clamp(16px, 3vw, 30px); }
.badge { display: flex; flex-direction: column; align-items: center; gap: 9px; width: 84px; }
.badge__disc {
  width: 72px; height: 72px; border-radius: var(--radius-pill); border: var(--border-w) solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 26px; box-shadow: 4px 4px 0 var(--sh);
  transform: rotate(-4deg);
}
.badge__l { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; }

/* device / prototype embed */
.device-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.device {
  position: relative; width: min(390px, 100%); aspect-ratio: 390 / 856;
  margin: 0 auto;
}
/* desktop + tablet: widen the frame so the embedded prototype shows its demo controls */
@media (min-width: 768px) {
  .device {
    width: min(720px, 100%); aspect-ratio: 3 / 4;
    background: var(--ink); border: var(--border-w) solid var(--ink);
    border-radius: var(--radius-lg); box-shadow: 8px 8px 0 var(--sh); overflow: hidden;
  }
}
.device iframe { width: 100%; height: 100%; border: 0; background: transparent; display: block; }
.device__glow { position: absolute; inset: -14px; z-index: -1; }

.pill-tag { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border: 2px solid currentColor; border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.hairline { height: 2px; background: currentColor; opacity: .28; border: 0; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h); display: flex; align-items: center;
  background: var(--paper); border-bottom: var(--border-w) solid var(--ink);
}
.nav__in { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 5vw, 64px); width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { display: inline-flex; align-items: baseline; gap: 8px; font-family: var(--font-display); font-size: 20px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.wordmark .jp { font-family: var(--font-jp); font-weight: 700; font-size: 14px; opacity: .5; }
.nav .btn { min-height: 42px; height: 42px; padding: 0 16px; font-size: 13px; }

/* ============================================================
   HERO
   ============================================================ */
.hero .wrap { padding-top: clamp(56px, 9vw, 104px); padding-bottom: clamp(56px, 9vw, 104px); }
.hero__kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.hero__title { margin-bottom: 22px; }
.hero__sub { margin-bottom: 30px; }
.hero__cta-note { margin-top: 14px; }
.hero__try { margin-top: 22px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; text-decoration: none; }
.hero__try .arw { display: inline-block; animation: sa-bob 1.7s ease-in-out infinite; }

/* generic section header */
.sec-head { margin-bottom: clamp(22px, 4vw, 40px); }
.sec-head .kicker { margin-bottom: 12px; }

/* two-column layouts */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split--proto { grid-template-columns: 1fr auto; }

/* founder */
.founder { display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.founder > .stamp { justify-self: start; align-self: start; margin-bottom: 8px; }
.founder__photo {
  width: clamp(220px, 30vw, 320px); aspect-ratio: 4 / 5;
  border: var(--border-w) solid var(--ink); border-radius: var(--radius-md);
  box-shadow: 6px 6px 0 var(--sh); overflow: hidden; background: var(--paper-raised);
  justify-self: start; align-self: start;
}
.founder__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; display: block; }
.founder__photo.is-empty { display: flex; align-items: center; justify-content: center; }
.founder__photo.is-empty img { display: none; }
.founder__photo.is-empty::after { content: "戦い"; font-family: var(--font-jp); font-weight: 900; font-size: clamp(48px, 9vw, 72px); color: rgba(10,10,10,0.14); }
.founder__sign { margin-top: 18px; font-family: var(--font-display); font-size: 22px; text-transform: uppercase; letter-spacing: .03em; }
.founder__role { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
[data-editable] { position: relative; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; margin-top: 6px; }
.faq__item { padding: clamp(16px, 2.6vw, 22px) 0; border-top: var(--border-w) solid var(--hairline); }
.faq__item:last-child { border-bottom: var(--border-w) solid var(--hairline); }
.faq__q { margin: 0 0 8px; font-family: var(--font-body); font-size: clamp(16px, 2.6vw, 20px); font-weight: 700; line-height: 1.3; }
.faq__a { margin: 0; font-size: clamp(14.5px, 2.1vw, 16.5px); line-height: 1.55; font-weight: 500; color: var(--muted); max-width: 64ch; }

/* ---------- legal pages (privacy / terms) ---------- */
.legal .wrap { padding-top: clamp(48px, 8vw, 96px); }
.legal__back { display: inline-block; margin-bottom: 22px; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--muted); }
.legal__back:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal__note { background: #FBE7C8; color: var(--ink); border: var(--border-w) solid var(--ink); border-radius: var(--radius-md); box-shadow: 4px 4px 0 var(--ink); padding: 16px 18px; font-size: 14.5px; font-weight: 500; line-height: 1.5; margin: 6px 0 34px; max-width: 68ch; }
.legal__body { max-width: 68ch; }
.legal__body h2 { font-family: var(--font-body); font-size: clamp(17px, 2.6vw, 21px); font-weight: 700; margin: 30px 0 8px; line-height: 1.25; }
.legal__body p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.62; font-weight: 500; color: rgba(10,10,10,0.80); }
.legal__body ul { margin: 0 0 14px; padding-left: 20px; }
.legal__body li { margin: 0 0 8px; font-size: 15.5px; line-height: 1.55; font-weight: 500; color: rgba(10,10,10,0.80); }
.legal__body a { color: var(--cobalt); font-weight: 600; }
.legal__body strong { color: var(--ink); font-weight: 700; }
.legal__meta { margin-top: 30px; padding-top: 16px; border-top: 2px solid var(--hairline); font-size: 13px; color: var(--muted); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer .wrap { padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(40px, 6vw, 64px); }
.footer__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.footer .wordmark { color: var(--paper); font-size: 30px; }
.footer .wordmark .jp { opacity: .55; }
.footer__tag { margin-top: 12px; font-size: 14px; color: var(--muted); font-weight: 500; }
.footer__links { display: flex; gap: 22px; font-size: 13px; font-weight: 600; }
.footer__links a { color: var(--muted); text-decoration: none; }
.footer__links a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.footer__fine { margin-top: 26px; font-size: 12px; color: var(--muted); }

/* ============================================================
   SCROLL REVEAL (CSS transitions — fail-safe: worst case content
   snaps visible, it can never stay hidden if JS/paint stalls)
   ============================================================ */
.anim [data-reveal] { opacity: 0; transform: translateY(18px); }
.anim [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease-glide), transform .6s var(--ease-glide);
  transition-delay: var(--rd, 0ms);
}

/* ============================================================
   KEYFRAMES (from the app's motion tokens)
   ============================================================ */
@keyframes sa-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes sa-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@keyframes sa-pop-in { 0% { transform: scale(.3) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.12) rotate(3deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes sa-stamp-in { 0% { transform: scale(1.6) rotate(-14deg); opacity: 0; } 100% { transform: scale(1) rotate(-5deg); opacity: 1; } }

/* ============================================================
   RESPONSIVE  (down to 360px)
   ============================================================ */
@media (max-width: 900px) {
  .split, .split--proto, .founder { grid-template-columns: 1fr; }
  .split--proto { justify-items: center; }
  .founder { gap: 20px; }
}
@media (max-width: 620px) {
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .step { flex-direction: row; align-items: center; }
  .step__disc { width: 46px; height: 46px; font-size: 19px; }
  .signup { flex-direction: column; }
  .signup .field, .signup .btn { width: 100%; }
  .nav .btn { padding: 0 13px; }
  .wordmark { font-size: 18px; }
  .footer__row { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .wordmark .jp { display: none; }
}

/* motion off — loops stop, layout stays put, reveals show instantly */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__inner { animation: none; }
  .hero__try .arw { animation: none; }
  .anim [data-reveal] { opacity: 1 !important; transform: none !important; }
}
