/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
  --clr-bg:        #03040a;
  --clr-surface:   #080a16;
  --clr-surface-2: #0d1020;
  --clr-accent:    #7c5cfc;
  --clr-accent-2:  #00d4ff;
  --clr-gold:      #f0b400;
  --clr-text:      #e8eaf6;
  --clr-muted:     #8892b0;
  --clr-border:    rgba(255,255,255,0.07);

  --font-heading: 'Georgia', serif;
  --font-body:    system-ui, -apple-system, sans-serif;

  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:   cubic-bezier(0.25, 0.1, 0.25, 1);
  --anim-dur:      0.75s;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: clamp(15px, 1.1vw, 17px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: rgba(124, 92, 252, 0.35);
  color: #fff;
}

a { text-decoration: none; color: inherit; }

body:has(.cursor) { cursor: none; }
body:has(.cursor) a,
body:has(.cursor) button { cursor: none; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

/* =============================================
   SCROLL PROGRESS BAR
   ============================================= */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2), var(--clr-gold));
  z-index: 10001;
  transition: none;
  will-change: width;
}

/* =============================================
   MAIN CONTENT WRAPPER (for sticky footer)
   ============================================= */
.main-content {
  position: relative;
  z-index: 2;
  background: var(--clr-bg);
  will-change: transform, border-radius;
}

/* =============================================
   STARS CANVAS (2D fallback + 3D hero)
   ============================================= */
#stars-canvas,
#stars-canvas-3d {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
#stars-canvas-3d {
  display: none;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  transition: opacity 0.8s ease-out 0.2s;
}
/* Gdy 3D startuje pomyślnie - ukryj 2D fallback i stare CSS planety */
body.stars-3d-active #stars-canvas { display: none; }
body.stars-3d-active #stars-canvas-3d { display: block; opacity: 1; }
body.stars-3d-active .floating-planet,
body.stars-3d-active .orbit-ring,
body.stars-3d-active .parallax-bg { display: none; }

/* =============================================
   PRELOADER - SPLIT REVEAL
   ============================================= */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--clr-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preloader__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  z-index: 2;
}

.preloader__logo {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  font-weight: 700;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.08em;
}

.preloader__bar {
  width: clamp(200px, 40vw, 300px);
  height: 1px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.preloader__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2));
  border-radius: 2px;
  transition: width 0.1s ease-out;
}

.preloader__counter {
  font-family: var(--font-body);
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  color: var(--clr-text);
  opacity: 0.06;
  line-height: 1;
  letter-spacing: -0.03em;
}

/* Split panels for cinematic reveal */
.preloader__panel {
  position: absolute;
  left: 0; right: 0;
  background: var(--clr-bg);
  z-index: 1;
  will-change: transform;
}
.preloader__panel--top {
  top: 0;
  height: 50%;
  transform-origin: top;
}
.preloader__panel--bottom {
  bottom: 0;
  height: 50%;
  transform-origin: bottom;
}

/* =============================================
   CUSTOM CURSOR
   ============================================= */
.cursor, .cursor-follower {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  will-change: transform;
}

.cursor {
  width: 6px; height: 6px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cursor-follower {
  width: 44px; height: 44px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--ease-out-expo), height 0.4s var(--ease-out-expo),
              border-color 0.3s, background 0.3s, border-radius 0.4s;
}

.cursor.is-active {
  background: var(--clr-accent);
  transform: translate(-50%, -50%) scale(1.5);
}

.cursor-follower.is-active {
  width: 64px; height: 64px;
  border-color: var(--clr-accent);
  background: rgba(124,92,252,0.08);
}

/* Text cursor mode for links */
.cursor-follower.is-text {
  width: 80px; height: 80px;
  border-radius: 50%;
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.03);
}

@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-follower { display: none !important; }
  html, a, button { cursor: auto !important; }
}

/* =============================================
   FILM GRAIN OVERLAY
   ============================================= */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
}

.grain::after {
  content: '';
  position: fixed;
  inset: -100%;
  width: 300%; height: 300%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
  animation: grain 0.5s steps(8) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  30% { transform: translate(3%, -15%); }
  50% { transform: translate(12%, 9%); }
  70% { transform: translate(9%, 4%); }
  90% { transform: translate(-1%, 7%); }
}

