/* ============================================================
   DREAMS · The Dreams Academy
   Night-nursery design system
   ============================================================ */

:root {
  /* color */
  --zenith: #10162e;        /* cielo profundo (hero, footer) */
  --horizon: #2a3357;       /* índigo del horizonte */
  --night-ink: #dfe3f2;     /* texto sobre noche */
  --night-soft: #9aa3c7;    /* texto secundario sobre noche */
  --moon: #ecc678;          /* dorado luna — acento principal */
  --moon-deep: #d9a94f;
  --linen: #f7f4ee;         /* fondo día, lino cálido */
  --card: #fffdf9;          /* superficie de tarjetas */
  --ink: #23283e;           /* tinta índigo */
  --ink-soft: #6a6f86;
  --dusk: #4f5d9e;          /* interactivo secundario */
  --line: #e5e0d4;          /* bordes cálidos */
  --ok-bg: #eef4e7;
  --ok-line: #c4d6ad;
  --error: #b3453c;

  /* type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;

  /* shape */
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 2px 6px rgba(35, 40, 62, 0.05), 0 14px 34px rgba(35, 40, 62, 0.08);
  --shadow-lift: 0 4px 10px rgba(35, 40, 62, 0.08), 0 22px 48px rgba(35, 40, 62, 0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  background: var(--linen);
  color: var(--ink);
}

/* ============================================================ HERO */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--zenith) 0%, #1a2140 55%, var(--horizon) 100%);
  color: var(--night-ink);
  overflow: hidden;
  padding-bottom: 4.5rem;
}

.hero-sky { position: absolute; inset: 0; pointer-events: none; }

.stars {
  position: absolute;
  border-radius: 50%;
  background: #fff;
}
.stars-a {
  width: 2px; height: 2px;
  opacity: 0.7;
  box-shadow:
    6vw 12vh 0 0 rgba(255,255,255,.75), 14vw 28vh 0 0 rgba(255,255,255,.5),
    21vw 8vh 0 0 rgba(255,255,255,.8), 28vw 34vh 0 0 rgba(255,255,255,.45),
    34vw 16vh 0 0 rgba(255,255,255,.7), 42vw 6vh 0 0 rgba(255,255,255,.55),
    49vw 24vh 0 0 rgba(255,255,255,.65), 57vw 11vh 0 0 rgba(255,255,255,.5),
    63vw 31vh 0 0 rgba(255,255,255,.7), 71vw 18vh 0 0 rgba(255,255,255,.6),
    78vw 7vh 0 0 rgba(255,255,255,.75), 84vw 27vh 0 0 rgba(255,255,255,.5),
    91vw 14vh 0 0 rgba(255,255,255,.65), 96vw 33vh 0 0 rgba(255,255,255,.45),
    10vw 42vh 0 0 rgba(255,255,255,.4), 47vw 40vh 0 0 rgba(255,255,255,.4),
    88vw 44vh 0 0 rgba(255,255,255,.35);
  animation: twinkle 4.5s ease-in-out infinite;
}
.stars-b {
  width: 3px; height: 3px;
  opacity: 0.9;
  box-shadow:
    17vw 20vh 0 0 rgba(255,255,255,.9), 38vw 27vh 0 0 rgba(236,198,120,.85),
    53vw 5vh 0 0 rgba(255,255,255,.95), 67vw 25vh 0 0 rgba(255,255,255,.8),
    81vw 12vh 0 0 rgba(236,198,120,.8), 93vw 22vh 0 0 rgba(255,255,255,.85),
    25vw 38vh 0 0 rgba(255,255,255,.6), 74vw 39vh 0 0 rgba(236,198,120,.6);
  animation: twinkle 6s ease-in-out 1.2s infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.35; }
}

/* creciente real: el propio elemento es transparente y la sombra
   desplazada dibuja la luna, dejando el recorte del color del cielo */
