/* Biblioteca y lectura: la marca institucional se convierte en una superficie editorial. */
[hidden] { display: none !important; }
.editorial-page { background: #faf8f4; color: var(--ink); }
.editorial-header { min-height: 100px; background: var(--purple); padding: 16px 5vw; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.editorial-header img { width: 76px; height: 64px; object-fit: contain; }
.editorial-header nav { display: flex; gap: clamp(18px, 3vw, 48px); }
.editorial-header nav a { color: white; font-size: 14px; text-underline-offset: 6px; }
.editorial-footer { padding: 44px 5vw; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; background: var(--purple); color: white; font-size: 14px; }
.editorial-footer > a:first-child { font-weight: 700; }
.editorial-footer span { opacity: .8; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .17em; font-weight: 700; line-height: 1.6; }
.library-intro { max-width: 1520px; margin: auto; padding: 80px 6vw 72px; display: grid; grid-template-columns: 1.6fr 1fr; gap: 7vw; align-items: center; }
.library-intro h1 { font-family: var(--font-heading, Poppins), sans-serif; font-size: clamp(38px, 4.5vw, 70px); letter-spacing: -.055em; line-height: 1.13; margin: 24px 0; }
.library-intro h1 em { font-style: normal; color: var(--purple); }
.library-description { max-width: 560px; font-size: 18px; line-height: 1.65; margin-bottom: 32px; }
.text-link { display: inline-block; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 5px; line-height: 1.6; }
.library-art { position: relative; min-height: 370px; display: grid; place-items: center; isolation: isolate; }
.art-orbit { position: absolute; width: 90%; aspect-ratio: 1; border-radius: 50%; background: var(--lavender); z-index: -1; }
.art-paper { padding: 50px 35px; width: min(90%, 290px); min-height: 310px; background: var(--lime); transform: rotate(-8deg); box-shadow: 12px 16px 0 var(--purple); font: 700 clamp(26px, 2.6vw, 38px)/1.35 var(--font-heading, Poppins), sans-serif; letter-spacing: -.05em; }
.art-paper em { font-style: normal; border-bottom: 3px solid currentColor; }
.art-spark { position: absolute; right: -5px; bottom: -15px; font-size: 130px; line-height: 1; }
.library-section { border-top: 1px solid #30006b20; max-width: 1520px; margin: auto; padding: 48px 6vw 90px; }
.library-section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.library-section-heading h2 { font-size: clamp(25px, 2.2vw, 34px); font-family: var(--font-heading, Poppins), sans-serif; letter-spacing: -.04em; }
.library-section-heading > span { font-size: 13px; }
.library-filters { display: grid; grid-template-columns: 2fr 1.4fr 1fr auto; align-items: end; gap: 18px; margin: 32px 0 20px; }
.library-filters label { display: grid; gap: 8px; min-width: 0; font-weight: 700; font-size: 13px; }
.library-filters input, .library-filters select { width: 100%; min-width: 0; height: 48px; padding: 10px 12px; border: 1px solid #30006b50; color: var(--ink); background: transparent; border-radius: 0; font: 400 16px var(--font-body, Roboto), sans-serif; }
.editorial-page .button { font-size: 13px; min-height: 46px; padding: 14px 24px; line-height: 1.3; }
.library-status { font-size: 13px; min-height: 1.5em; margin: 28px 0; }
.library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 32px; }
.library-card { min-width: 0; display: flex; flex-direction: column; }
.library-cover { display: block; text-decoration: none; background: #ede4ef; padding: 30px; }
.library-cover .book-cover { max-width: 260px; margin: 0 auto; width: 100%; transition: transform 250ms ease; }
.library-cover:hover .book-cover { transform: rotate(-3deg) translateY(-5px); }
.library-cover img { height: 320px; object-fit: contain; }
.library-copy { padding-top: 22px; display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.library-copy h3 { font: 700 26px/1.2 var(--font-heading, Poppins), sans-serif; letter-spacing: -.035em; margin: 14px 0 12px; }
.library-copy > p:not(.publication-meta) { font-size: 16px; line-height: 1.6; margin-bottom: 22px; }
.publication-meta { font-size: 12px; margin-top: 12px; }
.library-copy .text-link { margin-top: auto; }
.library-pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 50px; font-size: 14px; }
.library-pagination button { border: 1px solid var(--ink); padding: 12px 16px; background: transparent; color: var(--ink); font: inherit; }
.library-pagination button:disabled { opacity: .4; cursor: default; }
.reader-loading { max-width: 700px; min-height: 60vh; margin: auto; padding: 80px 24px; line-height: 1.7; }
.reader-loading h1 { font-family: var(--font-heading, Poppins), sans-serif; font-size: clamp(30px, 5vw, 48px); line-height: 1.2; margin-bottom: 24px; }
.story-hero { position: relative; isolation: isolate; overflow: hidden; padding: 35px 12vw 72px; background: var(--ink); color: #fff; min-height: 620px; }
.story-hero::before { content: ''; position: absolute; z-index: -1; width: 55vw; height: 55vw; right: -32vw; bottom: -29vw; border: 5vw solid var(--lavender); border-radius: 50%; opacity: .65; }
.story-hero::after { content: '✳'; position: absolute; z-index: -1; right: 3vw; top: 65px; color: var(--lime); font-size: 160px; line-height: 1; }
.story-back { display: inline-block; font-size: 13px; margin-bottom: 52px; text-underline-offset: 5px; }
.story-hero .eyebrow { color: var(--lime); }
.story-hero h1 { max-width: 920px; font: 700 clamp(48px, 7vw, 104px)/1.03 var(--font-heading, Poppins), sans-serif; letter-spacing: -.06em; margin: 22px 0; overflow-wrap: anywhere; }
.story-deck { max-width: 720px; font-size: clamp(18px, 1.7vw, 25px); line-height: 1.5; }
.story-byline { font-size: 13px; margin-top: 25px; }
.story-demo { font-size: 12px; line-height: 1.6; max-width: 650px; margin: 22px 0; padding-left: 14px; border-left: 2px solid var(--lavender); color: #eadbf6; }
.story-hero .button { margin-top: 12px; }
.story-navigation { position: sticky; top: 0; z-index: 5; background: #faf8f4; border-bottom: 1px solid #30006b25; }
.story-navigation progress { appearance: none; display: block; width: 100%; height: 4px; border: none; background: #e4dbea; }
.story-navigation progress::-webkit-progress-bar { background: #e4dbea; }
.story-navigation progress::-webkit-progress-value { background: var(--purple); }
.story-navigation progress::-moz-progress-bar { background: var(--purple); }
.chapter-links { display: flex; max-width: 1240px; margin: auto; padding: 0 24px; overflow-x: auto; }
.chapter-links a { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 18px 16px; text-decoration: none; font-size: 12px; line-height: 1.3; border-bottom: 3px solid transparent; }
.chapter-links a > span:first-child { font-weight: 700; font-size: 18px; }
.chapter-links a[aria-current] { border-color: var(--purple); background: #ede5f0; }
.story-chapter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 9vw; padding: 100px 10vw; scroll-margin-top: 95px; position: relative; }
.story-chapter--1 { background: #eee5f3; }
.story-chapter--2 { background: #eff1dc; }
.chapter-visual { align-self: start; position: sticky; top: 155px; padding-top: 12px; }
.chapter-visual::after { content: ''; display: block; width: 72px; height: 8px; border-radius: 50px; margin-top: 34px; background: var(--purple); }
.chapter-visual img { display: block; max-height: 300px; width: 100%; object-fit: contain; margin-top: 24px; }
.chapter-takeaway { font: 700 clamp(30px, 3.4vw, 53px)/1.2 var(--font-heading, Poppins), sans-serif; letter-spacing: -.045em; margin-top: 30px; overflow-wrap: anywhere; }
.chapter-copy { min-width: 0; }
.chapter-copy h2 { font: 700 clamp(25px, 2.1vw, 34px)/1.25 var(--font-heading, Poppins), sans-serif; letter-spacing: -.025em; margin-bottom: 30px; }
.chapter-copy > p { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.85; margin-bottom: 26px; }
.chapter-copy > p:first-of-type::first-letter { font-size: 3em; float: left; line-height: 1; margin: 6px 7px 0 0; font-weight: 700; }
.story-figures { display: grid; gap: 24px; margin-top: 40px; }
.story-figures figure { border-top: 1px solid #30006b40; padding-top: 20px; }
.story-figures strong { display: block; font: 700 clamp(40px, 5vw, 70px)/1.2 var(--font-heading, Poppins), sans-serif; }
.story-figures figcaption { font-size: 18px; margin: 8px 0; }
.story-figures a, .story-figures small { font-size: 12px; }
.story-end { text-align: center; padding: 80px 24px; background: var(--lavender); }
.story-end > .text-link { margin: 0 0 24px; }
.story-end-title { font: 700 clamp(30px, 4vw, 54px)/1.2 var(--font-heading, Poppins), sans-serif; letter-spacing: -.045em; margin-bottom: 28px; }
.story-end > p:not(.story-end-title) { margin-bottom: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .story-chapter.is-revealed .chapter-copy { animation: chapter-in .65s ease both; }
  @keyframes chapter-in { from { opacity: .25; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}
@media (min-width: 1700px) { .story-chapter { padding-inline: max(10vw, calc((100vw - 1280px) / 2)); } }
@media (max-width: 1000px) {
  .library-intro { gap: 4vw; padding: 55px 5vw; }
  .library-art { min-height: 300px; }
  .art-paper { font-size: 25px; min-height: 265px; padding: 45px 25px; }
  .art-spark { font-size: 100px; }
  .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-chapter { padding: 70px 6vw; gap: 6vw; }
  .story-hero { padding-inline: 8vw; }
  .story-hero::after { font-size: 100px; }
}
@media (max-width: 680px) {
  .editorial-header { min-height: 84px; padding: 12px 20px; gap: 16px; }
  .editorial-header img { width: 60px; height: 50px; }
  .editorial-header nav { gap: 14px; }
  .editorial-header nav a { font-size: 12px; }
  .editorial-header nav a:last-child { display: none; }
  .library-intro { grid-template-columns: 1fr; padding: 42px 22px; gap: 32px; }
  .library-intro h1 { font-size: clamp(34px, 9vw, 52px); }
  .library-description { font-size: 16px; }
  .library-art { min-height: 270px; max-width: 290px; width: 100%; margin: 0 auto; }
  .art-paper { width: 225px; min-height: 230px; font-size: 27px; padding: 32px; }
  .art-orbit { width: 250px; }
  .art-spark { font-size: 92px; bottom: 0; }
  .library-section { padding: 32px 22px 56px; }
  .library-filters { grid-template-columns: 1fr 1fr; gap: 16px; }
  .library-filters label:first-child { grid-column: 1 / -1; }
  .library-filters button { grid-column: 1 / -1; justify-self: start; }
  .library-grid { grid-template-columns: 1fr; gap: 36px; }
  .library-cover { padding: 26px; }
  .library-cover .book-cover { max-width: 210px; }
  .library-copy h3 { font-size: 25px; }
  .library-pagination { gap: 10px; font-size: 12px; }
  .library-pagination button { padding: 12px 8px; }
  .story-hero { padding: 26px 24px 52px; min-height: 0; }
  .story-hero::after { font-size: 65px; top: 78px; right: 12px; opacity: .6; }
  .story-hero h1 { font-size: clamp(43px, 12vw, 66px); }
  .story-back { margin-bottom: 48px; }
  .story-hero .eyebrow { max-width: 80%; font-size: 10px; }
  .story-hero::before { width: 75vw; height: 75vw; right: -53vw; bottom: -34vw; }
  .chapter-links { padding: 0 10px; }
  .chapter-links a { padding: 16px 14px; justify-content: center; flex-shrink: 0; min-width: 56px; }
  .chapter-links a > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .story-chapter { grid-template-columns: 1fr; gap: 36px; padding: 52px 24px; scroll-margin-top: 60px; }
  .chapter-visual { position: static; }
  .chapter-visual::after { margin-top: 24px; height: 5px; width: 50px; }
  .chapter-takeaway { font-size: 34px; margin-top: 20px; }
  .chapter-copy > p { font-size: 17px; line-height: 1.8; }
  .chapter-copy h2 { font-size: 24px; margin-bottom: 24px; }
  .story-end { padding: 60px 24px; }
  .editorial-footer { padding: 32px 22px; flex-direction: column; align-items: flex-start; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { .editorial-page *, .editorial-page *::before, .editorial-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