/* =============================================
   TRANSITION OVERLAY
   ============================================= */
.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: var(--clr-accent);
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}

/* =============================================
   BUTTONS - with ripple & glow
   ============================================= */
.btn-primary, .btn-outline, .btn-ghost {
  display: inline-block;
  padding: 0.8em 2em;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  transition: all 0.35s var(--ease-out-expo);
  will-change: transform;
  position: relative;
  overflow: hidden;
}

/* Ripple effect */
.btn-primary::after, .btn-outline::after, .btn-ghost::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%),
    rgba(255,255,255,0.2) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s;
}
.btn-primary:hover::after, .btn-outline:hover::after, .btn-ghost:hover::after {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
  color: #fff;
  box-shadow: 0 0 30px rgba(124,92,252,0.35),
              0 0 60px rgba(124,92,252,0.1);
  border: none;
}
.btn-primary:hover {
  box-shadow: 0 0 40px rgba(124,92,252,0.55),
              0 0 80px rgba(124,92,252,0.2);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--clr-text);
  background: transparent;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--clr-muted);
  background: rgba(255,255,255,0.03);
}
.btn-secondary:hover {
  border-color: rgba(255,255,255,0.35);
  color: var(--clr-text);
  background: rgba(255,255,255,0.06);
}

.btn-ghost {
  border: 1px solid rgba(124,92,252,0.3);
  color: var(--clr-accent);
  background: transparent;
}
.btn-ghost:hover {
  background: rgba(124,92,252,0.08);
  border-color: var(--clr-accent);
  transform: translateY(-2px);
}

.btn-sm { padding: 0.55em 1.4em; font-size: 0.83rem; }

/* =============================================
   HEADER / NAV
   ============================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0;
  transition: background 0.5s, box-shadow 0.5s, padding 0.3s;
}

.site-header.scrolled {
  background: rgba(3, 4, 10, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04),
              0 4px 30px rgba(0,0,0,0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  will-change: transform;
}

.logo-star {
  font-size: 1.2rem;
  color: var(--clr-accent);
  filter: drop-shadow(0 0 10px rgba(124,92,252,0.9));
  animation: starPulse 3s ease-in-out infinite;
}

@keyframes starPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(124,92,252,0.8)); transform: scale(1); }
  50% { filter: drop-shadow(0 0 16px rgba(124,92,252,1)); transform: scale(1.1); }
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 400;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.main-nav a {
  padding: 0.45em 0.8em;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--clr-muted);
  transition: color 0.25s, background 0.25s;
  white-space: nowrap;
  position: relative;
}

.main-nav a::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--clr-accent);
  transition: width 0.3s var(--ease-out-expo), left 0.3s var(--ease-out-expo);
}

.main-nav a:hover {
  color: var(--clr-text);
}

.main-nav a:hover::before {
  width: 60%;
  left: 20%;
}

.main-nav .nav-cta {
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
  color: #fff !important;
  padding: 0.45em 1.1em;
  box-shadow: 0 0 20px rgba(124,92,252,0.3);
}
.main-nav .nav-cta::before { display: none; }
.main-nav .nav-cta:hover {
  box-shadow: 0 0 35px rgba(124,92,252,0.55);
  background: linear-gradient(135deg, #8f6eff, #00e5ff);
}

.header-social {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header-social a {
  color: var(--clr-muted);
  transition: color 0.25s, transform 0.25s;
}
.header-social a:hover {
  color: var(--clr-text);
  transform: scale(1.15);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.4rem;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  z-index: 1;
  padding-top: 72px;
}

.parallax-bg {
  position: absolute;
  inset: -20% 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% 40%,
      rgba(124,92,252,0.18) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 70% 65%,
      rgba(0,212,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 30% 30% at 20% 30%,
      rgba(240,180,0,0.04) 0%, transparent 50%);
  will-change: transform;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  padding: 2rem;
}

.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--clr-accent-2);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.05;
  font-weight: 400;
  margin-bottom: 1.8rem;
  font-weight: 700;
}

.hero-title .line {
  will-change: transform;
}

.hero-title .accent {
  background: linear-gradient(120deg, var(--clr-accent), var(--clr-accent-2), var(--clr-gold));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--clr-muted);
  margin-bottom: 2.8rem;
  line-height: 1.8;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Floating planets */
