/* Rocket Base — sistema de diseño. Solo usa los tokens de marca/tokens.css */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--rb-font-body);
  font-size: var(--rb-fs-body);
  line-height: 1.6;
  color: var(--rb-text-on-light);
  background: var(--rb-cream);
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--rb-font-display);
  letter-spacing: var(--rb-tracking-tight);
  margin: 0 0 var(--rb-space-2);
  line-height: 1.1;
}
h1 { font-size: var(--rb-fs-h1); font-weight: 700; line-height: 1.05; }
h2 { font-size: var(--rb-fs-h2); font-weight: 700; }
h3 { font-size: var(--rb-fs-h3); font-weight: 500; line-height: 1.25; }
p { margin: 0 0 var(--rb-space-2); }
small, .small { font-size: var(--rb-fs-small); }

/* Foco visible */
:focus-visible {
  outline: 3px solid var(--rb-yellow);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--rb-yellow); color: var(--rb-navy);
  padding: .75rem 1rem; font-weight: 500;
}
.skip-link:focus { left: 0; }

/* Layout */
.container { width: min(100% - 2rem, var(--rb-container)); margin-inline: auto; }
.section { padding-block: var(--rb-section-y); }
.section--cream { background: var(--rb-cream); }
.section--white { background: var(--rb-white); }
.section--navy { background: var(--rb-navy); color: var(--rb-text-on-dark); }
.section--navy-2 { background: var(--rb-navy-2); color: var(--rb-text-on-dark); }
.section--orange { background: var(--rb-orange); color: var(--rb-navy); }
.muted { color: var(--rb-text-muted-on-light); }
.section--navy .muted, .section--navy-2 .muted { color: var(--rb-text-muted-on-dark); }
.section-head { max-width: 46rem; margin-bottom: var(--rb-space-5); }
.eyebrow {
  font-family: var(--rb-font-mono); font-size: var(--rb-fs-small);
  color: var(--rb-orange); margin-bottom: var(--rb-space-1); display: block;
}
.section--navy .eyebrow, .section--navy-2 .eyebrow { color: var(--rb-yellow); }

.grid { display: grid; gap: var(--rb-space-3); }
@media (min-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Botones: verbo primero, 8 px de radio */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--rb-font-display); font-weight: 700; font-size: 1rem;
  padding: .85rem 1.5rem; min-height: 48px;
  border-radius: var(--rb-radius-control); border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn--primary { background: var(--rb-orange); color: var(--rb-navy); }
.btn--primary:hover { background: var(--rb-orange-hover); }
.btn--outline { border-color: var(--rb-cream); color: var(--rb-cream); background: transparent; }
.btn--outline:hover { background: var(--rb-cream); color: var(--rb-navy); }
.btn--dark { background: var(--rb-navy); color: var(--rb-cream); }
.btn--dark:hover { background: var(--rb-navy-3); }
.btn--outline-dark { border-color: var(--rb-navy); color: var(--rb-navy); background: transparent; }
.btn--outline-dark:hover { background: var(--rb-navy); color: var(--rb-cream); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--rb-space-2); }
.link-arrow { font-weight: 500; text-decoration: none; border-bottom: 2px solid var(--rb-yellow); }
.link-arrow:hover { border-bottom-color: var(--rb-orange); }

/* Tarjetas: 12 px de radio */
.card {
  background: var(--rb-white); color: var(--rb-text-on-light);
  border-radius: var(--rb-radius-card); padding: var(--rb-space-3);
  border: 1px solid rgba(11, 21, 48, .08);
  display: flex; flex-direction: column; gap: .5rem;
  transition: transform .2s, border-color .2s;
}
.card h3 { margin-bottom: 0; }
.card p { margin: 0; color: var(--rb-text-muted-on-light); }
.card--dark {
  background: var(--rb-navy-2); color: var(--rb-text-on-dark);
  border-color: var(--rb-navy-3);
}
.card--dark p { color: var(--rb-text-muted-on-dark); }
a.card { text-decoration: none; }
a.card:hover { transform: translateY(-4px); border-color: var(--rb-orange); }
.card .link-arrow { margin-top: auto; align-self: flex-start; }

