/* ============================================================
   Tomomon — landing page styles
   Light theme: white + blue / gray-blue, cyan & purple accents.
   Inter for readability.
   ============================================================ */

:root {
  /* Surfaces — dark blue + matte blue (Dark Aqua is the default theme) */
  --bg:        #0d1729;
  --bg-2:      #122340;
  --bg-3:      #182f54;
  --panel:     #13223c;
  --line:      #273f63;
  --line-soft: #1d3252;

  /* Theme-dependent surfaces (overridden by [data-theme]) */
  --frost:     rgba(13,23,41,0.85);   /* nav scrolled, mobile menu, carousel buttons */
  --tag-bg:    rgba(13,23,41,0.82);   /* small filename/label chips */
  --bar-fade:  rgba(8,15,28,0.92);    /* slide caption gradient */
  --veil-rgb:  13,23,41;              /* background-picture readability veil (also read by JS) */
  --footer-bg: #081223; --footer-text: #d8e4f6; --footer-link: #94abd0; --footer-mute: #6c83a8;

  /* Sprite-drop field — mid blue-gray so black-outlined pixel art stands out */
  --sprite-field-1: #50607e;
  --sprite-field-2: #405069;

  /* Text — light on dark blue */
  --text:      #e6eefb;
  --text-dim:  #a3b7d8;
  --text-mute: #7188ac;

  /* Accent — cyan + blue + neon pink */
  --accent:     #00a6c4;
  --accent-2:   #3565e6;
  --accent-3:   #ff3ca6;
  --accent-glow: rgba(0, 166, 196, 0.35);

  /* Neon */
  --neon-cyan:  #00b4d2;
  --neon-purple: #ff3ca6;
  --purple-rgb: 255,60,166;   /* raw rgb for translucent pink accents */
  --purple-soft: #ff7cc4;     /* lightened pink for dark footers */
  --neon-glow-cyan: 0 0 6px rgba(0,180,210,0.4), 0 0 16px rgba(0,180,210,0.22);
  --neon-glow-purple: 0 0 6px rgba(var(--purple-rgb),0.4), 0 0 16px rgba(var(--purple-rgb),0.2);

  /* Pixel-art friendly: crisp, smaller radii */
  --radius:    6px;
  --radius-sm: 4px;
  --maxw:      1180px;
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);

  /* Fonts */
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-pixel:   'JetBrains Mono', monospace;
  --font-jp:      'Noto Sans JP', 'Inter', sans-serif;
}

