/* Roadmap de Ciberseguridad v3.0 - main.css */

/* === CUSTOM PROPERTIES (VARIABLES) === */
:root {
  /* -- Color: Backgrounds -- */
  --color-bg-primary: #020810;
  --color-bg-secondary: #040d1c;
  --color-bg-tertiary: #060f22;
  --color-surface: #081528;

  /* -- Color: Borders -- */
  --color-border-subtle: #0e243a;
  --color-border-medium: #163550;
  --color-border-strong: #1e4668;

  /* -- Color: Text -- */
  --color-text-primary: #c2d8f0;
  --color-text-secondary: #6a96b8;
  --color-text-muted: #2d4d6a;

  /* -- Color: Accents -- */
  --color-accent-cyan: #00cfff;
  --color-accent-cyan-dark: #0090cc;
  --color-accent-red: #ff1e3c;
  --color-accent-green: #00ffaa;
  --color-accent-orange: #ff8c00;
  --color-accent-purple: #b04dff;
  --color-accent-yellow: #ffc107;

  /* -- Short Aliases (backwards compatibility) -- */
  --bg: var(--color-bg-primary);
  --bg2: var(--color-bg-secondary);
  --bg3: var(--color-bg-tertiary);
  --surf: var(--color-surface);
  --b1: var(--color-border-subtle);
  --b2: var(--color-border-medium);
  --b3: var(--color-border-strong);
  --txt: var(--color-text-primary);
  --txt2: var(--color-text-secondary);
  --txt3: var(--color-text-muted);
  --cyan: var(--color-accent-cyan);
  --cyan2: var(--color-accent-cyan-dark);
  --red: var(--color-accent-red);
  --green: var(--color-accent-green);
  --oran: var(--color-accent-orange);
  --purp: var(--color-accent-purple);
  --yell: var(--color-accent-yellow);

  /* -- Font Families -- */
  --font-display: 'Orbitron', monospace;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Rajdhani', sans-serif;

  /* -- Spacing Scale -- */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 40px;
  --spacing-2xl: 64px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  cursor: none;
}

/* === SCROLLBARS === */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-medium);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-cyan);
}

/* === TYPOGRAPHY === */
.section-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--color-accent-cyan);
  text-transform: uppercase;
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-tag::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--color-accent-cyan);
}

.section-h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.5vw, 36px);
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 10px;
  line-height: 1.1;
}

.section-sub {
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--color-text-secondary);
  line-height: 1.75;
  max-width: 680px;
}

.sec-divider {
  border: none;
  border-top: 1px solid var(--color-border-subtle);
  margin: 0;
}

/* === CUSTOM CURSOR === */
#cur,
#cur2 {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  border-radius: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

#cur {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--color-accent-cyan);
  -webkit-transition: width 0.2s, height 0.2s, background 0.2s, border-color 0.2s;
  transition: width 0.2s, height 0.2s, background 0.2s, border-color 0.2s;
  mix-blend-mode: difference;
}

#cur2 {
  width: 5px;
  height: 5px;
  background: var(--color-accent-cyan);
}

body.hov #cur {
  width: 44px;
  height: 44px;
  background: rgba(0, 207, 255, 0.08);
  border-color: var(--color-accent-red);
}

/* === BACKGROUND EFFECTS === */
#cvs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 207, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 207, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-animation: grid-pan 50s linear infinite;
  animation: grid-pan 50s linear infinite;
}

@-webkit-keyframes grid-pan {
  to {
    background-position: 64px 64px;
  }
}

@keyframes grid-pan {
  to {
    background-position: 64px 64px;
  }
}

/* Scanline overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.025) 3px,
    rgba(0, 0, 0, 0.025) 4px
  );
}

/* === KEYFRAMES (SHARED) === */
@-webkit-keyframes fadeUp {
  from {
    opacity: 0;
    -webkit-transform: translateY(22px);
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    -webkit-transform: translateY(22px);
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

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

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

/* === SCROLL REVEAL UTILITY === */
.rv {
  opacity: 0;
  -webkit-transform: translateY(26px);
  transform: translateY(26px);
  -webkit-transition: opacity 0.7s ease, transform 0.7s ease;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.rv.vis {
  opacity: 1;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}

.rv2 {
  -webkit-transition-delay: 0.1s;
  transition-delay: 0.1s;
}

.rv3 {
  -webkit-transition-delay: 0.2s;
  transition-delay: 0.2s;
}

.rv4 {
  -webkit-transition-delay: 0.3s;
  transition-delay: 0.3s;
}

/* === BUTTONS === */
.btn-pri {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 15px 36px;
  background: var(--color-accent-cyan);
  color: #000;
  border: none;
  border-radius: 3px;
  text-decoration: none;
  text-transform: uppercase;
  -webkit-transition: all 0.25s;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn-pri::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.35), transparent);
  -webkit-transform: translateX(-100%);
  transform: translateX(-100%);
  -webkit-transition: -webkit-transform 0.4s;
  transition: transform 0.4s;
}

.btn-pri:hover::before {
  -webkit-transform: translateX(100%);
  transform: translateX(100%);
}

.btn-pri:hover {
  box-shadow:
    0 0 36px rgba(0, 207, 255, 0.55),
    0 0 70px rgba(0, 207, 255, 0.2);
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
}

.btn-sec {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  padding: 15px 36px;
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-strong);
  border-radius: 3px;
  text-decoration: none;
  text-transform: uppercase;
  -webkit-transition: all 0.25s;
  transition: all 0.25s;
  cursor: pointer;
}

.btn-sec:hover {
  border-color: var(--color-text-secondary);
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
