/* =============================================
   base.css — Reset, global styles, background
   ============================================= */

/* ----- Reset ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #050510;
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
}

a { text-decoration: none; }
ul { list-style: none; }
img { display: block; }

/* ----- Scrollbar ----- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #050510; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7B2FBE, #C9A227);
  border-radius: 3px;
}

/* ----- Grain overlay ----- */
/* Oversized so translate() never reveals a bare edge — fixes the flicker bug */
.grain-overlay {
  position: fixed;
  top: -10%; left: -10%;
  width: 120%; height: 120%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' 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)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grain 0.9s steps(1) infinite;
  will-change: background-position;
}

@keyframes grain {
  0%   { background-position: 0px 0px; }
  10%  { background-position: -10px -15px; }
  20%  { background-position: 15px 10px; }
  30%  { background-position: -5px 20px; }
  40%  { background-position: 20px -5px; }
  50%  { background-position: -15px 15px; }
  60%  { background-position: 10px -20px; }
  70%  { background-position: -20px 5px; }
  80%  { background-position: 5px -10px; }
  90%  { background-position: -10px 20px; }
  100% { background-position: 0px 0px; }
}

/* ----- Background base ----- */
.bg-base {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(123,47,190,0.10) 0%, rgba(5,5,16,0) 70%),
    radial-gradient(ellipse at 100% 100%, rgba(201,162,39,0.05) 0%, rgba(5,5,16,0) 60%),
    #050510;
}

/* ----- Orbs — comfortable middle speed, eye-friendly opacity ----- */
.orb {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
}

.orb-purple-tl {
  z-index: 0; width: 600px; height: 600px; top: -200px; left: -200px;
  background: radial-gradient(circle, rgba(123,47,190,0.22) 0%, rgba(123,47,190,0) 70%);
  filter: blur(55px);
  animation: breathe 12s ease-in-out infinite;
}
.orb-gold-tr {
  z-index: 0; width: 500px; height: 500px; top: -100px; right: -150px;
  background: radial-gradient(circle, rgba(201,162,39,0.14) 0%, rgba(201,162,39,0) 70%);
  filter: blur(65px);
  animation: breathe-gold 14s ease-in-out infinite 1.5s;
}
.orb-purple-center {
  z-index: 0; width: 800px; height: 800px; top: 30%; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(157,78,221,0.10) 0%, rgba(157,78,221,0) 70%);
  filter: blur(75px);
  animation: breathe-slow 16s ease-in-out infinite;
}
.orb-purple-br {
  z-index: 0; width: 700px; height: 700px; bottom: -200px; right: -200px;
  background: radial-gradient(circle, rgba(123,47,190,0.18) 0%, rgba(123,47,190,0) 70%);
  filter: blur(60px);
  animation: breathe 13s ease-in-out infinite 3s;
}
.orb-gold-bl {
  z-index: 0; width: 400px; height: 400px; bottom: 10%; left: -100px;
  background: radial-gradient(circle, rgba(201,162,39,0.10) 0%, rgba(201,162,39,0) 70%);
  filter: blur(55px);
  animation: breathe-gold 15s ease-in-out infinite 2s;
}

@keyframes breathe {
  0%,100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.1); }
}
@keyframes breathe-slow {
  0%,100% { opacity: 0.45; transform: scale(1); }
  50%     { opacity: 0.9;  transform: scale(1.12); }
}
@keyframes breathe-gold {
  0%,100% { opacity: 0.4; transform: scale(1); }
  50%     { opacity: 0.9; transform: scale(1.08); }
}

/* ----- Scan lines ----- */
.scanlines {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  background-image: repeating-linear-gradient(
    0deg,
    transparent, transparent 2px,
    rgba(191,90,242,0.008) 2px, rgba(191,90,242,0.008) 4px
  );
}

/* ----- Star field canvas ----- */
#starfield {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

/* ----- Content layer ----- */
.content-layer {
  position: relative;
  z-index: 2;
}

/* ----- Shared section helpers ----- */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #BF5AF2;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.section-subtitle {
  font-size: 1.05rem;
  color: rgba(180,180,210,0.6);
  max-width: 500px;
  line-height: 1.7;
  margin: 0 auto;
}

.section-divider-line {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(191,90,242,0.3), rgba(201,162,39,0.3), transparent);
  max-width: 1100px;
  margin: 3rem auto 0;
}

/* ----- Shared buttons ----- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #BF5AF2, #9b3fd4);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: box-shadow 0.3s, transform 0.2s;
}
.btn-primary:hover {
  box-shadow: 0 0 26px rgba(191,90,242,0.5), 0 8px 24px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 32px;
  border-radius: 10px;
  background: transparent;
  color: rgba(200,200,220,0.85);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(191,90,242,0.35);
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s, color 0.2s;
}
.btn-secondary:hover {
  border-color: rgba(191,90,242,0.8);
  box-shadow: 0 0 16px rgba(191,90,242,0.22);
  color: #fff;
  transform: translateY(-2px);
}