/* ── Themes — accents stay shared; surfaces swap ──── */
[data-theme="light"] {
  /* White panels on a gray-blue page; pink returns to purple */
  --bg: #eef3fa; --bg-2: #e1eaf6; --bg-3: #d4dff0;
  --panel: #ffffff; --line: #c8d5e9; --line-soft: #dae3f1;
  --sprite-field-1: #aebacf; --sprite-field-2: #98a6bf;
  --text: #1c2940; --text-dim: #50607c; --text-mute: #8593ab;
  --accent-3: #8453e8; --neon-purple: #7a4fe0;
  --purple-rgb: 122,79,224; --purple-soft: #ab90f2;
  --neon-glow-purple: 0 0 6px rgba(122,79,224,0.4), 0 0 16px rgba(122,79,224,0.2);
  --frost: rgba(206,225,249,0.8); --tag-bg: rgba(255,255,255,0.82);
  --bar-fade: rgba(255,255,255,0.92); --veil-rgb: 238,243,250;
  --footer-bg: #243553; --footer-text: #dce5f4; --footer-link: #a7b7d6; --footer-mute: #8a9bc0;
}
[data-theme="dark"] {
  /* Light black + charcoal; purple accents */
  --bg: #131417; --bg-2: #1a1c21; --bg-3: #23262d;
  --panel: #1b1d23; --line: #2d313b; --line-soft: #25282f;
  --sprite-field-1: #5a6172; --sprite-field-2: #474d5c;
  --text: #e8eaf0; --text-dim: #a6acbc; --text-mute: #71778a;
  --accent-3: #8453e8; --neon-purple: #7a4fe0;
  --purple-rgb: 122,79,224; --purple-soft: #ab90f2;
  --frost: rgba(19,20,23,0.85); --tag-bg: rgba(19,20,23,0.82);
  --bar-fade: rgba(10,11,14,0.92); --veil-rgb: 19,20,23;
  --footer-bg: #0e0f12; --footer-text: #d5d9e4; --footer-link: #9aa2b6; --footer-mute: #767e92;
}
[data-theme="lightblue"] {
  /* Light blue as the main color; purple accents */
  --bg: #d9eafa; --bg-2: #c8dff5; --bg-3: #b7d3ee;
  --panel: #eef6fe; --line: #a3c2e3; --line-soft: #b9d2ec;
  --sprite-field-1: #8fa6c4; --sprite-field-2: #7c93b4;
  --text: #16263e; --text-dim: #44597b; --text-mute: #6d82a3;
  --accent-3: #8453e8; --neon-purple: #7a4fe0;
  --purple-rgb: 122,79,224; --purple-soft: #ab90f2;
  --frost: rgba(186,215,245,0.85); --tag-bg: rgba(238,246,254,0.85);
  --bar-fade: rgba(222,237,251,0.92); --veil-rgb: 217,234,250;
  --footer-bg: #1d3a5f; --footer-text: #d9e7f8; --footer-link: #9fbcde; --footer-mute: #7d99bd;
}
[data-theme="blue"] {
  /* Blue + light blue — medium blue page (midway between deep and light), light blue panels */
  --bg: #6c93cf; --bg-2: #5b82c2; --bg-3: #4a70b0;
  --panel: #dce9f9; --line: #9ab8e4; --line-soft: #5f87c2;
  --sprite-field-1: #8ba3c6; --sprite-field-2: #7890b3;
  /* Dark navy text — the mid-tone page needs dark type, not light */
  --text: #142441; --text-dim: #2c4368; --text-mute: #41598a;
  /* Accents deepened a step so they hold against the medium blue */
  --accent: #007d9c; --accent-2: #2b5bd0; --accent-3: #6a3fd6;
  --neon-cyan: #0a93b0; --neon-purple: #6745c9;
  --purple-rgb: 103,69,201; --purple-soft: #a98fe8;
  --frost: rgba(214,231,250,0.8); --tag-bg: rgba(238,245,253,0.85);
  --bar-fade: rgba(228,239,252,0.92); --veil-rgb: 108,147,207;
  --footer-bg: #16335f; --footer-text: #d9e6f9; --footer-link: #9db9e4; --footer-mute: #7490bc;
}
/* Blue theme: soft light washes so the page reads layered, not flat blue */
[data-theme="blue"] body {
  background:
    radial-gradient(1100px 620px at 80% -10%, rgba(235,244,254,0.22), transparent 60%),
    radial-gradient(900px 540px at 8% 14%, rgba(33,200,228,0.1), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
/* Blue theme: panels get a gentle top-lit sheen and a deeper anchored shadow */
[data-theme="blue"] .card,
[data-theme="blue"] .mcard,
[data-theme="blue"] .fcard,
[data-theme="blue"] .feature-list__item,
[data-theme="blue"] .series {
  background: linear-gradient(180deg, #ecf4fd, #d2e4f8);
  border-color: #b9d2f0;
  box-shadow: 0 18px 44px -24px rgba(10,28,58,0.5);
}
[data-theme="blue"] .card--spotlight {
  background:
    linear-gradient(100deg, rgba(106,63,214,0.1), rgba(10,147,176,0.08)),
    linear-gradient(180deg, #ecf4fd, #d2e4f8);
}
[data-theme="blue"] .chip { background: #c0d9f3; }
/* Editor chrome on light surfaces to match the dark page text */
[data-theme="blue"] .ed-btn { background: #c7dcf5; }
[data-theme="blue"] .ed-secrow { background: #cfe2f7; }
[data-theme="aqua"] {
  /* Dark blue + matte blue — purple accents swap to neon pink */
  --bg: #0d1729; --bg-2: #122340; --bg-3: #182f54;
  --panel: #13223c; --line: #273f63; --line-soft: #1d3252;
  --sprite-field-1: #50607e; --sprite-field-2: #405069;
  --text: #e6eefb; --text-dim: #a3b7d8; --text-mute: #7188ac;
  --accent-3: #ff3ca6; --neon-purple: #ff3ca6;
  --purple-rgb: 255,60,166; --purple-soft: #ff7cc4;
  --neon-glow-purple: 0 0 6px rgba(255,60,166,0.55), 0 0 16px rgba(255,60,166,0.3);
  --frost: rgba(13,23,41,0.85); --tag-bg: rgba(13,23,41,0.82);
  --bar-fade: rgba(8,15,28,0.92); --veil-rgb: 13,23,41;
  --footer-bg: #081223; --footer-text: #d8e4f6; --footer-link: #94abd0; --footer-mute: #6c83a8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Render any sprite/pixel image without smoothing. */
.pixelated,
.mcard__art img,
.creature-frame img,
.video-frame img { image-rendering: pixelated; image-rendering: crisp-edges; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Background fx ─────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  opacity: 0.7;
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 380px at 75% 8%, rgba(53,101,230,0.2), transparent 70%),
    radial-gradient(520px 340px at 12% 18%, rgba(0,166,196,0.17), transparent 70%),
    radial-gradient(720px 440px at 55% 96%, rgba(var(--purple-rgb),0.13), transparent 70%);
}

/* ── Layout helpers ────────────────────────────────── */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 110px 24px;
}
.section--alt {
  max-width: none;
  background: linear-gradient(180deg, transparent, var(--bg-2) 12%, var(--bg-2) 88%, transparent);
}
.section--alt > * { max-width: var(--maxw); margin-inline: auto; }
.section__head { max-width: 680px; margin-bottom: 56px; }

/* ── Section dividers — fading hairline + diamond ──── */
.section { position: relative; }
.section::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(720px, 82%); height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 18%, #aac1e0 50%, var(--line) 82%, transparent);
}
.section::after {
  content: '◆'; position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  font-size: 0.6rem; line-height: 1; color: var(--accent);
  background: var(--bg); padding: 0 10px;
}
/* Skip where a band already separates (marquee border, alt band) */
.marquee + .section::before, .marquee + .section::after,
.section--alt::before, .section--alt::after { content: none; }

.kicker {
  font-family: var(--font-pixel);
  font-size: 0.78rem; letter-spacing: 0.12em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 14px;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); display: flex; align-items: center; gap: 16px; }

/* Sprite-drop slot in front of section titles — drop a pixel icon in later */
.title-slot {
  flex-shrink: 0; width: 64px; height: 64px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); position: relative; overflow: hidden;
  display: grid; place-items: center;
  background: var(--sprite-field-1);
  box-shadow: inset 0 0 0 1px rgba(0,180,210,0.1);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.title-slot:not(:has(img))::after {
  content: '+'; font-family: var(--font-pixel); font-weight: 400;
  font-size: 1.3rem; color: #f2f6fb; opacity: 0.75;
}
.title-slot img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.title-slot:hover { border-color: var(--neon-cyan); box-shadow: var(--neon-glow-cyan), inset 0 0 0 1px rgba(0,180,210,0.2); }

/* Centered headings keep the slot+title group centered */
.section__head--center h2, .section--cta h2 { justify-content: center; }

@media (max-width: 680px) {
  .title-slot { width: 48px; height: 48px; }
  h2 { gap: 12px; }
}
h3 { font-size: 1.2rem; font-weight: 700; }
.lead { color: var(--text-dim); font-size: 1.08rem; margin-top: 14px; }
.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 0.98rem;
  padding: 13px 26px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  white-space: nowrap;
}
.btn--sm { padding: 9px 18px; font-size: 0.9rem; }
.btn--primary {
  color: #ffffff;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 24px -6px var(--accent-glow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px -8px var(--accent-glow); }
.btn--ghost {
  color: var(--text); background: rgba(28,41,64,0.03);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ── Navbar ────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}
.nav.scrolled { background: var(--frost); border-bottom-color: var(--line); }
.nav__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 16px 24px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 900; letter-spacing: 0.04em; }
.brand__mark { color: var(--accent); font-size: 1.1rem; }
.brand__name { font-size: 1.15rem; }
.brand__accent { color: var(--accent); }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { color: var(--text-dim); font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta { margin-left: 4px; }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; margin-left: auto; }
.nav__burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* ── Hero ──────────────────────────────────────────── */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
  padding: 90px 24px 70px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-pixel); font-size: 0.8rem;
  color: var(--text-dim); padding: 7px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: rgba(0,166,196,0.06);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero__title { font-family: var(--font-display); font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 900; margin: 22px 0 18px; }
.hero__sub { color: var(--text-dim); font-size: 1.12rem; max-width: 480px; }
.hero__cta { display: flex; gap: 14px; margin: 30px 0 40px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 38px; }
.hero__stats b { font-size: 1.8rem; font-weight: 800; display: block; font-family: var(--font-pixel); color: var(--accent); }
.hero__stats span { color: var(--text-mute); font-size: 0.85rem; }

/* Hero art placeholder */
.hero__art { display: flex; justify-content: center; }
.creature-frame {
  position: relative; width: 100%; max-width: 380px; aspect-ratio: 1;
  border: 2px solid var(--line); border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 45%, rgba(0,166,196,0.08), transparent 65%),
    /* sprite-editor checkerboard (mid-tone for black-outlined sprites) */
    repeating-conic-gradient(var(--sprite-field-1) 0% 25%, var(--sprite-field-2) 0% 50%) 0 0 / 28px 28px,
    var(--panel);
  overflow: hidden; display: grid; place-items: center;
  box-shadow: 0 30px 80px -30px rgba(28,41,64,0.25), inset 0 0 0 1px rgba(255,255,255,0.35);
}
.creature-orb {
  /* crisp pixel-stepped placeholder creature, no blur */
  width: 54%; aspect-ratio: 1; border-radius: 8px;
  background:
    linear-gradient(135deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  image-rendering: pixelated; opacity: 0.95;
  animation: float 6s steps(8, end) infinite;
  box-shadow:
    0 0 60px var(--accent-glow),
    inset -10px -10px 0 rgba(0,0,0,0.18),
    inset 10px 10px 0 rgba(255,255,255,0.12);
}
.creature-frame__label {
  position: absolute; bottom: 12px; left: 14px;
  font-family: var(--font-pixel); font-size: 0.72rem; color: var(--text-dim);
  background: var(--tag-bg); padding: 4px 8px; border-radius: var(--radius-sm);
}
.creature-frame__scanline {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(28,41,64,0.07) 4px);
  pointer-events: none; mix-blend-mode: overlay;
}
@keyframes float { 0%,100% { transform: translateY(-10px); } 50% { transform: translateY(10px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Marquee ───────────────────────────────────────── */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-2); padding: 16px 0; }
.marquee__track {
  display: flex; gap: 28px; width: max-content;
  animation: slide 22s linear infinite;
  font-family: var(--font-pixel); font-weight: 700; letter-spacing: 0.1em;
  color: var(--text-mute); font-size: 1rem;
}
.marquee__track span:nth-child(even) { color: var(--accent); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ── Cards / grids ─────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid--features { grid-template-columns: repeat(3, 1fr); }
.grid--monsters { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px;
  transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
  position: relative; overflow: hidden;
  box-shadow: 0 8px 30px -18px rgba(28,41,64,0.18);
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,0%), rgba(0,166,196,0.07), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.card:hover { transform: translateY(-5px); border-color: rgba(0,166,196,0.45); }
.card:hover::before { opacity: 1; }
.card__icon {
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: var(--radius-sm); font-size: 1.3rem; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(0,166,196,0.12), rgba(53,101,230,0.12));
  color: var(--accent); border: 1px solid var(--line);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 0.95rem; }

/* Secondary feature list (icon + title only, wrapping pills) */
.feature-list {
  list-style: none; display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px;
}
.feature-list__item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px 13px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); font-weight: 600; font-size: 0.98rem; color: var(--text);
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
  box-shadow: 0 6px 20px -14px rgba(28,41,64,0.2);
}
.feature-list__item:hover {
  transform: translateY(-3px); border-color: var(--neon-cyan);
  box-shadow: 0 0 18px -6px rgba(0,180,210,0.35);
}
.feature-list__icon {
  display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0;
  border-radius: var(--radius-sm); font-size: 1.05rem;
  background: linear-gradient(135deg, rgba(0,166,196,0.12), rgba(53,101,230,0.12));
  color: var(--neon-cyan); border: 1px solid rgba(0,180,210,0.3);
}
.feature-list__item--more {
  border-color: rgba(var(--purple-rgb),0.4); color: var(--neon-purple);
}
.feature-list__item--more:hover { border-color: var(--neon-purple); box-shadow: 0 0 18px -6px rgba(var(--purple-rgb),0.4); }
.feature-list__item--more .feature-list__icon {
  background: linear-gradient(135deg, rgba(var(--purple-rgb),0.14), rgba(var(--purple-rgb),0.12));
  color: var(--neon-purple); border-color: rgba(var(--purple-rgb),0.35);
}

