@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&family=Playfair+Display:wght@400;500&display=swap');
@import 'tailwindcss';

:root {
  font-family: 'DM Sans', sans-serif;
  color: #171615;
  background: #fbf9f6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --paper: #fbf9f6;
  --paper-white: #fffefd;
  --ink: #171615;
  --warm-gray: #47433f;
  --rule: #d8d2cc;
  --nude: #f4e1d9;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 74px; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); }
button, a { font: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { color: var(--ink); background: #ead5cb; }

:focus-visible {
  outline: 2px solid #6f5a4e;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 30;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  height: 58px;
  background: rgba(255, 254, 253, .92);
  border-bottom: 1px solid rgba(216, 210, 204, .72);
}
.header-inner {
  width: min(100% - 72px, 1180px);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  text-decoration: none;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.main-navigation { display: flex; align-items: center; gap: clamp(23px, 4vw, 48px); }
.main-navigation a {
  font-size: 14px;
  text-decoration: none;
  color: #34312e;
  transition: opacity 180ms ease;
}
.main-navigation a:hover { opacity: .62; }
.menu-toggle { display: none; }

.hero {
  min-height: 455px;
  background:
    linear-gradient(rgba(255,255,255,.05), rgba(255,255,255,.05)),
    url('/assets/fondo-seccion-1.png') center center / cover no-repeat;
  overflow: hidden;
}
.hero-inner {
  width: min(100% - 72px, 1180px);
  min-height: 455px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr .92fr;
  align-items: center;
}
.hero-copy { padding: 43px 0 45px; position: relative; z-index: 1; }
.hero h1 {
  margin: 0 0 19px;
  max-width: 560px;
  font-family: var(--serif);
  font-size: clamp(38px, 4.2vw, 54px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.052em;
}
.book-identity {
  width: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 17px 0 12px 1px;
  font-family: var(--serif);
  letter-spacing: .24em;
}
.book-identity > span { font-size: 14px; }
.book-identity i { width: 123px; height: 1px; background: #272523; }
.book-identity small { font-size: 8px; letter-spacing: .28em; }
.hero-description {
  margin: 14px 0 18px;
  color: #34312e;
  font-size: 15px;
  line-height: 1.45;
}
.hero .buy-link { margin-top: 12px; min-width: 220px; min-height: 50px; font-size: 16px; }
.buy-link {
  min-height: 38px;
  min-width: 184px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #1b1a19;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  transition: background-color 180ms ease;
}
.buy-link:hover { background: #45413d; }
.buy-link span { transition: transform 180ms ease; font-size: 17px; line-height: 1; }
.buy-link:hover span { transform: translateX(3px); }
.hero-art {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  position: relative;
  isolation: isolate;
}
.hero-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4% 0;
  background:
    radial-gradient(ellipse 74% 68% at 47% 45%, rgba(226, 184, 172, .48) 0%, rgba(238, 207, 195, .36) 43%, transparent 76%),
    radial-gradient(ellipse 49% 44% at 72% 60%, rgba(235, 199, 184, .40) 0%, transparent 74%),
    radial-gradient(ellipse 42% 34% at 31% 70%, rgba(220, 173, 165, .30) 0%, transparent 81%);
  filter: blur(18px);
  pointer-events: none;
}
.hero-art img {
  width: min(100%, 395px);
  max-height: 420px;
  object-fit: contain;
  filter: drop-shadow(0 14px 16px rgba(48, 38, 28, .15));
}

.book-section {
  display: grid;
  grid-template-columns: 36% 64%;
  align-items: stretch;
  background: var(--paper-white);
}
.book-photo { position: relative; min-height: 0; overflow: hidden; }
.book-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 51%; }
.editorial-copy { color: var(--warm-gray); }
.editorial-copy em { font-style: italic; }
.book-copy { align-self: center; max-width: 900px; padding: 34px clamp(34px, 5vw, 72px) 36px 44px; transform: none; }
.eyebrow {
  margin: 0;
  color: #383430;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .25em;
}
.book-copy > .eyebrow,
.author-copy > .eyebrow { padding-bottom: 11px; border-bottom: 1px solid var(--rule); }
.editorial-copy h2 {
  margin: 9px 0 9px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(25px, 2.6vw, 34px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.editorial-copy p:not(.eyebrow) {
  margin: 10px 0 0;
  font-size: 17px;
  line-height: 1.62;
}

.for-you {
  min-height: 187px;
  display: grid;
  grid-template-columns: 43% 57%;
  align-items: stretch;
  overflow: hidden;
  background: #f5e4dd;
}
.for-you-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 25px 25px max(40px, calc((100vw - 1120px) / 2));
}
.for-you-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.55vw, 45px);
  line-height: .99;
  letter-spacing: -.045em;
}
.for-you-photo { min-height: 187px; overflow: hidden; }
.for-you-photo img { width: 100%; height: 100%; min-height: 187px; object-fit: cover; object-position: 57% 55%; }

.fragments { background: var(--paper); padding: 34px 24px 42px; }
.fragments-inner { width: min(100%, 1180px); margin: 0 auto; position: relative; padding: 0 34px; }
.fragments-heading { text-align: center; margin-bottom: 52px; }
.fragments-heading h2 {
  margin: 0;
  font: 400 clamp(27px, 3vw, 37px)/1.1 var(--serif);
  letter-spacing: -.035em;
}
.fragments-heading p { margin: 7px 0 0; color: var(--warm-gray); font-size: 14px; }
.voices { display: grid; grid-template-columns: 1fr 1fr; position: relative; }
.fragments-inner::before,
.fragments-inner::after {
  content: "◆";
  position: absolute;
  top: 57%;
  transform: translateY(-50%);
  color: #d8bdb2;
  font-size: 9px;
}
.fragments-inner::before { left: 0; }
.fragments-inner::after { right: 0; }
.voice { padding: 0 46px 0 18px; }
.voice + .voice { padding: 0 18px 0 46px; border-left: 1px solid var(--rule); }
.voice .eyebrow { padding-bottom: 9px; border-bottom: 1px solid var(--rule); }
.voice blockquote {
  position: relative;
  margin: 11px 0 0;
  color: #383430;
}
.voice blockquote::before {
  content: '“';
  position: absolute;
  left: -21px;
  top: -12px;
  color: #eed9d0;
  font: 400 47px/1 var(--serif);
}
.voice blockquote p { margin: 0 0 14px; font-size: 17px; line-height: 1.62; }

.availability { background: #f9f1ed; border-top: 1px solid rgba(216,210,204,.45); }
.availability-inner {
  width: min(100% - 72px, 900px);
  min-height: 92px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  align-items: center;
}
.available-label { min-height: 44px; display: flex; flex-direction: column; justify-content: center; gap: 7px; border-right: 1px solid var(--rule); }
.available-label span { width: 25px; height: 1px; background: #55504b; }
.formats-and-cta { display: flex; align-items: center; justify-content: center; gap: 22px; }
.formats-and-cta p { margin: 0; font-size: 16px; color: #252220; white-space: nowrap; }
.formats-and-cta p span { padding: 0 4px; color: #928982; }
.formats-and-cta .buy-link { min-width: 220px; min-height: 50px; font-size: 16px; }

.author-section { background: #f5e6df; padding: 38px 24px 42px; }
.author-inner {
  width: min(100%, 1120px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 31% 1fr;
  align-items: center;
  gap: 54px;
}
.author-photo { padding-top: 1px; background: transparent; }
.author-photo img {
  width: 100%;
  max-height: 390px;
  object-fit: contain;
  object-position: center;
  filter: grayscale(100%);
}
.author-copy { padding-right: 6px; }
.author-copy h2 { margin-top: 9px; }
.author-copy p:not(.eyebrow) { margin-top: 12px; font-size: 17px; line-height: 1.62; }
.author-copy .author-buy { margin-top: 18px; min-height: auto; padding: 0 0 3px; min-width: 0; gap: 9px; background: transparent; color: var(--ink); border-bottom: 1px solid #69615a; font-size: 16px; }
.author-copy .author-buy:hover { background: transparent; color: #75695f; }
.author-copy .author-buy span { font-size: 19px; }

.social-band { background: #1b1a19; color: #fff; }
.social-inner {
  width: min(100% - 72px, 1120px);
  min-height: 77px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.social-band .eyebrow { color: #eee9e5; font-size: 10px; }
.social-band h2 { margin: 5px 0 0; font: 400 24px/1.1 var(--serif); }
.instagram-link {
  min-height: 44px;
  padding-left: 26px;
  border-left: 1px solid rgba(255,255,255,.48);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #f8f6f3;
  text-decoration: none;
  font-size: 13px;
}
.instagram-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.instagram-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.instagram-link .instagram-dot { fill: currentColor; stroke: none; }
.site-footer { background: #1b1a19; color: #f4f1ee; border-top: 1px solid rgba(255,255,255,.2); }
.footer-inner {
  width: min(100% - 72px, 1120px);
  min-height: 39px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}
.footer-inner p { margin: 0; display: flex; align-items: center; gap: 10px; }
.footer-title { font-family: var(--serif); font-size: 13px; }
.footer-inner a { color: inherit; text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 1400px) {
  .hero { min-height: 490px; }
  .hero-inner { min-height: 490px; }
  .hero-art img { max-height: 455px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 60px; }
  .site-header { height: 56px; position: relative; z-index: 5; }
  .header-inner { width: calc(100% - 40px); }
  .wordmark { font-size: 19px; }
  .menu-toggle {
    width: 42px;
    height: 42px;
    padding: 12px 9px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  .menu-toggle span { width: 23px; height: 1px; background: var(--ink); }
  .main-navigation {
    display: none;
    position: absolute;
    top: 55px;
    left: 0;
    right: 0;
    padding: 13px 20px 17px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper-white);
    border-bottom: 1px solid var(--rule);
  }
  .main-navigation.is-open { display: flex; }
  .main-navigation a { padding: 12px 0; font-size: 14px; border-bottom: 1px solid #eee9e4; }
  .main-navigation a:last-child { border-bottom: 0; }
  .hero { min-height: 0; }
  .hero-inner {
    width: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
  }
  .hero-copy { padding: 42px 24px 12px; }
  .hero h1 { max-width: 560px; margin-bottom: 15px; font-size: clamp(36px, 9.2vw, 50px); line-height: .99; }
  .desktop-break { display: none; }
  .book-identity { margin-top: 14px; }
  .hero-description { margin-top: 12px; font-size: 14px; }
  .hero-art { padding: 0 24px 24px; }
  .hero-art img { width: min(78vw, 330px); max-height: 420px; }

  .book-section { grid-template-columns: 1fr; height: auto; }
  .book-photo { position: relative; min-height: 0; height: clamp(275px, 76vw, 440px); }
  .book-photo img { position: absolute; inset: 0; min-height: 0; height: 100%; object-position: center 52%; }
  .book-copy { padding: 31px 24px 35px; transform: none; }
  .editorial-copy h2 { font-size: 31px; }
  .editorial-copy p:not(.eyebrow) { font-size: 15px; line-height: 1.56; }
  .eyebrow { font-size: 11px; }

  .for-you { grid-template-columns: 1fr; }
  .for-you-copy { min-height: 180px; justify-content: flex-start; padding: 28px 24px; }
  .for-you-copy h2 { font-size: clamp(30px, 8vw, 39px); }
  .for-you-photo, .for-you-photo img { min-height: 0; height: clamp(210px, 64vw, 350px); }
  .for-you-photo img { object-position: center 54%; }

  .fragments { padding: 32px 24px 36px; }
  .fragments-inner { padding: 0; }
  .fragments-inner::before, .fragments-inner::after { display: none; }
  .fragments-heading { margin-bottom: 26px; }
  .fragments-heading h2 { font-size: 31px; }
  .fragments-heading p { max-width: 290px; margin: 7px auto 0; line-height: 1.45; }
  .voices { grid-template-columns: 1fr; gap: 27px; }
  .voice, .voice + .voice { padding: 0 0 0 11px; border-left: 0; }
  .voice + .voice { padding-top: 22px; border-top: 1px solid var(--rule); }
  .voice blockquote { margin-top: 13px; }
  .voice blockquote p { font-size: 15px; line-height: 1.56; }

  .availability-inner { width: calc(100% - 48px); min-height: 0; padding: 21px 0 23px; grid-template-columns: 1fr; gap: 16px; }
  .available-label { min-height: 0; padding-bottom: 12px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .formats-and-cta { align-items: flex-start; flex-direction: column; gap: 13px; }
  .formats-and-cta p { font-size: 12px; }
  .formats-and-cta .buy-link { width: 100%; min-height: 44px; }

  .author-section { padding: 28px 24px 33px; }
  .author-inner { grid-template-columns: 1fr; gap: 22px; }
  .author-photo { width: min(78vw, 300px); max-width: 300px; margin: 0 auto; }
  .author-photo img { width: 100%; max-height: none; object-fit: contain; }
  .author-copy { padding: 0; }
  .author-copy p:not(.eyebrow) { font-size: 15px; line-height: 1.56; }
  .author-copy .author-buy { font-size: 14px; }
  .social-inner { width: calc(100% - 48px); min-height: 0; padding: 22px 0; align-items: flex-start; flex-direction: column; gap: 17px; }
  .social-band h2 { font-size: 22px; }
  .instagram-link { min-height: 37px; padding-left: 0; border-left: 0; font-size: 12px; }
  .footer-inner { width: calc(100% - 48px); min-height: 45px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
/* v8 — approved final visual refinements */
@media (min-width: 761px) {
  .hero { min-height: 590px; }
  .hero-inner {
    width: min(100% - 72px, 1280px);
    min-height: 590px;
    grid-template-columns: 52% 48%;
  }
  .hero-copy {
    padding-top: 58px;
    padding-bottom: 92px;
    transform: translateX(-54px);
  }
  .hero-art { padding: 24px 0 66px; }
  .hero-art img {
    width: min(100%, 480px);
    max-height: 510px;
  }
  .fragments-inner::before,
  .fragments-inner::after {
    top: 59%;
    transform: translateY(-50%);
    color: #ead1c7;
    font: 400 76px/1 var(--serif);
  }
  .fragments-inner::before { content: "“"; left: -4px; }
  .fragments-inner::after { content: "”"; right: -4px; }
}

/* v9 — oversized blush quotation marks framing both voices (desktop only) */
@media (min-width: 761px) {
  .fragments-inner::before,
  .fragments-inner::after {
    top: 58%;
    color: rgba(234, 209, 199, .78);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 250px;
    font-weight: 400;
    line-height: .72;
    pointer-events: none;
    z-index: 0;
  }
  .fragments-inner::before { content: "“"; left: -158px; }
  .fragments-inner::after { content: "”"; right: -158px; }
  .fragments-heading, .voices { position: relative; z-index: 1; }
  .voice blockquote::before { display: none; }
}

/* v11 — desktop editorial rhythm: each major section gets its own visual field */
@media (min-width: 761px) {
  .hero,
  .hero-inner { min-height: clamp(680px, 80vh, 820px); }
  .book-section { min-height: clamp(650px, 76vh, 780px); }
  .fragments {
    min-height: clamp(620px, 72vh, 740px);
    padding-top: 64px;
    padding-bottom: 70px;
    display: flex;
    align-items: center;
  }
  .fragments-inner { width: min(100%, 1180px); }
  .author-section {
    min-height: clamp(600px, 70vh, 720px);
    padding-top: 62px;
    padding-bottom: 68px;
    display: flex;
    align-items: center;
  }
  .author-inner { width: min(100%, 1120px); }
}


/* v14 — mobile author section: portrait and biography form one compact continuous block */
@media (max-width: 760px) {
  .author-section {
    min-height: 0 !important;
    height: auto !important;
    display: block !important;
    padding: 34px 24px 38px !important;
  }
  .author-inner {
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 28px !important;
  }
  .author-photo {
    width: min(64vw, 260px) !important;
    max-width: 260px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    align-self: center !important;
  }
  .author-photo img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
  }
  .author-copy {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}
