/* alfredosolares.com — papel, sepia, tinta, lacre y verde de mapa acuarelado */
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/eb-garamond-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap; src: url(/static/fonts/eb-garamond-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/eb-garamond-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/eb-garamond-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url(/static/fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-style: italic; font-weight: 600; font-display: swap; src: url(/static/fonts/cormorant-garamond-latin-600-italic.woff2) format("woff2"); }
@font-face { font-family: "Homemade Apple"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/homemade-apple-latin-400-normal.woff2) format("woff2"); }

:root {
  --paper: #f3e6cc;
  --paper-2: #ebd9b6;
  --paper-3: #e2cb9f;
  --ink: #2b1d14;
  --sepia: #66492e;
  --rule: #c9ae80;
  --lacre: #8f1d17;
  --lacre-dk: #6e140f;
  --mapa: #5c7757;
  --mapa-lt: #b9c7a9;
  --display: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
  --text: "EB Garamond", "Garamond", Georgia, serif;
  --hand: "Homemade Apple", "Segoe Script", cursive;
  --measure: 36rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.1875rem/1.62 var(--text);
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  overflow-x: hidden;
}
@media (min-width: 900px) { body { font-size: 1.25rem; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lacre); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--lacre-dk); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--mapa); outline-offset: 3px; border-radius: 2px; }
em { font-style: italic; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: calc(var(--measure) + 2 * var(--gutter)); }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- cabecera ---------- */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead-in { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-top: .9rem; padding-bottom: .8rem; }
.signature {
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--ink); text-decoration: none;
}
.signature:hover { color: var(--ink); }
.lang { display: flex; align-items: baseline; gap: .15rem; font-size: 1rem; }
.lang a { color: var(--sepia); text-decoration: none; padding: .35rem .4rem; letter-spacing: .06em; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--lacre); }
.lang-sep { color: var(--rule); }

/* ---------- títulos ---------- */
.h2 {
  font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
  line-height: 1.1; margin: 0 0 1.25rem; letter-spacing: .01em;
}
.h2::after { content: ""; display: block; width: 2.5rem; height: 2px; background: var(--lacre); margin-top: .7rem; }

/* ---------- hero ---------- */
.hero { padding: clamp(2rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5.5rem); }
.hero-in { display: grid; gap: 2.25rem; align-items: center; }
.hero-cover { justify-self: center; width: min(58vw, 22rem); }
.cover img {
  border-radius: 2px 4px 4px 2px;
  box-shadow: 0 1px 0 rgba(43,29,20,.25), 0 14px 28px -10px rgba(60,38,20,.45), 0 30px 60px -30px rgba(60,38,20,.35);
}
.hero-cover-pair { position: relative; width: min(86vw, 26rem); aspect-ratio: 1 / 1.08; }
.hero-cover-pair .cover-back { position: absolute; width: 60%; right: 2%; top: 0; transform: rotate(3.5deg); }
.hero-cover-pair .cover-front { position: absolute; width: 60%; left: 2%; bottom: 0; transform: rotate(-2.5deg); }

.on-sale {
  display: inline-block; margin: 0 0 1.1rem; padding: .18rem .7rem .12rem;
  color: var(--lacre); border: 1.5px solid var(--lacre); border-radius: 3px;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: .06em;
  transform: rotate(-2deg);
}
.title {
  font-family: var(--display); font-weight: 500; text-transform: uppercase;
  font-size: clamp(2.3rem, 1.3rem + 4.6vw, 4.6rem); line-height: 1.02; letter-spacing: .09em;
  margin: 0; text-wrap: balance;
}
.subtitle { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin: .55rem 0 .2rem; color: var(--sepia); }
.byline { font-family: var(--display); font-weight: 600; letter-spacing: .24em; text-transform: uppercase; font-size: .95rem; margin: 0 0 1.6rem; color: var(--sepia); }
.hook { font-size: 1.3rem; line-height: 1.5; max-width: 30rem; margin-bottom: 1.8rem; font-style: italic; }
@media (min-width: 900px) { .hook { font-size: 1.45rem; } }
.hero-note { max-width: 30rem; color: var(--sepia); }
.hero-more { margin: 1.4rem 0 0; font-size: 1.05rem; }
.buy-label { margin: 0 0 .6rem; font-weight: 600; font-size: 1.05rem; }

@media (min-width: 900px) {
  .hero-in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(3rem, 6vw, 6rem); }
  .hero-cover { width: 100%; max-width: 25rem; justify-self: end; }
  .hero-cover-pair { max-width: 32rem; width: 100%; }
}

/* ---------- botones ---------- */
.buy-groups { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; }
.buy-group { display: flex; flex-direction: column; gap: .35rem; }
.buy-store { font-size: .95rem; color: var(--sepia); }
.buy-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem;
  padding: .45rem 1.15rem .4rem; border: 1.5px solid var(--ink); border-radius: 3px;
  background: transparent; color: var(--ink); font: 500 1.05rem/1.2 var(--text);
  text-decoration: none; cursor: pointer; letter-spacing: .01em;
}
.btn:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--lacre); border-color: var(--lacre); color: #fff8ea; }
.buy-compact .btn { min-height: 2.5rem; padding: .35rem .9rem .3rem; font-size: 1rem; }
.soon { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 1.35rem; color: var(--mapa); margin: .3rem 0 0; }

