/* ============================================================
   COSMÉTICA SOMÁTICA™ — EL QUINTO ELEMENTO · Página del libro
   Paleta tomada de la portada: azul noche · bruma · rosado · dorado
   ============================================================ */

:root {
  --noche: #13233A;
  --noche-2: #0D1A2C;
  --azul: #1D3452;
  --bruma: #8FB3C9;
  --bruma-2: #C9DCE6;
  --rosa: #E7B4C0;
  --dorado: #D4B26A;
  --dorado-2: #B8934A;
  --crema: #F6F1E7;
  --papel: #FBF8F2;
  --ink: #1B2636;
  --ink-soft: #4E5C6E;
  --linea: rgba(27, 38, 54, 0.12);
  --linea-luz: rgba(246, 241, 231, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); font-size: 1.0625rem; line-height: 1.7; color: var(--ink); background: var(--papel); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
::selection { background: var(--rosa); color: var(--noche); }

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.12; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 400; color: var(--dorado-2); }
strong { font-weight: 600; }

.kicker { font-size: 0.78rem; letter-spacing: 0.26em; text-transform: uppercase; font-weight: 600; color: var(--dorado-2); margin-bottom: 1.1rem; }

/* ---------- Botones ---------- */
.btn { display: inline-block; padding: 1rem 2rem; font-family: var(--body); font-size: 1rem; font-weight: 600; letter-spacing: 0.02em; text-decoration: none; text-align: center; border-radius: 999px; border: 1px solid transparent; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, color 0.3s; }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--rosa); outline-offset: 3px; }
.btn-gold { background: var(--dorado); color: var(--noche-2); }
.btn-gold:hover { background: #E0C07C; box-shadow: 0 14px 32px rgba(212, 178, 106, 0.32); }
.btn-ghost { border-color: rgba(246, 241, 231, 0.5); color: var(--crema); }
.btn-ghost:hover { background: rgba(246, 241, 231, 0.1); }
.btn-block { display: block; width: 100%; }
.text-link { color: var(--azul); font-weight: 600; text-decoration-color: var(--dorado); text-underline-offset: 4px; }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem clamp(1rem, 4vw, 2.5rem); padding-top: calc(0.8rem + env(safe-area-inset-top, 0px)); transition: background 0.35s, box-shadow 0.35s; }
.nav.is-scrolled { background: rgba(19, 35, 58, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); }
.nav-brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--crema); }
.nav-brand img { width: 38px; height: 38px; border-radius: 50%; }
.nav-brand span { font-family: var(--display); font-size: 1.2rem; font-weight: 500; }
.nav-cta { padding: 0.6rem 1.3rem; font-size: 0.92rem; }

