/*
 * Ronard Ortiz · Inédito — Sitio oficial
 * Build: 2026.06 — Lady Web (ladyweb.com.pa)
 *
 * Notas para quien venga después:
 * - Variables CSS en :root abajo. Cambiar paleta ahí.
 * - El rail lateral (coordenadas Panamá) se oculta < 860px.
 * - Books rotan en scroll via JS — ver script.js (RAF loop).
 * - Cuidado: book--02 tiene paleta invertida (gallery chapter).
 */

/* ── Tokens / design vars ─────────────── */
/* TODO: extraer tokens a una hoja aparte si crece */
:root {
  /* palette */
  --tinta:    #0A0908;
  --brea:    #14110F;
  --carbón:  #1C1815;
  --cuero:   #3D2817;
  --laton:   #C9985A;
  --laton-2: #B8854A;
  --sangre:  #E63946;
  --hueso:   #F5F1EA;
  --hueso-d: #C7C2B8;
  --linea:   rgba(245, 241, 234, 0.08);
  --linea-2: rgba(245, 241, 234, 0.18);

  /* type */
  --ff-display: "Fraunces", "Times New Roman", serif;
  --ff-vert:    "Big Shoulders Display", "Impact", sans-serif;
  --ff-body:    "Inter Tight", system-ui, sans-serif;
  --ff-mono:    "JetBrains Mono", "Courier New", monospace;

  /* layout */
  --pad-page: clamp(1.25rem, 4vw, 3rem);
  --rail-w:   72px;

  /* motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in:  cubic-bezier(.6, 0, .8, .25);
}

@media (max-width: 860px) {
  :root { --rail-w: 0px; }
}

/* reset — no usar normalize.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff-body);
  background: var(--tinta);
  color: var(--hueso);
  font-size: 17px;
  line-height: 1.5;
  font-feature-settings: "ss01", "kern"; /* ss01 = Fraunces alternates */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--laton); color: var(--tinta); }

/* grain — SVG noise inline (ahorra request HTTP) */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ── Loader ────────────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--tinta);
  display: grid;
  place-items: center;
  transition: opacity .9s var(--ease-out), visibility 0s linear .9s;
}
.loader.is-done {
  opacity: 0;
  visibility: hidden;
}
.loader__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.loader__mark {
  font-family: var(--ff-vert);
  font-weight: 900;
  font-size: clamp(3rem, 12vw, 8rem);
  letter-spacing: 0.02em;
  color: var(--hueso);
  line-height: 1;
  animation: loadIn 1.2s var(--ease-out) both;
}
.loader__line {
  display: block;
  width: 0;
  height: 3px;
  background: var(--laton);
  animation: loadLine 1.4s var(--ease-out) .3s forwards;
}
.loader__meta {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--hueso-d);
  opacity: 0;
  animation: loadIn 1s var(--ease-out) .9s forwards;
}
@keyframes loadIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes loadLine {
  to { width: 180px; }
}

/* ── Coordinate Rail (left side) ──────────────────────── */
.rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0;
  border-right: 2px solid var(--linea);
  background: rgba(10, 9, 8, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  color: var(--hueso-d);
}
.rail__top, .rail__bot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.rail__tick { color: var(--laton); font-weight: 500; }
.rail__coord {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.rail__line {
  flex: 1;
  width: 3px;
  background: var(--linea-2);
  margin: 1.5rem 0;
}
.rail__mid {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--laton);
  letter-spacing: 0.35em;
}
@media (max-width: 860px) { .rail { display: none; } }

