:root {
  color-scheme: dark;
  --ink: #f4efe6;
  --muted: #c9bca8;
  --dim: #8f806d;
  --black: #070605;
  --coal: #11100e;
  --iron: #25211d;
  --blood: #9f271e;
  --blood-bright: #c73b2b;
  --line: rgba(244, 239, 230, 0.16);
  --spotify: #1db954;
  --ytm: #ff0000;
  --max: 1180px;
  --display: "Cinzel", Georgia, "Times New Roman", serif;
  --body: "EB Garamond", Georgia, "Times New Roman", serif;
  --ui: "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  background: var(--black);
  color: var(--ink);
}

a { color: inherit; }

.site-header {
  position: fixed;
  z-index: 10;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(18px, 4vw, 54px);
  background: linear-gradient(180deg, rgba(7, 6, 5, 0.92), rgba(7, 6, 5, 0));
}

.brand {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

nav {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  font-family: var(--ui);
  font-size: 0.82rem;
}

nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--ink); }

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: 120px clamp(20px, 5vw, 72px) 72px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 6, 5, 0.94) 0%, rgba(7, 6, 5, 0.74) 38%, rgba(7, 6, 5, 0.2) 100%),
    url("assets/Libro_I_Despertar_y_Caida_Kindle_1600x2560.jpg") right center / min(62vw, 740px) auto no-repeat,
    radial-gradient(circle at 75% 42%, rgba(159, 39, 30, 0.28), transparent 38%),
    var(--black);
}

.hero__shade {
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(0deg, var(--black), transparent);
}

.hero__content {
  position: relative;
  max-width: 760px;
  animation: rise 700ms ease-out both;
}

.eyebrow {
  margin: 0 0 16px;
  font-family: var(--ui);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--blood-bright);
  letter-spacing: 0.12em;
}

h1, h2, h3, p { overflow-wrap: anywhere; }

h1 {
  max-width: 820px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.9rem, 7vw, 6.4rem);
  line-height: 0.98;
  font-weight: 700;
  text-wrap: balance;
}

h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 3.8vw, 4.1rem);
  line-height: 1.04;
  font-weight: 700;
  text-wrap: balance;
}

h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.15;
}

p {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.hero__lead {
  max-width: 640px;
  margin: 26px 0 0;
  font-size: clamp(1.12rem, 1.8vw, 1.4rem);
}

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

.hero__meta {
  margin: 18px 0 0;
  font-family: var(--ui);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
}

.hero__actions,
.signup__row,
.bso__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__actions { margin-top: 30px; }

.button, button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: var(--ui);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

.button--primary, button[type="submit"] { background: var(--blood); color: #fff; }
.button--primary:hover, button[type="submit"]:hover { background: var(--blood-bright); }

.button--ghost {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(244, 239, 230, 0.06);
}

.button--spotify { background: var(--spotify); color: #04130a; }
.button--spotify:hover { background: #1ed760; }
.button--ytm { background: var(--ytm); color: #fff; }
.button--ytm:hover { background: #ff2d2d; }
.button--spotify .dot, .button--ytm .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: currentColor; opacity: 0.85;
}

.section { padding: clamp(72px, 10vw, 132px) clamp(20px, 5vw, 72px); }
.section__inner { max-width: var(--max); margin: 0 auto; }

.section--intro {
  background: var(--black);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.intro-grid, .split, .community__inner, .author__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: start;
}

.books { background: #0d0b0a; }

.section-heading { max-width: 760px; margin-bottom: 48px; }
.section-heading__lead { margin-top: 14px; }

.book-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
}

.book { min-width: 0; position: relative; }

.book img {
  width: 100%;
  aspect-ratio: 10 / 16;
  object-fit: cover;
  display: block;
  margin-bottom: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.46);
  transition: transform 250ms ease, filter 250ms ease;
}

.book:hover img { transform: translateY(-6px); filter: saturate(1.08); }
.book p { margin: 0 0 12px; font-size: 1rem; }

.book__label {
  font-family: var(--ui);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--blood-bright);
  letter-spacing: 0.1em;
}

.book__link {
  font-family: var(--ui);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--blood);
  padding-bottom: 2px;
  transition: color 160ms ease, border-color 160ms ease;
}
.book__link:hover { color: var(--blood-bright); border-color: var(--blood-bright); }

.book--new .book__badge {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  font-family: var(--ui);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blood);
  padding: 5px 10px;
  border-radius: 3px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

/* ---- BSO ---- */
.bso {
  background:
    linear-gradient(rgba(7, 6, 5, 0.82), rgba(7, 6, 5, 0.92)),
    radial-gradient(circle at 80% 20%, rgba(29, 185, 84, 0.12), transparent 45%),
    radial-gradient(circle at 15% 90%, rgba(159, 39, 30, 0.18), transparent 45%),
    var(--coal);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.bso__inner { max-width: 820px; }
.bso__text p { margin-top: 18px; }
.bso__actions { margin-top: 30px; }
.bso__note { margin-top: 16px; font-size: 0.9rem; color: var(--dim); }

.experience {
  background:
    linear-gradient(rgba(7, 6, 5, 0.7), rgba(7, 6, 5, 0.9)),
    url("assets/Libro_II_Delegados_del_Abismo_Kindle_1600x2560.jpg") center 32% / cover fixed;
}

.feature-list {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--line);
}
.feature-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.55;
}

.readers { background: var(--coal); }
.readers__inner { display: grid; gap: 46px; }

.reader-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}
.reader-columns div { border-top: 1px solid var(--line); padding-top: 20px; }

