/* ============================================================
   Base Typography & Layout (Cyberpunk Edition)
   ============================================================ */

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: center center;
  transition:
    background-color var(--transition-slow),
    color var(--transition-slow),
    background-image var(--transition-slow);
  position: relative;
}

/* ---- CRT Scanline Overlay ---- */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: crt-flicker 0.15s infinite;
}

/* ---- CRT screen curvature (subtle vignette) ---- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 60%,
    rgba(8, 5, 22, 0.4) 100%
  );
}

/* ============================================================
   Typography Scale
   ============================================================ */

h1 { font-size: var(--font-size-5xl); font-weight: var(--font-weight-extrabold); line-height: var(--line-height-tight); }
h2 { font-size: var(--font-size-3xl); font-weight: var(--font-weight-bold); line-height: var(--line-height-tight); }
h3 { font-size: var(--font-size-2xl); font-weight: var(--font-weight-semibold); line-height: var(--line-height-tight); }
h4 { font-size: var(--font-size-xl); font-weight: var(--font-weight-medium); line-height: var(--line-height-tight); }
h5 { font-size: var(--font-size-lg); font-weight: var(--font-weight-medium); }
h6 { font-size: var(--font-size-base); font-weight: var(--font-weight-medium); }

@media (max-width: 768px) {
  h1 { font-size: var(--font-size-4xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }
}

/* ============================================================
   Container
   ============================================================ */

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

/* ============================================================
   Section
   ============================================================ */

.section {
  padding: var(--space-4xl) 0;
  position: relative;
}

.section--alt {
  background-color: var(--color-bg-secondary);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section__tag {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent-cyan);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: var(--space-sm);
  position: relative;
  text-shadow: 0 0 10px rgba(0, 255, 240, 0.5);
}

.section__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-md);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.section__divider-line {
  width: 60px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px rgba(0, 255, 240, 0.4);
}

.section__divider-dot {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
  color: white;
  font-size: var(--font-size-sm);
  box-shadow: 0 0 15px rgba(255, 0, 170, 0.3);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, #00fff0, #ff00aa);
  color: #080510;
  border: none;
  box-shadow: 0 0 20px rgba(0, 255, 240, 0.3), 0 0 20px rgba(255, 0, 170, 0.3);
  font-weight: var(--font-weight-bold);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 255, 240, 0.5), 0 0 40px rgba(255, 0, 170, 0.5);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--outline {
  background: transparent;
  color: var(--color-accent-cyan);
  border: 1.5px solid var(--color-accent-cyan);
  text-shadow: 0 0 8px rgba(0, 255, 240, 0.3);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background: rgba(255, 0, 170, 0.12);
  color: var(--color-accent-pink);
  border-color: var(--color-accent-pink);
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(255, 0, 170, 0.3);
  text-shadow: 0 0 8px rgba(255, 0, 170, 0.3);
}

.btn--outline:active {
  transform: translateY(0);
}

.btn--full {
  width: 100%;
}

/* ============================================================
   Selection Styling
   ============================================================ */

::selection {
  background: rgba(255, 0, 170, 0.25);
  color: #fff;
}

/* ============================================================
   Scrollbar Styling
   ============================================================ */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-text-muted);
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 255, 240, 0.1);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-cyan);
}