/* ── Nav ───────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem var(--pad-page);
  background: linear-gradient(to bottom, rgba(10,9,8,0.85), rgba(10,9,8,0));
  transition: background .3s var(--ease-out), border-color .3s var(--ease-out);
  border-bottom: 2px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10,9,8,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--linea);
}
.nav__brand {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.nav__brand-mono {
  font-family: var(--ff-vert);
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--hueso);
}
.nav__brand-sub {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--hueso-d);
}
.nav__menu {
  display: flex;
  gap: 2.5rem;
}
.nav__menu a {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hueso-d);
  position: relative;
  transition: color .2s var(--ease-out);
  padding: 0.5rem 0;
}
.nav__menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--laton);
  transition: width .35s var(--ease-out);
}
.nav__menu a:hover { color: var(--hueso); }
.nav__menu a:hover::after { width: 100%; }
.nav__toggle {
  display: none;
  background: none;
  border: 2px solid var(--linea-2);
  width: 44px;
  height: 44px;
  padding: 0;
  position: relative;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--hueso);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: transform .3s var(--ease-out);
}
.nav__toggle span:first-child { top: 16px; }
.nav__toggle span:last-child  { bottom: 16px; }
.nav.is-open .nav__toggle span:first-child { transform: translateX(-50%) translateY(5px) rotate(45deg); }
.nav.is-open .nav__toggle span:last-child  { transform: translateX(-50%) translateY(-5px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav__menu {
    position: fixed;
    inset: 78px 0 0 0;
    background: var(--tinta);
    flex-direction: column;
    gap: 0;
    padding: 2rem var(--pad-page);
    transform: translateY(-100%);
    transition: transform .5s var(--ease-out);
    visibility: hidden;
  }
  .nav.is-open .nav__menu {
    transform: translateY(0);
    visibility: visible;
  }
  .nav__menu a {
    font-family: var(--ff-display);
    font-size: 2rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--hueso);
    padding: 1rem 0;
    border-bottom: 2px solid var(--linea);
  }
  .nav__toggle { display: block; }
}

/* ═══ HERO ═══ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 8rem var(--pad-page) 4rem calc(var(--rail-w) + var(--pad-page));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__portrait {
  position: absolute;
  right: -5%;
  top: 0;
  width: 70%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: grayscale(0.7) contrast(1.15) brightness(0.55) sepia(0.2);
  mix-blend-mode: luminosity;
  transition: transform 1.5s var(--ease-out);
  will-change: transform;
}
.hero:hover .hero__portrait { transform: scale(1.04); }

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(10,9,8,0.85) 0%, rgba(10,9,8,0.5) 40%, transparent 70%),
    linear-gradient(to right, var(--tinta) 0%, rgba(10,9,8,0.4) 50%, rgba(10,9,8,0.85) 100%),
    linear-gradient(to bottom, transparent 60%, var(--tinta) 100%);
}

.hero__eyebrow {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--laton);
  margin-top: 2rem;
}
.hero__eyebrow .dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--sangre);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero__title {
  position: relative;
  z-index: 2;
  font-family: var(--ff-display);
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.04em;
  margin: clamp(2rem, 6vw, 4rem) 0;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  /* Variable font Fraunces SOFT axis */
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.hero__row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: clamp(3.5rem, 13vw, 11rem);
}
.hero__row[data-row="2"] {
  font-size: clamp(2rem, 6vw, 5rem);
  font-style: italic;
  font-weight: 600;
  font-variation-settings: "SOFT" 50, "opsz" 144;
  color: var(--laton);
  gap: 0.4em;
  padding-left: 0.4em;
  letter-spacing: -0.02em;
}
.hero__amp {
  font-weight: 400;
  font-style: italic;
  color: var(--hueso-d);
}
.hero__italic { font-style: italic; }

.word {
  display: inline-block;
  transition: transform .9s var(--ease-out), color .3s var(--ease-out);
  will-change: transform;
}
.hero__title:hover .word {
  animation: jitter 0.4s steps(2) infinite;
}
@keyframes jitter {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-1px, 1px); }
  75% { transform: translate(1px, -1px); }
}

.hero__meta {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 640px;
}
.hero__lede {
  font-family: var(--ff-body);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.55;
  color: var(--hueso-d);
}
.hero__lede em {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 600;
  color: var(--hueso);
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.6rem;
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 2px solid var(--linea-2);
  background: transparent;
  color: var(--hueso);
  position: relative;
  overflow: hidden;
  transition: color .35s var(--ease-out), border-color .35s var(--ease-out);
  white-space: nowrap;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--laton);
  transform: translateY(101%);
  transition: transform .45s var(--ease-out);
  z-index: -1;
}
.cta:hover::before { transform: translateY(0); }
.cta:hover { color: var(--tinta); border-color: var(--laton); }
.cta:hover svg { transform: translateX(4px); }
.cta svg { transition: transform .3s var(--ease-out); }