/* Monster cards */
.mcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; transition: transform 0.3s var(--ease), border-color 0.3s;
  cursor: default;
  box-shadow: 0 8px 30px -18px rgba(28,41,64,0.18);
}
.mcard:hover { transform: translateY(-6px); border-color: rgba(53,101,230,0.5); }
.mcard__art {
  aspect-ratio: 1; border-radius: var(--radius-sm); margin-bottom: 14px;
  display: grid; place-items: center; position: relative; overflow: hidden;
  border: 1px solid var(--line);
  /* sprite-editor checkerboard (mid-tone for black-outlined sprites) */
  background: repeating-conic-gradient(var(--sprite-field-1) 0% 25%, var(--sprite-field-2) 0% 50%) 0 0 / 20px 20px;
}
.mcard__blob {
  /* crisp pixel placeholder, no blur */
  width: 56%; aspect-ratio: 1; border-radius: 6px;
  image-rendering: pixelated;
  animation: float 5s steps(6, end) infinite;
  box-shadow:
    0 0 36px -8px currentColor,
    inset -8px -8px 0 rgba(0,0,0,0.22),
    inset 8px 8px 0 rgba(255,255,255,0.14);
}
.mcard__id { font-family: var(--font-pixel); font-size: 0.72rem; color: var(--text-mute); }
.mcard__name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin: 2px 0 8px; }
.mcard__type { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-size: 0.72rem; font-weight: 600;
  padding: 3px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); color: var(--text-dim); background: var(--bg-2);
}

