@font-face {
  font-family: "Monument Grotesk";
  src: url("assets/fonts/MonumentGrotesk-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Monument Grotesk Mono";
  src: url("assets/fonts/MonumentGrotesk-Semi-Mono.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Supreme Jumbo";
  src: url("assets/fonts/SupremeLL-Jumbo.otf") format("opentype");
  font-weight: 900;
  font-display: swap;
}

:root {
  --font: "Monument Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Monument Grotesk Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-mark: "Supreme Jumbo", "Monument Grotesk", Arial, sans-serif;

  --texture: url("assets/textures/lbd-paper.avif");
  --paper: #eeebe6;

  --ink: #221f1a;
  --ink-soft: #625a4d;
  --line: rgba(34, 31, 26, 0.24);
  --red: #e41e18;
  --shadow: 0 16px 38px -20px rgba(40, 32, 20, 0.6);
  /* interletrado: 0 en display y texto, --track-1 en etiquetas, --track-2 en datos diminutos */
  --track-1: 0.06em;
  --track-2: 0.14em;

  --edge: clamp(18px, 2.9vw, 42px);
  --gap: clamp(16px, 5.2vw, 75px);
  --block: clamp(70px, 12vh, 150px);

  --corner-x: clamp(12px, 1.6vw, 24px);
  --corner-y: clamp(10px, 1.4vh, 18px);
  --logo-w: clamp(120px, 15.2vw, 216px);
  --logo-h: calc(var(--logo-w) / 2.973);

  --logo-mask: url("assets/logo/logo.png");
  --cursor: url("assets/cursor-asterisk.png") 16 16, auto;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 700;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--texture);
  background-size: 100% auto;
  background-repeat: repeat-y;
  text-transform: uppercase;
  cursor: var(--cursor);
  -webkit-font-smoothing: antialiased;
}

a, button, select, label { cursor: var(--cursor); }

/* lo que el visitante escribe se queda como lo escribe */
input, textarea { text-transform: none; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ─── LANDING ─────────────────────────────────────────────*/

.frame {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: clamp(8px, 1.4vh, 16px) 0;
  padding: var(--corner-y) var(--corner-x);
  height: 100vh;
  height: 100svh;
  color: #fff;
}

/* el PNG del logo hace de máscara para que su color lo mande el CSS */
.logo {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
  width: var(--logo-w);
  aspect-ratio: 1799 / 605;
  background-color: currentColor;
  -webkit-mask: var(--logo-mask) center / contain no-repeat;
  mask: var(--logo-mask) center / contain no-repeat;
  transition: color 0.2s;
}

.corner {
  position: relative;
  z-index: 1;
  font-size: clamp(11px, 1.2vw, 15px);
  letter-spacing: var(--track-1);
  padding: 4px 2px;
  transition: color 0.2s;
}

.logo:hover,
.corner:hover { color: var(--red); }

.corner--tr { grid-column: 3; grid-row: 1; justify-self: end; }
.corner--bl { grid-column: 1; grid-row: 3; justify-self: start; }
.corner--br { grid-column: 3; grid-row: 3; justify-self: end; }

.hero {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.ast { font-size: 0.72em; vertical-align: super; line-height: 0; }

/* ─── GALERÍA ─────────────────────────────────────────────
   Filas de 1/6 de columna: vertical = 12, polaroid y apaisada (2 columnas) = 13. */

.gallery-wrap {
  container-type: inline-size;
  padding-block: var(--block);
}

.gallery {
  --n: 4;
  --W: 84cqw;
  --g: calc(var(--W) / (3 * var(--n) - 1));
  --u: calc(var(--g) / 3);
  padding-inline: 8%;
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  grid-auto-rows: var(--u);
  grid-auto-flow: row dense;
  column-gap: var(--g);
}

.shot {
  --cs: 1;
  --rs: 12;
  grid-column: var(--col, auto) / span var(--cs);
  grid-row: var(--row, auto) / span var(--rs);
  align-self: start;
  display: block;
  margin: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.shot--wide { --cs: 2; --rs: 13; aspect-ratio: 3 / 2; }

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* polaroid: el marco lleva el padding y la foto conserva su proporción */
.shot--polaroid {
  --rs: 13;
  aspect-ratio: auto;
  padding: 5.5% 5.5% 27.667%;
  background: #fdfcf8;
}

.shot--polaroid img { height: auto; aspect-ratio: 2 / 3; }

/* marco de negativo escaneado: borde negro, esquinas interiores redondeadas y filo claro */
.shot--film {
  aspect-ratio: auto;
  padding: 5% 3.6% 5.8%;
  background: #0e0d0c;
  box-shadow: 0 0 0 2px #efeadf;
}

.shot--film img { height: auto; aspect-ratio: 2 / 3; border-radius: 4% / 2.7%; }

/* ─── SECCIONES ───────────────────────────────────────────*/

.section { padding: var(--block) var(--edge); }

/* cabecera corrida, como la de un documento impreso */
.runhead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  border-top: 1px solid var(--ink);
  padding-top: 8px;
  margin-bottom: clamp(26px, 4.5vh, 56px);
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: var(--track-2);
  color: var(--ink-soft);
}

.title {
  font-family: var(--font-mark);
  font-size: clamp(34px, 6vw, 78px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  margin: 0 0 clamp(24px, 4vh, 50px);
}

.title__num {
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 0.2em;
  letter-spacing: var(--track-2);
  vertical-align: top;
  position: relative;
  top: 0.5em;
  margin-right: 0.7em;
  color: var(--ink-soft);
}

.lead { font-size: clamp(14px, 1.35vw, 17px); line-height: 1.7; margin: 0 0 1.2em; color: var(--ink); }

p {
  font-family: var(--font-text);
  font-weight: 400;
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.8;
  margin: 0 0 1.4em;
  color: var(--ink-soft);
}

.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--gap); align-items: start; }

.portrait { aspect-ratio: 2 / 3; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }

/* ─── TARJETA DE VISITA ───────────────────────────────────*/

.card-wrap {
  container-type: inline-size;
  width: min(560px, 100%);
  margin: 0 auto clamp(46px, 8vh, 90px);
}

.card {
  position: relative;
  aspect-ratio: 1352 / 892;
  padding: 6.3cqw;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 4.5cqw;
  background: #fdfcf8;
  box-shadow: var(--shadow);
}

.card p,
.card dl {
  font-family: var(--font);
  font-weight: 700;
  font-size: inherit;
  margin: 0;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: 0;
}

.card__claim { font-size: 3.9cqw; text-align: center; }
.card__book { font-size: 3.3cqw; text-align: center; }

.card__rows { display: grid; gap: 0.6cqw; font-size: 3.3cqw; }
.card__rows > div { display: flex; justify-content: space-between; gap: 4cqw; }
.card__rows dd { margin: 0; }
.card__rows a { border-bottom: 0.18cqw solid transparent; }
.card__rows a:hover { border-bottom-color: var(--ink); }

.card__site { align-self: end; justify-self: end; font-size: 4.4cqw; }

/* el logo estampado: tinta roja desigual, como un sello de caucho */
.card__stamp {
  position: absolute;
  left: 7cqw;
  bottom: 7cqw;
  width: 38cqw;
  aspect-ratio: 1799 / 605;
  background-color: var(--red);
  rotate: -8deg;
  opacity: 0.88;
  mix-blend-mode: multiply;
  -webkit-mask-image: var(--logo-mask), url("assets/stamp-ink.png");
  mask-image: var(--logo-mask), url("assets/stamp-ink.png");
  -webkit-mask-size: contain, 100% 100%;
  mask-size: contain, 100% 100%;
  -webkit-mask-repeat: no-repeat, no-repeat;
  mask-repeat: no-repeat, no-repeat;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}


/* ─── PIE ─────────────────────────────────────────────────
   Mismo papel, en negativo: el fondo se vuelve tinta y la
   letra toma el color del papel.                           */

.footer {
  position: relative;
  isolation: isolate;
  padding: var(--block) var(--edge);
  color: var(--paper);
  display: grid;
  justify-items: center;
  gap: clamp(26px, 4vh, 44px);
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--paper);
  background-image: var(--texture);
  background-size: 100% auto;
  background-repeat: repeat-y;
  filter: invert(1);
}

/* mismo bloque que la tarjeta, en negativo */
.footer__block {
  width: min(480px, 100%);
  display: grid;
  gap: clamp(20px, 3.4vh, 32px);
}

.footer__block p,
.footer__block dl {
  margin: 0;
  color: inherit;
  line-height: 1.3;
  letter-spacing: 0;
}

.footer__claim { font-size: clamp(15px, 1.7vw, 21px); text-align: center; }
.footer__book { font-size: clamp(13px, 1.45vw, 18px); text-align: center; }

.footer__rows { display: grid; gap: 4px; font-size: clamp(13px, 1.45vw, 18px); }
.footer__rows > div { display: flex; justify-content: space-between; gap: 20px; }
.footer__rows dd { margin: 0; }
.footer__rows a { border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.footer__rows a:hover { border-bottom-color: currentColor; }

.footer__ig {
  display: block;
  width: clamp(26px, 2.6vw, 32px);
  color: inherit;
  transition: color 0.2s;
}
.footer__ig svg { width: 100%; height: auto; display: block; }
.footer__ig:hover { color: var(--red); }

.footer__logo {
  width: clamp(130px, 16vw, 200px);
  aspect-ratio: 1799 / 605;
  background-color: currentColor;
  -webkit-mask: var(--logo-mask) center / contain no-repeat;
  mask: var(--logo-mask) center / contain no-repeat;
  transition: color 0.2s;
}
.footer__logo:hover { color: var(--red); }

/* ─── MENÚ ────────────────────────────────────────────────
   La A* se despliega en AGABONET* y hace de cerrar.        */

.burger {
  position: fixed;
  z-index: 70;
  top: calc(var(--corner-y) + var(--logo-h) / 2);
  left: var(--corner-x);
  translate: 0 -50%;
  padding: 0;
  font-family: var(--font-mark);
  font-weight: 900;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  background: none;
  border: 0;
  color: var(--ink);
  white-space: nowrap;
  transition: color 0.2s;
}

/* blanca sobre la foto, negra con el menú abierto; roja al pasar el ratón solo si está cerrada */
.burger.on-photo { color: #fff; }
.burger.is-open { color: var(--ink); }
.burger:not(.is-open):hover { color: var(--red); }

/* el padding da aire al recorte para que no corte las letras;
   el margen negativo lo descuenta del layout */
.burger__rest {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  vertical-align: top;
  padding-block: 0.3em;
  margin-block: -0.3em;
  transition: max-width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.burger.is-open .burger__rest { max-width: 8em; }

.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}
.menu.is-open { opacity: 1; pointer-events: auto; }

.menu__paper {
  position: absolute;
  inset: 0;
  background-color: var(--paper);
  background-image: var(--texture);
  background-size: cover;
  background-position: center;
}

/* el menú, como el índice de un impreso */
.menu__index {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(620px, 82vw);
  display: grid;
  gap: clamp(6px, 1.6vh, 14px);
}

.menu__index a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  transition: opacity 0.2s;
}
.menu__index a:hover { opacity: 0.45; }

.menu__index .entry {
  font-size: clamp(26px, 4.4vw, 46px);
  letter-spacing: 0;
  line-height: 1.1;
}

.menu__index .leader {
  flex: 1;
  border-bottom: 2px dotted var(--ink);
  opacity: 0.3;
  transform: translateY(-0.35em);
}

.menu__index .folio {
  font-family: var(--font-text);
  font-weight: 400;
  font-size: clamp(12px, 1.3vw, 15px);
  letter-spacing: var(--track-2);
  color: var(--ink-soft);
  min-width: 2ch;
  text-align: right;
}

.menu__index .folio--ast {
  font-family: var(--font-mark);
  font-weight: 900;
  font-size: clamp(21px, 2.6vw, 30px);
  color: var(--red);
  line-height: 0;
  position: relative;
  top: 0.16em;
}

/* ─── RESPONSIVE ──────────────────────────────────────────*/

@media (max-width: 1000px) {
  .gallery { --n: 3; --W: 90cqw; padding-inline: 5%; }
  .shot { grid-column: auto / span var(--cs); grid-row: auto / span var(--rs); }
}

@media (max-width: 680px) {
  body { background-size: 260% auto; }
  .gallery { --n: 2; padding-inline: 0; grid-auto-rows: auto; gap: 5cqw; }
  .shot { grid-row: auto; }
  .gallery-wrap { padding-inline: var(--edge); }
  .cols { grid-template-columns: 1fr; }
  .corner { padding-inline: 14px; }
  .frame { gap: 10px 0; }
}

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