:root {
  --bg: #020202;
  --ink: #fdfefd;
  --muted: #c2cfde;
  --accent: #3665a3;
  --accent-soft: #4b84d0;
  --steel: #828589;
  --card: rgba(253, 254, 253, 0.06);
  --card-border: rgba(194, 207, 222, 0.22);
  --focus-ring: 0 0 0 3px rgba(75, 132, 208, 0.42);
  --radius: 16px;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
  --max: 1160px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% -10%, #264f88 0%, var(--bg) 42%),
    linear-gradient(180deg, rgba(6, 12, 23, 1), rgba(2, 2, 2, 1));
  color: var(--ink);
  font-family: "Source Sans 3", sans-serif;
  line-height: 1.55;
}

.container {
  width: min(var(--max), 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
  background: rgba(2, 2, 2, 0.82);
  border-bottom: 1px solid rgba(194, 207, 222, 0.14);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
}

.header-wrap {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand img {
  width: 266px;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 10px rgba(54, 101, 163, 0.2));
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.96rem;
  padding: 8px 10px;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.main-nav a:hover {
  color: var(--ink);
  background: rgba(75, 132, 208, 0.14);
}

.main-nav a.active {
  color: var(--ink);
  background: rgba(75, 132, 208, 0.2);
  border: 1px solid rgba(75, 132, 208, 0.46);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(194, 207, 222, 0.35);
  background: rgba(253, 254, 253, 0.06);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(75, 132, 208, 0.16);
  border-color: rgba(75, 132, 208, 0.55);
}

.menu-toggle .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle .bar + .bar {
  margin-top: 0;
}

.menu-toggle.is-open .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-open .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease;
  letter-spacing: 0.01em;
}

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

.btn-primary {
  background: linear-gradient(120deg, var(--accent-soft), var(--accent));
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(54, 101, 163, 0.45);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(194, 207, 222, 0.42);
  color: var(--ink);
}

.btn:focus-visible,
.main-nav a:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.hero {
  position: relative;
  isolation: isolate;
  padding: 88px 0 72px;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(2, 2, 2, 0.35), rgba(2, 2, 2, 0.75)),
    url("./assets/fondo.png") center / cover no-repeat;
  opacity: 0.26;
}

.page-hero {
  position: relative;
  isolation: isolate;
  padding: 62px 0 48px;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(2, 2, 2, 0.4), rgba(2, 2, 2, 0.8)),
    url("./assets/fondo.png") center / cover no-repeat;
  opacity: 0.22;
}

.page-hero p {
  max-width: 72ch;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: start;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(194, 207, 222, 0.35);
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  font-family: "Orbitron", sans-serif;
  line-height: 1.18;
}

h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.45rem);
}

h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
}

h3 {
  font-size: 1.06rem;
}

p {
  margin: 0 0 10px;
  color: #e7edf7;
  line-height: 1.62;
}

.hero-copy p {
  max-width: 64ch;
}

.hero-cta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.microcopy {
  color: var(--muted);
  margin-top: 12px;
  font-weight: 600;
}

.hero-panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.hero-panel ul {
  margin: 12px 0 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.problem-strip {
  padding: 26px 0;
  border-top: 1px solid rgba(194, 207, 222, 0.16);
  border-bottom: 1px solid rgba(194, 207, 222, 0.16);
  background: rgba(194, 207, 222, 0.05);
}

.problem-strip h2 {
  font-size: clamp(1.3rem, 2.1vw, 1.7rem);
  margin-bottom: 6px;
}

.section {
  padding: 72px 0;
  position: relative;
}

/* Evita que el header sticky tape los titulos al saltar por anclas */
#servicios,
#empresas,
#metodo,
#faq,
#contacto {
  scroll-margin-top: 112px;
}

/* Ritmo vertical ajustado para evitar huecos grandes entre secciones */
#servicios.section {
  padding-top: 58px;
  padding-bottom: 54px;
}

#empresas.section {
  padding-top: 56px;
  padding-bottom: 40px;
}

#metodo.section {
  padding-top: 48px;
  padding-bottom: 42px;
}

#faq.section {
  padding-top: 46px;
  padding-bottom: 38px;
}

.section.light {
  background: linear-gradient(
    180deg,
    rgba(253, 254, 253, 0.05),
    rgba(253, 254, 253, 0.02)
  );
}

.section.dark {
  background:
    radial-gradient(circle at 85% 8%, rgba(54, 101, 163, 0.24), transparent 44%),
    rgba(2, 2, 2, 0.92);
}

.section-head {
  max-width: 780px;
  margin-bottom: 24px;
}

.content-wrap {
  display: grid;
  gap: 18px;
}

.content-wrap p {
  max-width: 82ch;
}

.content-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px;
}

.legal-content {
  padding: 56px 0;
}

.legal-content h2 {
  margin-top: 20px;
}

.legal-content ul {
  margin: 0 0 8px 0;
  padding-left: 22px;
}