.floating-planet {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}
.planet-a {
  width: clamp(100px, 16vw, 240px);
  height: clamp(100px, 16vw, 240px);
  background: radial-gradient(circle at 35% 35%, #a97fff, #4a2fa0 50%, #1a0f3e);
  top: 12%; right: 5%;
  box-shadow: 0 0 80px rgba(124,92,252,0.3), inset -18px -18px 40px rgba(0,0,0,0.5);
  animation: floatA 9s ease-in-out infinite;
}
.planet-b {
  width: clamp(55px, 7vw, 95px);
  height: clamp(55px, 7vw, 95px);
  background: radial-gradient(circle at 40% 30%, #ffd580, #e06020 50%, #3d1200);
  bottom: 22%; left: 6%;
  box-shadow: 0 0 45px rgba(255,153,0,0.25), inset -10px -10px 25px rgba(0,0,0,0.5);
  animation: floatB 7s ease-in-out infinite;
}
.orbit-ring {
  position: absolute;
  top: calc(12% - 28px); right: calc(5% - 28px);
  width: clamp(160px, 24vw, 296px);
  height: clamp(160px, 24vw, 296px);
  border: 1px solid rgba(124,92,252,0.15);
  border-radius: 50%;
  pointer-events: none;
  animation: spin 30s linear infinite;
}
.orbit-ring::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  background: radial-gradient(circle at 35% 35%, #ccc, #555);
  border-radius: 50%;
  top: -5px; left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px rgba(200,200,255,0.6);
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  z-index: 3;
}
.scroll-hint span {
  display: block;
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--clr-accent-2);
  border-bottom: 1.5px solid var(--clr-accent-2);
  transform: rotate(45deg);
  opacity: 0;
  animation: scrollPulse 1.8s ease-in-out infinite;
}
.scroll-hint span:nth-child(2) { animation-delay: 0.2s; }
.scroll-hint span:nth-child(3) { animation-delay: 0.4s; }

/* =============================================
   SECTION HELPERS
   ============================================= */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--clr-accent-2);
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.15;
  font-weight: 700;
}

.section-sub {
  color: var(--clr-muted);
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

/* =============================================
   SECTION DIVIDER - glowing line
   ============================================= */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-accent), var(--clr-accent-2), transparent);
  opacity: 0.3;
  margin: 0;
}

/* =============================================
   COSMIC SCALE - scroll-story
   ============================================= */
.cosmic-scale-section {
  position: relative;
  height: 400vh;  /* 4 kroki × 100vh */
  background: #03040a;
}
.cosmic-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}
#cosmic-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.cosmic-overlay {
  position: absolute; inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(1.2rem, 4vw, 3rem);
  pointer-events: none;
  z-index: 2;
}
.cosmic-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.cosmic-header .section-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--clr-accent-2);
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.cosmic-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin-top: 0.6rem;
  background: linear-gradient(120deg, #fff, #c8d9ff 40%, #7c5cfc 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cosmic-steps {
  align-self: end;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.cosmic-step {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  background: rgba(10, 14, 28, 0.55);
  border: 1px solid var(--clr-border);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.5s ease, border-color 0.5s ease, transform 0.5s ease;
  opacity: 0.55;
}
.cosmic-step.active {
  opacity: 1;
  background: rgba(124, 92, 252, 0.18);
  border-color: rgba(124, 92, 252, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(124, 92, 252, 0.2);
}
.cosmic-step-num {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--clr-accent-2);
  opacity: 0.7;
  line-height: 1;
  flex-shrink: 0;
}
.cosmic-step.active .cosmic-step-num { opacity: 1; color: var(--clr-gold); }
.cosmic-step-body h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin: 0 0 0.15rem;
  color: #e8eaf6;
}
.cosmic-step-body p {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--clr-muted);
  margin: 0;
}
.cosmic-hint {
  position: absolute;
  bottom: clamp(1rem, 4vw, 2rem);
  right: clamp(1rem, 4vw, 2rem);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(180, 195, 230, 0.6);
  animation: cosmicBob 2.2s ease-in-out infinite;
}
@keyframes cosmicBob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(4px); }
}
@media (max-width: 900px) {
  .cosmic-steps { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
}
@media (max-width: 520px) {
  .cosmic-steps { grid-template-columns: 1fr; gap: 0.5rem; max-width: 320px; }
  .cosmic-step-body p { font-size: 0.72rem; }
  .cosmic-hint { display: none; }
}

/* =============================================
   ISSUES SECTION
   ============================================= */
.issues-section {
  position: relative;
  z-index: 1;
  padding: 7rem 0;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(8,10,22,0.97) 8%,
    rgba(8,10,22,0.97) 92%,
    transparent 100%);
}