.cta--primary {
  background: var(--laton);
  color: var(--tinta);
  border-color: var(--laton);
}
.cta--primary::before { background: var(--hueso); }
.cta--primary:hover { color: var(--tinta); border-color: var(--hueso); }

.hero__scroll {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hueso-d);
  margin-top: 3rem;
}
.hero__scroll-line {
  display: block;
  flex: 1;
  max-width: 200px;
  height: 3px;
  background: linear-gradient(to right, var(--laton), transparent);
  position: relative;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 5px;
  background: var(--laton);
  animation: scrollLine 2.5s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: translateX(0); opacity: 1; }
  50%  { transform: translateX(140px); opacity: 0.3; }
  100% { transform: translateX(0); opacity: 1; }
}

/* manifesto / pull quote */
.manifesto {
  position: relative;
  padding: clamp(6rem, 14vw, 12rem) var(--pad-page) clamp(6rem, 14vw, 12rem) calc(var(--rail-w) + var(--pad-page));
  background: var(--tinta);
  border-top: 2px solid var(--linea);
  border-bottom: 2px solid var(--linea);
}
.manifesto__label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--laton);
  margin-bottom: 3rem;
}
.manifesto__label .num {
  font-family: var(--ff-vert);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0;
}
.manifesto__quote {
  max-width: 1100px;
}
.manifesto__quote p {
  font-family: var(--ff-display);
  font-weight: 600;
  font-style: normal;
  font-size: clamp(2rem, 5.5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--hueso);
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.manifesto__quote em {
  color: var(--laton);
  font-style: italic;
  font-variation-settings: "SOFT" 50, "opsz" 144;
}
.quote-mark {
  font-family: var(--ff-display);
  color: var(--laton);
  opacity: 0.6;
}
.manifesto__quote footer {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--hueso-d);
  margin-top: 2.5rem;
}

/* obras — book chapters con sticky scroll */
.trilogy {
  position: relative;
  padding: clamp(5rem, 10vw, 9rem) 0 0 var(--rail-w);
  background: var(--brea);
}
.trilogy__intro {
  padding: 0 var(--pad-page);
  max-width: 1100px;
  margin-bottom: clamp(4rem, 8vw, 7rem);
}
.trilogy__eyebrow {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--laton);
  margin-bottom: 1.5rem;
}
.trilogy__title {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--hueso);
  margin-bottom: 1.5rem;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.trilogy__title em {
  font-style: italic;
  color: var(--laton);
  font-weight: 600;
}
.trilogy__sub {
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--hueso-d);
  max-width: 640px;
}

