/* New Sky Games, rebuilt from the original website assets */
:root {
  --bg: #120a1f;
  --bg-2: #1b0f30;
  --glow: #3d1c6b;
  --ink: #f4f0fb;
  --muted: #b9add0;
  --line: rgb(244 240 251 / .55);
  --accent: #9b5cff;
  --display: "Montserrat", "Arial Black", sans-serif;
  --body: "Outfit", system-ui, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --radius: 22px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: grid; grid-template-columns: 56px 1fr 56px; align-items: center;
  padding: 14px clamp(16px, 4vw, 56px);
  background: linear-gradient(rgb(18 10 31 / .96) 55%, rgb(18 10 31 / 0));
}
.nav__logo { justify-self: center; }
.nav__logo img { width: clamp(64px, 7vw, 92px); }
.nav__btn {
  width: 48px; height: 48px; display: grid; place-items: center;
  background: none; border: 0; color: var(--ink); cursor: pointer; padding: 0;
  font-size: 26px; text-decoration: none;
}
.nav__cart {
  justify-self: end; width: 52px; height: 36px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 20px;
  transition: background .2s var(--ease-out), transform .16s var(--ease-out);
}
.burger { display: grid; gap: 7px; width: 34px; }
.burger i { display: block; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease-out), opacity .2s; }
.burger i:nth-child(2) { width: 75%; }
.burger i:nth-child(3) { width: 50%; }
[aria-expanded="true"] .burger i:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .burger i:nth-child(3) { width: 100%; transform: translateY(-8.5px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 15;
  display: grid; place-items: center;
  background: rgb(18 10 31 / .96);
  backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .25s var(--ease-out);
}
.menu.is-open { opacity: 1; }
.menu ul { text-align: center; display: grid; gap: 10px; }
.menu a {
  font-family: var(--display); font-style: italic; font-weight: 900;
  text-transform: uppercase; text-decoration: none;
  font-size: clamp(28px, 6vw, 56px); line-height: 1.15;
  display: inline-block; padding: 4px 8px;
  transform: translateY(14px); opacity: 0;
  transition: transform .4s var(--ease-out), opacity .3s, color .2s;
}
.menu.is-open a { transform: none; opacity: 1; }
.menu.is-open li:nth-child(2) a { transition-delay: 40ms; }
.menu.is-open li:nth-child(3) a { transition-delay: 80ms; }
.menu.is-open li:nth-child(4) a { transition-delay: 120ms; }
.menu.is-open li:nth-child(5) a { transition-delay: 160ms; }

/* ---------- Echo headline (solid text + outlined copy behind) ---------- */
.echo {
  position: relative; isolation: isolate;
  margin: 0;
  font-family: var(--display); font-style: italic; font-weight: 900;
  text-transform: uppercase; letter-spacing: -.01em;
  line-height: 1.02;
}
.echo::after {
  content: attr(data-text);
  position: absolute; inset: 0; z-index: -1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line);
  transform: translate(.07em, .16em);
  pointer-events: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh;
  display: grid; place-content: center; justify-items: center; gap: clamp(36px, 6vh, 64px);
  padding: 120px 16px 72px;
  text-align: center;
  background:
    radial-gradient(60% 55% at 50% 45%, var(--glow) 0%, rgb(61 28 107 / 0) 100%),
    var(--bg);
}
.hero__title { font-size: clamp(54px, 10.4vw, 168px); max-width: 11ch; }
.hero__title span { display: inline-block; }
.storm {
  position: absolute; top: 50%; z-index: 0;
  width: clamp(170px, 27vw, 430px);
  pointer-events: none; user-select: none;
  translate: 0 -50%;
  mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent);
}
.storm--l { left: 0; }
.storm--r { right: 0; transform: scaleX(1); }
.hero__title, .hero__cta { position: relative; z-index: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 30px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: rgb(18 10 31 / .55);
  font-size: 18px; font-weight: 400; text-decoration: none; white-space: nowrap;
  transition: background .2s var(--ease-out), color .2s, transform .16s var(--ease-out);
}
.pill .ico { font-size: 22px; transition: transform .25s var(--ease-out); }
.pill:active, .nav__cart:active { transform: scale(.97); }

/* ---------- Sections ---------- */
.section-title { font-size: clamp(44px, 8vw, 112px); text-align: center; margin-bottom: clamp(36px, 6vw, 72px); }
.cats, .best { padding: clamp(72px, 10vw, 140px) clamp(16px, 4vw, 56px); max-width: 1440px; margin: 0 auto; }
.cats__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.cats__grid a {
  display: block; border-radius: var(--radius); overflow: hidden;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.cats__grid img { width: 100%; }

/* ---------- Realms of Enchantment feature ---------- */
.roe {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(24px, 4vw, 64px);
  padding: clamp(28px, 5vw, 72px);
  border-radius: var(--radius);
  border: 1px solid rgb(244 240 251 / .1);
}
.roe__bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgb(18 10 31 / .25), rgb(18 10 31 / .85) 60%),
    url("assets/roe-bg.webp") center / cover;
}
.roe__logo { width: min(340px, 80%); margin: 0 0 8px -10px; }
.roe__body p { color: var(--muted); font-size: 18px; max-width: 40ch; margin: 0 0 28px; }
.roe__badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 460px; align-items: end; }

