:root {
  --bg: #0a0718;
  --panel: #141033;
  --panel-deep: #0f0b29;
  --panel-glass: rgba(16, 12, 44, 0.85);
  --text: #eef1fb;
  --text-soft: #c9cfea;
  --text-muted: #a9b0d0;
  --accent: #5cc2ff;
  --accent-soft: #8fd4ff;
  --on-accent: #06122a;
  --line: rgba(140, 170, 255, 0.18);
  --line-strong: rgba(140, 190, 255, 0.32);
  --display: 'Oxanium', 'Segoe UI', system-ui, sans-serif;
  --tech: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  --body: 'Oxanium', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-soft); }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1240px; margin: 0 auto; }
.narrow { max-width: 960px; margin: 0 auto; }

/* Type */
.eyebrow { font-family: var(--tech); font-weight: 600; font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--accent-soft); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; margin: 0; }
.h-xl { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; }
.h-lg { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.06; letter-spacing: -0.01em; }
.lead { font-size: 18px; line-height: 1.7; color: var(--text-soft); margin: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 10px;
  font-family: var(--tech); font-weight: 700; font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 32px rgba(92,194,255,0.4); }
.btn-primary:hover { color: var(--on-accent); transform: translateY(-1px); box-shadow: 0 0 44px rgba(92,194,255,0.6); }
.btn-ghost { border: 1px solid rgba(200,215,255,0.4); color: var(--text); background: rgba(10,7,24,0.45); font-weight: 600; }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 14px; box-shadow: none; }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 16px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(140,170,255,0.14); background: rgba(10,7,24,0.82); backdrop-filter: blur(10px); }
.nav { padding: 10px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand { gap: 10px; min-width: 0; flex: 0 1 auto; }
.brand-mark { width: 56px; height: 56px; border-radius: 50%; flex: none; box-shadow: 0 0 18px rgba(92,194,255,0.35); }
.brand-text { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.brand-name { font-family: 'Audiowide', var(--tech); font-size: 24px; letter-spacing: 0.06em; color: #e9eef8; background: linear-gradient(180deg, #ffffff 0%, #d7deeb 55%, #a9b6cc 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 18px rgba(143,212,255,0.18); }
.brand-sub { font-family: var(--body); font-weight: 600; font-size: 12px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--accent-soft); padding-left: 2px; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; font-family: var(--tech); font-weight: 600; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; }
.nav-links a:not(.btn) { color: var(--text-soft); text-decoration: none; }
.nav-links a:not(.btn):hover, .nav-links a[aria-current="page"] { color: #fff; }
.nav-links a[aria-current="page"] { border-bottom: 2px solid var(--accent); padding-bottom: 4px; }

/* Backgrounds */
.nebula { background-image: linear-gradient(180deg, rgba(10,7,24,0.15) 0%, rgba(10,7,24,0.55) 70%, var(--bg) 100%), url(assets/nebula.webp); background-size: cover; background-position: center; }
.nebula-band { background-image: linear-gradient(180deg, var(--bg) 0%, rgba(10,7,24,0.7) 30%, rgba(10,7,24,0.7) 70%, var(--bg) 100%), url(assets/nebula.webp); background-size: cover; background-position: center; }
.nebula-top { background-image: linear-gradient(180deg, rgba(10,7,24,0.35) 0%, var(--bg) 100%), url(assets/nebula.webp); background-size: cover; background-position: center; }

section { padding: 104px 32px; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 56px 32px 96px; isolation: isolate; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0.9; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 60% 55% at 50% 42%, rgba(10,7,24,0.55) 0%, rgba(10,7,24,0.2) 70%), linear-gradient(180deg, rgba(10,7,24,0.25) 0%, rgba(10,7,24,0.35) 65%, var(--bg) 100%); }
.hero .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; }
.hero-logo { width: 100%; max-width: 760px; margin: -20px 0 -36px; }
.hero p { margin: 0; max-width: 620px; font-size: 21px; line-height: 1.55; color: #dfe4f7; }
.hero p strong { color: #fff; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.release { font-family: var(--tech); font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }

/* Game */
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.split > * { min-width: 0; }
.split-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 22px; }
.split-media { flex: 1 1 480px; }
.board-img { border-radius: 16px; border: 1px solid rgba(140,190,255,0.35); box-shadow: 0 0 0 6px rgba(92,194,255,0.06), 0 30px 80px rgba(40,20,120,0.55); }
.pieces { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding-top: 8px; }
.piece-row { display: flex; flex-wrap: wrap; gap: 6px; }
.piece-row img { width: 52px; height: 52px; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.45)); transition: transform .2s ease; }
.piece-row img:hover { transform: translateY(-3px) scale(1.06); }
.pieces span { font-family: var(--tech); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) { .piece-row img { transition: none; } }

/* Shared section heads */
.section-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; margin-bottom: 48px; }
.section-head .lead { max-width: 600px; }
.section-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.section-head-row > div { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }

/* Modes */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); gap: 22px; }
.mode-card { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; border: 1px solid rgba(140,190,255,0.28); background: rgba(16,12,44,0.82); }
.mode-card img.board { width: 100%; height: auto; aspect-ratio: 1.06; object-fit: cover; border-bottom: 1px solid rgba(140,190,255,0.22); }
.mode-card .body { padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.mode-tag { font-family: var(--tech); font-weight: 700; font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--accent); }
.mode-card h3 { font-size: 30px; }
.mode-card p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--text-soft); }

/* Hint preview cards */
.hint-card { padding: 26px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.meta { font-family: var(--tech); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
.hint-card strong { font-family: var(--display); font-weight: 800; font-size: 22px; }
.hint-card span.txt { font-size: 15px; line-height: 1.6; color: var(--text-soft); }
.blur { filter: blur(6px); user-select: none; }

/* Community */
.comm-card { padding: 32px; border-radius: 16px; background: var(--panel-glass); border: 1px solid rgba(140,190,255,0.28); display: flex; flex-direction: column; gap: 16px; }
.comm-card.planned { border-style: dashed; border-color: rgba(170,175,195,0.35); filter: grayscale(1); opacity: 0.55; }
.comm-card h3 { font-size: 24px; }
.comm-card p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--text-soft); }
.comm-card a.more { margin-top: auto; font-family: var(--tech); font-weight: 600; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.pill { font-family: var(--tech); font-weight: 700; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: rgba(92,194,255,0.16); color: var(--accent-soft); }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Final CTA */
.final { padding: 112px 32px; }
.final .narrow { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; max-width: 900px; }
.final img { width: 96px; height: 96px; border-radius: 50%; box-shadow: 0 0 48px rgba(92,194,255,0.5); }
.final h2 { font-size: clamp(38px, 5vw, 54px); line-height: 1.05; }

/* Footer */
.site-footer { border-top: 1px solid rgba(140,170,255,0.14); padding: 40px 32px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer .who { display: flex; flex-direction: column; gap: 6px; }
.site-footer .who { gap: 12px; flex: 0 1 440px; }

.site-footer .who span, .site-footer small { font-size: 14px; color: var(--text-muted); }
.site-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; font-size: 14px; }
.site-footer nav a { text-decoration: none; }

/* Hints page */
.hints-hero { padding: 72px 32px 48px; }
.hints-hero .narrow { display: flex; flex-direction: column; gap: 18px; }
.hints-hero .lead { max-width: 620px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 10px; }
.toolbar input { flex: 1 1 320px; min-width: 0; min-height: 52px; padding: 0 18px; border-radius: 10px; border: 1px solid rgba(140,170,255,0.3); background: var(--panel); color: var(--text); font: inherit; font-size: 16px; }
.toolbar input::placeholder { color: var(--text-muted); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { min-height: 52px; padding: 0 20px; border-radius: 10px; cursor: pointer; font-family: var(--tech); font-weight: 600; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; background: transparent; color: var(--text); border: 1px solid rgba(140,170,255,0.35); }
.filter[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.hints-list { padding: 16px 32px 96px; }
.hints-list .narrow { display: flex; flex-direction: column; gap: 18px; }
.level { border-radius: 16px; background: var(--panel); border: 1px solid rgba(140,170,255,0.2); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.level-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.level-head > div { display: flex; flex-direction: column; gap: 6px; }
.level h2 { font-size: 26px; }
.progress { font-family: var(--tech); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-soft); }
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.tier { border-radius: 12px; border: 1px solid var(--line); background: var(--panel-deep); padding: 18px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.tier-label { font-family: var(--tech); font-weight: 700; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }
.tier[data-tier="0"] .tier-label { color: #8fd4ff; }
.tier[data-tier="1"] .tier-label { color: #ffcf4a; }
.tier[data-tier="2"] .tier-label { color: #ff8a7a; }
.tier p { margin: 0; font-size: 15px; line-height: 1.6; color: #dfe4f7; }
.tier button { margin-top: auto; min-height: 44px; border-radius: 8px; border: 1px solid rgba(140,190,255,0.4); background: transparent; color: var(--text); font-family: var(--tech); font-weight: 600; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.tier button:hover:not(:disabled) { border-color: var(--accent); }
.tier button:disabled { opacity: 0.55; cursor: not-allowed; }
.empty { text-align: center; color: var(--text-muted); padding: 24px; }
.after-note { margin: 8px 0 0; font-size: 15px; color: var(--text-muted); text-align: center; }

@media (max-width: 640px) {
  section, .hero, .final, .hints-hero, .hints-list { padding-left: 20px; padding-right: 20px; }
  section { padding-top: 72px; padding-bottom: 72px; }
  .nav { padding: 12px 20px; }
  .brand-mark { width: 44px; height: 44px; }
  .brand-name { font-size: 20px; }
  .brand-sub { font-size: 11px; }
  .nav-links { gap: 18px; }
  .hero p { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
#hint-list { display: flex; flex-direction: column; gap: 18px; }

button.btn { border: 0; cursor: pointer; }
button.btn-ghost { border: 1px solid rgba(200,215,255,0.4); }

/* Gameplay video panel */
.split-media { display: flex; justify-content: center; }
.gameplay { margin: 0; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.gameplay-video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; display: block; border-radius: 20px; background: #141033; border: 1px solid rgba(140,190,255,0.35); box-shadow: 0 0 0 6px rgba(92,194,255,0.06), 0 30px 80px rgba(40,20,120,0.55); }
.gameplay figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.gameplay figcaption span { font-family: var(--tech); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
.sound-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(140,190,255,0.4); background: rgba(16,12,44,0.85); color: var(--text); font-family: var(--tech); font-weight: 600; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.sound-btn:hover { border-color: var(--accent); }

/* Video lightbox */
.player { padding: 0; border: 0; background: transparent; max-width: min(1200px, 94vw); width: 100%; overflow: visible; }
.player.vertical { max-width: min(460px, 94vw); }
.player::backdrop { background: rgba(5,3,14,0.88); backdrop-filter: blur(6px); }
.player video { width: 100%; max-height: 86vh; display: block; border-radius: 14px; background: #000; box-shadow: 0 0 80px rgba(92,194,255,0.25); }
.player-close { position: absolute; top: -56px; right: 0; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(200,215,255,0.4); background: rgba(16,12,44,0.9); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.player-close:hover { border-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

/* Compact header menu */
.menu-btn { display: none; width: 48px; height: 48px; border-radius: 10px; border: 1px solid rgba(200,215,255,0.35); background: rgba(16,12,44,0.85); color: var(--text); place-items: center; cursor: pointer; }
@media (max-width: 1180px) {
  .menu-btn { display: grid; }
  .nav-links { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding: 8px 0 6px; }
  .nav-links.open { display: flex; }
  .nav-links > a:not(.btn) { min-height: 48px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
  .nav-links > a[aria-current="page"] { border-bottom: 1px solid var(--line); color: var(--accent-soft); padding-bottom: 0; }
  .nav-links .btn { margin-top: 10px; }
}

/* Contact page */
.contact-body { padding: 16px 32px 104px; }
.contact-grid { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; max-width: 1080px; }
.contact-form { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding: 32px; border-radius: 18px; background: var(--panel); border: 1px solid rgba(140,170,255,0.2); }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-row .field { flex: 1 1 220px; }
.field-row { display: flex; flex-wrap: wrap; gap: 20px; }
.field label { font-family: var(--tech); font-weight: 600; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 10px; border: 1px solid rgba(140,170,255,0.3); background: var(--panel-deep); color: var(--text); font: inherit; font-size: 16px; }
.field textarea { resize: vertical; min-height: 160px; line-height: 1.6; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent-soft) 50%), linear-gradient(135deg, var(--accent-soft) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(92,194,255,0.2); }
.field [aria-invalid="true"] { border-color: #ff8a7a; }
.form-error { margin: 0; min-height: 1px; color: #ff9d90; font-size: 15px; }
.form-error:empty { display: none; }
.contact-form .btn { align-self: flex-start; }
.form-note { margin: -6px 0 0; font-size: 14px; color: var(--text-muted); }
.contact-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact-card { padding: 28px; border-radius: 16px; background: var(--panel-glass); border: 1px solid rgba(140,190,255,0.28); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.contact-card h2 { font-size: 22px; }
.contact-card p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-soft); }
.contact-card .more { font-family: var(--tech); font-weight: 600; font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 640px) { .contact-body { padding-left: 20px; padding-right: 20px; } .contact-form { padding: 22px; } }

/* Social icons */
.socials { display: flex; align-items: center; gap: 4px; }
.social { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; color: var(--text-soft); text-decoration: none; transition: color .15s ease, background .15s ease; }
.social:hover { color: #fff; background: rgba(92,194,255,0.12); }
.footer-socials { margin-top: 6px; margin-left: -10px; }

/* Contact form states */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form button[disabled] { opacity: 0.6; cursor: progress; }
.contact-form.sent { align-items: flex-start; gap: 14px; }
.contact-form[hidden] { display: none; }
.contact-form.sent h2 { font-size: 30px; outline: none; }
.contact-form.sent p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--text-soft); max-width: 520px; }

/* Follow card on Contact page */
.social-btns { display: flex; flex-wrap: nowrap; gap: 10px; }
.social-btn { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(140,170,255,0.25); background: rgba(92,194,255,0.08); color: var(--accent-soft); text-decoration: none; transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease; }
.social-btn svg { width: 20px; height: 20px; }
.social-btn:hover { color: #fff; border-color: var(--accent); background: rgba(92,194,255,0.18); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .social-btn { transition: none; } .social-btn:hover { transform: none; } }
