/* Para el Alma Cansada — landing page (v2)
   One narrow reading column, written for the phone first; wider screens get
   the same column with more air. Palette and type come from the book itself:
   cream paper, near-black ink, the red of the cover's sunset. */

:root {
  --papel: #f6f1e4;
  --papel-2: #ede6d5;
  --hoja: #fffdf8;
  --tinta: #1c1b19;
  --tinta-suave: #575047;
  --linea: #d9cfba;
  --rojo: #b81d18;
  --rojo-fuerte: #9c1612;
  --oro: #a9762a;
  --noche: #141311;
  --noche-2: #1f1d1a;
  --crema: #f6f1e4;
  --crema-suave: #c9c1b1;
  --rojo-noche: #ff7468;

  --titulo: "DM Serif Display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --texto: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "Space Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --columna: 600px;
  --margen: 22px;
  --aire: 60px;
  --barra: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 1.125rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(184, 29, 24, .12);
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
svg { flex: none; }
.oculto { position: absolute; }

h1, h2, h3, p, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }

h1, h2 {
  font-family: var(--titulo);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.05rem, 1.2rem + 4.4vw, 3rem); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.8vw, 2.3rem); }
h3 { font-size: 1.08em; line-height: 1.3; font-weight: 650; }
p, li { text-wrap: pretty; }
summary, .etiqueta, .tarjeta-cabeza p { text-wrap: balance; }
.junto { white-space: nowrap; }
.renglon { display: block; }
a { color: inherit; }

:focus-visible { outline: 3px solid #0c6e72; outline-offset: 3px; border-radius: 2px; }
.noche :focus-visible, .barra-compra :focus-visible { outline-color: #7fe3e6; }

.columna {
  width: 100%;
  max-width: calc(var(--columna) + var(--margen) * 2);
  margin-inline: auto;
  padding-inline: max(var(--margen), env(safe-area-inset-left)) max(var(--margen), env(safe-area-inset-right));
}
.centro { text-align: center; }

.saltar {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--hoja); color: var(--tinta); padding: 12px 16px;
}
.saltar:focus { top: 12px; }

/* --- recurring pieces --------------------------------------------------- */

.etiqueta {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--rojo);
  margin-bottom: 14px;
}
.noche .etiqueta { color: var(--rojo-noche); }

.boton {
  display: flex; align-items: center; justify-content: center; gap: 0.4em;
  width: 100%;
  min-height: 58px;
  padding: 14px 22px;
  background: var(--rojo);
  color: #fff;
  font-family: var(--texto);
  font-weight: 700;
  font-size: 1.06em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 10px 22px -12px rgba(156, 22, 18, .75);
  transition: background-color .15s ease, transform .15s ease;
  touch-action: manipulation;
}
.boton:hover { background: var(--rojo-fuerte); }
.boton:active { transform: translateY(1px); }
.boton-grande { min-height: 62px; font-size: 1.12em; }
.boton-chico {
  width: auto; flex: none;
  min-height: 48px; padding: 10px 18px;
  font-size: 0.94em; white-space: nowrap;
  box-shadow: none;
}

.datos {
  font-family: var(--mono);
  font-size: 0.7812rem;
  letter-spacing: 0.03em;
  line-height: 1.5;
  color: var(--tinta-suave);
}

.pendiente {
  background: #ffe36e; color: #1c1b19;
  font-family: var(--mono); font-size: 0.8125rem !important; font-weight: 400;
  padding: 2px 8px; border-radius: 2px;
}

.filete {
  width: 56px; height: 2px; border: 0; margin: 0 auto;
  background: var(--oro); opacity: .7;
}

/* --- review draft state -------------------------------------------------- */

.cinta-borrador, .aviso-borrador { display: none; }
.borrador .cinta-borrador {
  display: block; margin: 0;
  background: #ffe36e; color: #1c1b19;
  font-family: var(--mono); font-size: 0.75rem; line-height: 1.45;
  padding: 8px var(--margen); text-align: center;
}
.borrador .aviso-borrador {
  display: block;
  margin-top: 14px; padding: 10px 12px;
  background: #ffe36e; color: #1c1b19;
  font-family: var(--mono); font-size: 0.75rem; line-height: 1.5; text-align: left;
}
.borrador .solo-listo { display: none; }

/* --- 1. hero ---------------------------------------------------------------- */