.legal-content a {
  color: var(--accent-soft);
  text-decoration: underline;
  text-decoration-color: rgba(75, 132, 208, 0.85);
  text-underline-offset: 3px;
  font-weight: 700;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.legal-content a:hover {
  color: #8db5eb;
  text-decoration-color: rgba(141, 181, 235, 0.95);
}

.legal-content a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid label {
  font-weight: 600;
}

.form-grid input:not([type="checkbox"]),
.form-grid textarea,
.form-grid select {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(194, 207, 222, 0.28);
  background: rgba(253, 254, 253, 0.08);
  color: var(--ink);
  padding: 10px 12px;
  font-family: "Source Sans 3", sans-serif;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.form-grid textarea {
  min-height: 130px;
  resize: vertical;
}

.form-grid input:not([type="checkbox"]):hover,
.form-grid textarea:hover,
.form-grid select:hover {
  border-color: rgba(75, 132, 208, 0.52);
}

.form-grid input:not([type="checkbox"]):focus,
.form-grid textarea:focus,
.form-grid select:focus {
  border-color: rgba(75, 132, 208, 0.9);
  background: rgba(253, 254, 253, 0.1);
}

.checkbox-row {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 600;
  line-height: 1.45;
  margin-top: 2px;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 2px 0 0 0;
  accent-color: var(--accent-soft);
  border-radius: 4px;
  flex: 0 0 auto;
}

.checkbox-row span {
  display: inline-block;
}

.privacy-link {
  color: var(--accent-soft);
  text-decoration: underline;
  text-decoration-color: rgba(75, 132, 208, 0.85);
  text-underline-offset: 3px;
  font-weight: 700;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.privacy-link:hover {
  color: #8db5eb;
  text-decoration-color: rgba(141, 181, 235, 0.95);
}

.privacy-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

.muted {
  color: var(--muted);
}

.form-status {
  margin: 2px 0 0;
  min-height: 1.4em;
  font-weight: 700;
  font-size: 0.95rem;
}

.form-status.is-success {
  color: #8fd9b5;
}

.form-status.is-error {
  color: #f0b2b2;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.card {
  background: linear-gradient(160deg, rgba(253, 254, 253, 0.08), rgba(253, 254, 253, 0.04));
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(75, 132, 208, 0.5);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.card p {
  color: var(--muted);
  margin: 0;
}

.center-cta {
  margin-top: 26px;
  display: flex;
  justify-content: center;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  align-items: center;
}

.quote {
  border-left: 3px solid var(--accent);
  padding: 10px 0 10px 18px;
}

.quote p {
  font-size: 1.15rem;
  font-weight: 700;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  border: 1px solid var(--card-border);
  background: var(--card);
  border-radius: 14px;
  padding: 12px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.steps li:hover {
  border-color: rgba(75, 132, 208, 0.45);
  background: rgba(253, 254, 253, 0.09);
}

.steps span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(54, 101, 163, 0.36);
  font-family: "Orbitron", sans-serif;
  font-weight: 800;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card);
  padding: 12px 14px;
}

summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: var(--muted);
  transform: translateY(-1px);
}

details[open] summary::before {
  content: "▾";
}

details p {
  margin-top: 10px;
  color: var(--muted);
}

.final-cta {
  padding: 58px 0;
  background:
    radial-gradient(circle at 14% 0%, rgba(54, 101, 163, 0.36), transparent 54%),
    linear-gradient(180deg, rgba(2, 2, 2, 0.92), rgba(2, 2, 2, 1));
}

.final-cta h2,
.final-cta p {
  max-width: 860px;
}

.contact-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-quick-actions {
  margin-top: 16px;
}

.contact-quick-actions .btn {
  flex: 1 1 calc(33.333% - 7px);
  min-width: 0;
  border-color: rgba(194, 207, 222, 0.38);
  background: transparent;
  box-shadow: none;
}

.contact-quick-actions .btn:hover,
.contact-quick-actions .btn:focus-visible,
.contact-quick-actions .btn:active {
  background: linear-gradient(120deg, var(--accent-soft), var(--accent));
  border-color: transparent;
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(54, 101, 163, 0.45);
}

.site-footer {
  border-top: 1px solid rgba(194, 207, 222, 0.22);
  padding: 28px 0 20px;
  background: rgba(2, 2, 2, 0.75);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.legal-line {
  margin-top: 12px;
  border-top: 1px solid rgba(194, 207, 222, 0.14);
  padding-top: 12px;
}

.legal-line p {
  color: var(--steel);
  font-size: 0.92rem;
}

.legal-line a {
  color: var(--muted);
  text-decoration: none;
}

.legal-line a:hover {
  color: var(--ink);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .main-nav {
    display: flex;
    order: 4;
    width: 100%;
    margin: 0;
    gap: 8px;
    padding: 6px 0 2px;
    overflow: visible;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-grid,
  .split,
  .cards-grid,
  .footer-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .header-wrap {
    flex-wrap: wrap;
    padding: 12px 0;
    row-gap: 10px;
    justify-content: flex-start;
  }

  .brand img {
    width: 210px;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .main-nav a {
    width: auto;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
    font-size: 0.92rem;
    padding: 8px 10px;
  }

  .header-wrap > .btn {
    display: none;
  }

  .js-enabled .main-nav {
    display: none;
    order: 4;
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    border: 1px solid rgba(194, 207, 222, 0.22);
    border-radius: 12px;
    background: rgba(2, 2, 2, 0.92);
    flex-direction: column;
    gap: 6px;
    justify-content: stretch;
  }

  .js-enabled .main-nav.open {
    display: flex;
  }

  .js-enabled .main-nav a {
    width: 100%;
    text-align: left;
    white-space: normal;
    padding: 10px 12px;
  }
}

@media (max-width: 640px) {
  .brand img {
    width: 178px;
  }

  .hero {
    padding-top: 56px;
  }

  .page-hero {
    padding: 44px 0 32px;
  }

  .section {
    padding: 52px 0;
  }

  #servicios.section,
  #empresas.section,
  #metodo.section,
  #faq.section {
    padding-top: 40px;
    padding-bottom: 34px;
  }

  .final-cta {
    padding: 46px 0;
  }

  .btn {
    width: 100%;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
  }

  .contact-actions .btn {
    width: calc(50% - 5px);
  }

  .contact-quick-actions .btn {
    flex: 1 1 calc(50% - 5px);
  }
}