.issues-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.issue-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s;
  will-change: transform;
  transform-style: preserve-3d;
  position: relative;
}

/* Mouse-follow glow */
.issue-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(124,92,252,0.08) 0%,
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 0;
  pointer-events: none;
}
.issue-card:hover::before {
  opacity: 1;
}

.issue-card:hover {
  border-color: rgba(124,92,252,0.3);
  box-shadow: 0 25px 60px rgba(0,0,0,0.5),
              0 0 40px rgba(124,92,252,0.08);
}

.issue-cover {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.issue-featured .issue-cover { height: 300px; }

/* Cover gradients */
.cover-165 {
  background:
    radial-gradient(circle at 55% 35%, rgba(0,212,255,0.28) 0%, transparent 55%),
    linear-gradient(135deg, #020a14 0%, #051830 50%, #010508 100%);
}
.cover-164 {
  background:
    radial-gradient(ellipse 70% 80% at 60% 40%,
      rgba(40,20,80,0.9) 0%, transparent 70%),
    linear-gradient(135deg, #0a0520 0%, #1a0550 40%, #050210 100%);
}
.cover-163 {
  background:
    radial-gradient(circle at 40% 50%, rgba(0,100,200,0.4) 0%, transparent 60%),
    linear-gradient(135deg, #020818 0%, #041040 50%, #010510 100%);
}

.issue-cover::before {
  content: '\00B7 \00B7 \2726 \00B7 \2726 \00B7  \00B7 \2726  \00B7 \00B7 \2726 \00B7 \00B7 \2726 \00B7';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.1);
  letter-spacing: 0.3em;
  line-height: 2;
  padding: 1rem;
  word-break: break-all;
}

.issue-number-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  background: rgba(124,92,252,0.8);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25em 0.75em;
  border-radius: 50px;
  letter-spacing: 0.06em;
  z-index: 2;
}

.issue-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 40%,
    rgba(124,92,252,0.2) 0%, transparent 65%);
  pointer-events: none;
}

.issue-info {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.issue-date {
  font-size: 0.72rem;
  color: var(--clr-accent-2);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.issue-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  font-weight: 700;
}

.issue-featured .issue-title { font-size: 1.6rem; }

.issue-desc {
  color: var(--clr-muted);
  font-size: 0.86rem;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.issue-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.issue-price {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--clr-accent-2);
}

.issue-price-old {
  font-size: 0.82rem;
  color: var(--clr-muted);
  text-decoration: line-through;
}

/* =============================================
   MARQUEE
   ============================================= */
.marquee-section {
  position: relative;
  z-index: 1;
  padding: 2.5rem 0;
  overflow: hidden;
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
  background: rgba(8,10,22,0.97);
}

.marquee {
  overflow: hidden;
  white-space: nowrap;
}

.marquee__inner {
  display: inline-flex;
  align-items: center;
  gap: 0;
  will-change: transform;
}

.marquee__inner span {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.06);
  padding: 0 1.2rem;
  font-weight: 400;
  font-weight: 700;
  flex-shrink: 0;
  transition: color 0.5s;
}

.marquee:hover .marquee__inner span {
  color: rgba(255,255,255,0.12);
}

