/* ==========================================================================
   Landings lead magnets — Javi Rodríguez · TEMA OSCURO
   Paleta sacada de cada portada. JRC = espresso + naranja · JRF = royal + azul.
   ========================================================================== */

/* ---- Tokens base --------------------------------------------------------- */
:root {
  --max: 1140px;
  --radius: 22px;
  --radius-sm: 13px;
  --ease: cubic-bezier(.16, 1, .3, 1);

  /* Defaults (se sobreescriben por marca) */
  --bg: #120a06;
  --bg-2: #1e1109;
  --ink: #f6ece2;
  --ink-soft: #cbbaa9;
  --muted: #9c8775;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --surface: rgba(38, 23, 14, .5);
  --field: rgba(255, 255, 255, .045);
  --field-focus: rgba(255, 255, 255, .08);
  --accent: #ff7a2e;
  --accent-2: #ffa355;
  --accent-ink: #1a0a02;
  --grid: rgba(255, 160, 90, .05);
  --glow: rgba(255, 122, 46, .38);
}

/* Millonarios Conscientes — espresso + naranja */
body[data-brand="jrc"] {
  --bg: #130b06;
  --bg-2: #24140a;
  --ink: #f8efe6;
  --ink-soft: #d2c1b0;
  --muted: #a28b78;
  --surface: rgba(44, 26, 15, .5);
  --accent: #ff7d2f;
  --accent-2: #ffab5e;
  --accent-ink: #1c0c03;
  --grid: rgba(255, 165, 95, .055);
  --glow: rgba(255, 125, 47, .40);
}

/* Certificación HIT — royal + azul eléctrico */
body[data-brand="jrf"] {
  --bg: #0b1550;
  --bg-2: #15257f;
  --ink: #eef1ff;
  --ink-soft: #c3cbf7;
  --muted: #8e9ad8;
  --line: rgba(255, 255, 255, .11);
  --line-strong: rgba(255, 255, 255, .2);
  --surface: rgba(21, 38, 120, .46);
  --field: rgba(255, 255, 255, .06);
  --field-focus: rgba(255, 255, 255, .1);
  --accent: #5a74ff;
  --accent-2: #8aa0ff;
  --accent-ink: #ffffff;
  --grid: rgba(150, 170, 255, .085);
  --glow: rgba(90, 116, 255, .42);
}

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(100% 55% at 50% -8%, var(--glow), transparent 58%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 60%);
  background-attachment: fixed;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.08; margin: 0; }
.display {
  font-family: "Anton", "Inter", sans-serif; font-weight: 400;
  text-transform: uppercase; letter-spacing: .005em; line-height: .98;
}
.serif { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -.01em; }

/* ---- Layout + rejilla de fondo ------------------------------------------ */
.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center -1px;
  -webkit-mask-image: radial-gradient(130% 90% at 50% 0%, #000 35%, transparent 85%);
  mask-image: radial-gradient(130% 90% at 50% 0%, #000 35%, transparent 85%);
}
.page > * { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 24px; }

/* ---- Barra superior ------------------------------------------------------ */
.topbar { padding: 24px 0 4px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  font-size: 12px; color: var(--ink);
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--glow), 0 0 14px 2px var(--accent);
}

/* ---- Hero / columnas ----------------------------------------------------- */
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 56px;
  align-items: center;
  padding: 36px 0 70px;
}
.hero__copy { max-width: 560px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow::before { content: "★"; font-size: 10px; }

h1.title {
  font-size: clamp(2.5rem, 6vw, 4.3rem); color: var(--ink);
  text-shadow: 0 2px 40px var(--glow);
}
.promise {
  margin: 20px 0 0; font-size: clamp(1.05rem, 1.9vw, 1.24rem);
  color: var(--ink-soft); max-width: 30em;
}
.trust {
  display: flex; flex-wrap: wrap; gap: 10px 20px;
  margin-top: 26px; font-size: 13.5px; color: var(--ink-soft);
}
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust span::before { content: "✓"; color: var(--accent); font-weight: 800; }

/* ---- Ebook 3D flotante --------------------------------------------------- */
.showcase { padding: 30px 24px 16px; display: grid; place-items: center; }
.book {
  position: relative;
  width: min(192px, 58%);
  animation: bookFloat 5.8s var(--ease) infinite;
  transform-style: preserve-3d;
}
.book img {
  width: 100%; display: block;
  border-radius: 4px 11px 11px 4px;
  box-shadow:
    1px 0 0 #e7e1d6, 2px 0 0 #ded7cb, 3px 0 0 #d4cdbf, 4px 0 0 #cbc4b5,  /* canto de páginas */
    0 34px 44px -22px rgba(0, 0, 0, .9);
}
.book::before { /* lomo */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 14px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .12) 55%, rgba(255, 255, 255, .14));
  border-radius: 4px 0 0 4px; pointer-events: none;
}
.book::after { /* sombra de contacto que respira */
  content: ""; position: absolute; left: 6%; right: 2%; bottom: -30px; height: 30px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .6), transparent 70%);
  filter: blur(5px); z-index: -1;
  animation: bookShadow 5.8s var(--ease) infinite;
}
@keyframes bookFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-16px) rotate(1deg); }
}
@keyframes bookShadow {
  0%, 100% { transform: scaleX(1); opacity: .55; }
  50%      { transform: scaleX(.84); opacity: .32; }
}

