*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── VARIABLES ── */
:root {
  --bg-0: #0e1217;
  --bg-1: #141921;
  --bg-2: #1a202a;
  --bg-3: #212835;
  --bg-card: rgba(14, 22, 34, 0.85);
  --accent: #ff6b1a;
  --accent-dim: #e05510;
  --accent-glow: rgba(255, 107, 26, 0.15);
  --accent-glow-sm: rgba(255, 107, 26, 0.08);
  --text-primary: #e8edf4;
  --text-secondary: #8899aa;
  --text-muted: #4a5f72;
  --border: rgba(255, 255, 255, 0.07);
  --border-accent: rgba(255, 107, 26, 0.3);
  --red: #ff4d6a;
  --amber: #f5a623;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-body: 'Inter', sans-serif;
}

/* ── BASE ── */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-0);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── GRID TEXTURE ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
  height: 68px;
  background: rgba(14, 18, 23, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--bg-0);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  background: var(--accent);
  color: var(--bg-0);
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--font-mono);
  transition: opacity 0.2s, transform 0.15s;
}

.nav-cta:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* ── SECTIONS ── */
section {
  position: relative;
  z-index: 1;
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 120px 2rem 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-glow-sm);
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  padding: 6px 16px;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

#hero h1 {
  font-family: var(--font-head);
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 860px;
  margin-bottom: 2rem;
}

#hero h1 .accent {
  color: var(--accent);
}

#hero p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--accent);
  color: var(--bg-0);
  padding: 13px 28px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 0 30px rgba(0, 212, 170, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0, 212, 170, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  padding: 13px 28px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-outline:hover {
  border-color: var(--border-accent);
  color: var(--accent);
}

/* ── STATS STRIP ── */
.stats-strip {
  padding: 3rem 4rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 0;
  background: var(--bg-1);
}

.stat {
  flex: 1;
  max-width: 240px;
  padding: 1.5rem 2rem;
  text-align: center;
  border-right: 1px solid var(--border);
}

.stat:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── SECTION HEADERS ── */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.7;
  max-width: 520px;
}

/* ── NAV LOGO IMG ── */
.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.logo-footer-img {
  height: 32px;
  width: auto;
  display: block;
}

/* ── SERVICES ── */
#servicios {
  padding: 100px 4rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 4rem;
}

.service-card {
  background: var(--bg-1);
  padding: 2.5rem;
  transition: background 0.25s;
  cursor: default;
}

.service-card:hover {
  background: var(--bg-2);
}

.service-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 22px;
}

.service-card h3 {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.service-tag {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  background: var(--accent-glow-sm);
  border-radius: 100px;
  border: 1px solid var(--border-accent);
}

/* ── THREAT PANEL ── */
#amenazas {
  padding: 100px 4rem;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.threat-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  margin-top: 4rem;
}

.threat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.threat-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-2);
  border-left: 2px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.threat-item:hover {
  border-left-color: var(--accent);
  background: var(--bg-3);
}

.threat-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  min-width: 28px;
  padding-top: 3px;
}

.threat-item h4 {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.threat-item p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.threat-visual {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  overflow: hidden;
}

.threat-visual::before {
  content: '';
  position: absolute;
  bottom: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.threat-grid-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.metric-box {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}

.metric-box .val {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.metric-box .val.red   { color: var(--red); }
.metric-box .val.amber { color: var(--amber); }

.metric-box .label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── PROCESO ── */
#proceso {
  padding: 100px 4rem;
}

.proceso-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 4rem;
  position: relative;
}

.proceso-steps::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 10%; right: 10%;
  height: 1px;
  background: var(--border);
}

.step {
  padding: 0 1.5rem;
  text-align: center;
  position: relative;
}

.step-num {
  width: 48px;
  height: 48px;
  background: var(--bg-0);
  border: 1px solid var(--border-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.step h4 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

/* ── CONTACT ── */
#contacto {
  padding: 100px 4rem;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
  margin-top: 4rem;
}

.contact-info h2 {
  font-family: var(--font-head);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-detail:last-child {
  border-bottom: none;
}

.c-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: var(--accent-glow-sm);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.c-label {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.c-val {
  font-size: 14px;
  color: var(--text-primary);
  margin-top: 2px;
}

/* ── FORM ── */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  backdrop-filter: blur(12px);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
select,
textarea {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ff6b1a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

select option {
  background: var(--bg-0);
  color: var(--text-primary);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  width: 100%;
  margin-top: 1.5rem;
  background: var(--accent);
  color: var(--bg-0);
  border: none;
  border-radius: 7px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: 0 0 24px rgba(0, 212, 170, 0.2);
}

.form-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 36px rgba(0, 212, 170, 0.35);
}

.form-submit:active {
  transform: translateY(0);
}

.form-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1rem;
  font-family: var(--font-mono);
}

/* ── FOOTER ── */
footer {
  padding: 3rem 4rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-0);
}

.footer-brand {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 800;
  color: var(--bg-0);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* ── SUCCESS STATE ── */
.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem;
  gap: 1rem;
}

.form-success.show {
  display: flex;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.form-success h3 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
}

.form-success p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ── SCROLL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 0 1.5rem; }
  .nav-links { display: none; }
  #servicios, #amenazas, #proceso, #contacto { padding: 70px 1.5rem; }
  .stats-strip { flex-wrap: wrap; padding: 2rem 1.5rem; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); }
  .services-grid { grid-template-columns: 1fr; }
  .threat-layout, .contact-layout { grid-template-columns: 1fr; gap: 3rem; }
  .proceso-steps { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .proceso-steps::before { display: none; }
  .form-row { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 1.5rem; text-align: center; }
}

/* ── BACK TO TOP BUTTON ── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  background: var(--bg-2);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s, background-color 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  outline: none;
}

.back-to-top:hover {
  background: var(--bg-3);
  transform: translateY(-2px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}