/* Tokens from the Nakama Drift identity board (Oct 2026): red leads, white holds the line. */
:root {
  --night: #000000;
  --canvas: #050505;
  --panel: #111111;
  --panel-2: #1a1a1a;
  --rule: #262626;
  --ink: #ffffff;
  --ink-dim: #8f8f8f;
  --red: #f80100;
  --line: #ffffff;
  --paper: #ffffff;
  --text-dark: #111111;
  --muted-dark: #5b5b5b;
  --radius: 4px;
  --display: "Orbitron", "Arial Black", sans-serif;
  --ui: "Orbitron", "Arial Black", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --label: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --kanji: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Wordmark: the supplied lettering (media/nakama-drift-logo.png), used as is, never redrawn. The text form below is for the Battle Pass title only. */
.wm img { display: block; width: 100%; height: auto; }
.wm { margin: 0; font-family: var(--display); font-weight: 900; line-height: .9; letter-spacing: .02em; text-transform: uppercase; }
.wm .a { display: block; color: transparent; background: linear-gradient(180deg, var(--red) 30%, #8a0000 72%, #2a0000); -webkit-background-clip: text; background-clip: text; }
.wm .c { display: block; color: transparent; -webkit-text-stroke: var(--stroke, 2px) var(--line); }

/* Numbered mono tag, as on every board panel. */
.tag { display: flex; gap: 10px; margin: 0 0 14px; font-family: var(--label); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); }
.tag i { font-style: normal; color: var(--ink); }

.section-title { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(26px, 3vw, 38px); line-height: 1.05; margin: 0 0 28px; }

/* ---------- Game page (dark) ---------- */
.game { background: var(--night); color: var(--ink); }
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 10; background: linear-gradient(rgba(0,0,0,.94), rgba(0,0,0,0)); }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; gap: 16px; }
.topbar .mark { display: flex; flex-direction: column; font-family: var(--display); font-weight: 900; font-size: 22px; line-height: .82; text-decoration: none; }
.topbar .mark .a { color: var(--red); }
.topbar .mark .c { color: transparent; -webkit-text-stroke: 1.2px var(--line); }
.topbar nav { display: flex; align-items: center; gap: 24px; font-family: var(--ui); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.topbar nav a { text-decoration: none; }

/* The board's CTA: flat Drift Red, white Orbitron. */
.cta { display: inline-block; border: 0; cursor: pointer; padding: 13px 22px 12px; border-radius: 2px; background: var(--red); color: #fff; font-family: var(--ui); font-weight: 900; font-size: 14px; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.cta:disabled { opacity: .6; cursor: progress; }
.cta { transition: background-color 160ms ease, opacity 160ms ease, transform 160ms var(--ease-out); }
.topbar .cta { padding: 8px 14px 7px; font-size: 12px; }

/* Image direction: wet road, scanlines, night fade top and bottom. */
.scan, .fade { position: absolute; inset: 0; pointer-events: none; }
.scan { background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
.fade { background: linear-gradient(180deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0) 60%, var(--night) 100%); }

.game-hero { position: relative; min-height: min(100vh, 960px); display: flex; align-items: center; overflow: hidden; }
.game-hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.08) contrast(1.05); }
.game-hero .side { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,0) 75%); }
.game-hero .inner { position: relative; z-index: 1; padding: 120px 0 80px; }
.game-hero .wm { width: min(560px, 82vw); }
.game-hero .tagline { margin: 22px 0 30px; font-family: var(--ui); font-size: clamp(16px, 1.5vw, 20px); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.game-hero .tagline em { font-style: normal; color: var(--red); }
.cap { position: absolute; z-index: 2; left: 0; right: 0; bottom: 28px; }
.cap .wrap { display: flex; justify-content: space-between; font-family: var(--ui); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.cap .l { color: var(--red); }
.cap .r { color: var(--line); }

.wishlist-form { display: flex; gap: 10px; flex-wrap: wrap; max-width: 560px; }
.wishlist-form input[type=email] { flex: 1 1 260px; min-width: 0; padding: 13px 14px; border-radius: 2px; border: 1px solid var(--rule); background: rgba(0,0,0,.8); color: var(--ink); font: inherit; font-size: 16px; }
.wishlist-form input[type=email]::placeholder { color: var(--ink-dim); }
.wishlist-form input[type=email]:focus { outline: 2px solid var(--line); outline-offset: 1px; border-color: transparent; }
.consent { flex-basis: 100%; display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--ink-dim); line-height: 1.45; }
.consent input { margin-top: 2px; accent-color: var(--red); width: 16px; height: 16px; flex: none; }
.consent a { color: var(--ink); }
/* Form result as the board's in-game toast: white edge, red lead word; errors take a red edge. */
.form-status:empty { display: none; }
.form-status { flex-basis: 100%; margin: 4px 0 0; display: flex; align-items: center; gap: 10px; align-self: flex-start; background: var(--night); border-left: 3px solid var(--line); padding: 9px 14px 8px; font-family: var(--ui); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.form-status { transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.form-status em { font-style: normal; color: var(--red); }
.form-status.err { border-left-color: var(--red); }

.hero-socials { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.hero-socials a { display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px 8px; border: 1px solid var(--line); border-radius: 2px; background: rgba(255,255,255,.1); color: var(--ink); text-decoration: none; font-family: var(--ui); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out); }
.hero-socials a:focus-visible { background: var(--red); border-color: var(--red); color: #fff; }
.hero-socials svg { width: 18px; height: 18px; fill: currentColor; }

.game section { padding: 96px 0; }
.game .section-title { color: var(--ink); }
.trailer .frame { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--rule); }
.trailer video { width: 100%; height: 100%; object-fit: cover; }

/* What the game is: one short paragraph under the section title. */
.intro { max-width: 62ch; margin: -8px 0 36px; font-size: 18px; color: var(--ink-dim); }
.intro b { color: var(--ink); font-family: var(--ui); font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.intro span { color: var(--red); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feature { background: var(--panel); border-radius: var(--radius); padding: 26px; border-left: 3px solid var(--red); }
.feature.mates { border-left-color: var(--line); }
.feature .chip { display: inline-block; margin-bottom: 16px; font-family: var(--ui); font-weight: 900; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px 3px; border-radius: 2px; background: var(--red); color: #fff; }
.feature.mates .chip { background: transparent; border: 1px solid var(--line); color: var(--line); }
.feature h3 { margin: 0 0 10px; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 18px; line-height: 1.1; }
.feature p { margin: 0; color: var(--ink-dim); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.gallery figure { position: relative; margin: 0; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); background: #000; }
.gallery img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.08) contrast(1.05); }
.gallery figcaption { position: absolute; z-index: 1; left: 16px; bottom: 12px; font-family: var(--label); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.gallery figcaption i { font-style: normal; color: var(--ink); margin-right: 8px; }

.join { position: relative; background: radial-gradient(70% 60% at 70% 110%, rgba(248,1,0,.28), transparent 70%), var(--canvas); border-block: 1px solid var(--rule); }
.join .grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.essence { margin: 0 0 22px; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(36px, 4.6vw, 64px); line-height: .95; }
.essence span { display: block; }
.essence .a { color: var(--ink); }
.essence .c { color: transparent; -webkit-text-stroke: clamp(1px, .12vw, 1.8px) var(--red); }
.join p.lede { color: var(--ink-dim); margin: 0 0 22px; max-width: 46ch; }

/* The board's meet pass, issued as the wishlist pass. */
.pass { justify-self: center; width: min(300px, 80%); aspect-ratio: 5 / 7.4; background: var(--night); border-radius: 10px; position: relative; transform: rotate(-6deg); box-shadow: 0 30px 50px rgba(0,0,0,.55), 0 0 0 1px var(--rule); display: flex; flex-direction: column; padding: 30px 26px 36px; gap: 12px; }
.pass::before { content: ""; position: absolute; top: 4.5%; left: 50%; width: 22%; height: 3.4%; transform: translateX(-50%); border-radius: 20px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--rule); }
.pass .nd { margin-top: 36px; display: flex; flex-direction: column; font-family: var(--display); font-weight: 900; font-size: 56px; line-height: .82; }
.pass .nd .a { color: var(--red); }
.pass .nd .c { color: transparent; -webkit-text-stroke: 1.6px var(--line); }
.pass .kind { font-family: var(--ui); font-size: 16px; letter-spacing: .14em; }
.pass dl { margin: auto 0 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; font-family: var(--label); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.pass dt { color: var(--ink-dim); }
.pass dd { margin: 0; text-align: right; }
/* The board's hanko seal: 仲間 stamped in red, set at a slight angle. */
.pass .hanko { position: absolute; right: 22px; top: 64px; width: 58px; height: 58px; display: grid; place-items: center; border: 3px solid var(--red); border-radius: 5px; transform: rotate(-6deg); font-family: var(--kanji); font-weight: 900; font-size: 20px; line-height: 1; color: var(--red); writing-mode: vertical-rl; }
.pass .strip { position: absolute; left: 0; right: 0; bottom: 0; height: 2.4%; background: linear-gradient(90deg, var(--red) 50%, var(--line) 50%); border-radius: 0 0 10px 10px; }

.game footer { padding: 36px 0 52px; font-family: var(--label); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); }
.game footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.game footer a { text-decoration: none; }
.game footer .socials a { color: var(--ink); }
.socials a { margin-left: 18px; }

/* ---------- Legal page ---------- */
.legal { background: var(--paper); color: var(--text-dark); }
.legal main { max-width: 720px; padding: 64px 0 96px; }
.legal h1 { font-family: var(--display); font-weight: 900; text-transform: uppercase; }
.legal p, .legal li { color: var(--muted-dark); }

@media (max-width: 900px) {
  .join .grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .topbar nav .hide-sm { display: none; }
  .game section { padding: 72px 0; }
  .game-hero .side { background: linear-gradient(90deg, rgba(0,0,0,.9), rgba(0,0,0,.6)); }
  .pass { width: min(260px, 70%); }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .hero-socials span { display: none; }
  .hero-socials a { padding: 8px 10px; }
}

@media (prefers-reduced-motion: no-preference) {
  .game-hero .wm img { animation: lit 2.6s ease-out both; }
  @keyframes lit { 0% { opacity: .15; } 8% { opacity: 1; } 12% { opacity: .3; } 18%, 100% { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Battle pass checkout page: one centred panel, the ticket's red/white strip along its top. */
.checkout { min-height: 100dvh; display: grid; place-items: center; padding: 96px 16px 48px; }
.co-card { position: relative; width: min(520px, 100%); padding: 36px 32px 32px; background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 30px 60px rgba(0,0,0,.45); overflow: hidden; }
.co-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--red) 50%, var(--line) 50%); }
.co-card .wm { font-size: clamp(40px, 11vw, 64px); --stroke: 1.5px; }
.co-card .tag { margin-bottom: 18px; }
.checkout .co-card section { padding: 0; }
.co-price { display: flex; align-items: baseline; gap: 12px; margin: 24px 0 4px; font-family: var(--ui); letter-spacing: .08em; }
.co-price strong { font-size: 40px; font-weight: 900; color: var(--red); line-height: 1; }
.co-price span { font-family: var(--label); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); }
.co-list { list-style: none; margin: 20px 0 28px; padding: 0; display: grid; gap: 10px; }
.co-list li { display: flex; gap: 12px; align-items: baseline; font-size: 15px; line-height: 1.4; }
.co-list li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 5px; background: var(--line); }
.co-card .cta { display: block; width: 100%; min-height: 48px; text-align: center; font-size: 18px; }
.co-card .cta:focus-visible, .co-back:focus-visible { outline: 2px solid var(--line); outline-offset: 3px; }
.co-status { min-height: 1.5em; margin: 12px 0 0; font-family: var(--ui); font-size: 13px; letter-spacing: .08em; color: var(--red); }
.co-test { margin: 20px 0 0; padding: 12px 14px; border-left: 2px solid var(--line); background: var(--panel-2); font-family: var(--label); font-size: 12px; line-height: 1.6; letter-spacing: .04em; color: var(--ink-dim); }
.co-test b { color: var(--ink); font-weight: 500; }
.co-state { text-align: left; margin-top: 32px; }
.co-state h2 { margin: 0 0 12px; font-family: var(--ui); font-weight: 900; font-size: clamp(26px, 7vw, 34px); letter-spacing: .06em; text-transform: uppercase; line-height: 1.1; }
.co-state p { margin: 0 0 24px; max-width: 42ch; color: var(--ink); }
.co-ok h2 { color: var(--red); }
.co-bad h2 { color: var(--ink); }
.co-badge { display: grid; place-items: center; width: 56px; height: 56px; margin: 4px 0 20px; border-radius: 50%; border: 2px solid var(--red); color: var(--red); }
.co-bad .co-badge { border-color: var(--ink); color: var(--ink); }
.co-badge svg { width: 28px; height: 28px; }
.co-back { display: inline-block; min-height: 44px; padding: 10px 0; font-family: var(--ui); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--line); text-decoration: none; }
@media (prefers-reduced-motion: no-preference) {
  .co-state { animation: co-in 200ms var(--ease-out) both; }
  @keyframes co-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 480px) { .co-card { padding: 32px 20px 24px; } }

/* The title screen's double rule: a chrome line over a red one. */
.join::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, #8b9199, #f4f6f8 50%, #8b9199) top / 100% 2px no-repeat, linear-gradient(90deg, #4a0000, var(--red) 50%, #4a0000) bottom / 100% 2px no-repeat; }

/* Press feedback: pressable things scale down a touch. */
.cta:active:not(:disabled), .hero-socials a:active { transform: scale(.97); }

/* Keyboard focus rings: white on the dark pages. */
.game :focus-visible, #consent :focus-visible { outline: 2px solid var(--line); outline-offset: 3px; }

/* Form result fades in; the lift is movement, so only when motion is allowed. */
@starting-style { .form-status { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  @starting-style { .form-status { transform: translateY(4px); } }
}

/* Hover only where a pointer can hover; touch taps would leave these stuck on. */
@media (hover: hover) and (pointer: fine) {
  .co-back:hover { text-decoration: underline; }
  .topbar nav a:hover, .game footer a:hover { color: var(--line); }
  .cta:hover { background: #ff2a1f; }
  .hero-socials a:hover { background: var(--red); border-color: var(--red); color: #fff; }
  .game footer .socials a:hover { color: var(--red); }
}

/* Scroll reveals (reveal.js adds .in). Only hidden when JS is on, so no-JS visitors see everything. */
.js .reveal { opacity: 0; transform: translateY(8px); transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }
/* Gallery stills wipe in from the top, as the board's image reveal. The clip sits on the image, because a fully clipped target never counts as visible to the observer. */
.js .gallery figure.reveal { transform: none; }
.js .gallery figure.reveal img { clip-path: inset(0 0 100% 0); transition: clip-path 600ms cubic-bezier(0.77, 0, 0.175, 1); }
.js .gallery figure.reveal.in img { clip-path: inset(0); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { transform: none; transition: opacity 200ms ease; }
  .js .gallery figure.reveal img { clip-path: none; transition: none; }
}

/* Page changes: a short cross-fade; the game pages' top bar holds still. Browsers without support just navigate. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 200ms; animation-timing-function: var(--ease-out); }
  .topbar { view-transition-name: topbar; }
}

/* Analytics banner: shown once, until the visitor picks. Both buttons carry the same weight. */
#consent { position: fixed; left: 16px; bottom: 16px; z-index: 20; width: min(380px, calc(100% - 32px)); padding: 16px 18px; background: var(--night); border: 1px solid var(--line); border-left: 3px solid var(--red); color: var(--ink); font-family: var(--body); font-size: 13.5px; line-height: 1.45; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
#consent p { margin: 0 0 12px; }
#consent a { color: inherit; }
#consent .row { display: flex; gap: 8px; }
#consent .cta { padding: 9px 14px 8px; font-size: 12px; }
.cta.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
@starting-style { #consent { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  @starting-style { #consent { transform: translateY(8px); } }
}
@media (hover: hover) and (pointer: fine) { .cta.ghost:hover { background: rgba(255,255,255,.12); } }
