/*
  The top page (/ in Japanese, /en/ in English): what BlankFit is, for people
  who arrive from a social profile or a shared theme (2026-10-29).
  Screens are the app's own with sample data, shown as bare screens: Apple's
  rules allow iPhone frames only from their own bezels. The App Store badge is
  Apple's file, used as is (one per page, not animated, at least 40px tall,
  a quarter of its height clear around it).
  The layout follows the width of .page (container queries), not the window.
  No inline styles anywhere (the CSP in _headers allows only this file).
*/
@font-face {
  font-family: "OutfitDisplay";
  src: url("/fonts/outfit-display.woff") format("woff");
  font-weight: 800;
  font-display: swap;
}
:root {
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: #0A1428; }

.page {
  --bg: #0A1428;
  --text: #F4F6FD;
  --dim: #A9B4D5;
  --faint: #7581A6;
  --line: rgba(255, 255, 255, 0.09);
  --pink: #FF7AC8;
  --purple: #B48CFF;
  --blue: #6EA8FF;
  --grad: linear-gradient(90deg, var(--pink), var(--purple) 55%, var(--blue));
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --display: "OutfitDisplay", var(--sans);
  container-type: inline-size;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(70% 560px at 0% 0%, rgba(255, 79, 184, 0.18), transparent 70%),
    radial-gradient(80% 700px at 100% 6%, rgba(110, 96, 255, 0.24), transparent 70%),
    var(--bg);
}
.page:lang(en) {
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px));
}
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 10px; }
/* Japanese wraps between phrases (the <wbr> in the text) and after punctuation,
   not in the middle of a word; English keeps each sentence of the lead whole. */
.page:lang(ja) :is(.hero, .features, .cta) :is(h1, h2, p) { word-break: keep-all; overflow-wrap: break-word; overflow-wrap: anywhere; }
.hero h1, .feat h2, .cta h2 { text-wrap: balance; }
.unit { display: inline-block; }

/* ── top bar ───────────────────────────────────────────── */
.top { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: 0.01em;
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.lang {
  color: var(--dim); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
}
.lang:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.22); }

/* ── first screen ──────────────────────────────────────── */
/* Only top and bottom here: the sides are .wrap's gutter. */
.hero { display: grid; gap: 40px; padding-top: 20px; padding-bottom: 64px; text-align: center; }
.hero h1 {
  margin: 0; font-weight: 800; letter-spacing: -0.01em; line-height: 1.16;
  font-size: 42px;
  font-size: clamp(40px, 11.6cqi, 66px);
}
.page:lang(en) .hero h1 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.06; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead {
  margin: 16px 0 0; color: var(--dim); font-weight: 600;
  font-size: 17px;
  font-size: clamp(16px, 4.6cqi, 21px);
}
.get { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 26px; }
/* The badge keeps a quarter of its height clear on every side (the margin). */
.badge { display: inline-block; line-height: 0; margin: 13px; }
.badge img { display: block; height: 52px; width: auto; }
.note { margin: 0; color: var(--faint); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }

/* Three screens: the middle one in front, the other two tucked behind it. */
.stack { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 100 / 117; }
.shot {
  margin: 0; overflow: hidden; background: var(--bg);
  border-radius: 12% / 5.54%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.shot img { display: block; width: 100%; height: auto; }
.stack .shot { position: absolute; }
.stack .s1 { width: 44%; left: 0; top: 9.3%; }
.stack .s2 { width: 54%; left: 23%; top: 0; z-index: 1; }
.stack .s3 { width: 44%; right: 0; top: 9.3%; }

/* ── features ──────────────────────────────────────────── */
.features { display: grid; gap: 96px; padding-top: 24px; padding-bottom: 104px; }
.feat { display: grid; gap: 30px; justify-items: center; text-align: center; }
.f-log { --c: #7DB2FF; --glow: rgba(110, 168, 255, 0.20); }
.f-rp { --c: #FFCB57; --glow: rgba(255, 201, 77, 0.17); }
.f-battle { --c: #FF8DB6; --glow: rgba(255, 122, 168, 0.18); }
.f-look { --c: #C9A4FF; --glow: rgba(196, 155, 255, 0.20); }
.chip {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--c); background: var(--glow);
}
.feat h2 {
  margin: 14px 0 0; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25;
  font-size: 30px;
  font-size: clamp(28px, 7.6cqi, 40px);
}
.page:lang(en) .feat h2, .page:lang(en) .cta h2 { font-family: var(--display); letter-spacing: -0.015em; }
.feat p { margin: 12px auto 0; max-width: 28em; color: var(--dim); font-size: 16px; }
.pic { position: relative; isolation: isolate; width: 58%; max-width: 270px; }
.pic::before, .f-look .stack::before {
  content: ""; position: absolute; z-index: -1; inset: -14% -36%;
  background: radial-gradient(closest-side, var(--glow), transparent);
}
.f-look .stack { isolation: isolate; max-width: 400px; }

/* ── last call ─────────────────────────────────────────── */
.cta {
  max-width: 760px; margin: 0 auto 56px; padding: 56px 24px 52px;
  text-align: center; border-radius: 28px; border: 1px solid var(--line);
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(139, 92, 246, 0.20), transparent 70%),
    rgba(255, 255, 255, 0.03);
}
.cta > img { width: 72px; height: 72px; border-radius: 17px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.cta h2 {
  margin: 18px 0 0; font-weight: 800; line-height: 1.25;
  font-size: 32px;
  font-size: clamp(30px, 8.4cqi, 44px);
}
.cta p { margin: 8px 0 0; color: var(--dim); font-size: 15px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; margin-top: 24px; padding: 0 32px; border-radius: 999px;
  background: #fff; color: #0A1428; font-size: 17px; font-weight: 800; text-decoration: none;
}
.btn:hover { background: #E6EBFA; }
.cta .fine { margin-top: 20px; color: var(--faint); font-size: 12.5px; }

/* ── footer ────────────────────────────────────────────── */
.foot {
  padding-top: 28px; padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--faint); font-size: 12.5px; text-align: center;
}
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.foot nav a { color: var(--dim); text-decoration: none; }
.foot nav a:hover { color: var(--text); text-decoration: underline; }
.foot p { margin: 12px 0 0; }
.foot .tm { max-width: 52em; margin: 8px auto 0; font-size: 11px; line-height: 1.7; }

/* ── wide ──────────────────────────────────────────────── */
@container (min-width: 880px) {
  .top { height: 76px; }
  .hero { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 48px; padding-top: 36px; padding-bottom: 112px; text-align: left; }
  .hero h1 { font-size: 66px; }
  .lead { font-size: 21px; }
  .get { align-items: flex-start; margin-top: 30px; }
  .badge { margin: 14px 14px 14px 0; }
  .badge img { height: 56px; }
  .stack { max-width: 480px; }
  .features { gap: 136px; padding-bottom: 136px; }
  .feat { grid-template-columns: 1fr 1fr; align-items: center; justify-items: center; gap: 64px; text-align: left; }
  .feat-copy { justify-self: stretch; padding-left: 4%; }
  .feat:nth-child(even) .feat-copy { order: 2; padding-left: 0; }
  .feat p { margin-left: 0; font-size: 17px; }
  .pic { width: 290px; max-width: none; }
  .f-look .stack { max-width: 440px; }
  .cta { padding: 64px 40px 60px; }
}

/* ── motion: the first screens rise in once; screens further down settle up
   into place as they come into view (home.js adds .pre to the ones not yet on
   screen). They only move: nothing waits hidden for the scroll. ──────────── */
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.stack .shot { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.stack .s1 { animation-delay: 0.12s; }
.stack .s3 { animation-delay: 0.2s; }
.f-look .stack .shot { animation: none; }
.reveal { transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.pre { transform: translateY(36px); }
@media (prefers-reduced-motion: reduce) {
  .stack .shot { animation: none; }
  .reveal { transition: none; }
}
@media print {
  .reveal.pre { transform: none; }
}
