/* ============================================================
   CasaNutri · Sistema visual de páginas estáticas (SEO)
   Espeja el tema cinematográfico de la app React (LandingView):
   mismos tokens de marca, tipografías (Outfit + Inter), fondo
   cálido con washes, tarjetas redondeadas con anillo de marca,
   botones pill y acentos mint. Preserva el contrato de clases
   (.topbar, .hero, .card, .btn, .band, .faq, .tool, .table…)
   para re-vestir todas las páginas sin tocar su markup.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --brand: #412865;
  --brand-soft: #5b3f86;
  --brand-tint: #f3eefa;
  --brand-light: #ede6f7;
  --mint: #16b28d;
  --mint-tint: #e6f7f2;
  --tang: #f67315;
  --tang-tint: #fef0e6;
  --gold: #f8a008;
  --ink: #211827;
  --warm: #6a5e86;
  --line: #ede6f7;
  --surface: #faf8f5;

  --font-head: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-card: 22px;
  --radius-lg: 32px;
  --shadow-card: 0 10px 30px rgba(65, 40, 101, .06);
  --shadow-hover: 0 18px 46px rgba(65, 40, 101, .12);
  --shadow-mint: 0 12px 30px rgba(22, 178, 141, .28);
  --shadow-brand: 0 12px 30px rgba(65, 40, 101, .22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;
  /* Gradiente que cubre toda la página (sin background-attachment:fixed, que se
     rompe en Safari móvil y en captura headless). Los washes van una sola vez arriba. */
  background-color: #f6f1fb;
  background-image:
    radial-gradient(680px circle at 6% -4%, rgba(65, 40, 101, .12), transparent 60%),
    radial-gradient(620px circle at 106% 6%, rgba(22, 178, 141, .10), transparent 62%),
    linear-gradient(180deg, #f6f1fb 0%, #faf8f5 40%, #eef9f5 100%);
  background-repeat: no-repeat;
  background-size: auto, auto, 100% 100%;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  color: var(--brand-soft);
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- TOPBAR (espeja el navbar sticky de la app) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(237, 230, 247, .7);
}

.topbar .wrap {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--brand);
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand span {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.01em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 600;
}

.nav a {
  color: var(--warm);
}

.nav a:hover {
  color: var(--brand);
}

/* CTA dentro del nav (ej. "Iniciar sesión" / "Empezar gratis") */
.nav .nav-cta {
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  padding: 8px 18px;
  box-shadow: 0 8px 20px rgba(65, 40, 101, .18);
  transition: transform .15s ease, background .15s ease;
}

.nav .nav-cta:hover {
  color: #fff;
  background: var(--brand-soft);
  transform: translateY(-1px);
}

/* ---------- TIPOGRAFÍA ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  color: var(--brand);
  letter-spacing: -.02em;
}

h1 {
  max-width: 900px;
  margin: 14px 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  font-weight: 800;
  line-height: 1.03;
}

.lead {
  max-width: 720px;
  color: var(--warm);
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.6;
}

.eyebrow {
  display: inline-block;
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 800;
}

/* ---------- HERO ---------- */
.hero {
  padding: 68px 0 40px;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

/* ---------- BOTONES ---------- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 24px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, filter .15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

/* primaria = mint (el CTA de conversión de la app) */
.btn.primary {
  background: var(--mint);
  color: #fff;
  box-shadow: var(--shadow-mint);
}

.btn.primary:hover {
  filter: brightness(.96);
  color: #fff;
}

/* variante marca (morado) para CTAs secundarios fuertes */
.btn.brand {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn.brand:hover {
  background: var(--brand-soft);
  color: #fff;
}

.btn.secondary {
  background: rgba(255, 255, 255, .8);
  color: var(--brand);
  border-color: var(--brand-light);
  backdrop-filter: blur(4px);
}

.btn.secondary:hover {
  border-color: rgba(65, 40, 101, .4);
  color: var(--brand);
}

/* ---------- GRID / SECCIONES ---------- */
.section {
  padding: 56px 0;
}

.section h2 {
  margin-top: 0;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.06;
}

.section-intro {
  max-width: 760px;
  color: var(--warm);
  font-size: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  padding: 36px 0;
}

/* ---------- TARJETAS (anillo de marca + hover lift + spotlight) ---------- */
.card {
  position: relative;
  border: 1px solid rgba(237, 230, 247, .8);
  border-radius: var(--radius-card);
  padding: 26px;
  background: rgba(255, 255, 255, .85);
  box-shadow: var(--shadow-card);
  transition: transform .28s ease, box-shadow .28s ease;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .3s ease;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(22, 178, 141, .12), transparent 70%);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card:hover::before {
  opacity: 1;
}

.card h2,
.card h3 {
  margin-top: 0;
  font-size: 20px;
}

.card p {
  color: var(--warm);
  margin-bottom: 0;
}

.card h3 a {
  color: var(--brand);
}

/* ---------- PASOS ---------- */
.steps {
  counter-reset: step;
}

.step {
  position: relative;
  padding-left: 62px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 24px;
  top: 26px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--mint);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(22, 178, 141, .3);
}

/* ---------- SPLIT ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 30px;
  align-items: start;
}

.feature-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: 17px;
}

.feature-list li {
  position: relative;
  margin: 12px 0;
  padding-left: 30px;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--mint);
  font-weight: 800;
}

.highlight {
  border: 1px solid rgba(248, 160, 8, .28);
  border-radius: var(--radius-card);
  padding: 28px;
  background: linear-gradient(180deg, #fff9f0 0%, #fff 100%);
  box-shadow: var(--shadow-card);
}

.highlight h3 {
  margin-top: 0;
}

.highlight p {
  color: var(--warm);
}

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.faq details {
  border: 1px solid rgba(237, 230, 247, .9);
  border-radius: 16px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, .85);
  box-shadow: var(--shadow-card);
}

.faq summary {
  cursor: pointer;
  color: var(--brand);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "＋";
  float: right;
  color: var(--mint);
  font-weight: 700;
}

.faq details[open] summary::after {
  content: "－";
}

.faq p {
  margin-bottom: 0;
  margin-top: 12px;
  color: var(--warm);
}

/* ---------- META / TABLA / TOOL ---------- */
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.meta-row span {
  border: 1px solid var(--brand-light);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, .8);
  color: var(--warm);
  font-size: 13px;
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-card);
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 15px 16px;
  text-align: left;
  vertical-align: top;
}

