/* Landing de preventa de «El coste invisible de la comunicación».
   Portada negra (la palabra «invisible» se revela en rojo al cargar) y cuerpo claro con señales y autora. */
html[data-layout="preorder"] {
  --pv-black: #0b0b0d;
  --pv-white: #fff;
  --pv-text: #3a3939;
  --pv-muted: #6b6969;
  --pv-grey: #f2f2f2;
  --pv-line: #d9d4cc;
  --pv-red: #e23526;
  --pv-yellow: #ffc20e;
  --pv-purple: #7042dc;
  color-scheme: light;
}

html[data-layout="preorder"] body {
  background: var(--pv-black);
  color: var(--pv-text);
  font-family: Poppins, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

.pv-wrap {
  width: min(var(--content-width), calc(100% - var(--page-gutter)));
  margin: 0 auto;
}

.pv-eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--pv-red);
}

.pv-header {
  background: var(--pv-black);
  padding: 22px 0;
  border-bottom: 1px solid #1d1d21;
}

.pv-header img {
  width: 220px;
  height: auto;
}

/* ---------- Portada ---------- */
.pv-hero {
  background: var(--pv-black);
  color: #d9d5cf;
  padding: 64px 0 80px;
}

.pv-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas: "copy card" "cover card";
  gap: 48px 56px;
  align-items: start;
}

.pv-hero-copy { grid-area: copy; min-width: 0; }
.pv-card { grid-area: card; }
.pv-cover-row { grid-area: cover; }