.marquee__dot {
  font-size: clamp(0.6rem, 1vw, 0.9rem) !important;
  color: rgba(124,92,252,0.15) !important;
  font-style: normal !important;
}

/* =============================================
   PARALLAX NEBULA
   ============================================= */
.parallax-nebula {
  position: relative;
  z-index: 1;
  height: clamp(400px, 55vh, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.nebula-bg {
  position: absolute;
  inset: -30% 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 50%,
      rgba(124,92,252,0.2) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 25% 45%,
      rgba(0,212,255,0.1) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 75% 60%,
      rgba(240,180,0,0.05) 0%, transparent 50%);
  will-change: transform;
}

.nebula-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3,4,10,0.5);
}

.parallax-text {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 2rem;
}
.parallax-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  margin-bottom: 1.2rem;
  font-weight: 700;
}
.parallax-text p {
  color: var(--clr-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* =============================================
   TOPICS - HORIZONTAL SCROLL
   ============================================= */
.topics-section {
  position: relative;
  z-index: 1;
  padding: 7rem 0 4rem;
  background: rgba(8,10,22,0.97);
  overflow: hidden;
}

.topics-grid {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 1rem 0 2rem;
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
.topics-grid::-webkit-scrollbar { display: none; }

.topic-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  min-width: 300px;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: transform 0.4s var(--ease-spring), border-color 0.3s, background 0.3s;
  position: relative;
  overflow: hidden;
}

/* Gradient glow on hover */
.topic-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out-expo);
}

.topic-card:hover {
  transform: translateY(-8px);
  border-color: rgba(124,92,252,0.25);
  background: rgba(124,92,252,0.03);
}
.topic-card:hover::after {
  transform: scaleX(1);
}

.topic-icon {
  font-size: 2.2rem;
  margin-bottom: 1.2rem;
  display: block;
}

.topic-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 400;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.topic-card p {
  color: var(--clr-muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

/* Scroll indicator dots */
.topics-scroll-hint {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.topics-scroll-hint span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.3s, transform 0.3s;
}
.topics-scroll-hint span.active {
  background: var(--clr-accent);
  transform: scale(1.4);
}

/* Sticky section header on scroll */
.topics-section .section-header {
  position: relative;
  z-index: 5;
  padding: 1rem 0;
}

/* =============================================
   EVENT SECTION - Low Gravity Show
   ============================================= */
.event-section {
  position: relative;
  z-index: 1;
  height: clamp(420px, 55vh, 640px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.event-bg {
  position: absolute;
  inset: -30% 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%,
      rgba(240,180,0,0.12) 0%,
      rgba(124,92,252,0.12) 50%,
      transparent 75%);
  will-change: transform;
}

.event-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3,4,10,0.55);
}

.event-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 2rem;
}