/* ---------- Estrellas ---------- */
.stars { position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff, transparent 60%),
    radial-gradient(1px 1px at 28% 62%, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 47% 12%, #fff, transparent 60%),
    radial-gradient(1px 1px at 63% 40%, #fff, transparent 60%),
    radial-gradient(1px 1px at 78% 22%, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 70%, #fff, transparent 60%),
    radial-gradient(1px 1px at 7% 80%, #fff, transparent 60%),
    radial-gradient(1px 1px at 38% 88%, #fff, transparent 60%),
    radial-gradient(1px 1px at 55% 75%, #fff, transparent 60%),
    radial-gradient(1px 1px at 94% 8%, #fff, transparent 60%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 0.7; } }

/* ---------- 1. Hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--crema);
  padding: calc(7.5rem + env(safe-area-inset-top, 0px)) clamp(1.25rem, 5vw, 2.5rem) clamp(4rem, 9vw, 6rem);
  background:
    radial-gradient(ellipse 55% 55% at 72% 45%, rgba(231, 180, 192, 0.20), transparent 65%),
    radial-gradient(ellipse 60% 60% at 20% 10%, rgba(143, 179, 201, 0.22), transparent 60%),
    linear-gradient(180deg, var(--noche-2), var(--noche) 55%, var(--azul));
}
.hero-grid { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero .kicker { color: var(--dorado); }
.hero h1 { font-size: clamp(2.7rem, 6.4vw, 4.8rem); margin-bottom: 1.5rem; }
.hero h1 em { color: var(--rosa); }
.hero-sub { font-size: clamp(1.1rem, 2.1vw, 1.28rem); color: rgba(246, 241, 231, 0.82); margin-bottom: 2.2rem; max-width: 560px; }
.hero-sub strong { color: var(--crema); font-weight: 500; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero-meta { margin-top: 1.6rem; font-size: 0.9rem; color: rgba(246, 241, 231, 0.6); letter-spacing: 0.02em; }

.hero-book { position: relative; display: flex; justify-content: center; perspective: 1400px; }
.book { position: relative; z-index: 1; width: min(340px, 78vw); border-radius: 4px 10px 10px 4px; transform: rotateY(-14deg) rotateX(3deg); transform-style: preserve-3d; transition: transform 0.6s var(--ease); box-shadow: -18px 30px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06); animation: float 7s ease-in-out infinite; }
.book img { border-radius: 4px 10px 10px 4px; }
.book::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 14px; border-radius: 4px 0 0 4px; background: linear-gradient(90deg, rgba(0,0,0,0.35), rgba(255,255,255,0.12) 60%, transparent); z-index: 2; }
.book::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, rgba(255,255,255,0.18), transparent 35%); z-index: 2; pointer-events: none; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.book-glow { position: absolute; width: 70%; height: 30%; bottom: -6%; left: 15%; background: radial-gradient(ellipse, rgba(212, 178, 106, 0.35), transparent 70%); filter: blur(18px); }

/* ---------- Secciones ---------- */
.section { position: relative; padding: clamp(4.5rem, 10vw, 7.5rem) clamp(1.25rem, 5vw, 2.5rem); }
.section-head { max-width: 820px; margin: 0 auto clamp(2.5rem, 6vw, 3.5rem); text-align: center; }
.section-head h2, .narrow h2 { font-size: clamp(2.1rem, 4.8vw, 3.3rem); color: var(--noche); }
.narrow { max-width: 760px; margin: 0 auto; }
.narrow h2 { margin-bottom: 1.6rem; }
.narrow > p { color: var(--ink-soft); font-size: 1.12rem; margin-bottom: 1rem; }
.num { font-family: var(--display); font-style: italic; font-size: 1.3rem; color: var(--dorado-2); display: block; margin-bottom: 0.4rem; }

/* ---------- 2. Qué es ---------- */
.about { background: var(--papel); text-align: center; }

/* ---------- 3. Elementos ---------- */
.elements { background: linear-gradient(180deg, var(--papel), var(--bruma-2)); }
.el-grid { max-width: 820px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; text-align: center; }
.el h3 { font-size: 1.5rem; color: var(--noche); margin-top: 0.9rem; }
.el-dot { display: block; width: clamp(78px, 13vw, 112px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; box-shadow: inset -10px -12px 24px rgba(0,0,0,0.18), inset 8px 8px 18px rgba(255,255,255,0.45), 0 14px 30px rgba(19, 35, 58, 0.18); transition: transform 0.5s var(--ease); }
.el:hover .el-dot { transform: translateY(-6px) scale(1.04); }
.dot-tierra { background: radial-gradient(circle at 35% 30%, #EAE4D6, #A9A28E 70%); }
.dot-agua { background: radial-gradient(circle at 35% 30%, #C6E0EE, #4E7FA6 70%); }
.dot-fuego { background: radial-gradient(circle at 35% 30%, #FBE0E6, #D98EA2 70%); }
.dot-aire { background: radial-gradient(circle at 35% 30%, #CFE3DB, #3F6E66 70%); }
.el-lede { max-width: 640px; margin: 2.2rem auto 0; text-align: center; color: var(--ink-soft); font-size: 1.1rem; }
.quinto { max-width: 820px; margin: clamp(2.5rem, 6vw, 3.5rem) auto 0; display: flex; align-items: center; gap: 1.6rem; background: var(--noche); color: var(--crema); border-radius: 18px; padding: clamp(1.75rem, 4vw, 2.5rem); }
.quinto h3 { font-size: 1.9rem; color: var(--dorado); margin-bottom: 0.4rem; }
.quinto p { color: rgba(246, 241, 231, 0.8); }
.quinto-mark { flex: 0 0 auto; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle, #FFF7DE 0%, var(--dorado) 35%, rgba(212,178,106,0) 72%); box-shadow: 0 0 40px rgba(212, 178, 106, 0.55); }

/* ---------- 4. Transformación ---------- */
.shift { background: var(--papel); }
.steps { list-style: none; margin-top: 2rem; }
.steps li { display: grid; grid-template-columns: 3.4rem 1fr; gap: 0.5rem; padding: 1.3rem 0; border-bottom: 1px solid var(--linea); }
.steps span { font-family: var(--display); font-style: italic; font-size: 1.5rem; color: var(--dorado-2); line-height: 1.3; }
.steps p { color: var(--ink); font-size: 1.1rem; }

/* ---------- 5. Cita ---------- */
.quote-band { background: var(--azul); color: var(--crema); padding: clamp(4rem, 9vw, 6rem) clamp(1.25rem, 5vw, 2.5rem); text-align: center; }
.quote-band blockquote { max-width: 860px; margin: 0 auto; }
.quote-band p { font-family: var(--display); font-style: italic; font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.25; color: var(--crema); margin-bottom: 1.4rem; }
.quote-band cite { font-style: normal; font-size: 0.92rem; letter-spacing: 0.06em; color: var(--rosa); }
.quote-band cite em { font-style: italic; }

/* ---------- 6. Para quién ---------- */
.who { background: var(--papel); }
.who-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.who-card { background: #fff; border: 1px solid var(--linea); border-radius: 16px; padding: 2rem 1.75rem; border-top: 3px solid var(--rosa); }
.who-card h3 { font-size: 1.55rem; color: var(--noche); margin-bottom: 0.6rem; }
.who-card p { color: var(--ink-soft); }

/* ---------- 7. Autora ---------- */
.author { background: var(--crema); }
.author-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.author-photo img { border-radius: 200px 200px 16px 16px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: 0 30px 60px rgba(19, 35, 58, 0.2); }
.author-text h2 { font-size: clamp(2.3rem, 4.8vw, 3.4rem); color: var(--noche); margin-bottom: 1.2rem; }
.author-text > p { color: var(--ink-soft); margin-bottom: 1rem; }
.author-points { list-style: none; margin-top: 1.5rem; border-top: 1px solid var(--linea); }
.author-points li { padding: 0.75rem 0 0.75rem 1.6rem; border-bottom: 1px solid var(--linea); position: relative; }
.author-points li::before { content: "✦"; position: absolute; left: 0; color: var(--dorado-2); }

/* ---------- 8. Compra ---------- */
.buy { background: linear-gradient(180deg, var(--crema), var(--bruma-2)); }
.buy-card { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: 0.8fr 1.2fr; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 70px rgba(19, 35, 58, 0.16); }
.buy-cover { background: radial-gradient(ellipse at 50% 40%, var(--azul), var(--noche-2)); display: flex; align-items: center; justify-content: center; padding: clamp(2rem, 5vw, 3rem); }
.buy-cover img { width: min(260px, 70%); border-radius: 4px 8px 8px 4px; box-shadow: -12px 22px 44px rgba(0, 0, 0, 0.45); transform: rotate(-3deg); }
.buy-info { padding: clamp(2rem, 4.5vw, 3rem); }
.buy-info h2 { font-size: clamp(2rem, 4vw, 2.7rem); color: var(--noche); margin-bottom: 1.4rem; }
.buy-info h2 em { display: block; }
.check-list { list-style: none; margin-bottom: 1.8rem; }
.check-list li { position: relative; padding: 0.4rem 0 0.4rem 1.9rem; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.8rem; width: 1rem; height: 0.55rem; border-left: 2px solid var(--dorado-2); border-bottom: 2px solid var(--dorado-2); transform: rotate(-45deg); }
.buy-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.4rem 1rem; margin-bottom: 1.2rem; }
.price { font-family: var(--display); font-size: clamp(2.8rem, 6vw, 3.6rem); font-weight: 600; color: var(--noche); line-height: 1; }
.price-note { color: var(--ink-soft); font-size: 0.95rem; }
.buy-safe { text-align: center; margin-top: 0.9rem; font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- 9. Después ---------- */
.next { background: var(--papel); }
.next-grid { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.next-card { display: block; text-decoration: none; background: #fff; border: 1px solid var(--linea); border-radius: 16px; padding: 2rem 1.75rem; transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.next-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(19, 35, 58, 0.12); }
.next-card h3 { font-size: 1.55rem; color: var(--noche); margin-bottom: 0.5rem; }
.next-card p { color: var(--ink-soft); margin-bottom: 1rem; }
.next-link { font-weight: 600; color: var(--azul); }

/* ---------- 10. FAQ ---------- */
.faq { background: var(--papel); padding-top: 0; }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--linea); }
.faq summary { list-style: none; cursor: pointer; position: relative; padding: 1.3rem 2.5rem 1.3rem 0; font-family: var(--display); font-size: 1.45rem; font-weight: 500; color: var(--noche); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.3rem; top: 1.05rem; font-size: 1.7rem; color: var(--dorado-2); transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 1.4rem; color: var(--ink-soft); }

/* ---------- 11. Cierre ---------- */
.final { overflow: hidden; text-align: center; color: var(--crema); background: radial-gradient(ellipse 60% 70% at 50% 100%, rgba(231, 180, 192, 0.18), transparent 70%), linear-gradient(180deg, var(--azul), var(--noche-2)); }
.final-inner { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }
.final h2 { font-size: clamp(2.1rem, 4.8vw, 3.3rem); margin-bottom: 2rem; }
.final h2 em { color: var(--rosa); }

/* ---------- Footer ---------- */
.footer { background: var(--noche-2); color: rgba(246, 241, 231, 0.75); text-align: center; padding: 3.5rem 1.5rem calc(5.5rem + env(safe-area-inset-bottom, 0px)); font-size: 0.95rem; }
.footer img { width: 104px; margin: 0 auto 1.2rem; }
.footer p { margin-bottom: 0.5rem; }
.footer a { color: var(--dorado); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-small { font-size: 0.82rem; color: rgba(246, 241, 231, 0.5); margin-top: 1rem; }

/* ---------- WhatsApp ---------- */
.wa-float { position: fixed; right: 1.1rem; bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px)); z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25); transition: transform 0.3s var(--ease); }
.wa-float:hover { transform: scale(1.07); }

/* ---------- Reveal defensivo ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); animation: reveal-fallback 0.6s ease 6s forwards; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }
.js .reveal.is-in { opacity: 1; transform: none; animation: none; }
.js.reveal-all .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-book { order: -1; }
  .book { width: min(250px, 62vw); }
  .who-grid { grid-template-columns: 1fr; }
  .author-grid, .buy-card { grid-template-columns: 1fr; }
  .author-photo { max-width: 380px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .nav-brand span { font-size: 1.05rem; }
  .hero { padding-top: calc(6.5rem + env(safe-area-inset-top, 0px)); }
  .hero-ctas .btn { width: 100%; }
  .el-grid { grid-template-columns: 1fr 1fr; row-gap: 2rem; }
  .next-grid { grid-template-columns: 1fr; }
  .quinto { flex-direction: column; text-align: center; }
}
