/* Landing de HR-Core. Sistema de diseño en docs/diseno/SISTEMA.md. */
@font-face {
  font-family: 'DM Sans';
  src: url('fonts/dm-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('fonts/geist-mono-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #000409;
  --fg: #fff;
  --fg-2: rgb(255 255 255 / 0.66);
  --fg-3: rgb(255 255 255 / 0.5);
  --line: rgb(255 255 255 / 0.09);
  --line-2: rgb(255 255 255 / 0.16);
  --surface: rgb(8 14 26 / 0.72);
  --accent: #2f97ff;
  --accent-2: #6db7ff;
  --glow: #0083ff;
  --ok: #3ddc97;
  --bad: #ff8490;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --w: 72rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.55 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(90rem 44rem at 50% -12rem, #06224f 0%, transparent 62%),
    radial-gradient(60rem 40rem at 100% 100%, #03142f 0%, transparent 60%);
}
#nube { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: 0.7; pointer-events: none; }

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2 { font-weight: 450; letter-spacing: -0.035em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h1 em { font-style: normal; color: var(--accent-2); text-shadow: 0 0 40px rgb(0 131 255 / 0.55); }
h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
h3 { font-size: 1.2rem; font-weight: 520; letter-spacing: -0.02em; line-height: 1.25; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; padding: 0.6rem 1rem; border-radius: 999px; background: #fff; color: #000; }
.skip:focus { top: 1rem; }

/* ── Navegación: pastilla translúcida ── */
.nav {
  position: sticky;
  top: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(calc(100% - 2rem), 56rem);
  margin: 1rem auto 0;
  padding: 0.5rem 0.5rem 0.5rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(4 9 18 / 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav nav { display: flex; gap: 0.25rem; margin-left: auto; }
.nav nav a { padding: 0.5rem 0.8rem; border-radius: 999px; color: var(--fg-2); font-size: 0.94rem; text-decoration: none; transition: color 0.2s, background 0.2s; }
.nav nav a:hover { color: #fff; background: rgb(255 255 255 / 0.06); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
.logo-mark { width: 1.9rem; height: 1.9rem; }

/* ── Botones ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 3.25rem;
  padding: 0.4rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 520;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, translate 0.2s var(--ease), box-shadow 0.2s;
}
.btn:hover { translate: 0 -1px; }
.btn-primary { padding-right: 0.45rem; background: #fff; color: #000409; box-shadow: 0 0 0 1px rgb(47 151 255 / 0.3), 0 18px 50px -20px rgb(0 131 255 / 0.9); }
.btn-primary:hover { background: #dbeaff; }
.btn-secondary { background: rgb(0 0 0 / 0.5); color: #fff; border-color: var(--line-2); }
.btn-secondary:hover { border-color: rgb(109 183 255 / 0.6); }
.btn-arrow { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 999px; background: #000409; color: #fff; transition: rotate 0.3s var(--ease); }
.btn:hover .btn-arrow { rotate: 45deg; }
.btn-arrow svg { width: 1rem; height: 1rem; }
.btn-sm { min-height: 2.6rem; padding-left: 1.1rem; font-size: 0.94rem; }
.btn-sm .btn-arrow { width: 1.9rem; height: 1.9rem; }
.btn-block { width: 100%; justify-content: space-between; padding-left: 1.5rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgb(0 0 0 / 0.55);
  color: var(--fg-2);
  font: 500 0.72rem/1 'Geist Mono', ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag i { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px 2px var(--glow); }

/* ── Portada ── */
.hero { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; width: min(calc(100% - 2rem), var(--w)); margin: 0 auto; padding: clamp(3.5rem, 9vw, 6.5rem) 0 2rem; text-align: center; }
.hero > * { animation: subir 0.8s var(--ease) backwards; }
.hero > :nth-child(2) { animation-delay: 0.08s; }
.hero > :nth-child(3) { animation-delay: 0.16s; }
.hero > :nth-child(4) { animation-delay: 0.24s; }
.hero > :nth-child(5) { animation-delay: 0.4s; }
.lead { max-width: 44rem; color: var(--fg-2); font-size: clamp(1.05rem, 2vw, 1.25rem); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; }
.frame { overflow: hidden; border: 1px solid rgb(109 183 255 / 0.28); border-radius: 24px; background: #02060d; box-shadow: 0 0 0 6px rgb(47 151 255 / 0.05), 0 50px 140px -40px rgb(0 131 255 / 0.75); }
.hero-frame { width: 100%; margin-top: 1.5rem; }
.hero-frame img { width: 100%; }

@keyframes subir { from { opacity: 0; translate: 0 24px; } }

/* ── Cifras ── */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; width: min(calc(100% - 2rem), var(--w)); margin: 3rem auto 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.strip div { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.6rem 1.4rem; background: rgb(3 8 16 / 0.86); }
.strip b { font-size: 2.6rem; font-weight: 420; letter-spacing: -0.04em; line-height: 1; color: var(--accent-2); }
.strip span { color: var(--fg-2); font-size: 0.95rem; line-height: 1.4; }

/* ── Bloques ── */
.block { width: min(calc(100% - 2rem), var(--w)); margin: 0 auto; padding: clamp(4.5rem, 10vw, 8rem) 0 0; }
.head { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; max-width: 46rem; margin: 0 auto 3rem; text-align: center; }
.head > p:not(.tag) { color: var(--fg-2); font-size: 1.1rem; text-wrap: pretty; }

.card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 1.6rem; transition: border-color 0.3s, box-shadow 0.3s, translate 0.3s var(--ease); }
.card:hover { border-color: rgb(109 183 255 / 0.4); box-shadow: 0 30px 80px -50px rgb(0 131 255 / 0.9); }
.card p { color: var(--fg-2); }
.card h3 + p { margin-top: 0.5rem; }

.features { columns: 3 20rem; column-gap: 1rem; }
.feature { break-inside: avoid; margin-bottom: 1rem; }
.icon { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; margin-bottom: 1.1rem; border: 1px solid rgb(109 183 255 / 0.3); border-radius: 12px; background: linear-gradient(160deg, #0a2a5c, #030b18); color: var(--accent-2); }
.icon svg { width: 1.4rem; height: 1.4rem; }
.feature ul, .includes { display: grid; gap: 0.6rem; margin-top: 1rem; }
.feature li, .includes li { display: grid; grid-template-columns: 1.1rem 1fr; gap: 0.6rem; color: var(--fg-2); font-size: 0.97rem; line-height: 1.45; }
.feature li svg, .includes li svg { width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; color: var(--accent-2); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

/* ── Vídeos ── */
.videos { display: grid; grid-template-columns: 0.52fr 1fr 1fr; gap: 1.25rem; align-items: start; }
.video .frame { border-radius: 18px; }
.video video { width: 100%; background: #02060d; }
.video-movil video { aspect-ratio: 390 / 844; }
.video-escritorio video { aspect-ratio: 16 / 10; }
.video figcaption { padding: 1rem 0.25rem 0; }
.video figcaption p { margin-top: 0.3rem; color: var(--fg-2); font-size: 0.97rem; }

/* ── Manuales ── */
.manual { display: flex; flex-direction: column; gap: 0.6rem; text-decoration: none; }
.manual:hover { translate: 0 -3px; }
.pdf { align-self: flex-start; padding: 0.3rem 0.6rem; border: 1px solid rgb(109 183 255 / 0.35); border-radius: 6px; color: var(--accent-2); font: 500 0.7rem/1 'Geist Mono', ui-monospace, monospace; letter-spacing: 0.08em; }
.more { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: auto; padding-top: 0.8rem; color: #fff; font-weight: 520; }
.more i { display: grid; width: 1rem; height: 1rem; transition: translate 0.3s var(--ease); }
.manual:hover .more i { translate: 2px -2px; }

/* ── Tarifas ── */
.toggle { display: inline-flex; gap: 0.25rem; margin-top: 0.5rem; padding: 0.3rem; border: 1px solid var(--line-2); border-radius: 999px; background: rgb(0 0 0 / 0.55); }
.toggle button { padding: 0.55rem 1.1rem; border: 0; border-radius: 999px; background: none; color: var(--fg-2); font: inherit; font-size: 0.95rem; cursor: pointer; transition: background 0.2s, color 0.2s; }
.toggle button[aria-pressed='true'] { background: #fff; color: #000409; }
.toggle small { margin-left: 0.3rem; color: var(--accent-2); font-size: 0.78rem; }
.toggle button[aria-pressed='true'] small { color: #0057b8; }
.plans { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.plan { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.5rem 1.25rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.plan-featured { border-color: rgb(109 183 255 / 0.5); background: linear-gradient(170deg, #06224f, #020a18 75%); box-shadow: 0 40px 100px -50px rgb(0 131 255 / 0.95); }
.plan h3 { font-size: 1.02rem; color: var(--fg-2); font-weight: 450; }
.price { display: flex; align-items: baseline; gap: 0.2rem; margin-top: 0.4rem; }
.price b { font-size: 2.7rem; font-weight: 430; letter-spacing: -0.04em; line-height: 1; }
.plan .price b:only-child { font-size: 1.6rem; line-height: 1.7; }
.price span { color: var(--fg-2); font-size: 1.1rem; }
.price small { font-size: 0.9rem; }
.price-note { min-height: 2.6em; color: var(--fg-3); font-size: 0.88rem; line-height: 1.3; }
.plan .btn { margin-top: auto; min-height: 2.9rem; padding-left: 1.1rem; font-size: 0.95rem; justify-content: space-between; }
.plan .btn-secondary { justify-content: center; }
.plan .btn-arrow { width: 2rem; height: 2rem; }
.includes { grid-template-columns: repeat(3, 1fr); gap: 0.8rem 2rem; margin-top: 2rem; padding: 1.6rem; border: 1px solid var(--line); border-radius: 12px; background: rgb(3 8 16 / 0.6); }

/* ── Solicitud ── */
.request { display: grid; grid-template-columns: 0.9fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.request-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.2rem; position: sticky; top: 7rem; }
.request-copy p:not(.tag) { color: var(--fg-2); font-size: 1.08rem; }
.request-copy .muted { font-size: 0.97rem; }
.request-copy a, .check a { color: var(--accent-2); text-underline-offset: 3px; }
.form { display: grid; gap: 1rem; padding: clamp(1.25rem, 3vw, 2rem); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.92rem; font-weight: 500; }
.field small { color: var(--fg-3); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgb(0 0 0 / 0.5);
  color: #fff;
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; }
.field ::placeholder { color: var(--fg-3); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgb(47 151 255 / 0.25); }
.field [aria-invalid='true'] { border-color: var(--bad); }
.field .error { color: var(--bad); font-size: 0.86rem; }
.trap { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.check { display: grid; grid-template-columns: 1.2rem 1fr; gap: 0.7rem; color: var(--fg-2); font-size: 0.92rem; line-height: 1.45; cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; margin: 0.1rem 0 0; accent-color: var(--accent); }
.check.invalid { color: var(--bad); }
.form-status { min-height: 1.4em; font-size: 0.95rem; }
.form-status.ok { color: var(--ok); }
.form-status.bad { color: var(--bad); }
.form.sent > :not(.form-status) { display: none; }
.form.sent .form-status { padding: 2rem 0; font-size: 1.15rem; text-align: center; }

/* ── Pie ── */
.footer { width: min(calc(100% - 2rem), var(--w)); margin: clamp(5rem, 10vw, 8rem) auto 0; padding: 2rem 0 3rem; border-top: 1px solid var(--line); }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer nav a { color: var(--fg-2); font-size: 0.95rem; text-decoration: none; }
.footer nav a:hover { color: #fff; }
.footer { position: relative; }
.footer::before { content: ''; position: absolute; inset: 0 -100vw; z-index: -1; background: linear-gradient(transparent, rgb(0 4 9 / 0.92) 30%); }
.legal { max-width: 60rem; margin-top: 0.8rem; color: var(--fg-3); font-size: 0.84rem; line-height: 1.5; }
.legal b { color: var(--fg-2); font-weight: 500; }

/* ── Entradas al hacer scroll (solo con JavaScript) ── */
.js [data-reveal] { opacity: 0; translate: 0 22px; transition: opacity 0.7s var(--ease), translate 0.7s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; translate: 0 0; }

@media (max-width: 62rem) {
  .plans { grid-template-columns: repeat(2, 1fr); }
  .videos { grid-template-columns: 1fr 1fr; }
  .video-movil { grid-row: span 2; }
  .includes { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .request { grid-template-columns: 1fr; }
  .request-copy { position: static; }
  .strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 44rem) {
  body { font-size: 16px; }
  .nav nav { display: none; }
  .nav { justify-content: space-between; }
  .grid-2, .videos, .row, .includes { grid-template-columns: 1fr; }
  .video-movil { grid-row: auto; max-width: 17rem; margin: 0 auto; }
  .plans { grid-template-columns: 1fr; }
  .frame { border-radius: 14px; }
  .actions .btn { width: 100%; }
  .actions { width: 100%; }
  .btn-primary { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; translate: 0 0; }
}
