/* Ediciones Promodite — sistema visual v2
   Tinta y marfil, un único acento, serif editorial de gran formato y líneas finas.
   Sin dependencias externas. */

@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --ink: #0c0c0d;
  --ink-2: #151517;
  --ivory: #f4f1ea;
  --ivory-2: #e9e5db;
  --acc: #6f86ff;
  --acc-deep: #2a3dc9;

  --font-serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: "Geist", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 82rem;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --bg: var(--ivory);
  --bg-alt: var(--ivory-2);
  --fg: #141414;
  --muted: #55524a;
  --line: rgba(20, 20, 20, .18);
  --accent: var(--acc-deep);
  --focus: var(--acc-deep);

  --icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M14 6l6 6-6 6'/%3E%3C/svg%3E");
  --icon-ext: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M8 7h9v9'/%3E%3C/svg%3E");
}

.theme-ink {
  --bg: var(--ink);
  --bg-alt: var(--ink-2);
  --fg: #f4f1ea;
  --muted: #a8a59c;
  --line: rgba(244, 241, 234, .18);
  --accent: var(--acc);
  --focus: var(--acc);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; background: var(--ink); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ivory);
  color: #141414;
  font: 400 1.0625rem/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 2px; }
::selection { background: var(--acc); color: var(--ink); }

.section, .hero, .page-hero, .book-hero, .site-header, .site-footer, .facts, .book-body, .related, .notfound { background: var(--bg); color: var(--fg); }
.section-alt { background: var(--bg-alt); }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: .75rem; left: .75rem; z-index: 100; padding: .7rem 1rem; background: var(--acc); color: var(--ink); font-weight: 600; border-radius: 2px; }
.skip-link:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }

/* ---------- Tipografía ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
  font: 500 .74rem/1.3 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 1.6rem; height: 1px; background: var(--accent); }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -.012em; }
h2 { font-size: clamp(2.5rem, 5.6vw, 4.8rem); line-height: 1; text-wrap: balance; }
h3 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.05; }
h2 em, h1 em, h3 em { font-style: italic; }
.lead { max-width: 40rem; color: var(--muted); font-size: clamp(1.08rem, 1.4vw, 1.25rem); line-height: 1.55; text-wrap: pretty; }

/* ---------- Botones ---------- */

.arrow::after, .ext::after {
  content: "";
  flex: none;
  width: 1.05em;
  height: 1.05em;
  background: currentColor;
  -webkit-mask: var(--icon-arrow) center / contain no-repeat;
  mask: var(--icon-arrow) center / contain no-repeat;
  transition: transform .3s var(--ease);
}
.ext::after { -webkit-mask-image: var(--icon-ext); mask-image: var(--icon-ext); }
.arrow:hover::after { transform: translateX(.22em); }
.ext:hover::after { transform: translate(.15em, -.15em); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  padding: .9rem 1.45rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font: 500 .96rem/1.2 var(--font-sans);
  text-decoration: none;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { text-decoration: none; background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn--primary { background: var(--acc); border-color: var(--acc); color: var(--ink); }
.btn--primary:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn--solid { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn--solid:hover { background: var(--acc); border-color: var(--acc); color: var(--ink); }

.link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: .32em;
}

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 94%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(244, 241, 234, .14);
  color: var(--ivory);
  --fg: var(--ivory);
  --muted: #a8a59c;
  --focus: var(--acc);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .6rem 2rem; flex-wrap: wrap; padding-block: .85rem; }

.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.mark { display: inline-flex; align-items: flex-end; gap: 3px; width: 1.55rem; height: 1.5rem; flex: none; color: currentColor; }
.mark i { display: block; width: .32rem; background: currentColor; border-radius: 1px; }
.mark i:nth-child(1) { height: 100%; }
.mark i:nth-child(2) { height: 74%; }
.mark i:nth-child(3) { height: 94%; margin-left: .1rem; background: var(--acc); transform: rotate(14deg); transform-origin: bottom left; }
.wordmark { font: 400 1.5rem/1 var(--font-serif); letter-spacing: -.01em; white-space: nowrap; }
.wordmark em { color: var(--muted); }

.site-nav ul { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem 1.7rem; }
.site-nav a {
  position: relative;
  padding-block: .35rem;
  color: rgba(244, 241, 234, .78);
  font-size: .92rem;
  text-decoration: none;
  transition: color .2s ease;
}
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--acc); transition: right .3s var(--ease); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ivory); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }

