/* ============================================================
   🎨 COSMIC PASTA GAMES — HOME THEME
   🔧 CHANGE THE ENTIRE SITE LOOK HERE FIRST.
   ------------------------------------------------------------
   Keep variable names the same when creating a future theme.
   ============================================================ */
:root {
  --color-bg: #071A2B;
  --color-bg-deep: #04111D;
  --color-surface: #0A2238;
  --color-surface-2: #0D2D4A;

  --color-primary: #2196F3;
  --color-primary-dark: #0D47A1;
  --color-primary-light: #90CAF9;
  --color-highlight: #E3F2FD;

  --color-text: #F4FAFF;
  --color-text-soft: #D6E8F7;
  --color-muted: #8FAFC8;

  --color-line: rgba(144, 202, 249, 0.18);
  --color-line-strong: rgba(144, 202, 249, 0.38);

  --color-shadow: rgba(4, 71, 161, 0.34);
  --color-shadow-strong: rgba(33, 150, 243, 0.30);

  --color-overlay: rgba(4, 17, 29, 0.68);
  --color-overlay-heavy: rgba(4, 17, 29, 0.94);

  --color-success: #90CAF9;
  --color-danger: #FF8A80;

  /* 🔧 Scroll background controls */
  --scroll-bg-strength: 0.13;
  --scroll-bg-blur: 75px;
  --scroll-bg-opacity: 0.72;
  --scroll-glow-size: 44vw;
}

@import url("components.css");

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--color-bg-deep);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(33,150,243,.13), transparent 38%),
    var(--color-bg);
  color: var(--color-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
.page-shell { width: min(1240px, calc(100% - 64px)); margin-inline: auto; }

/* ============================================================
   🔧 GLOBAL SCROLL ATMOSPHERE
   ============================================================ */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -3;
  pointer-events: none;
  width: var(--scroll-glow-size);
  height: var(--scroll-glow-size);
  border-radius: 50%;
  filter: blur(var(--scroll-bg-blur));
  opacity: var(--scroll-bg-opacity);
  will-change: transform;
}

body::before {
  top: -18vw;
  left: -12vw;
  background: radial-gradient(circle, rgba(33,150,243,.24), rgba(33,150,243,.06) 38%, transparent 70%);
  transform: translate3d(0, calc(var(--scroll-y, 0px) * var(--scroll-bg-strength)), 0);
}

body::after {
  right: -14vw;
  bottom: -22vw;
  background: radial-gradient(circle, rgba(144,202,249,.18), rgba(13,71,161,.08) 42%, transparent 72%);
  transform: translate3d(0, calc(var(--scroll-y, 0px) * -.08), 0);
}

body > main::before {
  content: "";
  position: fixed;
  inset: -25vh -20vw;
  z-index: -2;
  pointer-events: none;
  opacity: calc(.06 + (var(--scroll-progress, 0) * .10));
  background: linear-gradient(
    112deg,
    transparent 32%,
    rgba(144,202,249,.10) 45%,
    rgba(33,150,243,.14) 51%,
    transparent 67%
  );
  transform: translate3d(
    calc(var(--scroll-progress, 0) * 9vw),
    calc(var(--scroll-y, 0px) * -.035),
    0
  ) rotate(-7deg);
  will-change: transform;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  border-bottom: 1px solid transparent;
  transition: .35s ease;
}

.site-header.scrolled {
  padding-block: 14px;
  background: rgba(4,17,29,.76);
  border-bottom-color: var(--color-line);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 50px rgba(4,17,29,.25);
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-symbol {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--color-primary);
  background: rgba(33,150,243,.12);
  color: var(--color-highlight);
  font-size: 12px; font-weight: 900; letter-spacing: -.04em;
  box-shadow: inset 0 0 20px rgba(33,150,243,.10);
}
.brand-copy { display: grid; line-height: .9; }
.brand-copy strong { font-size: 12px; letter-spacing: .13em; }
.brand-copy small { margin-top: 5px; color: var(--color-primary-light); font-size: 8px; letter-spacing: .35em; }

.desktop-nav { display: flex; align-items: center; gap: 28px; }
.nav-link {
  position: relative;
  padding: 8px 0;
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  transition: color .25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--color-primary-light);
  transition: right .25s ease;
}
.nav-link:hover,
.nav-link.active { color: var(--color-highlight); }
.nav-link:hover::after,
.nav-link.active::after { right: 0; }

.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--color-line);
  background: rgba(10,34,56,.72);
  color: var(--color-text);
  cursor: pointer;
}
.menu-toggle span {
  display: block; width: 16px; height: 1px;
  margin: 5px auto; background: currentColor;
}