.inicio { padding-block: 20px var(--aire); }
.inicio .etiqueta { color: var(--tinta-suave); margin-bottom: 14px; }
.portada {
  width: min(38vw, 170px);
  margin: 0 auto 20px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(169, 118, 42, .35), 0 22px 44px -18px rgba(120, 60, 10, .55);
}
.bajada {
  margin-top: 12px;
  font-size: 0.97em; line-height: 1.5;
  font-style: italic;
  color: var(--tinta-suave);
  max-width: 27em; margin-inline: auto;
}

.precio-fila {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 16px;
}
.precio {
  font-family: var(--titulo);
  font-size: min(2.3rem, 11vw); line-height: 1.05;
  white-space: nowrap;
}
.precio-fila s { color: var(--tinta-suave); font-size: 1rem; }
.pastilla {
  font-family: var(--mono); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4;
  color: #7c4d0c; background: #f3e4c4;
  border: 1px solid #dcbf85; border-radius: 999px;
  padding: 5px 12px;
}
.precio-nota {
  margin-top: 6px;
  font-family: var(--mono); font-size: 0.7188rem; line-height: 1.5;
  color: var(--tinta-suave);
  text-wrap: balance;
}
.acciones { margin-top: 16px; }

.garantias {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 4px 18px;
  margin-top: 14px;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em;
  color: var(--tinta-suave);
}
.garantias li::before { content: "✓"; color: var(--oro); margin-right: 6px; font-weight: 700; }
.noche .garantias { color: var(--crema-suave); }
.noche .garantias li::before { color: var(--rojo-noche); }

/* --- sections ----------------------------------------------------------------- */

.seccion { padding-block: var(--aire); }
.banda { background: var(--papel-2); }
.noche { color-scheme: dark; background: var(--noche); color: var(--crema); }

.seccion h2 + p, .seccion .columna > p + p { margin-top: 16px; }

/* --- 2. recognition ----------------------------------------------------------- */

.cita-entrada { font-style: italic; font-size: 1.1em; line-height: 1.5; color: var(--tinta-suave); }

.lista-luna, .lista-visto { margin-top: 26px; border-top: 1px solid var(--linea); }
.lista-luna li, .lista-visto li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--linea);
}
.lista-luna svg, .lista-visto svg, .incluye svg {
  width: 22px; height: 22px; margin-top: 0.2em;
  color: var(--oro);
}
.lista-visto svg, .incluye svg { color: var(--rojo); }
.remate { margin-top: 26px !important; font-weight: 650; }
.peso { margin-top: 28px; padding-left: 18px; border-left: 2px solid var(--oro); }
.peso p + p { margin-top: 12px; }
.peso .peso-cita { font-family: var(--titulo); font-size: 1.3em; line-height: 1.2; text-wrap: balance; color: var(--tinta); }

/* --- 3. promise ----------------------------------------------------------------- */

.esencial {
  margin-top: 24px;
  background: var(--hoja);
  border: 1px solid #e3d9c4;
  border-radius: 10px;
  padding: 24px 22px;
  box-shadow: 0 24px 44px -34px rgba(40, 30, 10, .55);
}
.esencial-titulo {
  font-family: var(--mono); font-size: 0.7188rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--oro); margin-bottom: 10px;
}
.esencial p:last-child { font-family: var(--titulo); font-size: 1.32em; line-height: 1.28; }

.tres {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
  text-align: center;
}
.tres li { border-top: 2px solid var(--tinta); padding-top: 12px; }
.tres strong { display: block; font-family: var(--titulo); font-weight: 400; font-size: 1.08em; line-height: 1.15; }
.tres span { display: block; margin-top: 6px; font-size: 0.8em; line-height: 1.35; color: var(--tinta-suave); }

/* --- 4. the ten nights ------------------------------------------------------------ */

.indice { margin-top: 28px; border-top: 2px solid var(--tinta); }
.indice li {
  display: grid; grid-template-columns: 2.3em minmax(0, 1fr);
  padding: 20px 0;
  border-bottom: 1px solid var(--linea);
}
.indice .num {
  font-family: var(--mono); font-weight: 700; font-size: 0.8em;
  color: var(--rojo); padding-top: 0.42em;
}
.indice h3 { font-family: var(--titulo); font-weight: 400; font-size: 1.3em; line-height: 1.18; text-wrap: balance; }
.indice p { margin-top: 7px; color: var(--tinta-suave); font-size: 0.95em; line-height: 1.5; }
.indice .ref {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.03em;
  color: #0c6e72;
}