/* ---------- Portada ---------- */

.hero {
  position: relative;
  overflow: clip;
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4.5rem);
  background:
    radial-gradient(52rem 34rem at 82% 8%, rgba(111, 134, 255, .17), transparent 70%),
    radial-gradient(40rem 30rem at 4% 100%, rgba(255, 255, 255, .05), transparent 70%),
    var(--ink);
}
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 3rem; align-items: center; }
.hero-copy { grid-column: 1 / 8; }
.hero-art { grid-column: 8 / 13; }

.hero h1 { font-size: clamp(3rem, 7.4vw, 7rem); line-height: .94; letter-spacing: -.025em; margin-bottom: 2rem; text-wrap: balance; }
.hero h1 .hl { font-style: italic; color: var(--acc); }
.hero h1 .strike { color: var(--muted); text-decoration: line-through; text-decoration-thickness: .06em; text-decoration-color: var(--acc); text-decoration-skip-ink: none; }
.hero .lead { color: #bdbab1; max-width: 36rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }

.stage3d { position: relative; aspect-ratio: 1 / 1.08; max-width: 30rem; margin-inline: auto; perspective: 1600px; }
.stage3d .cover { position: absolute; width: 56%; transition: transform .7s var(--ease); }
.stage3d .cover:nth-child(1) { left: 0; top: 14%; transform: rotateY(24deg) rotateZ(-5deg); z-index: 1; }
.stage3d .cover:nth-child(2) { left: 22%; top: 0; transform: rotateY(-8deg) rotateZ(2deg); z-index: 3; width: 60%; }
.stage3d .cover:nth-child(3) { right: 0; top: 24%; transform: rotateY(-26deg) rotateZ(6deg); z-index: 2; }
.stage3d:hover .cover:nth-child(1) { transform: rotateY(14deg) rotateZ(-8deg) translateX(-4%); }
.stage3d:hover .cover:nth-child(3) { transform: rotateY(-16deg) rotateZ(9deg) translateX(4%); }
.stage-tags { position: absolute; left: 0; right: 0; bottom: -.4rem; display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; z-index: 4; }
.tag {
  display: inline-block;
  padding: .38rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--fg);
  font: 500 .7rem/1.2 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(3rem, 6vw, 5rem); }
