/* Birth Gazette: la misma tinta, papel y letras que el libro. Lo oscuro es el escaparate (foto del producto);
   lo claro es el papel de diario (todo lo que se lee y se completa).
   12-oct-2026: sin bordó ni crema (son la marca de A Day In History): papel de diario, tinta, verde de la tela
   Heirloom para actuar y dorado para los precios. */
@font-face { font-family: "Playfair"; src: url(fonts/PlayfairDisplay-var.woff) format("woff"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Playfair"; src: url(fonts/PlayfairDisplay-Italic-var.woff) format("woff"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Baskerville"; src: url(fonts/LibreBaskerville-var.woff) format("woff"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Baskerville"; src: url(fonts/LibreBaskerville-Italic-var.woff) format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Old Standard"; src: url(fonts/OldStandard-Regular.woff) format("woff"); font-display: swap; }
@font-face { font-family: "Old Standard"; src: url(fonts/OldStandard-Italic.woff) format("woff"); font-style: italic; font-display: swap; }
@font-face { font-family: "Fraktur"; src: url(fonts/UnifrakturMaguntia-Book.woff) format("woff"); font-display: swap; }

:root {
  --papel: #e9e5d8;        /* papel de diario */
  --papel-claro: #f6f3ea;
  --tinta: #22201b;
  --tinta-suave: #55503f;
  --accion: #24513f;       /* verde de la tela Heirloom: botones y enlaces */
  --nogal: #17100c;        /* el fondo de las fotos del libro */
  --nogal-claro: #2a1d16;
  --crema: #efe3c8;        /* texto sobre nogal */
  --oro: #c9a253;
  --ancho: 72rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--papel); color: var(--tinta); font: 1.0625rem/1.7 "Baskerville", Georgia, serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accion); }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 3px; }

h1, h2, h3 { font-family: "Playfair", Georgia, serif; font-weight: 700; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.08; text-align: center; letter-spacing: -.01em; }
h3 { font-size: 1.6rem; line-height: 1.2; }
.bajada { max-width: 34rem; margin: 1rem auto 2.5rem; text-align: center; font: italic 1.15rem/1.6 "Old Standard", serif; color: var(--tinta-suave); }

main > section { padding: 5rem 1.25rem; }
main > section > * { max-width: var(--ancho); margin-left: auto; margin-right: auto; }

/* --- botones --- */
.boton { display: inline-block; text-align: center; text-decoration: none; cursor: pointer;
  font: 600 1.1rem/1.2 "Playfair", Georgia, serif; letter-spacing: .02em; color: var(--papel-claro); background: var(--accion);
  border: 0; padding: 1.05rem 2.2rem; min-height: 3.25rem; transition: background-color .2s; }
