/* ==========================================================================
   IGY.CLUB — design system
   One stylesheet for the whole site. No frameworks, no dependencies.
   Edit the tokens below to retheme everything at once.
   ========================================================================== */

:root {
  /* Palette */
  --bg: #08080a;
  --bg-raised: #0d0d10;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.065);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f6;
  --text-2: #9b9ba4;
  --text-3: #5f5f68;
  --accent: #8b7cff;            /* the one accent. change it, whole site follows */
  --accent-bright: #a89bff;
  --accent-soft: rgba(139, 124, 255, 0.13);
  --accent-glow: rgba(139, 124, 255, 0.35);

  /* Status colors */
  --ok: #6ee7a0;
  --demo: #7cc7ff;
  --soon: #8b8b93;
  --proto: #ffc46b;

  /* Shape + motion */
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Type — system stack: zero network cost, native on every OS */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  animation: page-in 0.5s var(--ease) both;
}

@keyframes page-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

::selection { background: var(--accent); color: #0a0a0c; }

/* --------------------------------------------------------------------------
   Ambient background — two fixed radial glows + a faint grid.
   Painted once, costs nothing at runtime.
   -------------------------------------------------------------------------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 70% -10%, rgba(139, 124, 255, 0.10), transparent 60%),
    radial-gradient(ellipse 50% 40% at 10% 110%, rgba(139, 124, 255, 0.05), transparent 60%);
}
.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 20%, transparent 75%);
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: min(1160px, 92vw);
  margin: 0 auto;
}

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

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(8, 8, 10, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.14em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--text); background: var(--surface); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 720px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 12px 4vw 20px;
    background: rgba(8, 8, 10, 0.97);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 12px 14px; font-size: 15px; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: clamp(90px, 16vh, 170px) 0 clamp(60px, 10vh, 110px);
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 7px 16px;
  border-radius: 99px;
  margin-bottom: 34px;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}
.hero h1 {
  font-size: clamp(64px, 13vw, 168px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  background: linear-gradient(180deg, #ffffff 30%, #b9b9c5 70%, #7e7e8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero .tagline {
  margin: 28px auto 0;
  max-width: 460px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-2);
}
.hero-actions {
  margin-top: 44px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 99px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.2s, border-color 0.2s;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--text);
  color: #0a0a0c;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.15);
}
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}
.btn-accent {
  background: var(--accent);
  color: #0a0a0c;
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}
.btn[disabled], .btn.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: clamp(56px, 9vh, 100px) 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}
.section-head .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-bright);
  display: block;
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.section-head .view-all {
  flex-shrink: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  padding-bottom: 6px;
  transition: color 0.2s;
  white-space: nowrap;
}
.section-head .view-all:hover { color: var(--text); }

/* Page header (interior pages) */
.page-head {
  padding: clamp(70px, 12vh, 120px) 0 clamp(30px, 5vh, 50px);
}
.page-head h1 {
  font-size: clamp(42px, 8vw, 84px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.page-head p {
  margin-top: 18px;
  max-width: 520px;
  color: var(--text-2);
  font-size: clamp(15px, 1.8vw, 17px);
}

/* --------------------------------------------------------------------------
   Card grid + cards
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
@media (max-width: 480px) {
  .grid, .grid.cols-2 { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.3s, background 0.3s;
  will-change: transform;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}
/* Cursor-tracking glow — driven by two CSS vars set in main.js. Cheap. */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%),
              rgba(139, 124, 255, 0.09), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }

.card-body { padding: 22px 24px 24px; }
.card-body h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.card-body p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}
.card-foot .btn { padding: 9px 18px; font-size: 13px; }

/* Cover art — pure CSS gradient placeholders. Swap for real images by
   putting an <img> inside .art (it will cover the area automatically). */
