/* =========================================================
   Federico Prado Macat · Landing
   Base cálida (crema y arena) con celestes para la calma.
   Todos los valores de diseño vienen de tokens.css (ver DESIGN.md).
   ========================================================= */

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

html { scroll-behavior: smooth; scroll-padding-top: var(--scroll-offset); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: var(--fw-regular);
  line-height: var(--lh-heading);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-3xl); }

p { margin: 0 0 1em; }
a { color: var(--color-accent); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-hover); }

:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: var(--radius-xs); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--space-3); top: calc(-1 * var(--space-12)); z-index: 100;
  background: var(--color-text); color: var(--color-text-inverse);
  padding: var(--space-2) 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-3); color: var(--color-text-inverse); }

/* Antetítulo en cursiva, en lugar de mayúsculas espaciadas */
.eyebrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-md);
  color: var(--color-warm);
  margin-bottom: 0.4em;
}

/* ---------- Botones ---------- */
/* Primario */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--btn-height);
  padding: var(--btn-padding);
  border-radius: var(--btn-radius);
  border: var(--btn-border-width) solid var(--btn-primary-border);
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  font-weight: var(--btn-font-weight);
  font-size: var(--btn-font-size);
  text-decoration: none;
  text-align: center;
  transition: background-color var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
}
.btn:hover {
  background: var(--btn-primary-bg-hover);
  border-color: var(--btn-primary-border-hover);
  color: var(--btn-primary-text);
}
/* Secundario */
.btn-ghost { background: var(--btn-secondary-bg); border-color: var(--btn-secondary-border); color: var(--btn-secondary-text); }
.btn-ghost:hover { background: var(--btn-secondary-bg-hover); color: var(--btn-secondary-text-hover); }
/* Sobre las manchas de color del inicio, fondo claro para mantener el contraste */
.hero .btn-ghost { background: var(--color-surface-translucent); }
.hero .btn-ghost:hover { background: var(--color-text-inverse); }
/* Tamaño pequeño */
.btn-small { min-height: var(--btn-height-sm); padding: var(--btn-padding-sm); font-size: var(--btn-font-size-sm); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--color-bg-header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow .3s;
}
.site-header.is-scrolled { box-shadow: var(--shadow-header); }

.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-height); }

.header-cta { margin-left: auto; margin-right: 6px; min-height: 38px; padding: 0.35em 1em; font-size: var(--fs-2xs); }
.about-cta { margin-top: var(--space-6); font-weight: var(--fw-medium); }
.about-cta a { text-decoration: none; }
.about-cta a:hover { text-decoration: underline; }

.brand {
  font-family: var(--font-serif); font-size: var(--fs-fluid);
  color: var(--color-text); text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--color-text); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; border-radius: var(--radius-md);
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 22px; height: 1.5px; background: var(--color-text); border-radius: 2px;
  position: relative; transition: transform var(--duration-fast), background-color var(--duration-fast);
}
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute; top: 100%; left: 0; right: 0;
  display: none; flex-direction: column; gap: 2px;
  padding: var(--space-2) var(--gutter) var(--space-5);
  background: var(--color-bg);
  box-shadow: var(--shadow-menu);
}
.site-nav.is-open { display: flex; }
.site-nav a:not(.btn) { color: var(--color-text); text-decoration: none; padding: 10px 0; }
.site-nav a:not(.btn):hover { color: var(--color-accent); }
.site-nav .btn { margin-top: var(--space-2); }

/* Sin JS el menú queda siempre visible */
.no-js .nav-toggle { display: none; }
.no-js .site-nav {
  position: static; display: flex; flex-direction: row; flex-wrap: wrap;
  gap: var(--space-1) var(--space-4); padding: 0; box-shadow: none; background: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  /* Ocupa toda la pantalla menos la cabecera (svh = sin contar las barras del navegador móvil) */
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height));
  padding: var(--space-12) 0 88px;
  text-align: center;
}
.hero-inner { width: 100%; }

