/* ==========================================================
   styles.css — variables, reset, layout y secciones
   Personaliza colores y fuentes desde :root
   ========================================================== */
:root {
  --bg: #080b14;
  --bg-2: #0e1322;
  --surface: #131a2e;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef1f8;
  --muted: #97a1ba;
  --blue: #4c8dff;
  --green: #34d399;
  --yellow: #fbbc04;
  --red: #f2605a;
  --accent: var(--blue);
  --accent-2: var(--green);
  --grad: linear-gradient(120deg, var(--blue), var(--green));
  --f-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --f-text: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 18px;
  --gutter: clamp(18px, 4vw, 40px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--f-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section {
  padding-block: clamp(64px, 9vw, 112px);
}
.section--alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}
.section-head {
  max-width: 680px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head h2,
.h2 {
  font: 700 clamp(1.8rem, 3.8vw, 2.8rem)/1.1 var(--f-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.section-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.075rem;
  max-width: 58ch;
}
.grid {
  display: grid;
  gap: 20px;
}
.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Cabecera */
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.skip:focus {
  left: 8px;
}
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 11, 20, 0.8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 1.15rem var(--f-display);
  letter-spacing: -0.02em;
}
.logo img {
  width: 30px;
  height: 30px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a:not(.btn) {
  white-space: nowrap;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav a:not(.btn):hover {
  color: var(--text);
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: none;
  cursor: pointer;
  place-items: center;
}

/* Hero */
.hero {
  position: relative;
  padding-block: clamp(48px, 8vw, 104px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(76, 141, 255, 0.22), transparent 65%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.hero h1 {
  font: 800 clamp(2.2rem, 5vw, 3.9rem)/1.04 var(--f-display);
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero h1 span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 52ch;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 0.9rem;
}
.hero__trust li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero__trust svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}

/* Pasos */
.steps {
  counter-reset: paso;
}
.step {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  position: relative;
}
.step::before {
  counter-increment: paso;
  content: counter(paso);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--grad);
  color: #04101f;
  font: 700 0.95rem var(--f-display);
  margin-bottom: 16px;
}
.step h3 {
  font: 600 1.1rem var(--f-display);
  margin-bottom: 6px;
}
.step p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Packs */
.packs {
  align-items: stretch;
}
.packs__note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Calculadora */
.calc {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
}
.calc__panel {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.calc__field + .calc__field {
  margin-top: 26px;
}
.calc__label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}
.calc__label output {
  color: var(--green);
  font-family: var(--f-display);
}
.calc__result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(160deg, rgba(76, 141, 255, 0.16), rgba(52, 211, 153, 0.12));
}
.calc__big {
  font: 800 clamp(2.6rem, 6vw, 4rem)/1 var(--f-display);
  letter-spacing: -0.04em;
  margin: 8px 0 4px;
}
.calc__rows {
  margin-top: 24px;
  display: grid;
  gap: 12px;
  font-size: 0.95rem;
}
.calc__rows div {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.calc__rows b {
  color: var(--text);
  font-weight: 600;
}

/* Calidad */
.quality {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.materials {
  display: grid;
  gap: 14px;
}
.material {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.material svg {
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--accent);
}
.material h3 {
  font: 600 1rem var(--f-display);
}
.material p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 2px;
}
.guarantee {
  margin-top: 24px;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.guarantee svg {
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--green);
}

/* Contacto */
.contact {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.contact__list {
  margin-top: 28px;
  display: grid;
  gap: 14px;
  color: var(--muted);
}
.contact__list li {
  display: flex;
  gap: 12px;
  align-items: center;
}
.contact__list svg {
  width: 18px;
  height: 18px;
  color: var(--green);
  flex: none;
}

/* Pie */
.footer {
  padding-block: 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* Responsive */
@media (max-width: 960px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr 1fr;
  }
  .hero__grid,
  .calc,
  .quality,
  .contact {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ===== Multipágina ===== */
.nav a[aria-current="page"]:not(.btn) {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.page-hero {
  padding-block: clamp(44px, 7vw, 84px) 0;
}
.page-hero h1 {
  font: 800 clamp(2rem, 4.4vw, 3.2rem)/1.08 var(--f-display);
  letter-spacing: -0.035em;
  max-width: 20ch;
  text-wrap: balance;
}
.page-hero p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 56ch;
}
.page-hero + .section {
  padding-top: clamp(36px, 5vw, 56px);
}
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(26px, 4vw, 44px);
  border-radius: var(--radius);
  border: 1px solid rgba(76, 141, 255, 0.4);
  background: linear-gradient(120deg, rgba(76, 141, 255, 0.16), rgba(52, 211, 153, 0.1));
}
.cta-band h2 {
  font: 700 clamp(1.4rem, 3vw, 2rem)/1.15 var(--f-display);
  letter-spacing: -0.02em;
  max-width: 24ch;
}
.cta-band .hero__cta {
  margin-top: 0;
}
.more {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 28px;
  color: var(--blue);
  font-weight: 600;
}
.more:hover {
  text-decoration: underline;
}
.notice {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
  padding: 16px 20px;
  border-radius: 14px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.notice svg {
  flex: none;
  width: 24px;
  height: 24px;
  color: var(--green);
}
.grid--packs {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1060px) {
  .grid--packs {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .grid--packs {
    grid-template-columns: 1fr;
  }
}

/* ===== Versión profesional ===== */
/* Menú móvil con transición suave (9 enlaces: colapsa antes) */
@media (max-width: 1120px) {
  .nav-toggle {
    display: grid;
  }
  .nav {
    position: absolute;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    padding: 14px var(--gutter) 22px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition:
      opacity 0.3s var(--ease),
      transform 0.35s var(--ease),
      visibility 0s 0.35s;
  }
  .nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition-delay: 0s;
  }
  .nav a:not(.btn) {
    padding: 12px 4px;
  }
}
.stats-wrap {
  padding-block: 0 clamp(40px, 6vw, 72px);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.stats--3 {
  grid-template-columns: repeat(3, 1fr);
}
.stat {
  padding: 22px 24px;
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border-right: 0;
}
.stat b {
  display: block;
  font: 700 1.6rem var(--f-display);
  letter-spacing: -0.02em;
}
.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
.compare th,
.compare td {
  padding: 16px 20px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.compare th:first-child,
.compare td:first-child {
  text-align: left;
}
.compare thead th {
  font: 600 0.95rem var(--f-display);
}
.compare tr:last-child td {
  border-bottom: 0;
}
.compare .hl {
  background: rgba(76, 141, 255, 0.1);
}
.yes {
  color: var(--green);
  font-weight: 700;
}
.no {
  color: var(--red);
}
.mid {
  color: var(--yellow);
}
.tool-teaser {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
}
.panel-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}
.login {
  max-width: 440px;
  margin: 0 auto;
}
.demo-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(251, 188, 4, 0.1);
  border: 1px solid rgba(251, 188, 4, 0.35);
  color: var(--muted);
  font-size: 0.85rem;
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  margin-bottom: 24px;
}
.tab {
  padding: 10px 16px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  font: 600 0.92rem var(--f-text);
  cursor: pointer;
  white-space: nowrap;
}
.tab.is-active {
  background: var(--bg);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tabpanel[hidden] {
  display: none;
}
.tool {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.out {
  padding: 24px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: var(--radius);
  background: rgba(52, 211, 153, 0.07);
}
.out[hidden] {
  display: none;
}
.out code {
  display: block;
  padding: 14px;
  margin: 12px 0;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  word-break: break-all;
  font:
    500 0.85rem/1.5 ui-monospace,
    Consolas,
    monospace;
}
.out__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.qr {
  margin-top: 16px;
  display: inline-block;
  padding: 10px;
  background: #fff;
  border-radius: 10px;
}
.qr:empty {
  display: none;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.tbl th,
.tbl td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.tbl td.l {
  word-break: break-all;
  color: var(--muted);
  font-size: 0.8rem;
}
.help {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.88rem;
}
.help a {
  color: var(--blue);
  text-decoration: underline;
}
.err {
  color: var(--red);
  font-size: 0.9rem;
  min-height: 20px;
}
.ok {
  color: var(--green);
  font-size: 0.9rem;
}
.footer {
  padding-block: 48px 28px;
}
.footer__cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
}
.footer h4 {
  font: 600 0.9rem var(--f-display);
  color: var(--text);
  margin-bottom: 12px;
}
.footer a {
  display: block;
  padding: 3px 0;
}
.footer a:hover {
  color: var(--text);
}
.footer .logo {
  display: flex;
  color: var(--text);
}
.footer__bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}
@media (max-width: 860px) {
  .tool,
  .tool-teaser,
  .footer__cols {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stats--3 {
    grid-template-columns: 1fr;
  }
  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* ===== V2: animaciones globales ===== */
.header {
  transition:
    background-color 0.3s,
    box-shadow 0.3s;
}
.header.is-scrolled {
  background: rgba(8, 11, 20, 0.94);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
}
.nav a:not(.btn) {
  position: relative;
}
.nav-toggle {
  transition:
    background-color 0.25s,
    border-color 0.25s;
}
.nav-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
}
.stat b {
  font-variant-numeric: tabular-nums;
}
.hero h1,
.hero__sub,
.hero__cta,
.hero__trust {
  animation: entra 0.9s var(--ease) both;
}
.hero__sub {
  animation-delay: 0.1s;
}
.hero__cta {
  animation-delay: 0.2s;
}
.hero__trust {
  animation-delay: 0.3s;
}
@keyframes entra {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Scroll-reveal: solo oculta si JS está activo (clase .js en <html>) */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
.logo,
.btn {
  white-space: nowrap;
}