.event-tag {
  display: inline-block;
  background: rgba(240,180,0,0.1);
  border: 1px solid rgba(240,180,0,0.25);
  color: var(--clr-gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.4em 1.2em;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

.event-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  margin-bottom: 1.2rem;
  font-weight: 700;
}

.event-desc {
  color: var(--clr-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

/* =============================================
   ARCHIVE SECTION
   ============================================= */
.archive-section {
  position: relative;
  z-index: 1;
  padding: 7rem 0;
  background: rgba(8,10,22,0.97);
}

.archive-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding: 3.5rem 2.5rem;
  border: 1px solid var(--clr-border);
  border-radius: 28px;
  background: rgba(124,92,252,0.03);
  position: relative;
  overflow: hidden;
}

/* Subtle animated border */
.archive-cta::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 28px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(124,92,252,0.2), transparent 40%, transparent 60%, rgba(0,212,255,0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.archive-stat {
  text-align: center;
}

.archive-num {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 400;
  font-weight: 700;
  background: linear-gradient(120deg, var(--clr-accent), var(--clr-accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.archive-stat p {
  color: var(--clr-muted);
  font-size: 0.85rem;
}

.archive-btn {
  flex-shrink: 0;
}

/* =============================================
   NEWSLETTER SECTION
   ============================================= */
.newsletter-section {
  position: relative;
  z-index: 1;
  padding: 5rem 0;
  background: rgba(5,6,14,0.98);
  overflow: hidden;
}

.newsletter-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-inner .section-title {
  margin-bottom: 0.8rem;
}

.newsletter-desc {
  color: var(--clr-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 0.85em 1.4em;
  border-radius: 50px;
  border: 1px solid var(--clr-border);
  background: rgba(255,255,255,0.03);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.newsletter-input::placeholder {
  color: var(--clr-muted);
  opacity: 0.6;
}
.newsletter-input:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 0 20px rgba(124,92,252,0.15);
}

.newsletter-form .btn-primary {
  flex-shrink: 0;
  padding: 0.85em 1.8em;
}

.newsletter-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--clr-muted);
  opacity: 0.5;
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about-section {
  position: relative;
  z-index: 1;
  padding: 7rem 0;
  background: rgba(5,6,14,0.98);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text .section-eyebrow { text-align: left; }
.about-text .section-title {
  text-align: left;
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--clr-muted);
  margin-bottom: 1rem;
  font-size: 0.92rem;
  line-height: 1.8;
}

.about-text p strong { color: var(--clr-text); }

.about-contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--clr-accent-2);
  font-size: 0.88rem;
  transition: opacity 0.25s, transform 0.25s;
}
.contact-item:hover {
  opacity: 0.8;
  transform: translateX(4px);
}
.contact-item svg { flex-shrink: 0; }

/* Magazine mockup */
.about-visual {
  display: flex;
  justify-content: center;
}

.magazine-mockup {
  perspective: 800px;
}

.mock-cover {
  position: relative;
  width: 270px;
  height: 360px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0a0520 0%, #1a0550 40%, #030210 100%);
  border: 1px solid rgba(124,92,252,0.25);
  box-shadow:
    0 0 80px rgba(124,92,252,0.25),
    0 50px 100px rgba(0,0,0,0.6),
    inset 0 0 40px rgba(124,92,252,0.04);
  overflow: hidden;
  transform: rotateY(-8deg) rotateX(3deg);
  transition: box-shadow 0.5s;
  will-change: transform;
}

.magazine-mockup:hover .mock-cover {
  box-shadow: 0 0 100px rgba(124,92,252,0.4), 0 50px 120px rgba(0,0,0,0.6);
}

.mock-title {
  position: absolute;
  top: 1.4rem; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 400;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  z-index: 2;
}

.mock-issue {
  position: absolute;
  top: 3.5rem; left: 0; right: 0;
  text-align: center;
  font-size: 0.6rem;
  color: var(--clr-accent-2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  z-index: 2;
  font-weight: 500;
}

.mock-headline {
  position: absolute;
  bottom: 3.5rem; left: 1.4rem; right: 1.4rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  z-index: 2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.85);
}

.mock-planet {
  position: absolute;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    rgba(160,120,255,0.8),
    rgba(60,20,120,0.9) 55%,
    rgba(10,4,30,0.95));
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  box-shadow: 0 0 50px rgba(124,92,252,0.4);
  z-index: 1;
}

.mock-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle 1px at 20% 25%, rgba(255,255,255,0.7) 1px, transparent 1px),
    radial-gradient(circle 1px at 75% 15%, rgba(255,255,255,0.6) 1px, transparent 1px),
    radial-gradient(circle 1px at 88% 60%, rgba(255,255,255,0.5) 1px, transparent 1px),
    radial-gradient(circle 1px at 10% 70%, rgba(255,255,255,0.6) 1px, transparent 1px),
    radial-gradient(circle 1px at 55% 85%, rgba(255,255,255,0.4) 1px, transparent 1px),
    radial-gradient(circle 1px at 40% 10%, rgba(255,255,255,0.7) 1px, transparent 1px),
    radial-gradient(circle 1px at 92% 38%, rgba(255,255,255,0.5) 1px, transparent 1px);
  z-index: 1;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  padding: 6rem 0 0;
  background: rgba(3,4,10,1);
  overflow: hidden;
}

.footer-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%,
    rgba(124,92,252,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 3rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--clr-border);
}

.footer-logo { margin-bottom: 1rem; }