/* Indicador sutil para bajar: aparece tras unos segundos y se va al hacer scroll */
.scroll-cue {
  position: absolute; left: 50%; bottom: 18px;
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-left: -22px;
  border-radius: var(--radius-round);
  color: var(--color-text-muted);
  opacity: 0;
  animation: cue-in 1s ease-out 2.8s forwards;
  transition: opacity .4s;
}
.scroll-cue svg { animation: cue-bob 2.6s ease-in-out 3.8s infinite; }
.scroll-cue:hover { color: var(--color-accent); }
.scroll-cue.is-hidden { opacity: 0 !important; pointer-events: none; animation: none; }

@keyframes cue-in { to { opacity: .75; } }
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
.hero-inner { position: relative; max-width: var(--container-narrow); }
.lead { font-size: var(--fs-lg); color: var(--color-text-muted); max-width: 32em; margin: 0 auto; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin: var(--space-8) 0 14px; }
.hero-note { font-size: var(--fs-xs); color: var(--color-text-muted); margin: 0; }

/* Aura: manchas de color difuminadas que "respiran" detrás del texto */
.hero-aura { position: absolute; inset: 0; pointer-events: none; }
.aura {
  position: absolute;
  border-radius: var(--radius-round);
  filter: blur(60px);
  opacity: .7;
  animation: breathe 12s ease-in-out infinite;
}
.aura-1 { width: 420px; height: 420px; background: var(--color-sky); top: -120px; left: -140px; }
.aura-2 { width: 380px; height: 380px; background: var(--color-peach); bottom: -160px; right: -120px; animation-delay: -4s; }
.aura-3 { width: 260px; height: 260px; background: var(--color-bg-tint); top: 30%; right: 18%; animation-delay: -8s; opacity: .9; }

/* Inhala, sostiene, exhala */
@keyframes breathe {
  0%, 100% { transform: scale(0.85); }
  40%, 55% { transform: scale(1.08); }
}

/* ---------- Secciones ---------- */
.section { padding: var(--section-pad) 0; }
/* Al saltar desde el menú, el título queda cerca de la cabecera en lugar de bajo todo el relleno */
.section[id] { scroll-margin-top: var(--section-anchor-offset); }
.section-sand { background: var(--color-bg-alt); }
.section-sky { background: var(--color-bg-tint); }
.section-head { margin-bottom: var(--space-10); max-width: var(--measure-head); }
.section-head p:not(.eyebrow) { color: var(--color-text-muted); }

/* Pasos: sin tarjetas, con línea y número en cursiva */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-8); }
.step { border-top: 1px solid var(--color-border); padding-top: var(--space-5); }
.step-num {
  display: block;
  font-family: var(--font-serif); font-style: italic;
  font-size: var(--fs-display-sm); line-height: var(--lh-tight); color: var(--color-sky-strong);
  margin-bottom: var(--space-3);
}
.step h3 { margin-bottom: 0.1em; }
.step-time { font-size: var(--fs-xs); color: var(--color-warm); margin-bottom: 0.6em; }
.step p:last-child { margin-bottom: 0; color: var(--color-text-muted); }

/* Para quién */
.two-col { display: grid; gap: var(--space-2); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.checklist li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-bottom: 1px solid var(--color-border-subtle);
}
.checklist li:last-child { border-bottom: 0; }
.checklist li::before {
  content: ""; position: absolute; left: var(--space-1); top: 1.45em;
  width: 12px; height: 12px; border-radius: var(--radius-round);
  background: var(--color-sky);
  box-shadow: var(--shadow-halo);
}