.table tr:last-child td {
  border-bottom: none;
}

.table th {
  background: var(--brand-tint);
  color: var(--brand);
  font-family: var(--font-head);
}

.tool {
  display: grid;
  gap: 16px;
  max-width: 760px;
  margin-top: 26px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-card);
}

.tool label {
  display: grid;
  gap: 6px;
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
}

.tool input,
.tool select {
  min-height: 48px;
  border: 1px solid var(--brand-light);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.tool input:focus,
.tool select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}

.result {
  border: 1px solid rgba(22, 178, 141, .35);
  border-radius: 16px;
  padding: 20px;
  background: var(--mint-tint);
  color: var(--ink);
  font-weight: 600;
}

/* ---------- BANDAS ---------- */
.band {
  position: relative;
  background: linear-gradient(180deg, rgba(243, 238, 250, .6), rgba(230, 247, 242, .5));
  border-top: 1px solid rgba(237, 230, 247, .7);
  border-bottom: 1px solid rgba(237, 230, 247, .7);
  padding: 8px 0;
  margin: 8px 0;
}

/* ---------- FOOTER (espeja el de la app) ---------- */
.footer {
  border-top: 1px solid rgba(237, 230, 247, .7);
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(6px);
  padding: 34px 0;
  color: var(--warm);
  font-size: 14px;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  gap: 8px;
}

.footer p {
  margin: 0;
}

.footer strong {
  color: var(--ink);
}

.footer a {
  color: var(--warm);
}

.footer a:hover {
  color: var(--brand);
}

/* ---------- HERO CINEMÁTICO (páginas insignia: casa, calculadoras) ---------- */
.hero-cine {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--brand);
}

.hero-cine > video,
.hero-cine > img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-cine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(65, 40, 101, .9) 0%, rgba(65, 40, 101, .42) 55%, rgba(65, 40, 101, .14) 100%);
}

.hero-cine .wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 40px;
  padding-bottom: 60px;
}

.hero-cine .eyebrow {
  color: #fff;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  padding: 7px 16px;
}

.hero-cine h1 {
  color: #fff;
}

.hero-cine h1 .hl,
.hero-cine .hl {
  color: var(--mint);
}

.hero-cine .lead {
  color: rgba(255, 255, 255, .9);
}

.hero-cine .btn.secondary {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .4);
  color: #fff;
}

.hero-cine-trust {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .8);
}

.hero-cine-trust b {
  color: var(--mint);
}

/* Nav transparente sobre hero cinemático */
.topbar.over-hero {
  position: absolute;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
  left: 0;
  right: 0;
}

.topbar.over-hero .brand,
.topbar.over-hero .brand span {
  color: #fff;
}

.topbar.over-hero .nav a {
  color: rgba(255, 255, 255, .85);
}

.topbar.over-hero .nav a:hover {
  color: #fff;
}

.topbar.over-hero .nav .nav-cta {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
}

.topbar.over-hero .nav .nav-cta:hover {
  background: rgba(255, 255, 255, .26);
}

/* ---------- PRICING (tarjetas de plan para /casa y hubs) ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.plan {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--brand-light);
  border-radius: var(--radius-card);
  padding: 26px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-card);
}

.plan.highlight {
  border: 2px solid rgba(22, 178, 141, .6);
  box-shadow: 0 16px 40px rgba(22, 178, 141, .12);
}

.plan .tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: 999px;
  padding: 4px 12px;
  background: var(--brand-tint);
  color: var(--brand);
}

.plan .plan-name {
  margin: 14px 0 2px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  color: var(--brand);
}

.plan .plan-price {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 30px;
  color: var(--brand);
  margin: 10px 0 4px;
}

.plan .plan-price small {
  font-size: 14px;
  color: var(--warm);
  font-weight: 600;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 20px;
  display: grid;
  gap: 9px;
  flex: 1;
}

.plan ul li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  color: var(--ink);
}

.plan ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--mint);
  font-weight: 800;
}

/* ---------- REVEAL (seguro: solo oculta si el JS marcó el <html>) ---------- */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 760px) {
  .topbar .wrap {
    min-height: 58px;
  }

  .nav {
    gap: 14px;
    font-size: 13px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .step {
    padding-left: 24px;
    padding-top: 60px;
  }

  .hero-cine {
    min-height: 88vh;
  }
}

/* Oculta ítems de nav de baja prioridad en móvil para no romper el navbar */
@media (max-width: 560px) {
  .nav .nav-hide-sm {
    display: none;
  }
}