.mobile-menu {
  position: fixed;
  inset: 74px 16px auto;
  z-index: 49;
  display: none;
  padding: 14px;
  border: 1px solid var(--color-line);
  background: rgba(4,17,29,.96);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px var(--color-shadow);
}
.mobile-menu.open { display: grid; }
.mobile-menu a {
  padding: 15px 12px;
  border-bottom: 1px solid var(--color-line);
  color: var(--color-text-soft);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.mobile-menu a:last-child { border-bottom: 0; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--color-line);
  background: var(--color-bg-deep);
}

#backgroundCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  transform: translate3d(0, calc(var(--scroll-y, 0px) * -.055), 0) scale(1.04);
  will-change: transform;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 40%, transparent 0 22%, rgba(4,17,29,.18) 58%, rgba(4,17,29,.88) 100%),
    linear-gradient(90deg, rgba(4,17,29,.72), transparent 55%, rgba(4,17,29,.30));
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: .17;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(144,202,249,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(144,202,249,.08) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
  transform: translate3d(0, calc(var(--scroll-y, 0px) * -.025), 0);
  will-change: transform;
}

.hero-content { position: relative; z-index: 3; padding-top: 92px; }

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  color: var(--color-primary-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .19em;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 18px var(--color-primary);
  animation: pulse 1.8s ease-in-out infinite;
}

.hero-title {
  max-width: 1050px;
  margin: 0;
  font-size: clamp(4rem, 10.4vw, 9.8rem);
  line-height: .80;
  letter-spacing: -.075em;
  font-weight: 850;
}
.hero-title span { display: block; }
.hero-title .outline {
  color: transparent;
  -webkit-text-stroke: 1px rgba(227,242,253,.78);
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  max-width: 940px;
  margin-top: 54px;
}
.hero-bottom p {
  max-width: 450px;
  margin: 0;
  color: var(--color-text-soft);
  font-size: 16px;
  line-height: 1.75;
}

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--color-line-strong);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: .25s ease;
}
.button-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-highlight);
  box-shadow: 0 14px 40px var(--color-shadow-strong);
}
.button-primary:hover {
  background: var(--color-highlight);
  border-color: var(--color-highlight);
  color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 18px 48px var(--color-shadow);
}
.button-ghost {
  background: rgba(10,34,56,.42);
  color: var(--color-text);
  backdrop-filter: blur(10px);
}
.button-ghost:hover {
  border-color: var(--color-primary-light);
  background: rgba(33,150,243,.12);
  transform: translateY(-2px);
}

.hero-corner {
  position: absolute;
  z-index: 3;
  bottom: 28px;
  display: flex;
  gap: 16px;
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
}
.hero-corner-left { left: 32px; }
.hero-corner-right { right: 32px; }
.scroll-arrow { color: var(--color-primary-light); font-size: 17px; line-height: .6; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 140px 0; position: relative; }
.eyebrow {
  margin: 0 0 18px;
  color: var(--color-primary-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2em;
}
.section-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 50px;
  margin-bottom: 58px;
}
.section-top h2 {
  margin: 0;
  font-size: clamp(3rem, 6.5vw, 6.5rem);
  line-height: .84;
  letter-spacing: -.065em;
}
.section-top h2 span,
.intro-main h2 span { color: transparent; -webkit-text-stroke: 1px rgba(227,242,253,.68); }
.section-top > p {
  max-width: 300px;
  margin: 0;
  color: var(--color-muted);
  line-height: 1.7;
  font-size: 14px;
}
.text-link {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--color-text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  transition: .25s ease;
}
.text-link span { color: var(--color-primary-light); transition: transform .25s ease; }
.text-link:hover { color: var(--color-primary-light); }
.text-link:hover span { transform: translateX(5px); }

/* ============================================================
   INTRO
   ============================================================ */
.intro { background: rgba(10,34,56,.24); border-bottom: 1px solid var(--color-line); }
.intro-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 280px;
  gap: 50px;
  align-items: center;
}
.intro-main h2 {
  margin: 0;
  font-size: clamp(3.3rem, 7vw, 7rem);
  line-height: .82;
  letter-spacing: -.07em;
}
.intro-copy {
  max-width: 620px;
  margin: 34px 0 25px;
  color: var(--color-text-soft);
  font-size: 17px;
  line-height: 1.8;
}
.intro-orbit {
  position: relative;
  width: 250px;
  height: 250px;
  margin-left: auto;
}
.orbit {
  position: absolute;
  inset: 10%;
  border: 1px solid var(--color-line-strong);
  border-radius: 50%;
  transform: rotate(-28deg) scaleY(.42);
}
.orbit-a { animation: orbitSpin 12s linear infinite; }
.orbit-b { inset: 0; transform: rotate(56deg) scaleY(.42); animation: orbitSpinReverse 16s linear infinite; }
.orbit-core {
  position: absolute;
  inset: 38%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--color-primary-light), var(--color-primary-dark));
  color: var(--color-highlight);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 0 60px rgba(33,150,243,.38);
}

