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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

/* ===================== VARIABLES ===================== */
:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg-2: #FFFFFF;
  --bg-3: #E6E8F1;
  --band: #E6E8F1;
  --border: #D0D4E2;
  --text: #1D2142;
  --text-muted: #4E5474;
  --accent: #E82718;
  --accent-2: #1D2142;
  --accent-soft: rgba(232, 39, 24, .1);
  --accent-line: rgba(232, 39, 24, .32);
  --accent-glow: rgba(232, 39, 24, .14);
  --glow-secondary: rgba(29, 33, 66, .1);
  --on-accent: #FFFFFF;
  --header-bg: rgba(255, 255, 255, .86);
  --overlay: rgba(29, 33, 66, .55);
  --success: #17804A;
  --success-glow: rgba(23, 128, 74, .45);
  --radius: 14px;
  --radius-lg: 22px;
  --max: 1180px;
  --shadow: 0 10px 30px rgba(29, 33, 66, .08);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1D2142;
  --bg-2: #262B52;
  --bg-3: #323864;
  --band: #171A36;
  --border: #3E456E;
  --text: #FFFFFF;
  --text-muted: #C8CCDE;
  --accent: #E82718;
  --accent-2: #E6E8F1;
  --accent-soft: rgba(232, 39, 24, .16);
  --accent-line: rgba(232, 39, 24, .45);
  --accent-glow: rgba(232, 39, 24, .22);
  --glow-secondary: rgba(230, 232, 241, .1);
  --on-accent: #FFFFFF;
  --header-bg: rgba(29, 33, 66, .82);
  --overlay: rgba(10, 12, 28, .72);
  --success: #4ADE80;
  --success-glow: rgba(74, 222, 128, .45);
  --shadow: 0 12px 32px rgba(0, 0, 0, .28);
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

/* ===================== HEADER ===================== */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .5px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: var(--on-accent);
  font-weight: 900;
  font-size: 14px;
}

.brand-name {
  font-size: 16px;
}

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color .2s;
}

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

.nav-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform .15s, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.menu-toggle,
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
}

.menu-toggle {
  display: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon,
html[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

.theme-toggle:hover,
.menu-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  padding: 90px 0 70px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 70%;
  background:
    radial-gradient(600px 300px at 20% 20%, var(--accent-glow), transparent 60%),
    radial-gradient(600px 300px at 80% 0%, var(--glow-secondary), transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  margin-bottom: 22px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--success-glow);
  }

  70% {
    box-shadow: 0 0 0 10px transparent;
  }

  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -.02em;
}

h1 .grad {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  max-width: 700px;
}

.stat .num {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
}

.stat .lbl {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ===================== TICKER ===================== */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--band);
  padding: 14px 0;
}

.ticker-track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  width: max-content;
  animation: scroll 28s linear infinite;
  font-size: 12.5px;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.ticker-track span {
  opacity: .85;
}

@keyframes scroll {
  to {
    transform: translateX(-50%);
  }
}

/* ===================== SECCIONES ===================== */
section {
  padding: 80px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 46px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  margin: 0 0 14px;
  letter-spacing: -.01em;
}

.section-head p {
  color: var(--text-muted);
  margin: 0;
}

/* ===================== FEATURES ===================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
  transition: transform .2s, border-color .2s;
}

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

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}

.card h3 {
  font-size: 1.05rem;
  margin: 0 0 10px;
}

.card p {
  font-size: 14.5px;
  color: var(--text-muted);
  margin: 0;
}

/* ===================== PLANES ===================== */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}

.plan {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  transition: transform .2s, border-color .2s;
}

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

.plan.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 20px 50px var(--accent-glow);
  background: linear-gradient(180deg, var(--accent-soft), var(--bg-2));
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 26px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
}

.plan h3 {
  font-size: 1.1rem;
  margin: 0 0 6px;
}

.plan .desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 20px;
  min-height: 40px;
}

.price {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.02em;
}

.price .cur {
  font-size: .95rem;
  color: var(--text-muted);
  font-weight: 600;
}