/* --- 4b. night picker: tap a night, read a piece of that chapter ------------------ */

.elige { margin-top: 28px; border-top: 2px solid var(--tinta); }
.elige details { border-bottom: 1px solid var(--linea); scroll-margin-top: 12px; }
.elige summary {
  cursor: pointer; list-style: none;
  display: grid; grid-template-columns: 2.3em minmax(0, 1fr) auto;
  align-items: center; column-gap: 6px;
  padding: 16px 0; min-height: 64px;
}
.elige summary::-webkit-details-marker { display: none; }
.elige summary:focus-visible { outline: 2px solid var(--rojo); outline-offset: 2px; }
.elige .num {
  font-family: var(--mono); font-weight: 700; font-size: 0.8em;
  color: var(--rojo);
}
.elige .dice {
  font-family: var(--titulo); font-size: 1.3em; line-height: 1.18;
  text-wrap: balance;
}
.elige summary::after {
  content: "+"; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid #dcbf85;
  font-family: var(--mono); font-size: 1em; line-height: 1; color: var(--rojo);
}
.elige details[open] summary::after { content: "–"; }
.elige details[open] .dice { color: var(--rojo); }

.elige-cuerpo { padding: 2px 0 30px; }
.elige .ref {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.03em;
  color: #0c6e72;
}
.elige-cuerpo h3 {
  margin-top: 6px;
  font-weight: 700; font-size: 1em; line-height: 1.35;
  text-wrap: balance;
}
.extracto {
  margin-top: 14px; padding-left: 16px;
  border-left: 2px solid var(--oro);
  font-style: italic; line-height: 1.55;
}
.elige .hoja { margin-top: 22px; }
.rezo { font-size: 1.06em; line-height: 1.6; }
.hoja-nota { margin-top: 14px; color: var(--tinta-suave); font-size: 0.95em; }
.dias li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px dotted var(--linea);
}
.dias li span:first-child { font-weight: 700; }
.dias li span:last-child { font-family: var(--mono); font-size: 0.85em; color: var(--tinta-suave); }
.elige .boton { margin-top: 24px; }
.elige .datos { margin-top: 10px; text-align: center; }

/* --- 5. three steps ----------------------------------------------------------------- */

.pasos { margin-top: 26px; counter-reset: paso; }
.pasos li {
  counter-increment: paso;
  position: relative;
  padding: 0 0 26px 58px;
}
.pasos li:last-child { padding-bottom: 0; }
.pasos li::before {
  content: counter(paso);
  position: absolute; left: 0; top: -2px;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--hoja); border: 1px solid #dcbf85;
  font-family: var(--titulo); font-size: 1.25em; color: var(--rojo);
}
.pasos li:not(:last-child)::after {
  content: ""; position: absolute; left: 20.5px; top: 46px; bottom: 6px;
  width: 1px; background: #dcbf85;
}
.pasos p { margin-top: 6px; color: var(--tinta-suave); }

/* --- 6. a page from the book ---------------------------------------------------------- */