.footer-brand p {
  color: var(--clr-muted);
  font-size: 0.86rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}
.footer-social a {
  font-size: 0.8rem;
  color: var(--clr-muted);
  padding: 0.35em 0.85em;
  border: 1px solid var(--clr-border);
  border-radius: 50px;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.footer-social a:hover {
  color: var(--clr-text);
  border-color: rgba(124,92,252,0.3);
  background: rgba(124,92,252,0.05);
}

.footer-links h4 {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: var(--clr-muted);
  font-size: 0.86rem;
  transition: color 0.25s, transform 0.25s;
  display: inline-block;
}
.footer-links a:hover {
  color: var(--clr-text);
  transform: translateX(3px);
}

.footer-contact h4 {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.footer-contact a {
  display: block;
  color: var(--clr-accent-2);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  transition: opacity 0.25s;
}
.footer-contact a:hover { opacity: 0.75; }

.footer-bottom {
  text-align: center;
  padding: 1.75rem 0;
  color: rgba(136,146,176,0.3);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

/* =============================================
   KEYFRAMES
   ============================================= */
@keyframes floatA {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-22px) rotate(4deg); }
}
@keyframes floatB {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-16px) rotate(-6deg); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes scrollPulse {
  0%   { opacity: 0; transform: rotate(45deg) translate(-4px,-4px); }
  50%  { opacity: 0.75; }
  100% { opacity: 0; transform: rotate(45deg) translate(4px,4px); }
}

/* =============================================
   LEGACY REVEAL CLASSES (backward compat for subpages)
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(44px);
  transition:
    opacity var(--anim-dur) var(--ease-out-expo),
    transform var(--anim-dur) var(--ease-out-expo);
  transition-delay: var(--card-delay, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition:
    opacity var(--anim-dur) var(--ease-out-expo),
    transform var(--anim-dur) var(--ease-out-expo);
  transition-delay: var(--card-delay, 0s);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition:
    opacity var(--anim-dur) var(--ease-out-expo),
    transform var(--anim-dur) var(--ease-out-expo);
  transition-delay: var(--card-delay, 0s);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition:
    opacity var(--anim-dur) var(--ease-out-expo),
    transform var(--anim-dur) var(--ease-spring);
  transition-delay: var(--card-delay, 0s);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* =============================================
   REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .parallax-bg, .nebula-bg, .event-bg { transform: none !important; }
  .grain { display: none; }
  [data-animate] { opacity: 1 !important; transform: none !important; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .main-nav a { padding: 0.4em 0.55em; font-size: 0.8rem; }
  .issues-grid { grid-template-columns: 1fr 1fr; }
  .issue-featured { grid-column: 1 / -1; }
  .issue-featured .issue-info { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: end; }
  .issue-featured .issue-desc { grid-column: 1 / -1; }
  .about-inner { grid-template-columns: 1fr; gap: 3rem; }
  .about-visual { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .newsletter-form { flex-direction: column; }
}

@media (max-width: 768px) {
  html, a, button { cursor: auto !important; }

  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: rgba(3,4,10,0.97);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    border-bottom: 1px solid var(--clr-border);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { display: block; padding: 0.75rem 0.5rem; font-size: 1rem; border-radius: 0; border-bottom: 1px solid var(--clr-border); }
  .main-nav a::before { display: none; }
  .main-nav .nav-cta { border-radius: 8px; border-bottom: none; margin-top: 1rem; text-align: center; }
  .header-social { display: none; }

  .issues-grid { grid-template-columns: 1fr; }
  .issue-featured .issue-info { display: block; }

  .nebula-bg { inset: 0; }
  .archive-cta { gap: 2rem; }

  .topic-card { min-width: 260px; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer { position: relative; }

  .parallax-bg, .nebula-bg, .event-bg {
    transform: none !important;
    inset: 0;
  }
  .floating-planet { animation-duration: 0s; position: absolute; }
  .orbit-ring { display: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.4rem; }
  .orbit-ring { display: none; }
  .mock-cover { width: 210px; height: 280px; }
  .topic-card { min-width: 240px; }
}