.boton:hover { background: #1a3d2f; }
.boton[disabled] { opacity: .6; cursor: progress; }
.boton.claro { background: transparent; color: var(--crema); box-shadow: inset 0 0 0 1px var(--oro); }
.boton.claro:hover { background: rgba(201,162,83,.14); }

/* --- cabecera sobre el escaparate --- */
.cabecera { position: absolute; z-index: 2; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center;
  max-width: var(--ancho); margin: 0 auto; padding: 1.1rem 1.25rem; }
/* el cabezal de diario de la portada (lo memorable de la página): fecha y edición arriba, el nombre en gótica, filete doble */
.cabecera:has(.cabecera-arriba) { position: static; display: flow-root; max-width: none; background: var(--nogal); color: var(--crema);
  padding: .7rem 1.25rem 0; text-align: center; }
.cabecera-arriba, .cabecera-abajo { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  max-width: var(--ancho); margin: 0 auto; font: italic .9rem "Old Standard", serif; color: #b9a684; }
.cabecera:has(.cabecera-arriba) .marca { display: block; font-size: clamp(2.5rem, 12vw, 4.4rem); line-height: 1.1; margin: .35rem 0 .2rem; color: #f6ecd6; }
.cabecera-abajo { margin-top: 0; padding: .3rem 0; border-top: 3px double rgba(201,162,83,.7); border-bottom: 1px solid rgba(201,162,83,.7); }
.cabecera-abajo span:last-child { font-style: normal; letter-spacing: .03em; }
.marca { font: 1.6rem/1 "Fraktur", serif; color: var(--crema); text-decoration: none; }
.ir-pedido { font: 600 1rem "Playfair", serif; color: var(--crema); text-decoration: none; border-bottom: 1px solid var(--oro); padding-bottom: 2px; }

/* --- el escaparate: el libro es lo memorable de la página --- */
.heroe { background: var(--nogal); color: var(--crema); padding: 0 !important; display: grid; overflow: hidden; }
.heroe-texto { padding: 2rem 1.25rem 0; text-align: center; max-width: 34rem !important; position: relative; z-index: 1; }
.heroe h1 { font-size: clamp(2.4rem, 9.5vw, 4.6rem); line-height: 1.02; letter-spacing: -.02em; color: #f6ecd6; }
.heroe-texto > p { font-size: 1.1rem; line-height: 1.65; color: #d9cbb0; margin: 1.2rem auto 1.8rem; max-width: 30rem; }
.precios-heroe { font: 600 1.15rem/1.5 "Playfair", Georgia, serif; color: #e6d7b8; margin: 0 0 1.1rem; }
.precios-heroe b { color: var(--oro); font-weight: 700; }
.precios-heroe span { color: #7d6b52; margin: 0 .4rem; }
.precios-heroe small { font: italic .95rem "Old Standard", serif; color: #b9a684; }
.heroe-botones { display: grid; gap: .7rem; max-width: 22rem; margin: 0 auto; }
.heroe-foto { display: block; margin-top: -1rem; max-width: none !important; width: 100%; }
.heroe-foto img { width: 100%; animation: luz 1.6s ease-out both; }
@keyframes luz { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }

.franja { list-style: none; margin: 0; padding: 1.1rem 1.25rem; background: var(--nogal-claro); color: var(--crema);
  display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 2.2rem; font: italic 1rem "Old Standard", serif;
  border-top: 1px solid rgba(201,162,83,.35); }
.franja li { position: relative; }

/* --- la portada viva --- */
.diario { max-width: 34rem !important; background: var(--papel-claro); padding: 1.1rem 1.1rem 1.4rem;
  border: 2px solid var(--tinta); outline: 1px solid var(--tinta); outline-offset: 4px;
  box-shadow: 0 30px 60px -30px rgba(34,32,27,.6); }
.diario-arriba { display: flex; justify-content: space-between; gap: .5rem; font: .78rem "Old Standard", serif; border-bottom: 1px solid var(--tinta); padding-bottom: .3rem; }
.diario-arriba span:nth-child(2) { font-style: italic; }
.cabezal { font: clamp(2.3rem, 11vw, 3.6rem)/1.05 "Fraktur", serif; text-align: center; margin: .45rem 0 .2rem; }
.diario-fecha { text-align: center; font: italic .95rem "Old Standard", serif; border-top: 3px solid var(--tinta);
  border-bottom: 1px solid var(--tinta); padding: .25rem 0; margin-bottom: .9rem; min-height: 2.1rem; }
.titular { font: 900 clamp(2.2rem, 10vw, 3.4rem)/.98 "Playfair", Georgia, serif; text-align: center; margin: 0 0 1.1rem; overflow-wrap: anywhere; }

.campo { display: block; margin: 0 0 1rem; border: 0; padding: 0; min-width: 0; }
.campo > span, .campo > legend { display: block; font: italic .98rem "Old Standard", serif; margin-bottom: .3rem; color: var(--tinta-suave); padding: 0; }
.campo small { float: right; font-style: normal; }
input:not([type=radio]), textarea { width: 100%; font: 1.1rem "Baskerville", Georgia, serif; color: var(--tinta); background: #fdfcf7;
  border: 1px solid #8a8470; border-radius: 0; padding: .75rem .8rem; min-height: 3.1rem; }
input:not([type=radio]):focus, textarea:focus { border-color: var(--tinta); outline: 2px solid var(--accion); outline-offset: 0; }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #9a947f; font-style: italic; }
.sexo label, .eleccion label { display: inline-flex; align-items: center; gap: .45rem; margin-right: 1.4rem; font-size: 1.05rem; min-height: 2.6rem; cursor: pointer; }
input[type=radio] { width: 1.15rem; height: 1.15rem; accent-color: var(--accion); }
form .boton { width: 100%; margin-top: .4rem; }
.aviso { min-height: 1.4rem; margin: .8rem 0 0; font: italic 1rem "Old Standard", serif; text-align: center; }
.aviso.error { color: var(--accion); font-style: normal; font-weight: bold; }

.resultado[hidden] { display: none; }
.resultado { display: grid; gap: 2rem; margin-top: 3rem; align-items: start; }
.resultado img { border: 1px solid var(--tinta); box-shadow: 0 30px 60px -28px rgba(34,32,27,.7); animation: imprenta .9s ease-out both; }
@keyframes imprenta { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.destacados dl { margin: .8rem 0 1.6rem; }
.destacados dt { font: italic .95rem "Old Standard", serif; color: var(--tinta-suave); margin-top: .8rem; }
.destacados dd { margin: 0; font: 700 1.15rem/1.35 "Playfair", Georgia, serif; border-bottom: 1px solid rgba(34,32,27,.2); padding-bottom: .5rem; }
.destacados .boton { width: 100%; }
.nota { font: italic .95rem "Old Standard", serif; text-align: center; margin-top: .8rem; }

/* --- adentro: carrusel de dobles páginas, una por vez (se desliza con el dedo, con flechas o solo) --- */
.adentro { background: #dfdacb; }
.carrusel { position: relative; max-width: 58rem !important; }
.dobles { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; scrollbar-width: none; scroll-behavior: smooth; }
.dobles::-webkit-scrollbar { display: none; }
.dobles figure { margin: 0; scroll-snap-align: center; text-align: center; }
.dobles img { -webkit-mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); mask-image: radial-gradient(closest-side, #000 80%, transparent 100%); }
.dobles figcaption { margin: 1.1rem auto 0; font-size: 1.05rem; line-height: 1.55; max-width: 32rem; padding: 0 .5rem; }
.dobles figcaption strong { font-family: "Playfair", serif; font-size: 1.15rem; display: block; }
.flecha { position: absolute; top: calc(50% - 4rem); width: 3rem; height: 3rem; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(247,240,220,.92); color: var(--tinta); font: 400 1.6rem/1 "Playfair", serif; box-shadow: 0 6px 18px -6px rgba(34,32,27,.5);
  display: flex; align-items: center; justify-content: center; padding-bottom: .2rem; }
.flecha:hover { background: #fdfcf7; }
.flecha.ant { left: .25rem; } .flecha.sig { right: .25rem; }
.puntos { display: flex; justify-content: center; gap: .1rem; margin-top: 1.2rem; }
.puntos button { width: 2.25rem; height: 2.25rem; border: 0; background: none; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.puntos button::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: rgba(34,32,27,.25); transition: background-color .2s, transform .2s; }
.puntos button[aria-current="true"]::before { background: var(--accion); transform: scale(1.25); }
.tambien { max-width: 34rem !important; text-align: center; font-style: italic; margin-top: 2rem; }

/* --- cómo funciona: es una secuencia, por eso va numerada --- */
.pasos ol { list-style: none; counter-reset: paso; max-width: 40rem; margin: 2.5rem auto 0; padding: 0; }
.pasos li { counter-increment: paso; position: relative; padding: 0 0 1.6rem 3.6rem; }
.pasos li::before { content: counter(paso, upper-roman) "."; position: absolute; left: 0; top: -.2rem; width: 2.8rem; text-align: right;
  font: 700 1.7rem "Playfair", Georgia, serif; color: var(--accion); }
.pasos strong { font-family: "Playfair", serif; font-size: 1.15rem; }

/* --- ediciones: el escaparate otra vez --- */
.ediciones { background: var(--nogal); color: var(--crema); }
.ediciones h2 { color: #f6ecd6; }
.paginas { max-width: 46rem !important; margin: 3rem auto 0; border: 2px solid var(--tinta); outline: 1px solid var(--tinta); outline-offset: 3px; padding: 1.6rem 1.3rem 1.4rem; background: var(--papel-claro); }
.paginas h3 { text-align: center; font-size: 1.7rem; margin: 0 0 .4rem; }
.paginas > p { text-align: center; font-style: italic; color: var(--tinta-suave); margin: 0 0 1.2rem; }
.paginas ol { margin: 0; padding-left: 2.2rem; columns: 2 15rem; column-gap: 2rem; font-size: .98rem; line-height: 1.45; }
.paginas li { break-inside: avoid; padding: .18rem 0; }
.paginas li::marker { color: var(--accion); font-family: "Playfair", Georgia, serif; }
.bajada-libro { max-width: 36rem; margin: .9rem auto 1.8rem; text-align: center; font-style: italic; color: #e6d7b8; }
.desde-libro .ediciones { padding-top: 2.5rem; }
.desde-libro .edicion-texto { display: flex; flex-direction: column; }
.desde-libro .edicion-texto > * { order: 3; }
.desde-libro .edicion-texto > h3 { order: 0; }
.desde-libro .edicion-texto > .precio { order: 1; }
.desde-libro .edicion .boton { order: 2; margin: .2rem 0 1.2rem; }
.dos { display: grid; gap: 3.5rem; margin-top: 2.5rem !important; }
.edicion img { width: 100%; }
.edicion-texto { padding: 0 .25rem; max-width: 30rem; margin: -1.5rem auto 0; position: relative; }
.edicion h3 { color: #f6ecd6; }
.precio { font: 600 1.6rem "Playfair", Georgia, serif; color: var(--oro); margin: .1rem 0 .8rem; }
.edicion-texto > p:not(.precio) { color: #d9cbb0; margin: 0 0 1rem; }
.edicion ul { margin: 0 0 1.6rem; padding-left: 1.1rem; color: #d9cbb0; }
.edicion li { margin-bottom: .3rem; }
.edicion li::marker { color: var(--oro); }
.edicion .boton { width: 100%; }

/* --- promesas --- */
.promesas dl { display: grid; gap: 2rem 3rem; margin-top: 2.5rem; max-width: 56rem; }
.promesas dt { font: 700 1.25rem "Playfair", Georgia, serif; padding-top: 1rem; border-top: 1px solid var(--tinta); }
.promesas dd { margin: .35rem 0 0; }

/* --- pedido --- */
.pedido { background: var(--papel-claro); border-top: 1px solid rgba(34,32,27,.15); }
#formPedido { max-width: 34rem; margin-top: 2.5rem; }
.fila { display: grid; gap: 0 1rem; }

/* --- preguntas --- */
.preguntas details { max-width: 42rem; border-bottom: 1px solid rgba(34,32,27,.35); }
.preguntas details:first-of-type { margin-top: 2rem; border-top: 1px solid rgba(34,32,27,.35); }
.preguntas summary { cursor: pointer; font: 600 1.15rem "Playfair", Georgia, serif; padding: 1.1rem 0; }
.preguntas details p { margin: 0 0 1.2rem; }

/* --- cierre --- */
.final { background: var(--nogal) url(img/escena-classic.jpg) center 35% / cover; color: #f6ecd6; text-align: center; padding: 9rem 1.25rem 4rem !important; position: relative; }
.final::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(23,16,12,.2), rgba(23,16,12,.85) 70%); }
.final > * { position: relative; }
.final h2 { margin-bottom: 1.8rem; padding-top: 14rem; }

.pie { background: var(--nogal); color: #b9a684; text-align: center; padding: 2.5rem 1.25rem 3rem; font: italic .95rem "Old Standard", serif; }
.pie p { margin: .3rem 0; }

@media (min-width: 46rem) {
  .heroe-texto { max-width: 46rem !important; padding-top: 3rem; }
  .heroe-botones { grid-template-columns: 1fr 1fr; max-width: 42rem; }
  .heroe h1 { font-size: clamp(3rem, 5.6vw, 4.6rem); }
  .heroe-foto { max-width: 76rem !important; margin: -3rem auto 0; }
  .resultado { grid-template-columns: 1.1fr 1fr; }
  .flecha.ant { left: -1.5rem; } .flecha.sig { right: -1.5rem; }
  .dos { grid-template-columns: 1fr 1fr; }
  .promesas dl { grid-template-columns: 1fr 1fr; }
  /* nombre y fecha del pedido en filas propias: en dos columnas las listas de la fecha quedaban cortadas («Mont», «D») */
  .fila { grid-template-columns: 1fr; }
}

/* Las fotos del libro se funden con el fondo: sin el rectángulo de la foto a la vista. */
.heroe-foto img, .edicion img {
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); }

/* barra de la imprenta mientras se arma la portada */
.barra { height: 4px; background: rgba(34,32,27,.15); margin-top: 1rem; overflow: hidden; }
.barra[hidden] { display: none; }
.barra span { display: block; height: 100%; width: 0; background: var(--accion); }

/* la caja de pago aparece en lugar del formulario, con el resumen del pedido */
.pagar[hidden] { display: none; }
.pagar { max-width: 34rem; margin-top: 2.5rem; }
.pagar .resumen { font: 600 1.15rem/1.45 "Playfair", Georgia, serif; text-align: center; margin: 0 0 1.4rem; }
#botonesPaypal { min-height: 9rem; }

/* la aclaración de color, chica y discreta, bajo las ediciones */
.aviso-color { max-width: 40rem !important; margin: 2.5rem auto 0 !important; text-align: center; font: italic .95rem/1.5 "Old Standard", serif; color: #b9a684; }

.pie .enlaces-legales a { color: #d9cbb0; }

/* llegada desde un anuncio: la portada con el formulario va primero; la cabecera deja de flotar sobre el escaparate */
.desde-anuncio .cabecera { position: static; background: var(--nogal); max-width: none; }
.desde-anuncio .cabecera-abajo, .desde-libro .cabecera-abajo { display: none; }
.desde-anuncio #portada { padding-top: 2rem !important; }
.desde-anuncio #t-portada { font-size: clamp(1.9rem, 7vw, 3rem); }

/* la fecha en tres listas: mes ancho, día y año angostos */
.campo > .selector-fecha, .selector-fecha { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: .5rem; margin: 0; font: inherit; color: inherit; }
.selector-fecha select { width: 100%; font: 1.05rem "Baskerville", Georgia, serif; color: var(--tinta); background: #fdfcf7; border: 1px solid #8a8470; border-radius: 0; padding: .7rem .5rem; min-height: 3.1rem; }
.selector-fecha select:focus { outline: 2px solid var(--accion); outline-offset: 0; }

.envio label { align-items: flex-start; line-height: 1.4; margin-bottom: .4rem; }
.envio input[type=radio] { margin-top: .2rem; flex: none; }
.nota-envio { font: italic .92rem/1.5 "Old Standard", serif; color: var(--tinta-suave); margin: .3rem 0 0; }

/* el ejemplo que se imprime solo (llegada desde anuncio) */
.ejemplo[hidden] { display: none; }
.ejemplo { max-width: 34rem !important; text-align: center; }
.ejemplo img { border: 1px solid var(--tinta); box-shadow: 0 30px 60px -28px rgba(34,32,27,.7); animation: imprenta 1.1s ease-out both; margin: .6rem 0 1.2rem; }
.ejemplo .boton { width: 100%; font-size: 1.2rem; }
.ejemplo-rotulo { font: italic 1.05rem "Old Standard", serif; color: var(--tinta-suave); margin: 0; }
/* (antes: pointer-events none durante la demo; sacado: los toques para hacer scroll terminaban cortándola) */
.demo-activo #formPrevia input, .demo-activo #formPrevia select { background: #fffdf6; }

/* el ejemplo nunca más alto que la pantalla: el botón «Now try it…» tiene que verse sin bajar (9-oct, captura de Pablo) */
.ejemplo img { width: auto; max-width: 100%; max-height: calc(100svh - 19rem); min-height: 16rem; margin-left: auto; margin-right: auto; display: block; }
.desde-anuncio #portada { padding-bottom: 2rem !important; }

.ejemplo .boton { margin-top: .8rem; }
.ejemplo .nota { margin: .5rem 0 0; }
.ejemplo-libro { border-top: 1px solid var(--tinta-suave); padding-top: 1.4rem; }
.ejemplo .ejemplo-libro img { animation: none; max-height: 26rem; min-height: 0; box-shadow: none; border: 0; margin: 0 auto 1rem; }
.ejemplo-libro p { font: 1.05rem/1.55 "Baskerville", Georgia, serif; margin: 0 0 1rem; }
.guardar { border-top: 1px solid var(--tinta-suave); margin-top: 1.6rem; padding-top: 1.3rem; text-align: left; }
.guardar h3 { font-size: 1.5rem; margin: 0 0 .3rem; text-align: center; }
.guardar > p:not(.aviso) { margin: 0 0 1rem; }
.guardar .campo { display: block; margin-bottom: .8rem; }
.guardar .campo > span:first-child { display: block; font: italic .95rem "Old Standard", serif; color: var(--tinta-suave); }
.guardar input:not([type=hidden]) { width: 100%; box-sizing: border-box; }
.guardar .boton { width: 100%; }
.boton-claro { background: transparent; color: var(--tinta); border: 1.5px solid var(--tinta); }
.boton-claro:hover { background: var(--tinta); color: var(--papel-claro); }
.titular { font-size: clamp(1.9rem, 8.5vw, 3.2rem); }
.ediciones .bajada { color: #b9a684; margin-bottom: 1rem; }
/* en las llegadas desde anuncios el cabezal se achica: lo primero es el libro y el precio */
.desde-libro .cabecera .marca, .desde-anuncio .cabecera .marca { font-size: 2.3rem; margin: .1rem 0 .4rem; }
.desde-libro .edicion img { width: auto; max-height: 19rem; margin: 0 auto; }