.moon-crescent {
  position: absolute;
  top: 7vh;
  right: 12vw;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 22px 14px 0 0 var(--moon);
  filter: drop-shadow(0 0 22px rgba(236, 198, 120, 0.5));
  transform: rotate(-14deg);
}
@media (max-width: 900px) {
  /* en pantallas angostas la luna baja para no chocar con la barra superior */
  .moon-crescent { width: 54px; height: 54px; box-shadow: 15px 9px 0 0 var(--moon); right: 6vw; top: 4.3rem; }
}
@media (max-width: 560px) {
  .wordmark-sub { display: none; }
}

/* top bar */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.4rem 1.4rem 0;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  white-space: nowrap;
}
.wordmark-dot { color: var(--moon); }
.wordmark-sub {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--night-soft);
}

.lang-toggle { display: flex; gap: 0.35rem; }
.lang-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--night-ink);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  transition: background 0.15s, color 0.15s;
}
.lang-btn:hover { background: rgba(255, 255, 255, 0.16); }
.lang-btn.active { background: var(--moon); color: var(--zenith); border-color: var(--moon); }

/* hero content */
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(4rem, 11vh, 7.5rem) 1.4rem 0;
  text-align: center;
  animation: rise 0.9s ease-out both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--moon);
  margin-bottom: 1.1rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.4vw, 3.4rem);
  line-height: 1.14;
  text-wrap: balance;
  color: #fff;
  margin-bottom: 1.1rem;
}

.hero-sub {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--night-soft);
  max-width: 34em;
  margin: 0 auto 1.9rem;
}

.hero-cta-row { margin-bottom: 2.4rem; }

.trust-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}
.trust-row li {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--night-ink);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.42rem 0.95rem;
}

.hero-curve {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  line-height: 0;
}
.hero-curve svg { width: 100%; height: clamp(34px, 6vw, 90px); display: block; }
.hero-curve path { fill: var(--linen); }

/* ============================================================ BOTONES */
.btn-moon {
  display: inline-block;
  background: linear-gradient(160deg, #f3d694 0%, var(--moon) 45%, var(--moon-deep) 100%);
  color: var(--zenith);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 0.78rem 2rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(217, 169, 79, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-moon:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(217, 169, 79, 0.45); }
.btn-moon:active { transform: none; }
.btn-moon:disabled { opacity: 0.55; cursor: wait; transform: none; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-lg { font-size: 1.08rem; padding: 0.95rem 2.6rem; }

.link-btn {
  background: none;
  border: none;
  color: var(--dusk);
  cursor: pointer;
  margin-top: 1.3rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--ink); }

/* ============================================================ LAYOUT */
main {
  max-width: 880px;
  margin: 0 auto;
  padding: 1rem 1.2rem 4rem;
}

.section { padding-top: 2.6rem; }

.section-title,
.card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.25;
  color: var(--ink);
  text-wrap: balance;
}
.section-title { text-align: center; margin-bottom: 1.6rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 2rem 2.1rem;
  margin-bottom: 1.5rem;
}
.card h2 { margin-bottom: 1.2rem; }

.step-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moon-deep);
  margin-bottom: 0.4rem;
}

.hint { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 1rem; }

/* ============================================================ FORM */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.05rem;
}
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

label { display: block; margin-bottom: 1.05rem; }
label span {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.68rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--dusk);
  box-shadow: 0 0 0 3px rgba(79, 93, 158, 0.16);
}
input.invalid, select.invalid { border-color: var(--error); }

:where(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--dusk);
  outline-offset: 2px;
}

/* submit */
.submit-row { text-align: center; margin: 2.2rem 0 1rem; }
.disclaimer {
  font-size: 0.8rem;
  color: var(--ink-soft);
  max-width: 34em;
  margin: 0 auto 1.2rem;
}

/* ============================================================ PRICING */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 1.3rem;
  align-items: stretch;
}
@media (max-width: 700px) { .pricing-grid { grid-template-columns: 1fr; } }

.price-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.9rem 1.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s;
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.price-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  margin-bottom: 0.15rem;
}

.price-big {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.3rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  margin: 0.15rem 0 1rem;
}

.feature-list {
  list-style: none;
  margin-bottom: 1.4rem;
  flex: 1;
}
.feature-list li {
  position: relative;
  padding-left: 1.55rem;
  font-size: 0.93rem;
  margin-bottom: 0.55rem;
}
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0.1rem;
  font-weight: 800;
  color: var(--dusk);
}