.pv-hero h1 {
  margin: 20px 0 0;
  color: var(--pv-white);
  font-size: clamp(40px, 7.4vw, 92px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.pv-invisible {
  display: block;
  color: transparent;
  background: linear-gradient(90deg, var(--pv-red) 0 50%, #232326 50% 100%);
  background-size: 200% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  animation: pv-reveal 2.2s cubic-bezier(0.6, 0, 0.2, 1) 0.5s forwards;
}

@keyframes pv-reveal {
  to { background-position: 0 0; }
}

.pv-title-rest {
  display: block;
  margin-top: 14px;
  font-size: 0.44em;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.pv-lead {
  max-width: 34em;
  margin: 30px 0 0;
  font-size: 19px;
  line-height: 1.65;
}

.pv-lead strong { color: var(--pv-white); }

.pv-date {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 22px;
  margin: 40px 0 0;
  padding-top: 26px;
  border-top: 1px solid #2b2b2f;
}

.pv-date-day {
  color: var(--pv-white);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.pv-date-left { font-size: 15px; color: #9a9898; font-variant-numeric: tabular-nums; }
.pv-date-left strong { color: var(--pv-red); }

/* Portada provisional dibujada en CSS: se sustituye por la imagen cuando llegue el arte final. */
.pv-cover-row {
  display: flex;
  align-items: flex-end;
  gap: 28px;
}

.pv-cover-row > p {
  max-width: 22em;
  margin: 0;
  font-size: 14px;
  color: #8f8d8d;
}

.pv-cover { margin: 0; flex: none; width: 190px; }
.pv-cover figcaption { margin-top: 10px; font-size: 12px; color: #77757a; }

.pv-cover-book {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 2 / 3;
  padding: 20px 16px 16px 28px;
  overflow: hidden;
  border: 1px solid #ffffff1a;
  border-radius: 3px 6px 6px 3px;
  background: #121215;
  color: var(--pv-white);
  box-shadow: 18px 22px 40px #00000080;
}

.pv-cover-book::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 12px;
  background: var(--pv-red);
}

.pv-cover-author { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #bdbbbb; }
.pv-cover-title { font-size: 18px; font-weight: 800; line-height: 1.05; }
.pv-cover-title em { display: block; font-style: normal; color: var(--pv-red); }
.pv-cover-title small { display: block; margin-top: 8px; font-size: 13px; font-weight: 400; color: #e6e4e4; }
.pv-cover-brand { font-size: 10px; font-weight: 700; letter-spacing: 0.3em; color: #8f8d8d; }

/* ---------- Formulario ---------- */
.pv-card {
  min-width: 0;
  padding: 32px 30px;
  border-radius: 14px;
  background: var(--pv-white);
  color: var(--pv-text);
  scroll-margin-top: 24px;
}

.pv-card h2 { margin: 0; color: var(--pv-black); font-size: 24px; font-weight: 800; line-height: 1.2; }
.pv-card-sub { margin: 6px 0 22px; font-size: 14px; color: var(--pv-muted); }

.pv-form { display: grid; gap: 16px; }
.pv-field { display: grid; gap: 6px; }
.pv-field label { font-size: 14px; font-weight: 700; color: var(--pv-black); }

.pv-field input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--pv-line);
  border-radius: 10px;
  background: var(--pv-white);
  color: var(--pv-black);
  font: inherit;
  font-size: 16px;
}

.pv-field input::placeholder { color: #a8a3a0; }
.pv-field input:hover { border-color: #b3ada6; }
.pv-field input:focus-visible,
.pv-consent input:focus-visible,
.pv-button:focus-visible,
.pv-closing-button:focus-visible { outline: 3px solid var(--pv-purple); outline-offset: 2px; }

.pv-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.pv-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.5; }
.pv-consent input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--pv-red); }

.pv-button,
.pv-closing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.pv-button { width: 100%; background: var(--pv-red); color: var(--pv-white); }
.pv-button:hover { background: var(--pv-yellow); color: var(--pv-black); }

.pv-privacy { margin: 0; font-size: 12px; line-height: 1.55; color: var(--pv-muted); }
.pv-privacy a { color: var(--pv-black); }

.pv-success,
.pv-error { margin: 0; font-size: 14px; line-height: 1.5; }
.pv-success { padding: 14px 16px; border-radius: 10px; background: #edf7ee; color: #1f5f2a; }
.pv-error { color: #b3261e; }

/* ---------- Señales ---------- */
.pv-signs { background: var(--pv-white); padding: 88px 0; }

.pv-signs h2,
.pv-author h2 {
  margin: 0;
  color: var(--pv-black);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  text-wrap: balance;
}

.pv-signs h2 { max-width: 22em; }
.pv-signs h2 span { color: var(--pv-red); }
.pv-signs-intro { margin: 14px 0 0; font-size: 18px; }

.pv-signs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 40px;
}

.pv-sign { display: grid; grid-template-rows: auto 1fr; background: var(--pv-grey); }
.pv-sign img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--pv-white); }
.pv-sign div { padding: 18px 18px 22px; }
.pv-sign h3 { margin: 0 0 6px; color: var(--pv-black); font-size: 17px; font-weight: 800; line-height: 1.3; }
.pv-sign p { margin: 0; font-size: 14px; line-height: 1.55; }

/* ---------- Autora ---------- */
.pv-author { background: var(--pv-grey); padding: 88px 0; }

.pv-author-grid {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.pv-author img { width: 100%; max-width: 300px; border: 6px solid var(--pv-white); border-radius: 50%; }
.pv-author .pv-eyebrow { color: var(--pv-purple); }
.pv-author p:last-child { max-width: 38em; margin: 14px 0 0; font-size: 17px; }

/* ---------- Cierre ---------- */
.pv-closing { background: var(--pv-red); color: var(--pv-white); padding: 52px 0; }

.pv-closing-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.pv-closing h2 { margin: 0; font-size: clamp(24px, 3vw, 34px); font-weight: 800; line-height: 1.2; }
.pv-closing p { margin: 4px 0 0; font-variant-numeric: tabular-nums; }
.pv-closing-button { background: var(--pv-white); color: var(--pv-black); }
.pv-closing-button:hover { background: var(--pv-yellow); }

.pv-footer { background: var(--pv-black); padding: 8px 0 28px; }

@media (max-width: 980px) {
  .pv-signs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* En móvil el formulario va justo después de la fecha, antes de la portada, para que entre pronto. */
@media (max-width: 860px) {
  .pv-hero { padding: 40px 0 56px; }
  .pv-hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "card" "cover"; gap: 40px; }
  .pv-card { padding: 28px 22px; }
  .pv-signs,
  .pv-author { padding: 56px 0; }
  .pv-author-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pv-author img { max-width: 200px; }
}

@media (max-width: 760px) {
  .pv-wrap { width: calc(100% - 32px); }
}

@media (max-width: 520px) {
  .pv-signs-grid { grid-template-columns: minmax(0, 1fr); }
  .pv-cover { width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .pv-invisible { animation: none; background-position: 0 0; }
  .pv-button,
  .pv-closing-button { transition: none; }
}