/* Precios */
.launch-note {
  display: inline-block;
  margin-top: var(--space-1);
  padding: 10px var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text) !important;
  font-size: var(--fs-sm);
}
.plans { display: grid; gap: var(--space-5); align-items: stretch; }
.plan {
  display: flex; flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 30px 26px;
}
.plan-featured { background: var(--color-bg-tint); border-color: transparent; position: relative; }
.plan-quiet { background: transparent; }
.plan-tag {
  position: absolute; top: -13px; left: 26px;
  background: var(--color-peach); color: var(--color-peach-text);
  font-family: var(--font-serif); font-style: italic;
  font-size: var(--fs-sm);
  padding: 2px 14px; border-radius: var(--radius-pill); margin: 0;
}
.plan-desc { color: var(--color-text-muted); }
.price { display: flex; flex-direction: column; margin: var(--space-1) 0 18px; }
.price-amount { font-family: var(--font-serif); font-size: var(--fs-display); line-height: var(--lh-display); }
.price-per { font-size: var(--fs-xs); color: var(--color-text-muted); }
.plan-list { list-style: none; padding: 0; margin: 0 0 var(--space-6); flex: 1; }
.plan-list li { padding: var(--space-2) 0; border-top: 1px solid var(--color-border-subtle); }
.plan .btn { width: 100%; }
.fine-print { margin-top: var(--space-7); font-size: var(--fs-sm); color: var(--color-text-muted); }

/* Sobre mí */
.about { display: grid; gap: var(--space-8); align-items: center; }
.about-photo { margin: 0; }
.about-photo img, .photo-placeholder {
  width: 100%; height: auto; max-width: min(72vw, 360px); aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius-arch) var(--radius-arch) var(--radius-xl) var(--radius-xl);
  display: block; margin: 0 auto;
}
.photo-placeholder {
  display: grid; place-items: center;
  background: linear-gradient(170deg, var(--color-sky) 0%, var(--color-peach) 100%);
  color: var(--color-text-inverse); font-family: var(--font-serif); font-size: var(--fs-jumbo);
}
.about-quote {
  margin: var(--space-7) 0;
  padding: var(--space-1) 0 var(--space-1) 22px;
  border-left: 3px solid var(--color-sky);
}
.about-quote p {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--fs-2xl);
  line-height: var(--lh-quote);
  color: var(--color-text);
}
.facts-title { margin: var(--space-7) 0 0; font-family: var(--font-serif); font-size: var(--fs-lg); }
.facts { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.facts li { padding-left: 18px; position: relative; color: var(--color-text-muted); }
.facts li::before {
  content: ""; position: absolute; left: 0; top: .75em;
  width: 6px; height: 6px; border-radius: var(--radius-round); background: var(--color-warm);
}
.facts strong { color: var(--color-text); font-weight: var(--fw-semibold); }

/* Enlaces a Neyen y YouTube */
.link-cards { display: grid; gap: var(--space-3); }
.link-card {
  display: flex; flex-direction: column; gap: 2px;
  padding: 18px var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color var(--duration-fast), background-color var(--duration-fast);
}
.link-card:hover { border-color: var(--color-sky-strong); background: var(--color-bg-tint); color: var(--color-text); }
.link-card-title { font-family: var(--font-serif); font-size: var(--fs-xl); }
.link-card-text { color: var(--color-text-muted); font-size: var(--fs-sm); }
.link-card-cta { margin-top: 6px; color: var(--color-accent); font-weight: var(--fw-medium); font-size: var(--fs-sm); }

@media (min-width: 560px) {
  .link-cards { grid-template-columns: 1fr 1fr; }
}

/* FAQ: líneas en lugar de cajas */
.faq { border-top: 1px solid var(--color-border); }
.faq details { border-bottom: 1px solid var(--color-border); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: var(--space-5) 0;
  font-family: var(--font-serif); font-size: var(--fs-fluid);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  font-family: var(--font-sans); font-size: var(--fs-4xl); line-height: var(--lh-tight); color: var(--color-warm);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > :not(summary) { color: var(--color-text-muted); }
.faq details > :last-child { margin-bottom: 22px; }
.faq ul { padding-left: 1.2em; margin: 0 0 1em; }

/* CTA final */
.cta {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--color-bg-tint) 0%, var(--color-bg-alt) 100%);
  text-align: center;
}
.cta-inner { position: relative; }
.cta-inner p { color: var(--color-text-muted); max-width: 30em; margin-left: auto; margin-right: auto; }
.cta .btn { margin: var(--space-3) 0 var(--space-5); }
.cta-alt { font-size: var(--fs-sm); }

