/* ============================================================
   LAW OF THE ABYSS — Landing · base styles
   ============================================================ */

@font-face {
  font-family: 'Ethnocentric';
  src: url('../assets/font/Ethnocentric-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Core palette — deep space, violet accent */
  --bg-0: #060018;
  --bg-1: #0b0224;
  --bg-2: #14053a;
  --ink-0: #ffffff;
  --ink-1: #e6defc;
  --ink-2: #a497d0;
  --ink-3: #6b5f9a;
  --ink-4: #3b336a;

  /* Violets — from estilo visual.png */
  --violet-deep:   #2a0b5e;
  --violet-mid:    #5a1bb8;
  --violet:        #7b2cff;
  --violet-bright: #a46bff;
  --violet-light:  #c77dff;
  --violet-halo:   #e0aaff;

  /* Accents */
  --cyan:  #3ff1ff;
  --pink:  #ff4de0;
  --gold:  #ffd166;
  --gold-soft: #ffca3a;

  /* Rarity */
  --rarity-unique:    #ffd166;
  --rarity-abyssal:   #ff4de0;
  --rarity-mythic:    #ff7aa2;
  --rarity-legendary: #ffb84d;
  --rarity-epic:      #a46bff;
  --rarity-rare:      #4db8ff;
  --rarity-uncommon:  #6ee7a5;
  --rarity-common:    #c8c2e0;
  --rarity-free:      #8e86a8;

  /* Shadows / glows */
  --glow-violet: 0 0 20px rgba(164,107,255,0.55), 0 0 48px rgba(123,44,255,0.35);
  --glow-violet-strong: 0 0 30px rgba(199,125,255,0.75), 0 0 80px rgba(123,44,255,0.5);

  /* Geometry */
  --radius-sm: 4px;
  --radius: 10px;
  --radius-lg: 18px;

  --max-w: 1280px;

  --font-display: 'Ethnocentric', 'Orbitron', system-ui, sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  color: var(--ink-1);
  background: var(--bg-0);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden; /* the scroller handles scroll */
}

body {
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, #23085a 0%, transparent 60%),
    radial-gradient(ellipse 90% 70% at 80% 90%, #360a7a 0%, transparent 55%),
    linear-gradient(180deg, #050014 0%, #0b0224 100%);
  background-attachment: fixed;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  margin: 0 0 0.5em;
  color: var(--ink-0);
}

p { margin: 0 0 1em; color: var(--ink-1); }
em { color: var(--violet-halo); font-style: normal; }
strong { color: var(--ink-0); font-weight: 600; }

/* ---------- Snap scroller ---------- */
.snap-scroller {
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  /* proximity (not mandatory) so tall sections like Commanders can be
     scrolled through without being forcibly skipped. Short sections still
     snap crisply because they fit in a single viewport. */
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.snap-scroller::-webkit-scrollbar { display: none; }

.snap-section {
  scroll-snap-align: start;
  scroll-snap-stop: normal;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 32px 48px;
}

/* ---------- Backdrop layers ---------- */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.nebula {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);  /* halved from 80px — exponentially cheaper, still soft */
  opacity: 0.45;
  mix-blend-mode: screen;
}
.nebula-1 {
  width: 55vw;
  height: 55vw;
  top: -10vw;
  left: -12vw;
  background: radial-gradient(circle, #7b2cff 0%, #2a0b5e 40%, transparent 70%);
  /* animation removed: movement under blur(40px+) repaints the entire screen */
}
.nebula-2 {
  width: 60vw;
  height: 60vw;
  bottom: -15vw;
  right: -15vw;
  background: radial-gradient(circle, #c77dff 0%, #5a1bb8 35%, transparent 70%);
}

/* ---------- Top bar ---------- */
.top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 72px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 50;
  background: linear-gradient(180deg, rgba(5,0,20,0.96) 0%, rgba(5,0,20,0.6) 70%, rgba(5,0,20,0) 100%);
  /* backdrop-filter removed — too expensive when content scrolls behind it. */
}
.top-logo-link {
  display: inline-flex;
  align-items: center;
  transition: transform .25s, filter .25s;
}
.top-logo-link:hover { transform: scale(1.06); }
.top-logo {
  height: 38px;
  width: auto;
  filter: drop-shadow(0 0 14px rgba(164,107,255,0.7));
  transition: filter .25s;
}
.top-logo-link:hover .top-logo {
  filter: drop-shadow(0 0 22px rgba(199,125,255,0.95));
}
.top-nav {
  display: flex;
  gap: 28px;
}
.top-nav a {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-2);
  transition: color .3s, text-shadow .3s;
  position: relative;
}
.top-nav a::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -6px;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 1px;
  background: var(--violet-light);
  transition: transform .3s;
  box-shadow: 0 0 8px var(--violet-light);
}
.top-nav a:hover,
.top-nav a.active {
  color: var(--ink-0);
  text-shadow: 0 0 12px var(--violet-light);
}
.top-nav a:hover::after,
.top-nav a.active::after { transform: translateX(-50%) scaleX(1); }

/* ---------- Dots nav (right side) ---------- */
.section-dots {
  position: fixed;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 45;
}
.section-dots .dot {
  width: 10px; height: 10px;
  padding: 0;
  border: 1px solid var(--ink-3);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: all .3s;
}
.section-dots .dot:hover { border-color: var(--violet-light); }
.section-dots .dot.active {
  background: var(--violet-light);
  border-color: var(--violet-light);
  box-shadow: 0 0 10px var(--violet-light);
  transform: scale(1.2);
}

/* ---------- Utility ---------- */
.section-head { max-width: 980px; margin: 0 auto 40px; text-align: center; position: relative; z-index: 2; }
.section-head.compact { margin-bottom: 24px; }
.section-title {
  font-size: clamp(28px, 4.2vw, 54px);
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, var(--violet-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(199,125,255,0.25);
}
.section-lead {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--ink-2);
  max-width: 820px;
  margin: 0 auto;
}

.badge-inline {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  line-height: 1;
  padding: 4px 8px 4px 10px;
  border: 1px solid var(--rarity-unique);
  color: var(--rarity-unique);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(255,209,102,0.35);
}

/* ---------- Scroll hint ---------- */
.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.3em;
  z-index: 3;
  pointer-events: none;
  animation: fadePulse 2.8s ease-in-out infinite;
}
.scroll-hint-arrow {
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, var(--violet-light), transparent);
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .top-bar { padding: 0 16px; height: 60px; }
  .top-nav { display: none; }
  .section-dots { right: 10px; }
  .snap-section { padding: 80px 16px 32px; }
}