/* Badge: 999 px */
.badge {
  display: inline-block; font-family: var(--rb-font-mono); font-size: .8125rem;
  padding: .25rem .75rem; border-radius: var(--rb-radius-pill);
  background: var(--rb-yellow); color: var(--rb-navy); align-self: flex-start;
}
.badge--outline { background: transparent; border: 1px solid var(--rb-navy-3); color: var(--rb-yellow); }

/* Íconos de trazo */
.icon { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; color: var(--rb-orange); }
.section--navy .icon, .section--navy-2 .icon { color: var(--rb-yellow); }

/* Formularios */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: var(--rb-space-2); }
.field label { font-weight: 500; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--rb-navy); background: var(--rb-white);
  border: 1.5px solid var(--rb-text-muted-on-light);
  border-radius: var(--rb-radius-control); padding: .75rem 1rem; min-height: 48px; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field .errorlist { margin: 0; padding: 0; list-style: none; color: #B3200A; font-size: var(--rb-fs-small); }

/* Placeholders visibles [ASÍ] */
.placeholder {
  background: var(--rb-yellow); color: var(--rb-navy);
  padding: 0 .35em; border-radius: 4px; font-family: var(--rb-font-mono); font-size: .9em;
}

/* Fondos decorativos */
.stars {
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(247,245,240,.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 14%, rgba(247,245,240,.3) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 45% 60%, rgba(247,245,240,.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 70%, rgba(247,245,240,.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 85%, rgba(247,245,240,.3) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 62% 38%, rgba(247,245,240,.3) 50%, transparent 51%);
}
.trajectory { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.trajectory svg { width: 100%; height: 100%; }
.trajectory path { fill: none; stroke: var(--rb-orange); stroke-width: 1.5; opacity: .2; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--rb-navy); color: var(--rb-cream);
  border-bottom: 1px solid var(--rb-navy-3);
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.site-header__logo img { height: 36px; width: auto; }
.nav-toggle {
  background: none; border: 0; color: var(--rb-cream); cursor: pointer;
  min-width: 48px; min-height: 48px; display: grid; place-items: center;
}
.nav-toggle svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.site-nav { display: none; flex-direction: column; gap: .25rem; padding-bottom: var(--rb-space-3); }
.site-nav.is-open { display: flex; }
.site-nav a:not(.btn) { padding: .75rem 0; text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--rb-yellow); }
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
  .site-nav { display: flex; flex-direction: row; align-items: center; gap: 1.75rem; padding: 0; }
  .site-nav a:not(.btn) { padding: 0; }
  .site-nav .btn { padding: .6rem 1.1rem; min-height: 44px; }
}

/* Footer */
.site-footer { background: var(--rb-navy); color: var(--rb-text-on-dark); padding-block: var(--rb-space-6) var(--rb-space-4); }
.site-footer h4 { font-size: 1rem; font-weight: 700; color: var(--rb-yellow); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.site-footer a { text-decoration: none; color: var(--rb-text-muted-on-dark); }
.site-footer a:hover { color: var(--rb-cream); }
.site-footer__logo img { height: 40px; width: auto; margin-bottom: var(--rb-space-2); }
.site-footer__legal {
  margin-top: var(--rb-space-5); padding-top: var(--rb-space-3);
  border-top: 1px solid var(--rb-navy-3); color: var(--rb-text-muted-on-dark); font-size: var(--rb-fs-small);
}

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  width: 56px; height: 56px; border-radius: var(--rb-radius-pill);
  background: var(--rb-orange); color: var(--rb-navy);
  display: grid; place-items: center; text-decoration: none;
  box-shadow: 0 4px 12px rgba(11, 21, 48, .3);
}
.wa-float:hover { background: var(--rb-orange-hover); }
.wa-float svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Animaciones sutiles */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes liftoff { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.liftoff { animation: liftoff 1.2s ease-out both; }

/* ---- Portada: despegue del cohete atado al scroll ---- */
.hero { --py: 0px; }
.hero.stars { background-position: 0 var(--py); }
.hero::before, .hero::after {
  content: ""; position: absolute; inset: -20% 0; pointer-events: none; background-repeat: repeat;
}
.hero::before {
  background-size: 340px 340px;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(247,245,240,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 65%, rgba(255,201,60,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 85%, rgba(247,245,240,.6) 50%, transparent 51%);
  transform: translateY(calc(var(--py) * 1.6)); animation: twinkle 4s ease-in-out infinite alternate;
}
.hero::after {
  background-size: 220px 220px;
  background-image:
    radial-gradient(1px 1px at 80% 20%, rgba(247,245,240,.5) 50%, transparent 51%),
    radial-gradient(2px 2px at 35% 55%, rgba(247,245,240,.35) 50%, transparent 51%);
  transform: translateY(calc(var(--py) * 3)); animation: twinkle 6s ease-in-out infinite alternate-reverse;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }
.hero .container { z-index: 1; }
.trajectory path {
  stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--draw, .25)); opacity: .6; stroke-width: 2;
  filter: drop-shadow(0 0 6px var(--rb-orange));
}

.rocket-stage { position: relative; width: min(70%, 260px); aspect-ratio: 1; margin-inline: auto; z-index: 0; }
.rocket-pad { position: absolute; left: 12.5%; width: 75%; bottom: 3.9%; height: 7%; border-radius: 99px; background: var(--rb-cream); }
.rocket-fly { position: absolute; inset: 0; will-change: transform, opacity; }
.rocket { width: 100%; height: auto; display: block; overflow: visible; position: relative; }
.rocket__body { transform-box: fill-box; transform-origin: 50% 100%; animation: ignite 1.6s ease-out both, hover 3.2s 1.6s ease-in-out infinite alternate; }
.rocket__flame { transform-box: fill-box; transform-origin: 50% 0; animation: flame .12s linear infinite alternate; }
@keyframes ignite {
  0% { transform: translate(0, 0); } 15% { transform: translate(-.6px, 0); } 30% { transform: translate(.6px, -.3px); }
  45% { transform: translate(-.5px, 0); } 60% { transform: translate(.5px, -.4px); } 100% { transform: translate(0, -2px); }
}
@keyframes hover { from { transform: translateY(-2px); } to { transform: translateY(-4px); } }
@keyframes flame { from { transform: scaleY(.85) scaleX(.95); } to { transform: scaleY(1.45) scaleX(1.1); } }
.rocket-trail {
  position: absolute; left: 44%; width: 12%; top: 80%; height: calc(var(--lift, 0) * 1px);
  background: linear-gradient(to bottom, var(--rb-yellow), var(--rb-orange) 40%, transparent);
  filter: blur(3px); opacity: .85; border-radius: 99px; pointer-events: none;
}
.rocket-hud {
  position: absolute; right: -4%; top: 4%; display: grid; gap: .15rem; text-align: right;
  font-family: var(--rb-font-mono); font-size: .75rem; letter-spacing: .08em; color: var(--rb-text-muted-on-dark);
  border-right: 2px solid var(--rb-orange); padding-right: .6rem;
}
.rocket-hud b { color: var(--rb-yellow); font-weight: 500; }

/* Barra de progreso de lectura con cohete */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 70; pointer-events: none; }
.scroll-progress__bar { display: block; height: 100%; width: calc(var(--sp, 0) * 100%); background: linear-gradient(90deg, var(--rb-orange), var(--rb-yellow)); }
.scroll-progress__rocket { position: absolute; top: -7px; left: calc(var(--sp, 0) * (100% - 18px)); transform: rotate(90deg); }

@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
  .hero::before, .hero::after { transform: none; }
  .rocket-trail { display: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