/* ---- Autor ---- */
.author { background: #0d0b0a; }
.author__body p { margin: 0 0 18px; }
.author__body strong { color: var(--ink); }
.author__note { color: var(--dim); font-style: italic; }

.community { background: #100e0c; }
.signup { border-top: 1px solid var(--line); padding-top: 24px; }

label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--ui);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
  text-transform: uppercase;
}

input {
  flex: 1 1 240px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 14px;
  background: rgba(244, 239, 230, 0.08);
  color: var(--ink);
  font: 1rem var(--ui);
}
input::placeholder { color: var(--dim); }
.signup__note { margin: 12px 0 0; color: var(--dim); font-size: 0.92rem; }

.final-cta {
  min-height: 76svh;
  display: grid;
  place-items: center;
  padding: 80px 20px;
  text-align: center;
  background:
    linear-gradient(rgba(7, 6, 5, 0.24), rgba(7, 6, 5, 0.92)),
    url("assets/Libro_III_El_Reloj_de_Arena_Kindle_1600x2560.jpg") center / cover;
}
.final-cta__content { max-width: 760px; }

/* ---- Footer ---- */
.site-footer {
  background: var(--black);
  border-top: 1px solid var(--line);
  padding: clamp(48px, 7vw, 84px) clamp(20px, 5vw, 72px) 36px;
}
.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
}
.brand--footer { font-family: var(--display); font-size: 1.1rem; margin: 0; }
.site-footer__tag { margin: 8px 0 0; color: var(--dim); font-size: 0.98rem; }

.social__title {
  font-family: var(--ui);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 16px;
}
.social__list {
  list-style: none; margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.social__list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--ui);
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.social__list a:hover {
  color: var(--ink);
  border-color: var(--blood);
  background: rgba(159, 39, 30, 0.12);
}
.social__list svg { display: block; }

.site-footer__legal {
  max-width: var(--max);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.site-footer__legal p { margin: 0; font-size: 0.86rem; color: var(--dim); }
.site-footer__legal-links a { color: var(--muted); text-decoration: none; }
.site-footer__legal-links a:hover { color: var(--ink); }

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1040px) {
  .book-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; }
}

@media (max-width: 900px) {
  .site-header { position: absolute; }
  nav { display: none; }
  .hero {
    min-height: 92svh;
    background:
      linear-gradient(180deg, rgba(7, 6, 5, 0.62), rgba(7, 6, 5, 0.94) 70%),
      url("assets/Libro_I_Despertar_y_Caida_Kindle_1600x2560.jpg") center top / min(88vw, 460px) auto no-repeat,
      var(--black);
    align-items: end;
  }
  .intro-grid, .split, .community__inner, .author__inner, .reader-columns {
    grid-template-columns: 1fr;
  }
  .experience { background-attachment: scroll; }
  .site-footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero { padding-bottom: 42px; }
  h1 { font-size: clamp(2.5rem, 13vw, 3.6rem); }
  .button, button, input { width: 100%; }
  .book-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bso__actions .button { width: 100%; }
}