/* ── Battle section ───────────────────────────────── */
.battle { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.ticks { list-style: none; margin: 22px 0 30px; display: grid; gap: 12px; }
.ticks li { display: flex; align-items: center; gap: 12px; color: var(--text-dim); }
.ticks li::before {
  content: '✓'; color: var(--accent); font-weight: 800;
  display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 6px; background: rgba(0,166,196,0.1); border: 1px solid var(--line); font-size: 0.8rem;
}
.video-frame {
  position: relative; aspect-ratio: 16/10; border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, rgba(53,101,230,0.1), transparent 65%), var(--bg-2);
  box-shadow: 0 30px 80px -30px rgba(28,41,64,0.25);
}
.video-frame__scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(28,41,64,0.05) 4px); }
.video-frame__play {
  width: 72px; height: 72px; border-radius: 50%; border: 0; cursor: pointer;
  font-size: 1.4rem; color: #ffffff; z-index: 1;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 0 var(--accent-glow); animation: ring 2.4s infinite;
  display: grid; place-items: center; padding-left: 4px;
}
@keyframes ring { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 70% { box-shadow: 0 0 0 24px rgba(0,166,196,0); } 100% { box-shadow: 0 0 0 0 rgba(0,166,196,0); } }
.video-frame__label { position: absolute; bottom: 12px; left: 14px; font-family: var(--font-pixel); font-size: 0.72rem; color: var(--text-dim); background: var(--tag-bg); padding: 4px 8px; border-radius: var(--radius-sm); }

