/**
 * CyberSec Shield v2.0 — Main Stylesheet
 * Global variables, reset, base styles, backgrounds, and keyframes.
 *
 * @author Sebastián Vargas Yañez — TTPSEC SpA
 * @version 2.0.0
 * @license MIT
 */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Backgrounds */
  --color-bg-deep: #020810;
  --color-bg-panel: rgba(6, 14, 30, 0.95);
  --color-bg-card: rgba(8, 18, 40, 0.8);
  --color-bg-card-hover: rgba(12, 26, 50, 0.9);

  /* Neon accents */
  --color-neon-cyan: #00f0ff;
  --color-neon-green: #39ff14;
  --color-neon-magenta: #ff2eaa;
  --color-neon-yellow: #facc15;

  /* Team colors */
  --color-blue-team: #0088ff;
  --color-red-team: #ff2244;
  --color-purple-team: #a855f7;

  /* Text */
  --color-text-primary: #e8edf5;
  --color-text-muted: #7a8ba8;
  --color-text-dim: #3e4f66;

  /* Borders */
  --color-border-subtle: rgba(0, 240, 255, 0.08);
  --color-border-active: rgba(0, 240, 255, 0.25);

  /* Typography */
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Chakra Petch', 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-round: 20px;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 0.3s;
  --duration-normal: 0.4s;
  --duration-slow: 0.8s;

  /* Shadows */
  --shadow-glow-cyan: 0 0 30px rgba(0, 240, 255, 0.3);
  --shadow-glow-green: 0 0 20px rgba(57, 255, 20, 0.15);
  --shadow-glow-magenta: 0 0 20px rgba(255, 46, 170, 0.15);
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.4);

  /* Z-index scale */
  --z-background: 0;
  --z-scanlines: 1;
  --z-content: 2;
  --z-hud: 3;
  --z-nav: 1000;
}

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

/* ===== BASE STYLES ===== */
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--color-neon-cyan) var(--color-bg-deep);
}

body {
  font-family: var(--font-body);
  background: var(--color-bg-deep);
  color: var(--color-text-primary);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(0, 240, 255, 0.2);
  color: #fff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

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

ul,
ol {
  list-style: none;
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only--focusable:focus {
  position: fixed;
  top: var(--spacing-md);
  left: var(--spacing-md);
  z-index: calc(var(--z-nav) + 1);
  width: auto;
  height: auto;
  padding: var(--spacing-sm) var(--spacing-md);
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--color-bg-panel);
  color: var(--color-neon-cyan);
  border: 2px solid var(--color-neon-cyan);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ===== UTILITY: GRADIENT TEXT ===== */
.text--gradient {
  background: linear-gradient(135deg, var(--color-neon-cyan) 0%, var(--color-neon-green) 50%, var(--color-neon-magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== CONTENT WRAPPER ===== */
.content-wrapper {
  position: relative;
  z-index: var(--z-content);
}

/* ===== BACKGROUND LAYERS ===== */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: var(--z-background);
  pointer-events: none;
}

.bg-layer--matrix {
  opacity: 0.06;
}

.bg-layer--grid {
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
}

.bg-layer--radial {
  background:
    radial-gradient(ellipse 900px 700px at 15% 15%, rgba(0, 136, 255, 0.07), transparent),
    radial-gradient(ellipse 700px 900px at 85% 85%, rgba(255, 46, 170, 0.05), transparent),
    radial-gradient(ellipse 500px 500px at 50% 50%, rgba(0, 240, 255, 0.03), transparent);
}

.bg-layer--scanlines {
  z-index: var(--z-scanlines);
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.015) 2px,
    rgba(0, 0, 0, 0.015) 4px
  );
}

/* ===== HUD CORNERS ===== */
.hud-corner {
  position: fixed;
  z-index: var(--z-hud);
  pointer-events: none;
  width: 80px;
  height: 80px;
}

.hud-corner--tl {
  top: 12px;
  left: 12px;
  border-top: 2px solid rgba(0, 240, 255, 0.15);
  border-left: 2px solid rgba(0, 240, 255, 0.15);
}

.hud-corner--tr {
  top: 12px;
  right: 12px;
  border-top: 2px solid rgba(0, 240, 255, 0.15);
  border-right: 2px solid rgba(0, 240, 255, 0.15);
}

.hud-corner--bl {
  bottom: 12px;
  left: 12px;
  border-bottom: 2px solid rgba(0, 240, 255, 0.15);
  border-left: 2px solid rgba(0, 240, 255, 0.15);
}

.hud-corner--br {
  bottom: 12px;
  right: 12px;
  border-bottom: 2px solid rgba(0, 240, 255, 0.15);
  border-right: 2px solid rgba(0, 240, 255, 0.15);
}

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes heroRingSpin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes drawShield {
  to { stroke-dashoffset: 0; }
}

@keyframes showLock {
  to { opacity: 1; }
}

@keyframes ctaPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

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

@keyframes ctaFloat {
  0%, 100% { transform: translateY(0) scale(0.5); opacity: 0; }
  50%      { transform: translateY(-30px) scale(1); opacity: 1; }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--duration-slow) var(--ease-smooth);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}
