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

:root {
  --bg: #0a0e14;
  --bg-card: #111820;
  --bg-dark: #06090e;
  --green: #00ff9f;
  --green-dim: #00cc7a;
  --cyan: #00e5ff;
  --red: #ff3366;
  --yellow: #ffcc00;
  --text: #e0e6ed;
  --text-dim: #8b9bb4;
  --border: #1e2a3a;
  --font-mono: 'Share Tech Mono', monospace;
  --font-display: 'Orbitron', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ===== EFFECTS ===== */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

.matrix-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.08;
  pointer-events: none;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 14, 20, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.logo .glitch {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--green);
  letter-spacing: 0.1em;
  position: relative;
  text-shadow: 0 0 10px rgba(0, 255, 159, 0.5);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--green);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--green);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  padding: 8rem 2rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.terminal-line {
  color: var(--green);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-title .line {
  display: block;
}

.hero-title .accent {
  color: var(--green);
  text-shadow: 0 0 30px rgba(0, 255, 159, 0.4);
}

.hero-subtitle {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s;
}

.btn.primary {
  background: var(--green);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(0, 255, 159, 0.3);
}

.btn.primary:hover {
  background: var(--green-dim);
  box-shadow: 0 0 30px rgba(0, 255, 159, 0.5);
  transform: translateY(-2px);
}

.btn.secondary {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

.btn.secondary:hover {
  background: rgba(0, 255, 159, 0.1);
}

.btn.full {
  width: 100%;
  text-align: center;
}

.status-bar {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.status.online {
  color: var(--green);
}

/* Terminal window */
.terminal-window {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 255, 159, 0.05);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #0d1219;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  margin-left: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.terminal-body {
  padding: 1.25rem;
  font-size: 0.9rem;
  min-height: 220px;
}

.terminal-body p {
  margin-bottom: 0.4rem;
  color: var(--text-dim);
}

.terminal-body .success { color: var(--green); }
.terminal-body .warning { color: var(--yellow); }
.terminal-body .error { color: var(--red); }

.cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ===== SECTIONS ===== */
.section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section.dark {
  background: var(--bg-dark);
  max-width: none;
  padding-left: max(2rem, calc((100% - 1200px) / 2 + 2rem));
  padding-right: max(2rem, calc((100% - 1200px) / 2 + 2rem));
}

.section-header {
  margin-bottom: 3rem;
}

.section-tag {
  display: block;
  color: var(--green);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-dim);
  max-width: 560px;
}

/* Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 6px;
  transition: border-color 0.25s, transform 0.25s;
}

.card:hover {
  border-color: var(--green);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--green);
}

.card p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Stations */
.stations {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.station {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.station::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.station.low::before { background: var(--text-dim); }
.station.mid::before { background: var(--cyan); }
.station.high::before { background: var(--green); }

.station-badge {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 1rem;
  font-weight: 700;
}

.station.low .station-badge {
  background: rgba(139, 155, 180, 0.2);
  color: var(--text-dim);
}

.station.mid .station-badge {
  background: rgba(0, 229, 255, 0.15);
  color: var(--cyan);
}

.station.high .station-badge {
  background: rgba(0, 255, 159, 0.15);
  color: var(--green);
}

.station h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
}

.station ul {
  list-style: none;
  margin-bottom: 1.25rem;
}

.station li {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(30, 42, 58, 0.6);
}

.station li::before {
  content: '> ';
  color: var(--green);
  opacity: 0.6;
}

.station-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
  opacity: 0.8;
}

/* Reto */
.reto-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: start;
}

.reto-text p {
  color: var(--text-dim);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.reto-text .highlight {
  color: var(--green);
  border-left: 3px solid var(--green);
  padding-left: 1rem;
  margin-top: 1.5rem;
}

.reto-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  border-radius: 6px;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* CTA / Form */
.cta-section {
  padding-bottom: 8rem;
}

.cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3rem;
  border-radius: 8px;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.cta-box h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.cta-box > p {
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.contact-form {
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green);
}

.contact-form textarea {
  margin-bottom: 1.25rem;
  resize: vertical;
}

.form-note {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  opacity: 0.7;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
  background: var(--bg-dark);
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--green);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.footer p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.copyright {
  margin-top: 1rem;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 7rem;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .status-bar {
    justify-content: center;
  }

  .grid-3,
  .stations {
    grid-template-columns: 1fr;
  }

  .reto-content {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .header {
    padding: 1rem;
  }

  .section {
    padding: 4rem 1.25rem;
  }

  .cta-box {
    padding: 2rem 1.25rem;
  }
}