/* ---------- Card deck strip ---------- */
.deck { margin-top: clamp(40px, 6vw, 72px); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.deck__track { display: flex; gap: 20px; width: max-content; animation: deck 60s linear infinite; }
.deck__track li { width: clamp(150px, 16vw, 230px); flex: none; }
.deck__track img { border-radius: 10px; transition: transform .3s var(--ease-out); }
.deck:hover .deck__track { animation-play-state: paused; }
@keyframes deck { to { transform: translateX(calc(-50% - 10px)); } }

/* ---------- Footer ---------- */
.foot {
  display: grid; justify-items: center; gap: 16px;
  padding: 72px 16px 48px; text-align: center;
  border-top: 1px solid rgb(244 240 251 / .08);
  background: radial-gradient(50% 80% at 50% 100%, rgb(61 28 107 / .5), transparent), var(--bg);
}
.foot img { width: 84px; }
.foot__ig { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 18px; padding: 6px 10px; }
.foot__ig .ico { font-size: 22px; }
.foot p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Hover (real pointers only) ---------- */
@media (hover: hover) and (pointer: fine) {
  .pill:hover { background: var(--ink); color: var(--bg); }
  .pill:hover .ico { transform: translateX(4px); }
  .nav__cart:hover { background: rgb(244 240 251 / .12); }
  .menu a:hover { color: var(--accent); }
  .cats__grid a:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -20px rgb(155 92 255 / .45); }
  .deck__track li:hover img { transform: translateY(-8px) rotate(-1.5deg); }
  .foot__ig:hover { color: var(--accent); }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__title span { animation: slam .9s var(--ease-out) both; }
  .hero__title span + span { animation-delay: .12s; }
  .hero__title::after { animation: echo-in 1.1s var(--ease-out) .35s both; }
  .hero__cta { animation: rise .7s var(--ease-out) .55s both; }
  .storm--l { animation: storm-l 1s var(--ease-out) .1s both, flicker 7s 1.4s infinite; }
  .storm--r { animation: storm-r 1s var(--ease-out) .2s both, flicker 8s 3.2s infinite; }
  .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
  .reveal.is-in { opacity: 1; transform: none; }
  .cats__grid li.reveal:nth-child(2n) { transition-delay: 80ms; }
}
@keyframes slam { from { opacity: 0; transform: translateX(-.4em) skewX(-8deg); filter: blur(6px); } }
@keyframes echo-in { from { opacity: 0; transform: translate(.02em, .02em); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes storm-l { from { opacity: 0; translate: -30% -50%; } }
@keyframes storm-r { from { opacity: 0; translate: 30% -50%; } }
@keyframes flicker {
  0%, 88%, 100% { opacity: 1; }
  90% { opacity: .55; }
  92% { opacity: 1; filter: brightness(1.5); }
  94% { opacity: .75; filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .deck__track { animation: none; }
  .deck { overflow-x: auto; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .hero { gap: 40px; padding-top: 110px; }
  .hero__title { font-size: clamp(54px, 17vw, 88px); max-width: 6ch; }
  .storm { width: 46vw; opacity: .85; }
  .storm--l { left: -14vw; }
  .storm--r { right: -14vw; }
  .cats__grid { grid-template-columns: 1fr; }
  .roe { grid-template-columns: 1fr; text-align: center; padding: 28px 20px 36px; }
  .roe__bg { background: linear-gradient(rgb(18 10 31 / .3), rgb(18 10 31 / .9) 50%), url("assets/roe-bg.webp") center / cover; }
  .roe__logo { margin: 0 auto 8px; }
  .roe__body p { margin-inline: auto; font-size: 17px; }
  .roe__badges { margin: 0 auto; gap: 8px; }
  .pill { font-size: 17px; padding: 13px 26px; }
}

.ico { width: 1em; height: 1em; flex: none; }

/* ---------- 404 ---------- */
.hero--404 { gap: 28px; padding-top: 48px; }
.hero--404 .nav__logo, .hero__sub { position: relative; z-index: 1; }
.hero--404 .hero__title { font-size: clamp(48px, 8vw, 120px); }
.hero__sub { margin: 0; color: var(--muted); font-size: 18px; }
.roe__cta { margin-top: 32px; }