/* ── Individual Book Chapter (sticky scroll) ─────────── */
.book {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  border-top: 2px solid var(--linea);
  padding: 0 var(--pad-page);
  gap: 0;
}
.book--01 { background: var(--brea); }
.book--02 {
  background: linear-gradient(180deg, #E8DFC9 0%, #DCD0B3 100%);
  color: #1a1410;
}
.book--03 { background: #1a1109; }

/* Book II: invert palette for light gallery chapter */
.book--02 .book__tag { color: #6B4823; border-bottom-color: rgba(26,20,16,0.2); }
.book--02 .book__title { color: #1a1410; }
.book--02 .book__title .serif { color: #B45A1D; }
.book--02 .book__sub { color: #5a4630; }
.book--02 .book__hook { color: #1a1410; border-left-color: #B45A1D; }
.book--02 .book__body p { color: #2d251c; }
.book--02 .book__body strong { color: #1a1410; }
.book--02 .book__chips li {
  border-color: rgba(26,20,16,0.25);
  color: #3d3225;
}
.book--02 .book__cta {
  color: #1a1410;
  border-color: #1a1410;
}
.book--02 .book__cta::before { background: #1a1410; }
.book--02 .book__cta:hover { color: #E8DFC9; }
.book--02 .book__numeral {
  -webkit-text-stroke-color: #1a1410;
  opacity: 0.12;
}
/* Book II cover - no shadow drama since it's on light bg */
.book--02 .book__cover {
  box-shadow:
    0 25px 50px -15px rgba(26,20,16,0.35),
    0 12px 24px -12px rgba(26,20,16,0.25);
}
.book--02 .book__shadow {
  background: radial-gradient(ellipse at center, rgba(26,20,16,0.35) 0%, transparent 70%);
}

.book__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}
.book__cover-wrap {
  position: relative;
  width: clamp(220px, 30vw, 380px);
  aspect-ratio: 0.66 / 1;
  transition: transform .8s var(--ease-out);
  will-change: transform;
  --rot: 0deg;
  --float: 0px;
  transform: perspective(1400px) rotateY(calc(var(--rot) * -1)) rotateX(calc(var(--rot) * 0.15)) translateY(var(--float));
}
.book__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.7),
    0 18px 36px -18px rgba(0,0,0,0.5),
    inset 1px 0 0 rgba(255,255,255,0.05);
  transition: filter .5s var(--ease-out);
}
.book__cover-wrap:hover .book__cover {
  filter: brightness(1.08) contrast(1.05);
}
.book__shadow {
  position: absolute;
  inset: 90% -5% -30% -5%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, transparent 70%);
  filter: blur(20px);
  z-index: -1;
}

.book__numeral {
  position: absolute;
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(8rem, 22vw, 18rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--laton);
  opacity: 0.18;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  pointer-events: none;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  z-index: 0;
}

.book__content {
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(4rem, 10vw, 8rem) clamp(1rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.8rem;
  max-width: 560px;
}
.book__tag {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--laton);
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--linea-2);
  margin-bottom: 1.5rem;
}
.book__title {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(2.2rem, 5.5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--hueso);
  display: flex;
  flex-direction: column;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.book__title .lead {
  display: block;
}
.book__title .serif {
  font-style: italic;
  font-weight: 600;
  color: var(--laton);
  font-variation-settings: "SOFT" 50, "opsz" 144;
}
.book__sub {
  font-family: var(--ff-vert);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hueso-d);
}
.book__hook {
  font-family: var(--ff-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.4;
  color: var(--hueso);
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-left: 3px solid var(--laton);
}
.book__body p {
  color: var(--hueso-d);
  line-height: 1.65;
  margin-bottom: 1rem;
}
.book__body strong {
  color: var(--hueso);
  font-weight: 500;
}
.book__series-note {
  display: flex !important;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.4rem !important;
  margin-bottom: 0.5rem !important;
  padding: 0.65rem 0.9rem;
  border-left: 3px solid var(--laton);
  background: rgba(201, 152, 90, 0.05);
  font-family: var(--ff-mono);
  font-size: 0.72rem !important;
  letter-spacing: 0.08em;
  line-height: 1.4 !important;
  color: var(--hueso) !important;
}
.book__series-note em {
  font-family: var(--ff-display);
  font-style: italic;
  font-weight: 600;
  color: var(--laton);
  letter-spacing: 0;
}
.book__series-note .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--laton);
  border-radius: 50%;
  flex-shrink: 0;
}
.book--02 .book__series-note {
  border-left-color: #1a1410;
  background: rgba(26, 20, 16, 0.05);
  color: #1a1410 !important;
}
.book--02 .book__series-note em { color: #B45A1D; }
.book--02 .book__series-note .dot { background: #1a1410; }
.book__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}
.book__chips li {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.5rem 0.85rem;
  border: 2px solid var(--linea-2);
  color: var(--hueso-d);
  border-radius: 1px;
}
.book__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.4rem;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hueso);
  border: 2px solid var(--laton);
  align-self: flex-start;
  position: relative;
  overflow: hidden;
  transition: color .35s var(--ease-out);
}
.book__cta::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--laton);
  transform: translateX(-101%);
  transition: transform .45s var(--ease-out);
  z-index: -1;
}
.book__cta:hover { color: var(--tinta); }
.book__cta:hover::before { transform: translateX(0); }
.book__cta:hover svg { transform: translateX(4px); }
.book__cta svg { transition: transform .3s var(--ease-out); }

/* book-specific accent tweaks */
.book--01 .book__title .serif { color: #C9985A; }
.book--03 .book__title .serif { color: #C9985A; }
.book--04 { background: #12100E; }
.book--04 .book__title .serif { color: #C9985A; }

@media (max-width: 880px) {
  .book {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .book__sticky {
    position: relative;
    height: auto;
    padding: 4rem 0 2rem;
  }
  .book__content {
    padding: 0 0 5rem 0;
  }
  .book__cover-wrap {
    width: min(60vw, 280px);
  }
  .book__numeral {
    font-size: clamp(6rem, 25vw, 12rem);
  }
}

/* marquesina dorada con frases del autor */
.marquee {
  background: var(--laton);
  color: var(--tinta);
  padding: 1.4rem 0;
  overflow: hidden;
  border-top: 2px solid var(--tinta);
  border-bottom: 2px solid var(--tinta);
  margin-left: var(--rail-w);
}
.marquee__track {
  display: flex;
  gap: 2.5rem;
  white-space: nowrap;
  font-family: var(--ff-vert);
  font-weight: 700;
  font-size: clamp(1rem, 1.4vw, 1.3rem);
  letter-spacing: 0.15em;
  animation: marqueeMove 38s linear infinite;
  width: max-content;
}
.marquee__track .dot-sep { font-size: 1.3em; opacity: 0.5; }
@keyframes marqueeMove {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* AUTOR */
.author {
  position: relative;
  padding: clamp(6rem, 12vw, 11rem) var(--pad-page) clamp(6rem, 12vw, 11rem) calc(var(--rail-w) + var(--pad-page));
  background: var(--tinta);
}
.author__rail {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--laton);
  margin-bottom: 4rem;
}
.author__rail .num {
  font-family: var(--ff-vert);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0;
}
.author__grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1.4fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.author__portrait {
  position: sticky;
  top: 100px;
}
.author__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 2px solid var(--linea-2);
}
.author__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 60%, rgba(201,152,90,0.15) 100%);
  z-index: 2;
  pointer-events: none;
}
.author__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  filter: contrast(1.05) saturate(1.02);
  transition: filter .5s var(--ease-out), transform 1s var(--ease-out);
}
.author__frame:hover img {
  filter: contrast(1.08) saturate(1.08);
  transform: scale(1.03);
}
.author__caption {
  display: flex;
  justify-content: space-between;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  color: var(--hueso-d);
  margin-top: 1rem;
  text-transform: uppercase;
}
.author__caption span:first-child { color: var(--laton); }

.author__title {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--hueso);
  margin-bottom: 2rem;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.author__title em {
  font-style: italic;
  color: var(--laton);
  font-weight: 600;
}
.author__copy p {
  color: var(--hueso-d);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  font-size: 1.02rem;
}
.author__copy p strong {
  color: var(--hueso);
  font-weight: 500;
}
.author__lead {
  font-size: 1.15rem !important;
  color: var(--hueso) !important;
}

.author__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 3.5rem;
  border-top: 2px solid var(--linea-2);
}
.author__stats > div {
  padding: 1.5rem 1rem 1.5rem 0;
  border-bottom: 2px solid var(--linea);
}
.author__stats > div:nth-child(odd) {
  border-right: 2px solid var(--linea);
  padding-right: 1.5rem;
}
.author__stats > div:nth-child(even) {
  padding-left: 1.5rem;
}
.author__stats dt {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hueso-d);
  margin-bottom: 0.5rem;
}
.author__stats dd {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--hueso);
  line-height: 1.1;
}
.author__stats .flag { color: var(--laton); }