/* ── Gameplay carousel ────────────────────────────── */
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .kicker { display: inline-flex; align-items: center; }
.section__head--center .lead { margin-inline: auto; }

.carousel { position: relative; max-width: 960px; margin: 0 auto; }
.carousel__viewport {
  position: relative; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(28,41,64,0.25);
}
.carousel__track { display: flex; transition: transform 0.55s var(--ease); }

.slide { min-width: 100%; }
.slide__screen {
  position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tint) 18%, transparent), transparent 65%),
    linear-gradient(160deg, var(--bg-3), var(--bg));
}
.slide__scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(28,41,64,0.05) 4px);
}
.slide__jp {
  font-size: clamp(3rem, 9vw, 6rem); font-weight: 700; opacity: 0.55;
  color: var(--tint); text-shadow: 0 0 22px color-mix(in srgb, var(--tint) 40%, transparent);
}
.slide__bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(0deg, var(--bar-fade), transparent);
}
.slide__caption { font-weight: 600; font-size: 1rem; color: var(--text); }
.slide__label { font-family: var(--font-pixel); font-size: 0.7rem; color: var(--text-mute); }

.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer; z-index: 2;
  display: grid; place-items: center; font-size: 1.6rem; line-height: 1; padding-bottom: 3px;
  color: var(--text); background: var(--frost); border: 1px solid var(--line);
  backdrop-filter: blur(6px); transition: 0.2s var(--ease);
}
.carousel__btn:hover {
  color: var(--neon-cyan); border-color: var(--neon-cyan);
  box-shadow: var(--neon-glow-cyan); transform: translateY(-50%) scale(1.08);
}
.carousel__btn--prev { left: 14px; }
.carousel__btn--next { right: 14px; }

.carousel__dots { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.cdot {
  width: 9px; height: 9px; border-radius: 50%; cursor: pointer; padding: 0;
  background: var(--line); border: 0; transition: 0.25s var(--ease);
}
.cdot:hover { background: var(--text-mute); }
.cdot.is-active { background: var(--neon-cyan); box-shadow: var(--neon-glow-cyan); width: 26px; border-radius: 6px; }

@media (max-width: 680px) {
  .carousel__btn { width: 38px; height: 38px; font-size: 1.3rem; }
}

/* ── CTA / signup ─────────────────────────────────── */
.section--cta {
  text-align: center;
  background:
    radial-gradient(560px 320px at 50% 35%, rgba(0,166,196,0.1), transparent 70%),
    radial-gradient(640px 360px at 50% 80%, rgba(var(--purple-rgb),0.09), transparent 70%);
}
.cta { max-width: 620px; margin: 0 auto; }
.cta .kicker, .cta .lead { margin-inline: auto; }
.cta .lead { max-width: 520px; }
.signup { display: flex; gap: 12px; margin: 30px auto 0; max-width: 460px; }
.signup input {
  flex: 1; padding: 13px 18px; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  font-size: 0.98rem; font-family: inherit; transition: border-color 0.2s;
}
.signup input:focus { outline: none; border-color: var(--accent); }
.signup__note { margin-top: 14px; font-size: 0.9rem; min-height: 1.2em; color: var(--accent); }

/* ── Original game / Steam promo ──────────────────── */
.series {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center;
  padding: 34px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(53,101,230,0.06), transparent 60%), var(--panel);
  box-shadow: 0 14px 44px -26px rgba(28,41,64,0.25);
}
.series__screen {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden;
  display: grid; place-items: center; border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 40%, rgba(53,101,230,0.14), transparent 65%),
    linear-gradient(160deg, var(--bg-3), var(--bg));
  box-shadow: 0 20px 60px -28px rgba(28,41,64,0.3);
}
.series__scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(28,41,64,0.05) 4px); }
.series__badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  font-family: var(--font-pixel); font-size: 0.72rem; color: var(--accent-2);
  border: 1px solid rgba(53,101,230,0.45); border-radius: var(--radius-sm); padding: 4px 8px;
  background: var(--tag-bg);
}
.series__jp { font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 700; opacity: 0.55; color: var(--accent-2); text-shadow: 0 0 22px rgba(53,101,230,0.3); }
.series__label { position: absolute; bottom: 12px; left: 14px; font-family: var(--font-pixel); font-size: 0.7rem; color: var(--text-dim); background: var(--tag-bg); padding: 4px 8px; border-radius: var(--radius-sm); }
.series__body h2 { margin-bottom: 14px; }