/* Footer */
.site-footer {
  background: var(--color-text); color: var(--color-text-inverse-muted);
  padding: var(--space-10) 0; font-size: var(--fs-xs);
}
.site-footer a { color: var(--color-text-inverse); }
.footer-inner { display: grid; gap: var(--space-5); }
.disclaimer { max-width: 60em; }
.disclaimer strong { color: var(--color-text-inverse); }
.footer-meta p { margin: 0 0 var(--space-1); }

/* ---------- Animaciones ---------- */
/* Entrada del hero al cargar */
.hero-inner > * { animation: rise 1.1s var(--ease-out) both; }
.hero-inner > :nth-child(1) { animation-delay: .1s; }
.hero-inner > :nth-child(2) { animation-delay: .25s; }
.hero-inner > :nth-child(3) { animation-delay: .45s; }
.hero-inner > :nth-child(4) { animation-delay: .65s; }
.hero-inner > :nth-child(5) { animation-delay: .8s; }
.hero-aura { animation: fade-in 2s ease-out both; will-change: transform; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Aparición suave al hacer scroll (main.js añade .is-visible) */
.js :is(.section-head, .step, .checklist li, .about-photo, .about-text > *, .plan, .fine-print, .faq details, .cta-inner > *, .link-card) {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--duration-reveal) var(--ease-out) var(--d, 0s),
    transform var(--duration-reveal) var(--ease-out) var(--d, 0s),
    background-color var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
}
.js .about-photo { transform: translateY(20px) scale(.96); }
.js :is(.section-head, .step, .checklist li, .about-photo, .about-text > *, .plan, .fine-print, .faq details, .cta-inner > *, .link-card).is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Tablet / escritorio ---------- */
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--space-10); }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 2fr 1fr; align-items: end; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav, .no-js .site-nav {
    position: static; display: flex; flex-direction: row; align-items: center; gap: var(--space-7);
    padding: 0; box-shadow: none; background: none;
  }
  .site-nav .btn { margin-top: 0; }

  .hero { padding: var(--space-16) 0 var(--space-26); }
  .aura-1 { width: 560px; height: 560px; top: -180px; left: -120px; }
  .aura-2 { width: 520px; height: 520px; right: -80px; }

  /* Precios: cabecera en dos columnas para que las tarjetas entren en pantalla */
  #precios .section-head {
    max-width: none;
    display: grid;
    grid-template-columns: 1fr minmax(0, 440px);
    column-gap: var(--space-12);
    align-items: end;
    margin-bottom: 36px;
  }
  #precios .section-head > :not(.launch-note) { grid-column: 1; }
  #precios .section-head > :last-child:not(.launch-note) { margin-bottom: 0; }
  #precios .section-head > p:not(.eyebrow):not(.launch-note) { margin-bottom: 0; }
  #precios .launch-note { grid-column: 2; grid-row: 1 / span 3; align-self: end; margin: 0; }
  .plan { padding: 26px 26px var(--space-6); }
  .two-col { grid-template-columns: 0.8fr 1.2fr; gap: var(--space-14); align-items: start; }
  .about { grid-template-columns: 0.8fr 1.2fr; gap: var(--space-16); align-items: start; }
  .about-photo { position: sticky; top: var(--space-26); }
  .header-cta { display: none; }
  .link-cards { max-width: var(--container-narrow); }
}

/* ---------- Accesibilidad: menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js :is(.section-head, .step, .checklist li, .about-photo, .about-text > *, .plan, .fine-print, .faq details, .cta-inner > *, .link-card) {
    opacity: 1; transform: none;
  }
  .scroll-cue { opacity: .75; }
}