/* ---- Tarjeta + formulario ------------------------------------------------ */
.card {
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), inset 0 1px 0 var(--line-strong);
  overflow: hidden;
}
.card__body { padding: 8px 24px 26px; }

form { display: grid; gap: 13px; }
.field label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--muted); margin-bottom: 6px; letter-spacing: .01em;
}
.input, .phone input, select {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 15px;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.input::placeholder, .phone input::placeholder { color: var(--muted); }
.input:focus, .phone input:focus, select:focus {
  outline: none; background: var(--field-focus);
  border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow);
}
.phone { display: grid; grid-template-columns: 116px 1fr; gap: 10px; }
select {
  appearance: none; cursor: pointer; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239c8775' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
option { color: #16151c; }

.btn {
  appearance: none; cursor: pointer; border: 0; width: 100%;
  font: inherit; font-weight: 700; font-size: 1.03rem;
  color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  padding: 15px 18px; border-radius: var(--radius-sm);
  box-shadow: 0 14px 30px -12px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .14s var(--ease), box-shadow .2s, filter .2s;
  margin-top: 4px;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 20px 38px -14px var(--glow); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  color: var(--ink); background: transparent;
  border: 1.5px solid var(--line-strong); box-shadow: none;
}
.btn--ghost:hover { border-color: var(--accent); background: var(--field); filter: none; }

.note {
  display: flex; gap: 9px; margin-top: 14px;
  font-size: 12.5px; color: var(--muted); line-height: 1.5;
}
.note svg { flex: none; margin-top: 2px; color: var(--accent); }

/* ---- Página de GRACIAS --------------------------------------------------- */
.thanks { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 44px 0 76px; }
.thanks__inner { width: 100%; max-width: 660px; text-align: center; }
.seal {
  width: 70px; height: 70px; margin: 0 auto 24px;
  display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent);
  box-shadow: 0 0 0 10px var(--glow), 0 0 40px var(--glow);
}
h1.thanks__title { font-size: clamp(2.1rem, 5vw, 3.2rem); color: var(--ink); text-shadow: 0 2px 40px var(--glow); }
.thanks__text { margin: 18px auto 0; font-size: 1.1rem; color: var(--ink-soft); max-width: 34em; }

.resource {
  margin: 34px auto 0; max-width: 480px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .9), inset 0 1px 0 var(--line-strong);
  padding: 22px; display: grid; gap: 15px;
}
.resource__row { display: flex; align-items: center; gap: 16px; text-align: left; }
.resource__cover { width: 58px; flex: none; }
.resource__cover img {
  width: 100%; display: block; border-radius: 3px 7px 7px 3px;
  box-shadow: 1px 0 0 #e7e1d6, 2px 0 0 #d4cdbf, 0 12px 20px -8px rgba(0, 0, 0, .8);
}
.resource__meta strong { display: block; color: var(--ink); font-size: 1.04rem; }
.resource__meta span { font-size: 13px; color: var(--muted); }

/* Bloque "después" → formación / VSL */
.after {
  margin: 46px auto 0; max-width: 580px; text-align: center;
  padding: 36px 30px; border-radius: var(--radius);
  background:
    radial-gradient(90% 120% at 50% -20%, var(--glow), transparent 62%),
    var(--surface);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .9);
  position: relative; overflow: hidden;
}
.after__kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.after h2 { font-size: clamp(1.4rem, 3vw, 1.78rem); color: var(--ink); }
.after p { margin: 14px auto 24px; color: var(--ink-soft); max-width: 36em; }
.after .btn { max-width: 360px; margin-inline: auto; }

/* ---- Pie ----------------------------------------------------------------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 22px 0 32px; margin-top: 10px;
  font-size: 12px; color: var(--muted);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.foot .brand { font-size: 11px; color: var(--muted); }
.foot .brand .dot { box-shadow: 0 0 0 3px var(--glow); }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 20px; padding: 18px 0 52px; text-align: center; }
  .hero__copy { max-width: 540px; margin-inline: auto; }
  .eyebrow { margin-bottom: 18px; }
  .promise { margin-inline: auto; }
  .trust { justify-content: center; }
  .card { max-width: 440px; margin-inline: auto; width: 100%; }
  .showcase { padding: 14px 24px 8px; }
  .book { width: 150px; }
}
@media (max-width: 480px) {
  .wrap { padding-inline: 18px; }
  h1.title { font-size: clamp(2.2rem, 11vw, 3rem); }
  .phone { grid-template-columns: 104px 1fr; }
  .foot { flex-direction: column; align-items: center; text-align: center; }
  .resource__row { flex-direction: column; text-align: center; }
  .resource__cover { width: 72px; }
  .book { width: 140px; }
}

/* Respeta reduce-motion */
@media (prefers-reduced-motion: reduce) {
  *, .book, .book::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