@media (max-width: 880px) {
  .author__grid { grid-template-columns: 1fr; }
  .author__portrait { position: relative; top: 0; max-width: 380px; }
}

/* compra · cards con toggle blanda/dura */
.purchase {
  padding: clamp(6rem, 12vw, 11rem) var(--pad-page) clamp(6rem, 12vw, 11rem) calc(var(--rail-w) + var(--pad-page));
  background: var(--brea);
  border-top: 2px solid var(--linea);
}
.purchase__head {
  max-width: 880px;
  margin-bottom: clamp(3rem, 7vw, 6rem);
}
.purchase__eyebrow {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--laton);
  margin-bottom: 1.5rem;
}
.purchase__title {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--hueso);
  margin-bottom: 1.5rem;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.purchase__title em {
  font-style: italic;
  color: var(--laton);
  font-weight: 600;
}
.purchase__sub {
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--hueso-d);
  max-width: 600px;
}
.purchase__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
@media (max-width: 1280px) { .purchase__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .purchase__grid { grid-template-columns: 1fr; } }

.card {
  position: relative;
  padding: 2rem 1.75rem 2.25rem;
  background: var(--carbón);
  border: 2px solid var(--linea-2);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  transition: transform .4s var(--ease-out), border-color .4s var(--ease-out), background .4s var(--ease-out);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--laton);
}