.hoja {
  margin-top: 28px;
  background: var(--hoja);
  padding: 28px 22px;
  border: 1px solid #e6dfcf;
  box-shadow: 0 1px 0 var(--linea), 0 30px 54px -32px rgba(40, 30, 10, .5);
}
.hoja-titulo {
  font-weight: 700; font-size: 0.76em;
  letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.5;
  margin-bottom: 20px;
}
.lineas { counter-reset: linea; }
.lineas li { counter-increment: linea; position: relative; padding-left: 1.8em; color: var(--tinta-suave); }
.lineas li + li { margin-top: 14px; }
.lineas li::before { content: counter(linea); position: absolute; left: 0; top: 0; font-weight: 700; color: #d0120f; }
.lineas strong { color: var(--tinta); font-weight: 700; }
.hoja-pie {
  margin-top: 24px; padding-top: 12px;
  border-top: 1px solid var(--linea);
  font-family: var(--mono); font-size: 0.7188rem; letter-spacing: 0.05em;
  color: var(--tinta-suave);
}
.nota-chica { margin-top: 22px !important; color: var(--tinta-suave); font-style: italic; text-align: center; text-wrap: balance; }

/* --- 7. Fray Gabriel ------------------------------------------------------------------- */

.autor { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.autor img { width: 92px; height: 92px; border-radius: 50%; border: 1px solid #4a443c; object-fit: cover; flex: none; }
.autor .etiqueta { margin-bottom: 6px; }
.autor h2 { font-size: clamp(1.25rem, 6.2vw, 1.9rem); }
.noche .columna > p { color: #e6dfd0; }
.pregunta {
  margin-top: 22px;
  font-family: var(--titulo);
  font-size: 1.55em; line-height: 1.2;
  text-wrap: balance;
}
.noche .pregunta { color: var(--crema); padding-left: 18px; border-left: 0; position: relative; }
.noche .pregunta::before {
  content: ""; position: absolute; left: 0; top: 0.2em; bottom: 0.2em; width: 2px;
  background: var(--rojo-noche);
}

/* --- 8. who it is for --------------------------------------------------------------------- */

.no-es {
  margin-top: 24px;
  padding: 18px 20px;
  background: var(--papel-2);
  border-radius: 10px;
  font-size: 0.95em; color: var(--tinta-suave);
}
.no-es strong { color: var(--tinta); }

/* --- 9. offer -------------------------------------------------------------------------------- */

.oferta .etiqueta { margin-bottom: 18px; }
.tarjeta {
  background: var(--hoja);
  border: 1px solid #e3d9c4;
  border-radius: 14px;
  padding: 22px 20px 24px;
  box-shadow: 0 34px 60px -40px rgba(40, 30, 10, .6);
}
.tarjeta-cabeza { display: flex; align-items: center; gap: 16px; }
.tarjeta-cabeza img { width: 96px; flex: none; border-radius: 4px; box-shadow: 0 10px 20px -10px rgba(40, 30, 10, .6), 0 0 0 1px rgba(0,0,0,.08); }
.tarjeta-cabeza h2 { font-size: clamp(1.3rem, 6vw, 1.7rem); }
.tarjeta-sub { margin-top: 6px; font-style: italic; font-size: 0.9em; line-height: 1.4; color: var(--tinta-suave); }
.tarjeta-cabeza .datos { margin-top: 8px; }

.incluye { margin-top: 20px; border-top: 1px solid var(--linea); }
.incluye li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--linea);
  font-size: 0.97em; line-height: 1.45;
}
.incluye svg { width: 20px; height: 20px; }

.tarjeta-precio { margin-top: 22px; text-align: center; }
.tarjeta-precio .precio-fila { margin-top: 0; }
.tarjeta-precio .precio { font-size: min(2.9rem, 12vw); }
.tarjeta-precio .boton { margin-top: 16px; }
.tarjeta-precio .datos { margin-top: 12px; }

.garantia {
  margin-top: 20px; padding: 16px 18px;
  border: 1px dashed #c9b488; border-radius: 10px;
  font-size: 0.93em; color: var(--tinta-suave); text-align: center;
}

/* --- 10. letter --------------------------------------------------------------------------------- */

.carta .pregunta { color: var(--tinta); margin-block: 24px 4px; }
.despedida { margin-top: 24px !important; font-style: italic; color: var(--tinta-suave); }
.firma { margin-top: 4px !important; font-family: var(--titulo); font-style: italic; font-size: 1.35em; }

/* --- 11. FAQ ---------------------------------------------------------------------------------------- */

.faq { margin-top: 24px; border-top: 2px solid var(--tinta); }
.faq details { border-bottom: 1px solid var(--linea); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; min-height: 60px;
  font-weight: 650; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid #dcbf85;
  font-family: var(--mono); font-size: 1em; line-height: 1; color: var(--rojo);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 20px; color: var(--tinta-suave); }

/* --- 12. close ------------------------------------------------------------------------------------------ */

.cierre h2 { margin-bottom: 26px; }

/* --- footer ------------------------------------------------------------------------------------------------ */

.pie {
  background: var(--noche-2); color: var(--crema-suave);
  font-size: 0.875rem; line-height: 1.55;
  padding: 30px 0 calc(var(--barra) + 40px + env(safe-area-inset-bottom));
  border-top: 1px solid #2e2b27;
}
.pie p + p { margin-top: 6px; }
.pie strong { color: var(--crema); font-weight: 650; }
.pie a { display: inline-block; padding: 13px 0; text-underline-offset: 4px; }

/* --- sticky buy bar ----------------------------------------------------------------------------------------- */

.barra-compra {
  color-scheme: dark;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: #26231f; color: var(--crema);
  border-top: 1px solid #5a5147;
  box-shadow: 0 -10px 24px -10px rgba(0, 0, 0, .5);
  padding: 10px max(var(--margen), env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(var(--margen), env(safe-area-inset-left));
  transform: translateY(110%);
  visibility: hidden;
  transition: transform .25s ease, visibility 0s linear .25s;
}
.barra-compra.visible { transform: none; visibility: visible; transition: transform .25s ease; }
.barra-fila {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  max-width: var(--columna); margin-inline: auto;
}
/* the price never shrinks; if the reader's text is enlarged, the button drops to its own row */
.barra-texto { flex: 1 1 auto; min-width: min-content; line-height: 1.2; }
.barra-compra .boton { flex: 0 1 auto; max-width: 100%; }
.barra-titulo {
  display: block; width: 0; min-width: 100%;
  font-size: 0.8125rem; color: var(--crema-suave);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.barra-precio { display: block; margin-top: 2px; white-space: nowrap; }
.barra-precio strong { font-family: var(--titulo); font-weight: 400; font-size: 1.22em; }
.barra-precio s { font-size: 0.75rem; color: var(--crema-suave); }

/* --- narrow phones ------------------------------------------------------------------------------------------------ */

@media (max-width: 399px) {
  /* not enough room for title + price + button: the price carries the bar */
  .barra-titulo { display: none; }
  .barra-precio { margin-top: 0; }
  .barra-precio strong { font-size: 1.3em; }
}

@media (max-width: 359px) {
  :root { --margen: 16px; }
  body { font-size: 1.0625rem; }
  .tres { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .tres li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .tres span { margin-top: 0; }
  .tarjeta-cabeza img { width: 76px; }
  .autor { gap: 14px; }
  .autor img { width: 72px; height: 72px; }
  .barra-compra .boton { padding-inline: 14px; }
}

@media (max-width: 309px) {
  /* folded phones and split-screen windows */
  :root { --margen: 14px; }
  .etiqueta { letter-spacing: 0.06em; font-size: 0.6875rem; }
  .tarjeta { padding-inline: 14px; }
  .tarjeta-cabeza { flex-direction: column; align-items: flex-start; }
  .hoja, .esencial { padding-inline: 16px; }
  .autor { flex-direction: column; align-items: flex-start; }
  .pasos li { padding-left: 50px; }
  .pasos li::before { width: 36px; height: 36px; }
  .pasos li:not(:last-child)::after { left: 17.5px; top: 40px; }
  .barra-compra .boton { padding-inline: 10px; font-size: 0.85em; }
  .barra-precio strong { font-size: 1.1em; }
}

/* --- short phones: keep the first button on the first screen ------------------------------------------------------- */

@media (max-width: 559px) and (max-height: 720px) {
  .inicio { padding-top: 14px; }
  .inicio .etiqueta { margin-bottom: 12px; }
  .portada { width: min(30vw, 118px); margin-bottom: 16px; }
  .bajada { margin-top: 10px; }
  .precio-fila { margin-top: 12px; }
  .acciones { margin-top: 12px; }
}
@media (max-width: 559px) and (max-height: 600px) {
  .inicio { padding-top: 10px; }
  .inicio .etiqueta { margin-bottom: 8px; font-size: 0.6875rem; }
  .portada { width: 96px; margin-bottom: 12px; }
  h1 { font-size: 1.8rem; }
  .bajada { font-size: 0.92em; line-height: 1.42; margin-top: 8px; }
  .inicio .precio { font-size: 1.8rem; }
  .inicio .boton { min-height: 52px; }
}

/* --- tablets and up ------------------------------------------------------------------------------------------------- */

@media (min-width: 700px) {
  :root { --aire: 88px; }
  body { font-size: 1.1875rem; }
  .inicio { padding-block: 48px var(--aire); }
  .portada { width: 240px; margin-bottom: 34px; }
  .inicio .etiqueta { margin-bottom: 22px; }
  .precio { font-size: 2.7rem; }
  .precio-nota { font-size: 0.78rem; }
  .inicio .boton, .cierre .boton { max-width: 440px; margin-inline: auto; }
  .esencial { padding: 32px; }
  .hoja { padding: 44px 40px; }
  .tarjeta { padding: 32px 32px 34px; }
  .tarjeta-cabeza img { width: 124px; }
  .autor img { width: 116px; height: 116px; }
}

/* --- wide screens and phones held sideways: cover beside the pitch --------------------------------------------------- */

@media (min-width: 900px), (min-width: 560px) and (max-height: 520px) {
  .inicio .columna {
    display: grid;
    grid-template-columns: var(--tapa, 290px) minmax(0, var(--pitch, 470px));
    grid-template-rows: 1fr repeat(7, auto) 1fr;
    column-gap: var(--hueco, 56px);
    justify-content: center;
    max-width: none;
    text-align: left;
  }
  .inicio .columna > * { grid-column: 2; }
  .inicio .portada { grid-column: 1; grid-row: 1 / -1; align-self: center; width: 100%; margin: 0; }
  .inicio .etiqueta { grid-row: 2; }
  .inicio h1 { grid-row: 3; }
  .inicio .bajada { grid-row: 4; margin-inline: 0; max-width: none; }
  .inicio .precio-fila { grid-row: 5; justify-content: flex-start; }
  .inicio .precio-nota { grid-row: 6; }
  .inicio .acciones { grid-row: 7; }
  .inicio .garantias { grid-row: 8; justify-content: flex-start; }
  .inicio .boton { margin-inline: 0; max-width: none; }
}

@media (min-width: 900px) {
  .inicio { padding-block: 56px var(--aire); }
}

@media (min-width: 560px) and (max-height: 520px) {
  /* phone held sideways: little height, so everything tightens */
  .inicio { padding-block: 14px 44px; }
  .inicio .columna { --tapa: 150px; --hueco: 28px; --pitch: 440px; }
  .inicio .etiqueta { margin-bottom: 6px; }
  h1 { font-size: 1.75rem; }
  .bajada { margin-top: 6px; font-size: 0.9em; line-height: 1.4; }
  .precio-fila { margin-top: 8px; }
  .inicio .precio { font-size: 1.7rem; }
  .precio-nota { margin-top: 2px; }
  .acciones { margin-top: 8px; }
  .inicio .boton { min-height: 46px; padding-block: 8px; }
  .garantias { margin-top: 8px; }
  .seccion { padding-block: 44px; }
  .barra-compra { padding-block: 6px calc(6px + env(safe-area-inset-bottom)); }
  .barra-compra .boton { min-height: 44px; }
  .barra-titulo { display: none; }
}

/* --- large monitors: scale everything up together ---------------------------------------------------------------- */

@media (min-width: 1800px) and (min-height: 900px) {
  html { font-size: 112.5%; }
  :root { --columna: 680px; --aire: 104px; }
  .inicio { padding-top: 84px; }
  .inicio .columna { --tapa: 340px; --pitch: 540px; --hueco: 64px; }
}
@media (min-width: 2400px) and (min-height: 1200px) {
  html { font-size: 131.25%; }
  :root { --columna: 800px; --aire: 124px; }
  .inicio { padding-top: 110px; }
  .inicio .columna { --tapa: 410px; --pitch: 640px; --hueco: 76px; }
  .filete { width: 80px; }
  .tarjeta-cabeza img { width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .barra-compra, .cinta-borrador { display: none !important; }
}

/* three named things stack on phones (longer lines) */
@media (max-width: 479px) {
  .tres { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .tres li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
  .tres span { margin-top: 0; }
}

/* Thank-you page: one state shown at a time, chosen by gracias.js. */
.gracias main { padding-top: 56px; padding-bottom: 72px; }
.gracias [data-ver] { display: none; }
[data-pago="comprobando"] [data-ver="comprobando"],
[data-pago="pagado"] [data-ver="pagado"],
[data-pago="tarda"] [data-ver="tarda"],
[data-pago="no"] [data-ver="no"],
[data-pago="error"] [data-ver="error"] { display: block; }
.gracias section p { margin-top: 18px; }
.gracias .ayuda { margin-top: 48px; font-size: 0.92em; }

/* Buy buttons while the payment page is being opened. */
.pagando [data-compra] { opacity: 0.6; pointer-events: none; }

/* Notice after a payment that did not go through. */
.aviso-pago { margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--rojo); border-radius: 8px; }
