/* ============================================================
   TELL ME MORE — Sistema de diseño
   Mundo visual: "atardecer mágico" — la hora de leer antes de dormir
   Dragones como sistema de color: Lumi (azul), Memo (dorado), Valor (rojo)
   ============================================================ */

:root {
  /* --- Paleta base: cielo de atardecer --- */
  --night:      #1f1a3d;   /* púrpura noche profundo (texto, fondos oscuros) */
  --dusk:       #3b2e63;   /* púrpura crepúsculo */
  --twilight:   #6c5b9e;   /* lila medio */
  --cream:      #fdf6ec;   /* crema cálida (fondo principal) */
  --sand:       #f6e8d3;   /* arena suave (secciones alternas) */
  --ink:        #2a2342;   /* tinta para texto sobre claro */
  --muted:      #6f6790;   /* texto secundario */

  /* --- Dragones --- */
  --lumi:       #3a8dde;   /* azul luz */
  --lumi-soft:  #bfe0f5;
  --memo:       #f0a93c;   /* dorado recuerdos */
  --memo-soft:  #f9dca0;
  --memo-glow:  #ffd86b;   /* chispa dorada */
  --valor:      #e15554;   /* rojo coraje */
  --valor-soft: #f6c2c1;

  /* --- Semánticos --- */
  --bg:         var(--cream);
  --fg:         var(--ink);
  --accent:     var(--memo);
  --accent-2:   var(--lumi);

  /* --- Tipografía --- */
  --display: 'Fraunces', Georgia, serif;       /* display cálido con carácter */
  --body:    'Nunito Sans', system-ui, sans-serif;
  --hand:    'Caveat', cursive;                /* acento manuscrito (recetario, notas) */

  /* --- Medidas --- */
  --maxw: 1140px;
  --radius: 18px;
  --radius-lg: 30px;
  --shadow-sm: 0 2px 10px rgba(31,26,61,.08);
  --shadow:    0 12px 36px rgba(31,26,61,.14);
  --shadow-lg: 0 24px 60px rgba(31,26,61,.22);
  --ring: 0 0 0 3px var(--memo-glow);
}

/* ============================================================
   Reset y base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.12; color: var(--night); letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }

.eyebrow {
  font-family: var(--body);
  font-weight: 800;
  font-size: .76rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--memo);
}

/* ============================================================
   Utilidades de layout
   ============================================================ */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 92px 0; }
.section--sand { background: var(--sand); }
.section--night { background: var(--night); color: var(--cream); }
.section--night h2, .section--night h3 { color: var(--cream); }
.center { text-align: center; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 60ch; }
.center .lead { margin-inline: auto; }

/* ============================================================
   Botones
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: 15px 30px;
  border-radius: 100px;
  font-weight: 800;
  font-size: 1rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn--primary { background: var(--memo); color: var(--night); box-shadow: var(--shadow-sm); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); background: var(--memo-glow); }
.btn--ghost { background: transparent; color: var(--night); box-shadow: inset 0 0 0 2px rgba(31,26,61,.18); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--night); transform: translateY(-2px); }
.btn--light { background: var(--cream); color: var(--night); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--lg { padding: 18px 38px; font-size: 1.1rem; }
.btn--block { display: flex; width: 100%; justify-content: center; }

/* ============================================================
   Header / navegación
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(253,246,236,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31,26,61,.07);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.4rem; color: var(--night); }
.brand .logo { width: 38px; height: 38px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-weight: 700; font-size: .98rem; color: var(--ink); transition: color .15s; }
.nav-links a:hover { color: var(--memo); }
.nav-links .btn--primary { display: none; }  /* solo visible dentro del menú móvil */
.nav-links .btn--primary:hover { color: var(--night); }
.nav-right { display: flex; align-items: center; gap: 16px; }

/* Selector de idioma */
.lang {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(31,26,61,.06); border-radius: 100px; padding: 4px;
}
.lang button {
  font-weight: 800; font-size: .8rem; color: var(--muted);
  padding: 5px 12px; border-radius: 100px; transition: all .15s;
}
.lang button.active { background: var(--night); color: var(--cream); }