.card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--linea);
}
.card__num {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: 2.4rem;
  color: var(--laton);
  line-height: 1;
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.card__tag {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--hueso-d);
}
.card__title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.1;
  color: var(--hueso);
  font-variation-settings: "SOFT" 50, "opsz" 144;
}
.card__cardline {
  font-family: var(--ff-body);
  font-size: 0.85rem;
  color: var(--hueso-d);
  line-height: 1.4;
  font-style: italic;
  margin-top: -0.4rem;
}

/* ── Format toggle (tapa blanda / tapa dura) ────── */
.card__format {
  display: flex;
  border: 2px solid var(--linea-2);
  margin: 0.4rem 0 0.2rem;
}
.format-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 0.7rem 0.4rem;
  color: var(--hueso-d);
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s var(--ease-out), color .25s var(--ease-out);
  position: relative;
}
.format-btn + .format-btn { border-left: 2px solid var(--linea-2); }
.format-btn:hover { color: var(--hueso); }
.format-btn.is-active {
  background: var(--laton);
  color: var(--tinta);
}

.card__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--ff-display);
  color: var(--hueso);
  font-variation-settings: "SOFT" 100, "opsz" 144;
}
.currency {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--hueso-d);
}
.amount {
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 1;
  transition: opacity .25s var(--ease-out);
}
.card__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--hueso-d);
  font-size: 0.9rem;
  flex: 1;
}
.card__list li {
  position: relative;
  padding-left: 1.25rem;
  transition: opacity .3s var(--ease-out), max-height .3s var(--ease-out);
}
.card__list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--laton);
}
.card__list li.only-dura {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin-top: -0.5rem;
}
.card__list li.only-dura.is-shown {
  opacity: 1;
  max-height: 3em;
  margin-top: 0;
}

.card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.4rem;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tinta);
  background: var(--laton);
  border: 2px solid var(--laton);
  position: relative;
  overflow: hidden;
  transition: color .35s var(--ease-out), border-color .35s var(--ease-out);
}
.card__cta::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--hueso);
  transform: translateY(101%);
  transition: transform .45s var(--ease-out);
  z-index: -1;
}
.card__cta:hover::before { transform: translateY(0); }
.card__cta:hover { color: var(--tinta); border-color: var(--hueso); }
.card__cta:hover svg { transform: translateX(4px); }
.card__cta svg { transition: transform .3s var(--ease-out); }

/* ── Actions wrapper + Amazon ghost button ───────── */
.card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.2rem;
}
.card__amazon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  color: var(--hueso-d);
  background: transparent;
  border: 2px solid var(--linea-2);
  position: relative;
  overflow: hidden;
  transition: color .3s var(--ease-out),
              border-color .3s var(--ease-out),
              background .3s var(--ease-out);
}
.card__amazon svg {
  width: 70px;
  height: auto;
  display: block;
  transition: transform .3s var(--ease-out);
}
.card__amazon-label {
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-left: 0.65rem;
  border-left: 2px solid var(--linea-2);
  transition: border-color .3s var(--ease-out);
}
.card__amazon:hover {
  color: var(--hueso);
  border-color: var(--laton);
  background: rgba(201, 152, 90, 0.08);
}
.card__amazon:hover .card__amazon-label {
  border-left-color: var(--laton);
}

.purchase__note {
  margin-top: 3rem;
  padding: 1.25rem 1.5rem;
  border: 2px dashed var(--linea-2);
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  color: var(--hueso-d);
  line-height: 1.6;
}
.purchase__note em { color: var(--laton); font-style: normal; font-weight: 500; }
.purchase__note code {
  background: var(--tinta);
  padding: 0.15rem 0.45rem;
  font-size: 0.85em;
  color: var(--laton);
}