/* ---------- el libro ---------- */
.book { padding: clamp(3rem, 7vw, 5.5rem) 0; background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.backcover p { text-indent: 1.4em; margin: 0; hyphens: auto; }
.backcover p:first-child { text-indent: 0; }
.backcover p:first-child::first-letter {
  float: left; font-family: var(--display); font-weight: 600; color: var(--lacre);
  font-size: 4.2em; line-height: .82; padding: .06em .08em 0 0;
}
.seal {
  width: 2.6rem; height: 2.6rem; margin: 2.4rem auto; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #b23a2f 0 18%, var(--lacre) 46%, var(--lacre-dk) 100%);
  box-shadow: 0 0 0 4px rgba(143,29,23,.12), 0 2px 3px rgba(43,29,20,.35);
}
.description p { hyphens: auto; }
.description p:first-child { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.4em; line-height: 1.35; margin-bottom: 1.1em; }
.description-first p:first-child { margin-top: .4rem; }

/* ---------- el cuaderno ---------- */
.notebook { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.page {
  position: relative; margin: 0 auto; max-width: 50rem;
  padding: 2.2rem 1.25rem 2rem 3.2rem;
  background-color: #f8efdc;
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(60,38,20,.5);
  border-radius: 2px;
  transform: rotate(-.6deg);
}
.page::before { content: ""; position: absolute; top: 0; bottom: 0; left: 2.3rem; width: 1px; background: rgba(143,29,23,.55); }
.entries {
  list-style: none; margin: 0 -1.25rem 0 -3.2rem; padding: 0 1.25rem 0 3.2rem;
  font-family: var(--hand); color: #3b3a5a; font-size: .95rem; line-height: 2.1rem; word-spacing: .2em;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2.1rem - 1px), rgba(92,119,87,.4) calc(2.1rem - 1px), rgba(92,119,87,.4) 2.1rem);
  background-position: 0 -.35rem;
  border-top: 1px solid rgba(92,119,87,.4);
}
.entries li { display: flex; flex-wrap: wrap; column-gap: 1rem; }
.entries .who { white-space: nowrap; }
.entries .qce { opacity: .85; }
.entries .faint { opacity: .55; }
.formula { margin: 1.6rem 0 0; }
.formula p {
  margin: 0; font-family: var(--display); font-style: italic; font-weight: 600; color: var(--ink);
  font-size: clamp(2rem, 1.2rem + 3.4vw, 3.4rem); line-height: 1.12; text-wrap: balance;
}
.page figcaption { margin-top: 1rem; font-size: 1rem; color: var(--sepia); }
@media (min-width: 700px) {
  .page { padding: 2.6rem 3rem 2.4rem 5rem; }
  .page::before { left: 3.6rem; }
  .entries { font-size: 1.1rem; margin: 0 -3rem 0 -5rem; padding: 0 3rem 0 5rem; }
}

/* ---------- ediciones ---------- */
.editions { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--rule); }
.lede { max-width: var(--measure); color: var(--sepia); }
.ed-list { display: grid; gap: 2.5rem; margin-top: 2rem; }
.ed { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: 1.25rem; align-items: start; align-content: start; }
.ed-cover { width: 100%; }
.cover-sm img { box-shadow: 0 1px 0 rgba(43,29,20,.25), 0 10px 18px -8px rgba(60,38,20,.45); }
.cover-blank {
  aspect-ratio: 600 / 899; border: 1.5px dashed var(--rule); border-radius: 2px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12%;
  background: #f8efdc;
}
.cover-blank span { font-family: var(--display); font-weight: 600; letter-spacing: .16em; text-transform: uppercase; font-size: .55rem; color: var(--sepia); }
.ed-lang { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; }
.ed-title { margin: .35rem 0 0; font-style: italic; line-height: 1.3; }
.ed-sub { margin: 0 0 .6rem; color: var(--sepia); font-size: 1rem; }
.ed-data { margin: 0 0 1rem; font-size: 1rem; color: var(--sepia); }
.ed-data dd { margin: 0; }
.ed .buy-groups { gap: .8rem 1.25rem; }
@media (min-width: 900px) {
  .ed-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
  .ed { grid-template-columns: 1fr; }
  .ed-cover { width: 9.5rem; }
}

/* ---------- autor y contacto ---------- */
.author { padding: clamp(3rem, 7vw, 5.5rem) 0; background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.author p { hyphens: auto; }
.contact { padding: clamp(3rem, 7vw, 5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.mail-slot { min-height: 2.75rem; }
.mail { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 1.6rem; word-break: break-all; }
.mail-img { width: 226px; height: auto; }

.privacy { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 8vw, 6rem); }

/* ---------- pie ---------- */
.foot { border-top: 1px solid var(--rule); color: var(--sepia); font-size: 1rem; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 2rem; padding-top: 1.4rem; padding-bottom: 1.6rem; }
.foot p { margin: 0; }
.foot a { color: var(--sepia); }

@media print {
  .masthead, .lang, .notebook, .buy-groups, .contact { display: none; }
  body { background: #fff; }
}
