:root {
  --navy: #071D49;
  --navy-light: #123268;
  --navy-soft: #0e2a63;
  --red: #B91C1C;
  --red-light: #dc3030;
  --bg: #f5f7fb;
  --text: #101828;
  --text-muted: #5b6577;
  --border: #e2e6ee;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 12px 30px -12px rgba(7, 29, 73, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

img, svg { display: block; }

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 10px 24px -8px rgba(185, 28, 28, 0.55);
}
.btn-primary:hover { background: var(--red-light); }
.btn-outline {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-ghost {
  color: var(--navy);
  background: rgba(7, 29, 73, 0.06);
}
.btn-ghost:hover { background: rgba(7, 29, 73, 0.12); }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.brand-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--white);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 0.98rem; color: var(--navy); }
.brand-text small { font-size: 0.72rem; color: var(--text-muted); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--text-muted);
}
.main-nav a:hover { color: var(--navy); }

.nav-cta { flex-shrink: 0; padding: 10px 20px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--navy); margin: 0 auto; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 55%, var(--navy-light) 100%);
  color: var(--white);
  overflow: hidden;
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  padding: 90px 24px 70px;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff8a8a;
  margin-bottom: 14px;
}
.eyebrow-light { color: var(--red-light); }
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 0 18px;
}
.text-red { color: #ff6b6b; }
.hero .lead {
  color: rgba(255,255,255,0.82);
  font-size: 1.05rem;
  max-width: 540px;
  margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero .btn-ghost { background: rgba(255,255,255,0.12); color: var(--white); }
.hero .btn-ghost:hover { background: rgba(255,255,255,0.2); }

.hero-stats {
  display: flex;
  gap: 34px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.3rem; }
.hero-stats span { font-size: 0.78rem; color: rgba(255,255,255,0.65); }

/* ---------- hero phone mock ---------- */
.hero-visual { position: relative; display: grid; place-items: center; }
.phone-mock {
  position: relative;
  z-index: 2;
  width: 260px;
  border-radius: 34px;
  background: #0c0f14;
  padding: 14px 12px;
  box-shadow: 0 30px 60px -18px rgba(0,0,0,0.55);
}
.phone-notch {
  width: 90px;
  height: 18px;
  background: #0c0f14;
  border-radius: 0 0 14px 14px;
  margin: 0 auto -18px;
  position: relative;
  z-index: 2;
}
.phone-screen {
  background: var(--white);
  border-radius: 24px;
  padding: 30px 18px 22px;
  color: var(--navy);
  text-align: center;
  min-height: 400px;
}
.phone-topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--white);
  background: var(--red);
  margin: -30px -18px 18px;
  padding: 26px 12px 14px;
  border-radius: 24px 24px 40% 40%/24px 24px 20px 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
}
.phone-status {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-size: 0.72rem;
  color: #15803d;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 9px 10px;
  margin-bottom: 26px;
}
.phone-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #15803d; flex-shrink: 0; }
.panic-btn {
  position: relative;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--red-light), var(--red) 70%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 18px;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 0 0 6px rgba(185,28,28,0.12), 0 18px 30px -10px rgba(185,28,28,0.55);
  animation: panicPress 4s ease-in-out infinite;
}
.panic-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(185, 28, 28, 0.5);
  opacity: 0;
  animation: panicBurst 4s ease-out infinite;
  pointer-events: none;
}
.panic-btn svg {
  animation: panicIconPop 4s ease-in-out infinite;
}
@keyframes panicPress {
  0%, 100% { transform: scale(1); }
  8% { transform: scale(0.9); }
  18% { transform: scale(1.03); }
  26% { transform: scale(1); }
}
@keyframes panicIconPop {
  0%, 100% { transform: scale(1); }
  8% { transform: scale(0.85); }
  18% { transform: scale(1.12); }
  26% { transform: scale(1); }
}
@keyframes panicBurst {
  0%, 6% { transform: scale(0.7); opacity: 0; }
  14% { opacity: 0.55; }
  40% { transform: scale(2); opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .panic-btn,
  .panic-btn::after,
  .panic-btn svg,
  .pulse-ring {
    animation: none;
  }
}
.phone-hint { font-size: 0.78rem; color: var(--text-muted); margin: 0 0 18px; }
.phone-select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.pulse-ring {
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  animation: pulse 3.5s ease-out infinite;
}
.pulse-ring.delay { animation-delay: 1.5s; }
@keyframes pulse {
  0% { transform: scale(0.7); opacity: 0.7; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* ---------- modulos ---------- */
.modulos { padding: 90px 24px; }
.section-heading { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-heading .eyebrow { color: var(--red); }
.section-heading h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--navy); margin: 0 0 14px; }
.section-heading p { color: var(--text-muted); margin: 0; }

.flow {
  display: flex;
  align-items: stretch;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.module-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  flex: 1 1 280px;
  max-width: 340px;
  box-shadow: var(--shadow);
}
.module-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.icon-red { background: rgba(185,28,28,0.1); color: var(--red); }
.icon-navy { background: rgba(7,29,73,0.08); color: var(--navy); }
.module-tag {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.module-card h3 { margin: 0 0 10px; color: var(--navy); font-size: 1.2rem; }
.module-card p { margin: 0; color: var(--text-muted); font-size: 0.94rem; }

.flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  flex: 0 0 auto;
}

.modulos-note {
  margin: 50px auto 0;
  max-width: 640px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-muted);
  background: rgba(7,29,73,0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.modulos-note svg { color: var(--navy); flex-shrink: 0; margin-top: 2px; }
.modulos-note p { margin: 0; font-size: 0.9rem; }

/* ---------- contacto ---------- */
.contacto {
  background: var(--navy);
  color: var(--white);
  padding: 90px 24px;
}
.contacto-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contacto h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 16px; }
.contacto p { color: rgba(255,255,255,0.75); }
.contact-list { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.9); }
.contact-list svg { color: var(--red-light); flex-shrink: 0; }

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  color: var(--text);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--navy); }
.field input, .field textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(7,29,73,0.12);
}
.form-note { margin: 12px 0 0; font-size: 0.85rem; color: #15803d; min-height: 1em; }
.form-note.is-error { color: var(--red); }
.field-error { font-size: 0.78rem; color: var(--red); min-height: 1em; }
.field.has-error input,
.field.has-error textarea { border-color: var(--red); }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn[disabled] { opacity: 0.65; cursor: not-allowed; transform: none; }

/* ---------- footer ---------- */
.site-footer { background: #050f28; color: rgba(255,255,255,0.6); padding: 22px 24px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner a:hover { color: var(--white); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 60px; }
  .hero-visual { order: -1; margin-bottom: 20px; }
  .contacto-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .site-header.open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }
  .flow { flex-direction: column; align-items: center; }
  .flow-arrow { transform: rotate(90deg); }
}