/* tarjeta destacada: la noche dentro del día */
.price-card.featured {
  background: linear-gradient(180deg, var(--zenith) 0%, #1c2445 100%);
  border-color: #323c66;
  color: var(--night-ink);
}
.price-card.featured h3 { color: #fff; }
.price-card.featured .price-big { color: var(--moon); }
.price-card.featured .feature-list li::before { color: var(--moon); }
.hint-inverse { color: var(--night-soft); margin-top: 0.9rem; margin-bottom: 0; }

.ribbon {
  position: absolute;
  top: -0.78rem;
  right: 1.3rem;
  background: var(--moon);
  color: var(--zenith);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(217, 169, 79, 0.4);
}

.pdf-success {
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.05rem;
  font-size: 0.92rem;
}
.pdf-success a {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 800;
  color: var(--dusk);
}

/* ============================================================ ACCESS */
.access-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.4rem;
  align-items: start;
  margin-top: 0.6rem;
}
@media (max-width: 640px) { .access-grid { grid-template-columns: 1fr; } }

.access-col h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  margin-bottom: 0.5rem;
}
.access-col input {
  margin-bottom: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-align: center;
}
.access-divider {
  align-self: center;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  padding: 0 0.3rem;
}
.access-error { color: var(--error); font-size: 0.88rem; min-height: 1.3em; margin-top: 0.5rem; }
.price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.8rem;
}

/* ============================================================ RESULT */
.hidden { display: none !important; }

.loading { text-align: center; padding: 2.6rem 1rem; color: var(--ink-soft); }
.loading-moon {
  width: 46px;
  height: 46px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #f7dfae 0%, var(--moon) 55%, var(--moon-deep) 100%);
  box-shadow: 0 0 24px 6px rgba(236, 198, 120, 0.35);
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.86); opacity: 0.72; }
}

.plan { line-height: 1.68; }
.plan h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.2;
  color: var(--ink);
  margin: 1rem 0;
}
.plan h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 1.5rem 0 0.6rem;
  color: var(--ink);
}
.plan h3 { font-size: 1.02rem; margin: 1.1rem 0 0.4rem; color: var(--dusk); }
.plan p { margin: 0.5rem 0; }
.plan ul, .plan ol { margin: 0.5rem 0 0.5rem 1.4rem; }
.plan li { margin: 0.28rem 0; }
.plan table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.9rem 0;
  font-size: 0.91rem;
  font-variant-numeric: tabular-nums;
}
.plan th, .plan td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.plan th { background: #f2eee4; font-weight: 800; }
.plan blockquote {
  border-left: 3px solid var(--moon);
  padding: 0.45rem 1rem;
  background: #faf5e9;
  margin: 0.9rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.plan hr { border: none; border-top: 1px solid var(--line); margin: 1.3rem 0; }

.actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.7rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.actions button {
  background: #fff;
  color: var(--dusk);
  border: 1.5px solid var(--line);
  padding: 0.6rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.actions button:hover { border-color: var(--dusk); background: #f6f6fb; }

/* ============================================================ FOOTER */
.site-footer {
  background: linear-gradient(180deg, var(--horizon) 0%, var(--zenith) 100%);
  color: var(--night-soft);
  padding: 3rem 1.4rem 2.6rem;
  text-align: center;
}
.footer-inner { max-width: 880px; margin: 0 auto; }
.wordmark-footer { justify-content: center; margin-bottom: 0.7rem; font-size: 1.05rem; }
.site-footer p { font-size: 0.9rem; }
.footer-legal { margin-top: 0.5rem; font-size: 0.78rem; opacity: 0.75; }

/* ============================================================ MOTION & PRINT */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stars-a, .stars-b, .loading-moon, .hero-inner { animation: none; }
  .btn-moon, .price-card { transition: none; }
}

@media print {
  body { background: #fff; }
  .hero, form, .actions, .site-footer, .loading, #pricing-section,
  #access-section, #plan-link { display: none !important; }
  main { margin: 0; max-width: 100%; padding: 0; }
  .card { box-shadow: none; border: none; padding: 0; }
  #result-section { display: block !important; }
}