.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--night); margin: 4px auto; transition: .2s; }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; padding: 70px 0 90px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero h1 .accent { color: var(--memo); position: relative; }
.hero .lead { margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 26px; margin-top: 34px; flex-wrap: wrap; }
.hero-trust div { font-size: .92rem; color: var(--muted); }
.hero-trust strong { display: block; font-family: var(--display); font-size: 1.5rem; color: var(--night); }

/* Escena ilustrada del hero (construida con CSS, sin imágenes externas) */
.hero-art {
  position: relative; aspect-ratio: 1/1; border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 70% 20%, #ffe9b8 0%, transparent 45%),
    radial-gradient(140% 120% at 20% 90%, var(--twilight) 0%, transparent 55%),
    linear-gradient(160deg, #5b4a92 0%, #2e2456 60%, #1f1a3d 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-art .book {
  position: absolute; inset: 18% 16% 16% 16%;
  background: linear-gradient(155deg, #fff 0%, #fdeccb 100%);
  border-radius: 8px 14px 14px 8px;
  box-shadow: 0 30px 60px rgba(0,0,0,.35), inset 14px 0 0 -2px rgba(0,0,0,.06), inset 16px 0 24px -16px rgba(0,0,0,.25);
  transform: rotate(-6deg);
  display: grid; place-items: center;
}
.hero-art .book-inner { text-align: center; padding: 20px; }
.hero-art .book-inner .star { font-size: 2.6rem; }
.hero-art .book-inner p { font-family: var(--hand); font-size: 1.5rem; color: var(--dusk); line-height: 1.1; margin-top: 6px; }

/* Chispas doradas — la firma visual (poder de Memo) */
.spark { position: absolute; border-radius: 50%; background: var(--memo-glow); filter: blur(.3px); box-shadow: 0 0 8px 2px var(--memo-glow); opacity: 0; animation: floatUp 5s ease-in infinite; }
@keyframes floatUp {
  0%   { opacity: 0; transform: translateY(20px) scale(.6); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-120px) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .spark { animation: none; opacity: .7; }
  .hero-art .book { transform: none; }
}

/* ============================================================
   Tarjetas de dragones
   ============================================================ */
.dragons { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; margin-top: 54px; }
.dragon-card {
  background: var(--cream); border-radius: var(--radius); padding: 32px 26px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(31,26,61,.06);
  transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden;
}
.dragon-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.dragon-orb { width: 64px; height: 64px; border-radius: 50%; margin-bottom: 18px; position: relative; }
.dragon-orb::after { content:''; position:absolute; inset:-6px; border-radius:50%; opacity:.25; }
.dragon-card[data-d="lumi"]  .dragon-orb { background: radial-gradient(circle at 35% 30%, #fff, var(--lumi)); }
.dragon-card[data-d="memo"]  .dragon-orb { background: radial-gradient(circle at 35% 30%, #fff, var(--memo)); }
.dragon-card[data-d="valor"] .dragon-orb { background: radial-gradient(circle at 35% 30%, #fff, var(--valor)); }
.dragon-card h3 { margin-bottom: 6px; }
.dragon-card .power { font-family: var(--hand); font-size: 1.3rem; color: var(--memo); margin-bottom: 10px; }
.dragon-card[data-d="lumi"]  .power { color: var(--lumi); }
.dragon-card[data-d="valor"] .power { color: var(--valor); }

/* ============================================================
   Cómo funciona — pasos
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; margin-top: 50px; counter-reset: step; }
.step { position: relative; padding-top: 16px; }
.step .num {
  font-family: var(--display); font-size: 2.4rem; color: var(--memo); font-weight: 600;
  display: block; margin-bottom: 8px; line-height: 1;
}
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { font-size: .98rem; color: var(--muted); }

/* ============================================================
   Catálogo de cuentos
   ============================================================ */
.books { display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; margin-top: 50px; }
.book-card {
  background: var(--cream); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(31,26,61,.06);
  transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column;
}
.book-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.book-cover { aspect-ratio: 1/1; position: relative; display: grid; place-items: center; color: #fff; text-align: center; padding: 24px; }
.book-cover h3 { color: #fff; font-size: 1.5rem; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.book-cover .tag { position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,.92); color: var(--night); font-size: .72rem; font-weight: 800; letter-spacing: .04em; padding: 5px 11px; border-radius: 100px; text-transform: uppercase; }
.book-cover[data-c="lumi"]  { background: linear-gradient(155deg, #4a9fe8, #1f5fa8); }
.book-cover[data-c="memo"]  { background: linear-gradient(155deg, #f5b94f, #c9762a); }
.book-cover[data-c="valor"] { background: linear-gradient(155deg, #ec6b6a, #b13b3a); }
.book-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.book-body p { color: var(--muted); font-size: .96rem; margin-bottom: 18px; flex: 1; }
.book-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.book-price { font-family: var(--display); font-size: 1.5rem; color: var(--night); }
.book-price small { font-size: .8rem; color: var(--muted); font-family: var(--body); font-weight: 700; }
.book-langs { display: flex; gap: 5px; }
.book-langs span { font-size: .68rem; font-weight: 800; background: rgba(31,26,61,.07); color: var(--muted); padding: 3px 8px; border-radius: 6px; }

/* ============================================================
   Carnet gratis — sección destacada
   ============================================================ */
.carnet-band { background: linear-gradient(135deg, var(--dusk), var(--night)); color: var(--cream); border-radius: var(--radius-lg); padding: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; position: relative; overflow: hidden; }
.carnet-band h2 { color: #fff; margin-bottom: 16px; }
.carnet-band p { color: rgba(255,255,255,.82); margin-bottom: 24px; }
.carnet-visual { display: grid; place-items: center; }
.id-card {
  width: 100%; max-width: 320px; aspect-ratio: 1.586/1; border-radius: 16px;
  background: linear-gradient(150deg, #fff, #f7e9d2); color: var(--night);
  box-shadow: var(--shadow-lg); padding: 20px; display: grid; grid-template-columns: 78px 1fr; gap: 16px; align-items: center;
  transform: rotate(-4deg);
}
.id-photo { width: 78px; height: 90px; border-radius: 10px; background: linear-gradient(160deg, var(--lumi-soft), var(--twilight)); display: grid; place-items: center; font-size: 2rem; }
.id-info .id-role { font-family: var(--display); font-size: 1.15rem; color: var(--valor); }
.id-info .id-name { font-weight: 800; font-size: 1.05rem; }
.id-info .id-line { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.id-chip { width: 30px; height: 22px; border-radius: 5px; background: linear-gradient(135deg, var(--memo), var(--memo-glow)); margin-top: 8px; }

/* ============================================================
   Franja de confianza / cultural
   ============================================================ */
.values { display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; margin-top: 46px; }
.value { text-align: center; padding: 0 10px; }
.value .ic { font-size: 2.2rem; margin-bottom: 12px; }
.value h3 { font-size: 1.15rem; margin-bottom: 8px; }
.value p { font-size: .96rem; color: var(--muted); }
.section--night .value p { color: rgba(255,255,255,.72); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--night); color: rgba(255,255,255,.7); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer-grid h4 { color: #fff; font-family: var(--body); font-weight: 800; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.footer-grid a { display: block; padding: 5px 0; font-size: .95rem; transition: color .15s; }
.footer-grid a:hover { color: var(--memo); }
.footer-brand p { font-size: .95rem; margin-top: 14px; max-width: 34ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; font-size: .85rem; flex-wrap: wrap; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 440px; margin-inline: auto; order: -1; }
  .steps { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .carnet-band { grid-template-columns: 1fr; padding: 40px 30px; }
  .carnet-visual { order: -1; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 74px; left: 0; right: 0;
    background: var(--cream); padding: 20px 24px; gap: 16px; box-shadow: var(--shadow); border-bottom: 1px solid rgba(31,26,61,.08);
  }
  /* El CTA grande se mueve al menú móvil para descongestionar el header */
  .nav-right .btn--primary { display: none; }
  .nav-links.open .btn--primary { display: flex; width: 100%; justify-content: center; }
  .brand { font-size: 1.2rem; }
  .brand .logo { width: 32px; height: 32px; }
  .dragons, .books, .values { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