/* Steam button — keeps Steam's brand navy */
.btn--steam {
  margin-top: 26px; color: #d7ecff;
  background: linear-gradient(100deg, #1b2838, #2a475e);
  border-color: rgba(102,192,244,0.4);
  box-shadow: 0 6px 24px -8px rgba(102,192,244,0.4);
}
.btn--steam:hover {
  transform: translateY(-2px); color: #fff;
  background: linear-gradient(100deg, #223445, #346184);
  box-shadow: 0 0 22px -2px rgba(102,192,244,0.55), 0 12px 34px -8px rgba(102,192,244,0.4);
}
.btn__steam-icon { flex-shrink: 0; }

@media (max-width: 760px) {
  .series { grid-template-columns: 1fr; gap: 26px; padding: 24px; }
  .series__art { order: -1; }
}

/* ── Footer — deep anchor ─────────────────────────── */
.footer { border-top: 1px solid var(--line); background: var(--footer-bg); color: var(--footer-text); }
.footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 40px 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.footer__links { display: flex; gap: 24px; margin-left: auto; }
.footer__links a { color: var(--footer-link); font-size: 0.92rem; transition: color 0.2s; }
.footer__links a:hover { color: #5fd6ec; }
.footer__copy { width: 100%; color: var(--footer-mute); font-size: 0.85rem; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px; }

/* ── Zone background pictures (editor-added) ──────── */
.hero { position: relative; }
.has-bg { position: relative; }
.section-bg {
  /* Full-bleed: spans the whole page width, not just the section's content column */
  position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100vw; z-index: 0; pointer-events: none;
  background-size: cover; background-position: center;
}
/* Lift content above the background layer (and above alt-band backgrounds) */
.has-bg > :not(.section-bg) { position: relative; z-index: 1; }
.section--alt > .section-bg { max-width: none; }
.section::before, .section::after { z-index: 1; }

/* ── Free picture strips (editor-added images) ────── */
.pic-strip { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.pic-strip__item {
  position: relative; flex: 1 1 240px; max-width: 360px; margin: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--panel); box-shadow: 0 8px 30px -18px rgba(28,41,64,0.18);
}
.pic-strip__item img { width: 100%; height: 100%; object-fit: cover; }
.hero > .pic-strip { grid-column: 1 / -1; }

/* Floating pictures — freely positioned within their section */
main > [id] { position: relative; }
.pic-float {
  position: absolute; margin: 0; z-index: 1;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--panel); box-shadow: 0 14px 40px -20px rgba(28,41,64,0.35);
}
.pic-float img { width: 100%; display: block; }

/* ── Custom sections (editor-added) ───────────────── */
.section--custom .custom__body { color: var(--text-dim); max-width: 800px; white-space: pre-line; }
.section--custom .custom__img {
  margin: 28px 0 0; max-width: 800px; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 14px 44px -26px rgba(28,41,64,0.3);
}
.section--custom .custom__img img { width: 100%; }

/* ── Image/video box styles (set via editor) ──────── */
.box-nobg, .box-nobg:hover {
  background: transparent !important;
  box-shadow: none !important;
}
.box-nobg > .creature-frame__scanline,
.box-nobg > .video-frame__scan,
.box-nobg > .series__scan,
.box-nobg > .slide__scan { display: none; }
.box-solid, .box-solid:hover { background: var(--box-bg) !important; }
.box-bggrad, .box-bggrad:hover { background: linear-gradient(100deg, var(--box-bg1), var(--box-bg2)) !important; }
.box-radius { border-radius: var(--box-radius) !important; }
.box-bordercolor, .box-bordercolor:hover { border: 1px solid var(--box-border) !important; }
.box-borderw, .box-borderw:hover { border-width: var(--box-borderw) !important; border-style: solid !important; }
.box-noborder, .box-noborder:hover {
  border-color: transparent !important;
  box-shadow: none !important;
}
/* Custom box padding — resizes the box around its content (set via editor) */
.box-pad { padding: var(--box-pad) !important; }
/* Custom element opacity (set via editor) */
body:not(.editing) .box-opacity { opacity: var(--box-opacity) !important; }
body.editing .box-opacity { opacity: max(var(--box-opacity), 0.45); }
/* Custom text size (set via editor, % of normal) */
.box-textsize { font-size: var(--box-size) !important; }
/* Custom text outline (set via editor) */
.box-textoutline { -webkit-text-stroke: var(--box-outline-w) var(--box-outline-c); }
/* Custom text colors (set via editor) */
.box-textcolor { color: var(--box-text1) !important; }
.box-textgrad {
  color: var(--box-text1) !important; /* fallback */
  background-image: linear-gradient(100deg, var(--box-text1), var(--box-text2)) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
/* Hidden boxes vanish for visitors; edit mode keeps them dimmed and clickable */
body:not(.editing) .box-hidden { display: none !important; }
body.editing .box-hidden { opacity: 0.35; }

/* Custom box dimensions (set via editor) */
.box-w { width: var(--box-w) !important; max-width: none !important; }
.box-h { height: var(--box-h) !important; aspect-ratio: auto !important; }

/* ── Header logo image (set via editor, img.logo) ─── */
.brand { position: relative; min-height: 30px; }
.brand.has-img > span { visibility: hidden; }
.brand.has-img { min-width: 150px; min-height: 44px; }
.brand > img.set-img { object-fit: contain !important; }

/* ── Video player fill (assigned via editor) ──────── */
.video-frame video.video-player, .video-frame iframe.video-player {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; z-index: 3; background: #000;
}
.video-frame.has-video .video-frame__play { cursor: pointer; }

/* ── Reveal animation ─────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 56px; }
  .hero__sub { margin-inline: auto; }
  .hero__cta, .hero__stats { justify-content: center; }
  .hero__art { order: -1; }
  .creature-frame { max-width: 300px; }
  .battle { grid-template-columns: 1fr; }
  .grid--features { grid-template-columns: repeat(2, 1fr); }
  .grid--monsters { grid-template-columns: repeat(3, 1fr); }
  .grid--fusions { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .nav__links.open {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--frost); border-bottom: 1px solid var(--line); padding: 18px 24px; gap: 16px;
  }
  .section { padding: 72px 20px; }
  .grid--features, .grid--monsters { grid-template-columns: 1fr 1fr; }
  .grid--fusions { grid-template-columns: 1fr; }
  .signup { flex-direction: column; }
  .signup input { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   Accent · Japanese sci-fi flavor (light: cyan + purple)
   ============================================================ */

/* Japanese accent text — clean face, cyan tone */
.jp {
  font-family: var(--font-jp);
  font-weight: 500;
  color: var(--neon-cyan);
  letter-spacing: 0.04em;
}
.jp--pink { color: var(--neon-purple); }
.jp--dim { color: var(--text-dim); text-shadow: none; opacity: 0.85; }

/* Kicker gets a small JP companion */
.kicker__jp {
  font-family: var(--font-jp); font-weight: 500;
  margin-left: 10px; color: var(--neon-purple);
  letter-spacing: 0.06em;
}

/* Brand wordmark accents */
.brand__accent { color: var(--accent); }
.brand__num {
  margin-left: 4px; color: var(--neon-purple);
  -webkit-text-fill-color: var(--neon-purple);
}
.brand__mark { animation: neon-flicker 4.5s infinite steps(1); }

/* Hero title — subtle dual-accent edge */
.hero__title { text-shadow: 0 0 18px rgba(0,180,210,0.12), 0 0 38px rgba(var(--purple-rgb),0.08); }
.hero__jp {
  font-family: var(--font-jp); font-weight: 500; font-size: 1.05rem;
  letter-spacing: 0.22em; margin: -4px 0 4px;
  color: var(--neon-purple);
}

/* Eyebrow → accent-bordered HUD chip */
.eyebrow { border-color: rgba(0,180,210,0.4); box-shadow: 0 0 14px -2px rgba(0,180,210,0.18), inset 0 0 12px -6px rgba(0,180,210,0.18); }

/* CTA buttons */
.btn--primary {
  background: linear-gradient(100deg, var(--neon-cyan), var(--accent-2));
  box-shadow: 0 0 18px -2px rgba(0,180,210,0.35), 0 6px 24px -6px var(--accent-glow);
}
.btn--primary:hover { box-shadow: 0 0 26px 0 rgba(0,180,210,0.4), 0 12px 34px -8px var(--accent-glow); }
.btn--ghost:hover { border-color: var(--neon-purple); color: var(--neon-purple); box-shadow: 0 0 16px -2px rgba(var(--purple-rgb),0.3); }

/* Marquee: alternate cyan / purple accents */
.marquee { background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); }
.marquee__track span:nth-child(even) { color: var(--neon-purple); }
.marquee__track span:nth-child(4n+1) { color: var(--neon-cyan); }

/* Feature card JP badge (top-right corner) */
.card__jp {
  position: absolute; top: 16px; right: 18px;
  font-family: var(--font-jp); font-weight: 700; font-size: 1.35rem;
  color: rgba(var(--purple-rgb),0.18); letter-spacing: 0.05em; transition: 0.3s var(--ease);
  pointer-events: none;
}
.card:hover .card__jp { color: var(--neon-purple); }

/* Card hover edge → cyan */
.card:hover { border-color: var(--neon-cyan); box-shadow: 0 0 22px -6px rgba(0,180,210,0.3); }
.card__icon { color: var(--neon-cyan); border-color: rgba(0,180,210,0.3); }

/* Section headings get a faint accent underline */
.section__head h2, .battle__copy h2, .cta h2 { position: relative; }

/* Stat numbers */
.hero__stats b { text-shadow: var(--neon-glow-cyan); }

/* Sprite frames: cyan corner accents */
.creature-frame, .video-frame, .mcard__art { box-shadow: inset 0 0 0 1px rgba(0,180,210,0.08); }
.creature-frame { border-color: rgba(0,180,210,0.35); }
.creature-frame:hover, .video-frame:hover { box-shadow: 0 0 30px -10px rgba(0,180,210,0.3), inset 0 0 0 1px rgba(0,180,210,0.15); }

/* Signup input focus */
.signup input:focus { border-color: var(--neon-cyan); box-shadow: 0 0 14px -2px rgba(0,180,210,0.3); }

/* Ticks marker */
.ticks li::before { color: var(--neon-cyan); border-color: rgba(0,180,210,0.35); }

/* Fusion showcase cards (A + B → result) */
.grid--fusions { grid-template-columns: repeat(3, 1fr); }
.fcard {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 8px 30px -18px rgba(28,41,64,0.18);
}
.fcard:hover { transform: translateY(-6px); border-color: var(--neon-purple); box-shadow: 0 0 24px -8px rgba(var(--purple-rgb),0.35); }
.fcard__formula {
  display: flex; align-items: center; justify-content: center; gap: 7px; margin-bottom: 18px;
}
.fslot {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: var(--radius-sm);
  display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line);
  background: repeating-conic-gradient(var(--sprite-field-1) 0% 25%, var(--sprite-field-2) 0% 50%) 0 0 / 14px 14px;
}
.fslot--result {
  width: 100px; height: 100px; border-color: rgba(var(--purple-rgb),0.5);
  box-shadow: 0 0 22px -4px rgba(var(--purple-rgb),0.35), inset 0 0 0 1px rgba(var(--purple-rgb),0.15);
  background-size: 18px 18px;
}
.fblob {
  width: 62%; aspect-ratio: 1; border-radius: 5px; image-rendering: pixelated;
  box-shadow: inset -5px -5px 0 rgba(0,0,0,0.22), inset 5px 5px 0 rgba(255,255,255,0.14), 0 0 18px -6px currentColor;
}
.fslot--result .fblob { animation: float 5s steps(6, end) infinite; }
.fcard__op {
  font-family: var(--font-pixel); font-size: 1.1rem; color: var(--text-mute); flex-shrink: 0;
}
.fcard__op--eq { color: var(--neon-purple); font-size: 1.25rem; }

/* Fusion spotlight feature — full-width, dual-accent */
.card--spotlight {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 24px;
  background:
    linear-gradient(100deg, rgba(var(--purple-rgb),0.06), rgba(0,180,210,0.05)),
    var(--panel);
  border-color: rgba(var(--purple-rgb),0.4);
  box-shadow: 0 0 30px -10px rgba(var(--purple-rgb),0.25);
}
.card--spotlight:hover { border-color: var(--neon-purple); box-shadow: 0 0 34px -6px rgba(var(--purple-rgb),0.35); }
.card--spotlight .card__icon {
  margin-bottom: 0; flex-shrink: 0; width: 62px; height: 62px; font-size: 1.8rem;
  color: var(--neon-purple); border-color: rgba(var(--purple-rgb),0.35);
}
.card--spotlight h3 { font-size: 1.5rem; margin-bottom: 6px; }
.card--spotlight .card__jp { font-size: 2rem; top: 18px; right: 22px; color: rgba(var(--purple-rgb),0.22); }
.card--spotlight:hover .card__jp { color: var(--neon-purple); }
@media (max-width: 680px) {
  .card--spotlight { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* Monster card katakana name */
.mcard__jp { font-size: 0.78rem; margin: -4px 0 9px; }

/* Footer brand subtitle — lightened accents for the dark navy footer */
.footer__jp { font-family: var(--font-jp); font-size: 0.8rem; color: var(--purple-soft); margin-left: 6px; letter-spacing: 0.08em; }
.footer .brand__mark, .footer .brand__accent { color: #5fd6ec; }
.footer .brand__num { color: var(--purple-soft); -webkit-text-fill-color: var(--purple-soft); }

@keyframes neon-flicker {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: 0.4; }
  94% { opacity: 1; }
  96% { opacity: 0.3; }
  97% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .brand__mark { animation: none; }
}