.price .per {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 22px 0 26px;
  display: grid;
  gap: 10px;
}

.plan li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.plan li svg {
  flex: none;
  margin-top: 3px;
  color: var(--success);
}

.plan .btn {
  margin-top: auto;
  width: 100%;
}

.plan-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
}

/* ===================== SEGURIDAD ===================== */
.security {
  background: var(--bg-2);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}

.security h2 {
  margin-bottom: 14px;
}

.security p {
  color: var(--text-muted);
  margin: 0 0 20px;
}

.security ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.security li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
}

.security li svg {
  flex: none;
  color: var(--accent);
  margin-top: 2px;
}

.security-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.chip {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.chip strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}

/* ===================== IA ===================== */
.ai-note {
  margin-top: 22px;
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.ai-note strong {
  color: var(--text);
}

/* ===================== FAQ ===================== */
.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--text);
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-q svg {
  transition: transform .25s;
  color: var(--accent);
  flex: none;
}

.faq-item.open .faq-q svg {
  transform: rotate(45deg);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  padding: 0 20px;
  color: var(--text-muted);
  font-size: 14.5px;
}

.faq-item.open .faq-a {
  max-height: 420px;
  padding-bottom: 18px;
}

.faq-a a {
  color: var(--accent);
}

/* ===================== CONTACTO ===================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.field label {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .2s;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.contact-info {
  display: grid;
  gap: 16px;
}

.info-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
  color: var(--text-muted);
}

.info-item svg {
  flex: none;
  color: var(--accent);
  margin-top: 2px;
}

.info-item a {
  color: var(--text);
}

/* ===================== FOOTER ===================== */
footer.site-footer {
  border-top: 1px solid var(--border);
  background: var(--band);
  padding: 50px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 34px;
}

.footer-grid h4 {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.footer-grid a {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-grid a:hover {
  color: var(--accent);
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 12px 0 0;
  max-width: 300px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-bottom .legal-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* ===================== MODAL LEGAL ===================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  background: var(--overlay);
  backdrop-filter: blur(6px);
  padding: 20px;
  overflow-y: auto;
}

.modal.open {
  display: grid;
  place-items: center;
}

.modal-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}

.modal-box h3 {
  margin-top: 0;
}

.modal-box h4 {
  margin: 22px 0 8px;
  font-size: 15px;
}

.modal-box p,
.modal-box li {
  font-size: 14px;
  color: var(--text-muted);
}

.modal-box ul {
  padding-left: 20px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
}

.modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 960px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }

  .plans {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin: 0 auto;
  }

  .security {
    grid-template-columns: 1fr;
    padding: 30px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--band);
    border-bottom: 1px solid var(--border);
    padding: 18px 22px;
    gap: 16px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-cta .btn-ghost {
    display: none;
  }

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

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .hero-stats .stat:last-child {
    grid-column: span 2;
  }

  .security-visual {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .modal-box {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ticker-track {
    animation: none;
  }

  .dot {
    animation: none;
  }
}

/* ===================== BANDAS Y FORMULARIO ===================== */
.section-band {
  background: var(--band);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.contact-lead {
  color: var(--text-muted);
  margin: 0 0 26px;
}

.form-legal {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}

.form-legal a {
  color: var(--accent);
}

#formStatus {
  font-size: 13px;
  margin: 0;
}

#formStatus.is-error {
  color: var(--accent);
}

#formStatus.is-ok {
  color: var(--success);
}

/* ===================== PÁGINAS LEGALES ===================== */
.legal-page {
  padding: 48px 0 72px;
}

.legal-doc {
  max-width: 760px;
}

.legal-doc h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -.02em;
}

.legal-doc .updated {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 22px;
}

.legal-doc h2 {
  font-size: 1.15rem;
  margin: 32px 0 10px;
}

.legal-doc p,
.legal-doc li {
  color: var(--text-muted);
  font-size: 15.5px;
}

.legal-doc p {
  margin: 0 0 14px;
}

.legal-doc ul {
  margin: 0 0 14px;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.legal-doc a {
  color: var(--accent);
}

.legal-doc strong {
  color: var(--text);
}