.art {
  aspect-ratio: 16 / 10;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.art .glyph {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-family: var(--mono);
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  z-index: 1;
}
.art.square { aspect-ratio: 1; border-bottom: 1px solid var(--border); }
.art.wide { aspect-ratio: 16 / 9; }

/* Gradient variants — assign art-1..art-6 to vary the placeholder covers */
.art-1 { background: linear-gradient(135deg, #1b1740 0%, #3a2d7a 50%, #14121f 100%); }
.art-2 { background: linear-gradient(135deg, #0e2e26 0%, #1d6b4f 55%, #101318 100%); }
.art-3 { background: linear-gradient(135deg, #33131c 0%, #7a2d43 50%, #17111a 100%); }
.art-4 { background: linear-gradient(135deg, #101722 0%, #2d4a7a 55%, #0d1015 100%); }
.art-5 { background: linear-gradient(135deg, #2e2410 0%, #7a5c2d 50%, #171310 100%); }
.art-6 { background: linear-gradient(135deg, #131313 0%, #3d3d44 55%, #0f0f11 100%); }
/* soft inner glow on every art block */
.art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 90% at 50% 0%, rgba(255,255,255,0.10), transparent 60%);
}

/* Play badge for video / music covers */
.play-badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(8, 8, 10, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 1;
  transition: transform 0.3s var(--ease), background 0.3s;
}
.play-badge::before {
  content: "";
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}
.card:hover .play-badge { transform: scale(1.1); background: var(--accent); }

/* --------------------------------------------------------------------------
   Status pills
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: rgba(8, 8, 10, 0.5);
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; }
.pill-playable { color: var(--ok); }       .pill-playable::before { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.pill-demo     { color: var(--demo); }     .pill-demo::before     { background: var(--demo); }
.pill-soon     { color: var(--soon); }     .pill-soon::before     { background: var(--soon); }
.pill-proto    { color: var(--proto); }    .pill-proto::before    { background: var(--proto); }
.art .pill { position: absolute; top: 14px; left: 14px; z-index: 2; }

/* --------------------------------------------------------------------------
   About / feature strip
   -------------------------------------------------------------------------- */
.about {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(60% 100% at 80% 0%, var(--accent-soft), transparent 60%),
    var(--surface);
  padding: clamp(36px, 6vw, 64px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 800px) { .about { grid-template-columns: 1fr; } }
.about h2 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.about p { color: var(--text-2); max-width: 480px; }
.about .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  background: rgba(8, 8, 10, 0.4);
}
.stat b {
  display: block;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.stat span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* --------------------------------------------------------------------------
   Contact / CTA
   -------------------------------------------------------------------------- */
.cta {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(70% 120% at 50% -20%, var(--accent-soft), transparent 65%),
    var(--surface);
  padding: clamp(48px, 8vw, 90px) 24px;
}
.cta h2 {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.035em;
}
.cta p { margin: 16px auto 32px; max-width: 420px; color: var(--text-2); }

.contact-list {
  display: grid;
  gap: 16px;
  max-width: 560px;
}
.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  transition: border-color 0.2s, background 0.2s, transform 0.3s var(--ease);
}
.contact-row:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  transform: translateX(4px);
}
.contact-row .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.contact-row .v { font-weight: 600; font-size: 15px; }

/* --------------------------------------------------------------------------
   Game detail page
   -------------------------------------------------------------------------- */
.game-frame-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  position: relative;
}
.game-frame-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.game-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.game-placeholder .inner p { color: var(--text-2); font-size: 14px; margin-top: 8px; }
.game-placeholder .inner code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--accent-bright);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 6px;
}
.game-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 22px 0 10px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 26px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--border);
  margin-top: clamp(40px, 8vh, 80px);
  padding: 44px 0 54px;
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.foot-inner .logo { opacity: 0.9; }
.foot-links { display: flex; gap: 22px; list-style: none; }
.foot-links a {
  font-size: 13px;
  color: var(--text-2);
  transition: color 0.2s;
}
.foot-links a:hover { color: var(--text); }
.foot-note {
  width: 100%;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--text-3);
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   Mini music player (floating, site-wide — built by assets/js/player.js)
   -------------------------------------------------------------------------- */
.mini-player {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px 8px 8px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: rgba(8, 8, 10, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
.mini-player .mp-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  display: grid;
  place-items: center;
  transition: color 0.2s, background 0.2s;
}
.mini-player .mp-btn:hover { color: var(--text); background: var(--surface-hover); }
.mini-player .mp-play {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.mini-player.playing .mp-play { background: var(--accent); color: #0a0a0c; border-color: transparent; }
.mini-player .mp-title {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-left: 8px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-player.playing .mp-title { color: var(--accent-bright); }
@media (max-width: 720px) {
  .mini-player { left: 10px; bottom: 10px; }
  .mini-player .mp-title { max-width: 90px; }
}

/* Music cards — now-playing state (player.js toggles it) */
.card.now-playing { border-color: var(--accent); }
.card.now-playing .play-badge { background: var(--accent); }
.card.now-playing .play-badge::before {
  border-width: 0;
  width: 12px;
  height: 14px;
  border-left: 4px solid #fff;
  border-right: 4px solid #fff;
  margin-left: 0;
}

/* --------------------------------------------------------------------------
   Scroll reveal — elements with .reveal fade/rise in once, via main.js.
   Falls back to fully visible if JS is off or reduced motion is on.
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.07s; }
.reveal.d2 { transition-delay: 0.14s; }
.reveal.d3 { transition-delay: 0.21s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
.no-js .reveal { opacity: 1; transform: none; }