.path {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  min-height: 15rem;
  padding: clamp(1.4rem, 2.6vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: transform .35s var(--ease), border-color .25s ease;
}
.path:hover { transform: translateY(-4px); border-color: var(--acc); }
.path--author { background: var(--acc); border-color: var(--acc); color: var(--ink); }
.path--author:hover { border-color: var(--ivory); }
.path--reader { background: rgba(244, 241, 234, .04); color: var(--ivory); }
.path .label { font: 500 .72rem/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.path h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1; }
.path h2 a { text-decoration: none; }
.path h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }
.path p:not(.label) { max-width: 28rem; font-size: .98rem; }
.path--author p:not(.label) { color: #2a1308; }
.path--reader p:not(.label) { color: #bdbab1; }
.path-go { margin-top: auto; align-self: flex-end; display: grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid currentColor; border-radius: 50%; transition: background-color .25s ease, color .25s ease; }
.path-go::after { content: ""; width: 1.2rem; height: 1.2rem; background: currentColor; -webkit-mask: var(--icon-arrow) center / contain no-repeat; mask: var(--icon-arrow) center / contain no-repeat; transform: rotate(-45deg); transition: transform .35s var(--ease); }
.path:hover .path-go { background: currentColor; }
.path:hover .path-go::after { transform: rotate(0); background: var(--ink); }
.path--author:hover .path-go::after { background: var(--acc); }

/* ---------- Franja de datos ---------- */

.facts { border-block: 1px solid var(--line); background: var(--ink); }
.facts ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts li { padding: 1.4rem 1.2rem 1.4rem 0; }
.facts li + li { padding-left: 1.4rem; border-left: 1px solid var(--line); }
.facts b { display: block; margin-bottom: .2rem; font: 400 clamp(1.5rem, 2.4vw, 2rem)/1.1 var(--font-serif); }
.facts span { color: var(--muted); font: 500 .72rem/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Secciones ---------- */

.section { padding: clamp(4rem, 9vw, 8rem) 0; }
.section--tight { padding-top: clamp(3rem, 6vw, 5rem); }
.section-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 1.4rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.section-head h2 { grid-column: 1 / 9; }
.section-head .lead { grid-column: 1 / 8; }

.ledger { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--fg); }
.model { position: relative; display: flex; flex-direction: column; gap: 1.1rem; padding: 1.8rem 1.6rem 1.6rem 0; }
.model + .model { padding-left: 1.6rem; border-left: 1px solid var(--line); }
.model-num { color: var(--muted); font: 500 .74rem/1 var(--font-mono); letter-spacing: .12em; }
.model h3 { max-width: 14ch; }
.model > p { font-size: .98rem; color: var(--muted); }
.model dl { margin-top: auto; border-top: 1px solid var(--line); }
.model dl div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: .8rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; line-height: 1.4; }
.model dt { color: var(--muted); font: 500 .68rem/1.6 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.model dd { font-weight: 500; }

.model--ours { margin-block: -1px; padding: 2.4rem 1.8rem 1.6rem; background: var(--ink); color: var(--ivory); border-radius: 0 0 6px 6px; border-left: 0; box-shadow: 0 30px 60px -30px rgba(12, 12, 13, .55); --muted: #a8a59c; --line: rgba(244, 241, 234, .2); --accent: var(--acc); }
.model--ours .model-num { color: var(--acc); }
.model-badge { position: absolute; top: 0; left: 1.8rem; transform: translateY(-50%); padding: .35rem .8rem; border-radius: 999px; background: var(--acc); color: var(--ink); font: 600 .68rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }

.flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(3rem, 6vw, 5rem); }
.flow-row { padding: 1.5rem 1.7rem 1.7rem; border: 1px solid var(--line); border-radius: 6px; }
.flow-row--after { background: var(--ink); border-color: var(--ink); color: var(--ivory); --muted: #a8a59c; --accent: var(--acc); }
.flow-label { margin-bottom: 1.1rem; color: var(--muted); font: 500 .72rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.flow-row--after .flow-label { color: var(--acc); }
.flow ol { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .4rem; }
.flow li { display: flex; align-items: center; gap: .4rem; font: 400 clamp(1.4rem, 2.2vw, 1.9rem)/1.1 var(--font-serif); }
.flow-row--before li { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--acc-deep); text-decoration-thickness: 1px; }
.flow li + li::before { content: ""; width: 1.1rem; height: 1.1rem; margin-right: .3rem; background: var(--accent); -webkit-mask: var(--icon-arrow) center / contain no-repeat; mask: var(--icon-arrow) center / contain no-repeat; }
.flow-row--before li + li::before { background: var(--muted); }
.fineprint { max-width: 46rem; margin-top: 2rem; color: var(--muted); font-size: .86rem; }

.stage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 1.6rem; padding-block: clamp(2.4rem, 5vw, 4.2rem); border-top: 1px solid var(--line); }
.stage-intro { grid-column: 1 / 5; align-self: start; }
.stage-body { grid-column: 5 / 13; }
@media (min-width: 62.01rem) { .stage-intro { position: sticky; top: 6.5rem; } }
.stage-num { display: block; font: 400 clamp(5rem, 11vw, 9.5rem)/.82 var(--font-serif); letter-spacing: -.03em; color: transparent; -webkit-text-stroke: 1px var(--acc); }
.stage-eyebrow { margin: 1.2rem 0 .5rem; color: var(--accent); font: 500 .72rem/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.stage-intro h3 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
.stage-statement { max-width: 38rem; font: 400 clamp(1.5rem, 2.6vw, 2.2rem)/1.22 var(--font-serif); text-wrap: pretty; }
.stage-statement strong { font-weight: 400; font-style: italic; color: var(--acc); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.8rem; }
.chip { display: inline-block; padding: .36rem .8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); font: 500 .7rem/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.tile { display: flex; flex-direction: column; gap: .8rem; padding: 1.7rem 1.7rem 1.9rem; background: var(--bg); transition: background-color .3s ease; }
.tile:hover { background: var(--bg-alt); }
.tag-line { color: var(--accent); font: 500 .68rem/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.tile h4 { font: 400 1.7rem/1.08 var(--font-serif); letter-spacing: -.01em; }
.tile p { color: var(--muted); font-size: .96rem; }

.tiles + .cpa { margin-top: 1rem; }
.cpa { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem 3rem; padding: clamp(1.6rem, 3.4vw, 2.8rem); background: var(--ivory); color: #141414; --muted: #55524a; --line: rgba(20,20,20,.2); --accent: var(--acc-deep); }
.cpa h4 { margin: .6rem 0 1rem; font: 400 clamp(1.9rem, 3vw, 2.6rem)/1.04 var(--font-serif); letter-spacing: -.012em; }
.cpa p { color: #3c3a35; font-size: .98rem; }
.cpa p + p { margin-top: .8rem; font-size: .9rem; color: var(--muted); }
.cpa-math { align-self: center; border-block: 1px solid #141414; }
.cpa-line { display: grid; grid-template-columns: 8.4rem minmax(0, 1fr); align-items: baseline; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--line); }
.cpa-line:last-child { border-bottom: 0; }
.cpa-line b { font: 400 clamp(2rem, 3vw, 2.8rem)/1 var(--font-serif); letter-spacing: -.01em; }
.cpa-line span { color: var(--muted); font: 500 .7rem/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.cpa-line--result b { color: var(--acc-deep); }

.closing-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 2.5rem; align-items: end; }
.closing h2 { grid-column: 1 / 8; font-size: clamp(3rem, 7vw, 6.4rem); line-height: .94; }
.closing h2 em { color: var(--acc-deep); }
.closing-side { grid-column: 8 / 13; }
.closing .lead { margin-bottom: 1.5rem; }
.checks { margin-bottom: 2rem; counter-reset: q; border-top: 1px solid var(--line); }
.checks li { display: flex; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-weight: 500; counter-increment: q; }
.checks li::before { content: "0" counter(q); color: var(--accent); font: 500 .76rem/1.9 var(--font-mono); }

/* ---------- Pie ---------- */

.site-footer { padding: clamp(2.5rem, 5vw, 4rem) 0 1.8rem; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1.6rem 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.footer-legal { max-width: 25rem; color: var(--muted); font-size: .94rem; }
.footer-legal a { color: var(--fg); }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.7rem; font-size: .92rem; }
.footer-links a { text-underline-offset: .28em; }
.colophon { margin-top: 1.3rem; color: var(--muted); font: 400 .7rem/1.6 var(--font-mono); letter-spacing: .06em; }

/* ---------- Portadas ---------- */

.cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  width: 100%;
  background: var(--ivory-2);
  border-radius: 2px 5px 5px 2px;
  overflow: hidden;
  box-shadow: 0 1px 1px rgba(0,0,0,.25), 0 14px 28px -10px rgba(0,0,0,.5), 0 40px 70px -28px rgba(0,0,0,.55);
}
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.34) 0, rgba(255,255,255,.14) 1.1%, rgba(0,0,0,.14) 3.4%, rgba(0,0,0,0) 7%), linear-gradient(135deg, rgba(255,255,255,.1), transparent 45%); pointer-events: none; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover--type { display: flex; flex-direction: column; justify-content: space-between; padding: 9% 8% 7% 11%; color: #141414; }
.cover__author { font: 500 clamp(.52rem, 1.1vw, .72rem)/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.cover__title { font: 400 clamp(1.5rem, 3.4vw, 2.5rem)/.98 var(--font-serif); letter-spacing: -.015em; text-wrap: balance; }
.cover__imprint { display: flex; align-items: center; gap: .45rem; font: 500 clamp(.45rem, .9vw, .62rem)/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.cover__imprint .mark { width: 1rem; height: .95rem; }
.cover--v0 { background: var(--ivory); }
.cover--v1 { background: var(--acc); }
.cover--v2 { background: var(--ink); color: var(--ivory); box-shadow: 0 0 0 1px rgba(244,241,234,.22), 0 14px 28px -10px rgba(0,0,0,.6), 0 40px 70px -28px rgba(0,0,0,.6); }
.hero .cover--v0, .hero .cover--v1, .hero .cover--v2 { --focus: var(--acc); }

/* ---------- Catálogo ---------- */

.page-hero { padding: clamp(3.2rem, 7vw, 6rem) 0 clamp(2.4rem, 4vw, 3.5rem); background: radial-gradient(44rem 26rem at 88% 0%, rgba(111, 134, 255, .15), transparent 70%), var(--ink); }
.page-hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 1.6rem; align-items: end; }
.page-hero h1 { grid-column: 1 / 8; font-size: clamp(4rem, 12vw, 10rem); line-height: .86; letter-spacing: -.035em; }
.page-hero .lead { grid-column: 8 / 13; color: #bdbab1; }
.count { display: inline-block; margin-bottom: 1.2rem; padding: .3rem .75rem; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); font: 500 .7rem/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); gap: clamp(2.6rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.6rem); }
.shelf--one { grid-template-columns: minmax(0, 1fr); }

.card { position: relative; display: flex; flex-direction: column; gap: 1.4rem; min-width: 0; }
.card-cover { display: block; padding: 8% 8% 0; text-decoration: none; }
.card-cover .cover { transition: transform .6s var(--ease); transform-origin: 50% 100%; }
.card:hover .card-cover .cover, .card:focus-within .card-cover .cover { transform: perspective(1200px) rotateY(-9deg) translateY(-6px); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; color: var(--muted); font: 500 .7rem/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.status { display: inline-flex; align-items: center; gap: .45rem; }
.status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #2c9a5f; }
.status--agotado::before { background: #9b968a; }
.status--proximamente::before { background: var(--acc); }
.card h2 { font-size: clamp(1.9rem, 2.6vw, 2.35rem); line-height: 1.02; text-wrap: balance; }
.card h2 a { text-decoration: none; }
.card h2 a::after { content: ""; position: absolute; inset: 0; }
.card-author { margin-top: -.6rem; color: var(--muted); font-size: .94rem; }
.card-summary { color: #3c3a35; font-size: .96rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font: 500 .7rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.card-foot .go { margin-left: auto; color: var(--fg); display: inline-flex; align-items: center; gap: .45rem; }

.shelf--one .card { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); column-gap: clamp(2rem, 6vw, 5rem); align-items: center; max-width: 60rem; }
.shelf--one .card-cover { padding-inline: 0; grid-row: 1 / 6; }

.empty { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 3rem; align-items: center; }
.empty-copy { grid-column: 1 / 7; }
.empty-copy h2 { margin-bottom: 1.3rem; }
.empty-copy .lead { margin-bottom: 1.8rem; }
.empty-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.empty-art { grid-column: 7 / 13; }
.ghosts { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: clamp(.6rem, 1.6vw, 1.1rem); height: clamp(15rem, 28vw, 24rem); padding-bottom: 1rem; }
.ghosts::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--fg); }
.ghost { position: relative; flex: 1 1 0; max-width: 8.5rem; border: 1px dashed var(--line); border-radius: 2px 5px 5px 2px; background: repeating-linear-gradient(0deg, transparent 0 .9rem, var(--line) .9rem calc(.9rem + 1px)); }
.ghost:nth-child(1) { height: 70%; } .ghost:nth-child(2) { height: 92%; } .ghost:nth-child(3) { height: 80%; }
.ghost:nth-child(4) { height: 100%; border-color: var(--accent); border-style: solid; }
.ghost:nth-child(4)::after { content: ""; position: absolute; right: .8rem; bottom: .8rem; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--acc); }

.catalog-cta { margin-top: clamp(4rem, 8vw, 7rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.6rem 3rem; padding: clamp(1.6rem, 3vw, 2.6rem); background: var(--ink); color: var(--ivory); border-radius: 6px; --muted: #a8a59c; --accent: var(--acc); --focus: var(--acc); --fg: var(--ivory); --bg: var(--ink); }
.catalog-cta h2 { font-size: clamp(2rem, 3.6vw, 3rem); max-width: 20ch; }
.catalog-cta p { margin-top: .6rem; color: var(--muted); max-width: 32rem; }

/* ---------- Ficha de libro ---------- */

.crumbs { margin-bottom: 2.4rem; color: var(--muted); font: 500 .72rem/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem .7rem; }
.crumbs li + li::before { content: "/"; margin-right: .7rem; opacity: .55; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--fg); text-decoration: underline; }

.book-hero { padding: clamp(2.4rem, 5vw, 4.5rem) 0 clamp(3.5rem, 7vw, 6rem); background: radial-gradient(48rem 32rem at 78% 20%, rgba(111, 134, 255, .16), transparent 70%), var(--ink); }
.book-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 3rem; align-items: center; }
.book-art { grid-column: 1 / 6; perspective: 1600px; }
.book-art .cover { transform: rotateY(14deg) rotateX(2deg); transition: transform .8s var(--ease); max-width: 26rem; margin-inline: auto; }
.book-art:hover .cover { transform: rotateY(0) rotateX(0); }
.book-info { grid-column: 7 / 13; }
.book-info .card-meta { margin-bottom: 1.4rem; }
.book-info h1 { font-size: clamp(3rem, 6.4vw, 5.8rem); line-height: .94; letter-spacing: -.025em; text-wrap: balance; }
.book-subtitle { margin-top: 1rem; font: italic 400 clamp(1.4rem, 2.4vw, 2rem)/1.2 var(--font-serif); color: #cfccc3; }
.book-author { margin-top: 1.6rem; color: var(--muted); font: 500 .76rem/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.book-author b { color: var(--fg); font-weight: 500; }
.book-summary { margin-top: 1.6rem; max-width: 36rem; color: #bdbab1; font-size: 1.12rem; line-height: 1.6; }

.buy { margin-top: 2.2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.buy-label { margin-bottom: .9rem; color: var(--muted); font: 500 .7rem/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.buy-list { display: flex; flex-wrap: wrap; gap: .7rem; }
.buy-note { margin-top: 1rem; color: var(--muted); font-size: .84rem; max-width: 32rem; }
.book-links { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; }

.book-body { padding: clamp(3.5rem, 8vw, 7rem) 0; }
.book-body-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 3rem; }
.prose { grid-column: 1 / 8; max-width: 40rem; }
.prose p { margin-bottom: 1.35rem; font-size: 1.14rem; line-height: 1.7; color: #26241f; text-wrap: pretty; }
.prose p:first-child::first-letter { float: left; padding: .06em .1em 0 0; font: 400 4.6em/.78 var(--font-serif); color: var(--acc-deep); }
.specs { grid-column: 9 / 13; align-self: start; position: sticky; top: 6rem; }
.specs h2 { margin-bottom: 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--fg); font: 500 .74rem/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.specs dl div { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); gap: .8rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.specs dt { color: var(--muted); font: 500 .68rem/1.7 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.specs dd { font-weight: 500; overflow-wrap: anywhere; }

.related { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.related h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 2.4rem; }

.notfound { padding: clamp(5rem, 12vw, 10rem) 0; }
.notfound h1 { font-size: clamp(3.2rem, 8vw, 6.5rem); line-height: .94; margin-bottom: 1.4rem; }
.notfound .lead { margin-bottom: 2rem; }

/* ---------- Contacto ---------- */

.contact-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 3rem; align-items: start; }
.contact-aside { grid-column: 1 / 6; }
.contact-form-wrap, .contact-done { grid-column: 6 / -1; }
.contact-done { grid-column: 1 / 9; }
.contact-aside h2 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.02; margin-bottom: 2rem; text-wrap: balance; }
.contact-steps { border-top: 1px solid var(--fg); }
.contact-steps li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: .8rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contact-steps span { color: var(--accent); font: 500 .74rem/1.9 var(--font-mono); letter-spacing: .1em; }
.contact-note { margin-top: 1.6rem; max-width: 30rem; color: var(--muted); font-size: .96rem; }
.contact-done h2 { font-size: clamp(2.5rem, 5vw, 4.4rem); line-height: 1; margin-bottom: 1.4rem; }
.contact-done .lead { margin-bottom: 2rem; }

.contact-form { display: grid; gap: 1.6rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; }
.form-field { display: grid; gap: .5rem; align-content: start; }
.form-field label, .topics legend { font: 500 .78rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg); }
.req { margin-left: .2em; color: var(--accent); }
.opt { text-transform: none; letter-spacing: 0; color: var(--muted); font-family: var(--font-sans); font-weight: 400; font-size: .85rem; }
.form-field input:not([type="checkbox"]), .form-field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid rgba(20, 20, 20, .45);
  border-radius: 4px;
  background: #fbf9f4;
  color: #141414;
  font: 400 1rem/1.5 var(--font-sans);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.form-field textarea { resize: vertical; min-height: 9rem; }
.form-field input:not([type="checkbox"]):focus-visible, .form-field textarea:focus-visible { outline: 0; border-color: #141414; box-shadow: 0 0 0 3px var(--ivory), 0 0 0 5px var(--acc-deep); }
.form-field [aria-invalid="true"] { border-color: #b3261e; }
.field-error { color: #b3261e; font-size: .9rem; font-weight: 500; }

.topics { margin: 0; padding: 0; border: 0; display: grid; gap: .6rem; min-width: 0; }
.topics legend { padding: 0; margin-bottom: .9rem; float: left; width: 100%; }
.topics > :not(legend) { clear: both; }
.topic { position: relative; display: block; cursor: pointer; }
.topic input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.topic span { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.1rem; border: 1px solid rgba(20, 20, 20, .3); border-radius: 4px; font-weight: 500; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.topic span::before { content: ""; flex: none; width: .95rem; height: .95rem; border: 1px solid currentColor; border-radius: 50%; transition: box-shadow .2s var(--ease), background-color .2s var(--ease); }
.topic:hover span { border-color: #141414; }
.topic input:checked + span { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.topic input:checked + span::before { background: var(--acc); border-color: var(--acc); box-shadow: inset 0 0 0 2px var(--ink); }
.topic input:focus-visible + span { outline: 2px solid var(--acc-deep); outline-offset: 3px; }

.form-check label { display: flex; align-items: flex-start; gap: .75rem; font: 400 .95rem/1.5 var(--font-sans); letter-spacing: 0; text-transform: none; cursor: pointer; }
.form-check input { flex: none; width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; accent-color: var(--ink); }
.form-notice { color: var(--muted); font-size: .85rem; line-height: 1.55; }
.form-notice a { color: var(--fg); }
.contact-form .btn { justify-self: start; }
.contact-form .btn:disabled { opacity: .5; cursor: not-allowed; }
.form-alert { margin-bottom: 1.6rem; padding: 1rem 1.2rem; border: 1px solid #b3261e; border-left-width: 4px; border-radius: 4px; background: #fbeceb; color: #5f1410; font-size: .96rem; }
.form-alert a { color: inherit; font-weight: 500; }
.form-alert ul { margin-top: .4rem; list-style: disc; padding-left: 1.2rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Revelado suave (mejora progresiva) ---------- */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise both linear; animation-timeline: view(); animation-range: entry 0% entry 38%; }
    @keyframes rise { from { opacity: 0; transform: translateY(1.6rem); } to { opacity: 1; transform: none; } }
  }
}

/* ---------- Adaptación ---------- */

@media (max-width: 62rem) {
  .hero-copy, .hero-art { grid-column: 1 / -1; }
  .stage3d { max-width: 24rem; }
  .facts ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .section-head h2, .section-head .lead { grid-column: 1 / -1; }
  .ledger { grid-template-columns: 1fr; border-top: 0; max-width: 40rem; }
  .model, .model + .model { padding: 1.8rem 0; border-left: 0; border-top: 1px solid var(--line); }
  .model:first-child { border-top: 1px solid var(--fg); }
  .model--ours, .model--ours + .model { border-left: 0; }
  .model--ours { margin: 1.4rem 0; padding: 2.4rem 1.5rem 1.6rem; border-radius: 6px; border-top: 0; }
  .stage-intro, .stage-body { grid-column: 1 / -1; }
  .stage-intro { display: grid; grid-template-columns: auto 1fr; column-gap: 1.4rem; align-items: center; }
  .stage-num { grid-row: 1 / 3; }
  .stage-eyebrow { margin: 0; }
  .cpa { grid-template-columns: 1fr; }
  .closing h2, .closing-side { grid-column: 1 / -1; }
  .page-hero h1, .page-hero .lead { grid-column: 1 / -1; }
  .empty-copy, .empty-art { grid-column: 1 / -1; }
  .book-art, .book-info { grid-column: 1 / -1; }
  .book-art .cover { max-width: 17rem; }
  .prose, .specs { grid-column: 1 / -1; }
  .contact-aside, .contact-form-wrap, .contact-done { grid-column: 1 / -1; }
  .specs { position: static; }
  .shelf--one .card { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); }
}

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .header-inner { padding-block: .65rem; }
  .site-nav { width: 100%; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
  .site-nav ul { flex-wrap: nowrap; gap: .9rem; width: max-content; padding-right: 0; }
  .site-nav a { white-space: nowrap; font-size: .86rem; }
  .paths, .flow, .tiles { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form .btn { justify-self: stretch; justify-content: space-between; }
  .path { min-height: 12rem; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 3.8rem); }
  .hero-cta .btn, .empty-actions .btn { width: 100%; justify-content: space-between; }
  .model dl div { grid-template-columns: 6rem minmax(0, 1fr); }
  .cpa-line { grid-template-columns: 6.6rem minmax(0, 1fr); }
  .shelf--one .card { grid-template-columns: 1fr; }
  .shelf--one .card-cover { max-width: 16rem; grid-row: auto; }
  .buy-list .btn { flex: 1 1 100%; justify-content: space-between; }
  .catalog-cta .btn { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