/* footer */
.footer {
  padding: clamp(4rem, 8vw, 6rem) var(--pad-page) 2rem calc(var(--rail-w) + var(--pad-page));
  background: var(--tinta);
  border-top: 2px solid var(--linea);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 2px solid var(--linea);
}
.footer__col { display: flex; flex-direction: column; gap: 0.75rem; }
.footer__mark {
  font-family: var(--ff-vert);
  font-weight: 900;
  font-size: 3.2rem;
  letter-spacing: 0.02em;
  color: var(--hueso);
  line-height: 1;
}
.footer__tag {
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--hueso-d);
  max-width: 280px;
  line-height: 1.7;
}
.footer__label {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--laton);
  margin-bottom: 0.5rem;
}
.footer__mail {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--hueso);
  transition: color .3s var(--ease-out);
  font-variation-settings: "SOFT" 100, "opsz" 144;
  word-break: break-word;
}
.footer__mail:hover { color: var(--laton); }
.footer__phone {
  font-family: var(--ff-mono);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--hueso-d);
  transition: color .3s var(--ease-out);
  margin-top: 0.2rem;
}
.footer__phone:hover { color: var(--laton); }
.footer__small {
  font-size: 0.85rem;
  color: var(--hueso-d);
  line-height: 1.7;
}
.footer__col--social a {
  font-family: var(--ff-mono);
  font-size: 0.85rem;
  color: var(--hueso-d);
  transition: color .25s var(--ease-out);
}
.footer__col--social a:hover { color: var(--laton); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer__copy {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--hueso-d);
}
.footer__dev {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border: 2px solid var(--linea);
  transition: border-color .3s var(--ease-out), transform .3s var(--ease-out);
}
.footer__dev:hover {
  border-color: var(--laton);
  transform: translateY(-1px);
}
.footer__dev span {
  font-family: var(--ff-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--hueso-d);
}
.footer__dev img {
  height: 22px;
  width: auto;
  filter: brightness(1.05);
  transition: filter .3s var(--ease-out);
}
.footer__dev:hover img {
  filter: brightness(1.15);
}

@media (max-width: 880px) {
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 540px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ── Reveal animations (intersection observer) ────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px) rotateX(-30deg);
  transform-origin: 50% 100%;
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.reveal-word.is-visible {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

/* ── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero__portrait, .book__cover-wrap { transform: none !important; }
}

/* ── Focus visible ───────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--laton);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════
   AJUSTES DE LEGIBILIDAD · DESKTOP (>=880px)
   Solicitados por el cliente: mobile queda intacto.
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 880px) {

  /* 9 · menú principal — un pelín más presente */
  .nav__menu a {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
  }

  /* 5 · etiquetas superiores del libro
     ("Suspenso psicológico · Parte I de su serie") */
  .book__tag {
    font-size: 0.88rem;
    letter-spacing: 0.22em;
    padding-bottom: 1.2rem;
  }

  /* 4 · subtítulo del libro
     ("La última frontera del templo", "La era del silicio", etc.)
     Cambio: dejo la display font pero subo el tamaño y suavizo el spacing
     para que se lea bien en PC. */
  .book__sub {
    font-family: var(--ff-body);
    font-weight: 500;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--laton);
    font-style: italic;
  }

  /* 7 · chips descriptivos ("Intriga corporativa", "Realismo sucio"…) */
  .book__chips li {
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    padding: 0.6rem 1rem;
  }

  /* 8 · notas de saga/serie
     ("Saga conectada con El Código Babel", "Primera parte de una serie…") */
  .book__series-note {
    font-size: 0.88rem !important;
    padding: 0.85rem 1.1rem;
    letter-spacing: 0.02em;
  }

  /* 2 · stats del autor (Obras publicadas 03, Género, etc.) */
  .author__stats dt {
    font-size: 0.78rem;
    letter-spacing: 0.25em;
    margin-bottom: 0.7rem;
  }
  .author__stats dd {
    font-size: 1.9rem;
    line-height: 1.15;
  }

  /* 3 · marquesina dorada — más presente en pantalla grande */
  .marquee {
    padding: 1.8rem 0;
  }
  .marquee__track {
    font-size: 1.55rem;
    letter-spacing: 0.14em;
    gap: 2.8rem;
  }
}

/* Un pelín más grande aún en pantallas realmente grandes */
@media (min-width: 1400px) {
  .marquee__track { font-size: 1.75rem; }
  .book__tag      { font-size: 0.92rem; }
  .book__series-note { font-size: 0.92rem !important; }
}