/* ============================================================
   FEATURED
   ============================================================ */
.featured { border-bottom: 1px solid var(--color-line); }
.featured-card {
  display: grid;
  grid-template-columns: 1.45fr .75fr;
  min-height: 570px;
  border: 1px solid var(--color-line);
  background: linear-gradient(135deg, rgba(10,34,56,.94), rgba(7,26,43,.94));
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(4,17,29,.30);
}
.featured-art {
  min-height: 570px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(144,202,249,.20), transparent 11%),
    radial-gradient(circle at 50% 48%, rgba(33,150,243,.20), transparent 28%),
    linear-gradient(135deg, #0D47A1, #071A2B 62%);
}
.art-sphere {
  position: absolute;
  width: min(28vw, 310px);
  aspect-ratio: 1;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #E3F2FD 0 2%, #90CAF9 7%, #2196F3 28%, #0D47A1 64%, #04111D 100%);
  box-shadow: 0 0 120px rgba(33,150,243,.30);
}
.art-ring {
  position: absolute;
  left: 50%; top: 50%;
  width: 65%;
  height: 18%;
  border: 1px solid rgba(227,242,253,.42);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
}
.ring-two { width: 82%; transform: translate(-50%, -50%) rotate(64deg); opacity: .55; }
.art-stars {
  position: absolute;
  inset: 0;
  opacity: .55;
  background-image:
    radial-gradient(circle, #E3F2FD 0 1px, transparent 1.5px),
    radial-gradient(circle, #90CAF9 0 1px, transparent 1.5px);
  background-size: 83px 97px, 137px 121px;
  background-position: 12px 22px, 55px 48px;
}
.art-code, .art-placeholder {
  position: absolute;
  z-index: 2;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
}
.art-code { top: 24px; left: 24px; color: var(--color-primary-light); }
.art-placeholder {
  right: 24px; bottom: 24px;
  text-align: right;
  color: rgba(227,242,253,.65);
  line-height: 1.5;
}
.featured-details { display: flex; flex-direction: column; justify-content: center; padding: 58px; }
.tag {
  width: fit-content;
  margin-bottom: 25px;
  padding: 7px 9px;
  border: 1px solid var(--color-line-strong);
  color: var(--color-primary-light);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .16em;
}
.featured-details h3 {
  margin: 0 0 20px;
  font-size: clamp(2.6rem, 4vw, 4.7rem);
  line-height: .9;
  letter-spacing: -.06em;
}
.featured-details p { margin: 0 0 34px; color: var(--color-muted); line-height: 1.8; font-size: 14px; }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 42px; }
.meta-row span {
  padding: 7px 9px;
  border: 1px solid var(--color-line);
  color: var(--color-text-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

/* ============================================================
   GAME GRID
   ============================================================ */
.games { border-bottom: 1px solid var(--color-line); }
.game-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 14px;
}
.game-card { min-width: 0; border: 1px solid var(--color-line); background: var(--color-surface); overflow: hidden; transition: .35s ease; }
.game-card:hover { border-color: var(--color-line-strong); transform: translateY(-5px); box-shadow: 0 24px 70px var(--color-shadow); }
.game-card-art {
  min-height: 400px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  overflow: hidden;
}
.game-card-art::after {
  content: "";
  position: absolute;
  width: 180px; height: 180px;
  right: -40px; bottom: -60px;
  border: 1px solid rgba(227,242,253,.30);
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(144,202,249,.14);
}
.game-card-art > * { position: relative; z-index: 1; }
.game-card-art span { font-size: 8px; font-weight: 800; letter-spacing: .16em; color: var(--color-primary-light); }
.game-card-art strong { font-size: clamp(2.2rem, 4vw, 4.5rem); line-height: .84; letter-spacing: -.065em; }
.art-blue { background: radial-gradient(circle at 70% 30%, #90CAF9, transparent 18%), linear-gradient(135deg, #2196F3, #0D47A1 62%, #04111D); }
.art-deep { background: radial-gradient(circle at 30% 35%, rgba(33,150,243,.30), transparent 22%), linear-gradient(145deg, #0D2D4A, #04111D); }
.art-light { background: radial-gradient(circle at 65% 28%, rgba(227,242,253,.95), transparent 12%), linear-gradient(145deg, #90CAF9, #2196F3 50%, #0D47A1); color: #04111D; }
.art-light span { color: #0D47A1; }
.game-card-info { display: flex; justify-content: space-between; gap: 20px; padding: 17px; border-top: 1px solid var(--color-line); }
.game-card-info strong { font-size: 12px; }
.game-card-info span { color: var(--color-muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }

/* ============================================================
   UPDATES
   ============================================================ */
.updates { background: rgba(10,34,56,.18); border-bottom: 1px solid var(--color-line); }
.update-list { border-top: 1px solid var(--color-line); }
.update-row {
  display: grid;
  grid-template-columns: 60px 130px 1fr 30px;
  gap: 20px;
  align-items: center;
  padding: 25px 0;
  border-bottom: 1px solid var(--color-line);
  transition: .25s ease;
}
.update-row:hover { padding-inline: 12px; background: rgba(33,150,243,.06); }
.update-index, .update-date { color: var(--color-primary-light); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.update-date { color: var(--color-muted); }
.update-title { font-size: clamp(1rem, 1.6vw, 1.35rem); }
.update-arrow { color: var(--color-primary-light); }

/* ============================================================
   DEVELOPMENT JOURNEY
   ============================================================ */
.journey { border-bottom: 1px solid var(--color-line); }
.journey-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--color-line); }
.journey-item { min-height: 250px; padding: 24px; border-right: 1px solid var(--color-line); }
.journey-item:last-child { border-right: 0; }
.journey-item > span { color: var(--color-primary-light); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.journey-item strong { display: block; margin-top: 60px; font-size: 20px; letter-spacing: -.03em; }
.journey-item p { max-width: 190px; color: var(--color-muted); font-size: 12px; line-height: 1.65; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--color-bg-deep); }
.footer-main { display: flex; justify-content: space-between; gap: 60px; padding: 90px 0; }
.footer-line { margin-top: 20px; color: var(--color-muted); font-size: 12px; }
.footer-columns { display: grid; grid-template-columns: repeat(3, 150px); gap: 30px; }
.footer-columns > div { display: grid; align-content: start; gap: 10px; }
.footer-label { margin-bottom: 8px; color: var(--color-primary-light); font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.footer-columns a { color: var(--color-muted); font-size: 11px; transition: color .2s ease; }
.footer-columns a:hover { color: var(--color-highlight); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 18px 0 24px;
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .14em;
}

/* ============================================================
   REVEALS / MOTION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: none; }

@keyframes pulse {
  0%,100% { transform: scale(.85); opacity: .65; }
  50% { transform: scale(1.35); opacity: 1; }
}
@keyframes orbitSpin { to { transform: rotate(332deg) scaleY(.42); } }
@keyframes orbitSpinReverse { to { transform: rotate(-304deg) scaleY(.42); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
  .page-shell { width: min(100% - 36px, 720px); }

  .hero-content { padding-top: 80px; }
  .hero-bottom { display: block; }
  .hero-bottom p { margin-bottom: 28px; }

  .intro-grid { grid-template-columns: 1fr; }
  .intro-orbit { display: none; }

  .featured-card { grid-template-columns: 1fr; }
  .featured-art { min-height: 430px; }
  .art-sphere { width: 260px; }
  .featured-details { padding: 38px; }

  .game-grid { grid-template-columns: 1fr 1fr; }
  .game-card-main { grid-column: 1 / -1; }

  .journey-grid { grid-template-columns: 1fr 1fr; }
  .journey-item:nth-child(2) { border-right: 0; }
  .journey-item:nth-child(-n+2) { border-bottom: 1px solid var(--color-line); }
}

@media (max-width: 620px) {
  .site-header { padding: 16px 18px; }
  .page-shell { width: calc(100% - 32px); }
  .hero-title { font-size: clamp(3.6rem, 17vw, 6rem); }
  .hero-corner { bottom: 18px; }
  .hero-corner-left { left: 18px; }
  .hero-corner-right { right: 18px; }
  .scroll-arrow { display: none; }

  .section { padding: 90px 0; }
  .section-top { display: block; }
  .section-top > p { margin-top: 24px; }
  .section-top .text-link { margin-top: 22px; }

  .featured-art { min-height: 340px; }
  .art-sphere { width: 210px; }
  .featured-details { padding: 28px; }

  .game-grid { grid-template-columns: 1fr; }
  .game-card-main { grid-column: auto; }
  .game-card-art { min-height: 330px; }

  .update-row { grid-template-columns: 38px 1fr 22px; }
  .update-date { display: none; }

  .journey-grid { grid-template-columns: 1fr; }
  .journey-item { min-height: 190px; border-right: 0; border-bottom: 1px solid var(--color-line); }
  .journey-item:last-child { border-bottom: 0; }
  .journey-item strong { margin-top: 35px; }

  .footer-main { display: block; padding: 70px 0; }
  .footer-columns { margin-top: 50px; grid-template-columns: 1fr 1fr; }
  .footer-columns > div:last-child { grid-column: 1 / -1; }
  .footer-bottom { display: block; line-height: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before, body::after, body > main::before,
  #backgroundCanvas, .hero-grid { transform: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pulse, .orbit-a, .orbit-b { animation: none; }
}
