/* Meya Studios — shared styles for the studio site and every game page. */

@font-face { font-family: 'Monoton'; src: url('../fonts/monoton.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Chakra Petch'; font-weight: 400; src: url('../fonts/chakra-400.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-weight: 400; src: url('../fonts/chakra-ext-400.woff2') format('woff2'); font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-weight: 600; src: url('../fonts/chakra-600.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-weight: 600; src: url('../fonts/chakra-ext-600.woff2') format('woff2'); font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Chakra Petch'; font-weight: 700; src: url('../fonts/chakra-700.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Chakra Petch'; font-weight: 700; src: url('../fonts/chakra-ext-700.woff2') format('woff2'); font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --void: #07041a;
  --deep: #0d0830;
  --panel: rgba(21, 14, 56, 0.72);
  --line: rgba(124, 98, 255, 0.22);
  --text: #eeebff;
  --muted: #a49cd6;
  --cyan: #22f3ff;
  --pink: #ff3dc8;
  --violet: #9d6bff;
  --lime: #c6ff3d;
  --orange: #ff8a1f;
  --gold: #ffd76a;
  --ui: 'Chakra Petch', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --neon: 'Monoton', 'Chakra Petch', sans-serif;
  --radius: 22px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--void);
  color: var(--text);
  font: 400 17px/1.6 var(--ui);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(34, 243, 255, 0.3); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Background: a slow aurora behind everything, a faint grid on top. */
.sky { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.sky::before, .sky::after {
  content: ''; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
  filter: blur(90px); opacity: 0.35; animation: drift 26s ease-in-out infinite alternate;
}
.sky::before { background: radial-gradient(circle, #3b1bbd, transparent 65%); top: -30vmax; left: -20vmax; }
.sky::after { background: radial-gradient(circle, #8a1a8f, transparent 65%); bottom: -35vmax; right: -25vmax; animation-delay: -13s; }
.grid-floor {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(rgba(124, 98, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(124, 98, 255, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}
@keyframes drift { to { transform: translate(12vmax, 8vmax) scale(1.15); } }

/* Header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.top.is-solid { background: rgba(7, 4, 26, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 15px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img, .brand svg { width: 34px; height: 34px; filter: drop-shadow(0 0 8px rgba(34, 243, 255, 0.6)); }
.nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 28px); }
.nav a { color: var(--muted); font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.lang-btn {
  font: 700 13px var(--ui); letter-spacing: 0.08em; color: var(--text); background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.lang-btn:hover { border-color: var(--cyan); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* Neon type */
.neon {
  font-family: var(--neon); font-weight: 400; line-height: 1.02; letter-spacing: 0.02em; margin: 0;
  color: #d9fdff;
  text-shadow: 0 0 6px rgba(34, 243, 255, 0.9), 0 0 22px rgba(34, 243, 255, 0.65), 0 0 60px rgba(34, 243, 255, 0.45);
}
.neon.pink { color: #ffe1f6; text-shadow: 0 0 6px rgba(255, 61, 200, 0.9), 0 0 22px rgba(255, 61, 200, 0.6), 0 0 60px rgba(255, 61, 200, 0.4); }
.flicker { animation: flicker 7s infinite; }
@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.55; }
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan); }
.eyebrow::before { content: ''; width: 26px; height: 2px; background: currentColor; box-shadow: 0 0 10px currentColor; }
h2.title { font-size: clamp(30px, 5vw, 52px); line-height: 1.08; margin: 14px 0 16px; font-weight: 700; letter-spacing: -0.01em; }
.lead { font-size: clamp(17px, 2.2vw, 21px); color: var(--muted); max-width: 640px; }
.grad { background: linear-gradient(90deg, var(--cyan), var(--violet) 55%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font: 700 16px var(--ui); color: var(--void);
  background: var(--cyan); border: 0; border-radius: 14px; padding: 14px 22px; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(34, 243, 255, 0.4), 0 10px 40px -10px rgba(34, 243, 255, 0.8);
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(34, 243, 255, 0.6), 0 14px 50px -8px rgba(34, 243, 255, 0.95); }
.btn.ghost { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: 0 0 0 1px var(--cyan), 0 10px 40px -14px rgba(34, 243, 255, 0.6); }
.btn svg { width: 22px; height: 22px; flex: none; }

.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; min-width: 196px; padding: 10px 18px 10px 14px;
  border-radius: 14px; background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, 0.28);
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}
.store:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--cyan); box-shadow: 0 10px 34px -12px rgba(34, 243, 255, 0.7); }
.store svg { width: 28px; height: 28px; flex: none; }
.store small { display: block; font-size: 11px; letter-spacing: 0.06em; opacity: 0.8; line-height: 1.2; }
.store b { display: block; font-size: 19px; line-height: 1.15; }
.store.is-soon { opacity: 0.85; cursor: default; }
.store.is-soon:hover { transform: none; border-color: rgba(255, 255, 255, 0.28); box-shadow: none; }

/* Sections */
section { position: relative; padding: clamp(72px, 11vw, 140px) 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* Scroll reveal (only when JS runs and motion is fine). */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: 0.08s; } .js .reveal.d2 { transition-delay: 0.16s; } .js .reveal.d3 { transition-delay: 0.24s; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 15px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* The hero canvas (neon-field.js) */
.field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
