/* =========================================================
   AQC — Poemaris · Editorial landing (sense header/footer)
   ========================================================= */

/* ---------- Tipografies (ara.cat / recursos) ---------- */
@font-face {
  font-family: 'ChronicleDeck-Roman';
  src: url('https://recursos.ara.cat/hubfs/layout/fonts/00-Chronicle-Deck-Roman/ChronicleDeck-Roman.eot?') format('embedded-opentype'),
       url('https://recursos.ara.cat/hubfs/layout/fonts/00-Chronicle-Deck-Roman/ChronicleDeck-Roman.woff') format('woff'),
       url('https://recursos.ara.cat/hubfs/layout/fonts/00-Chronicle-Deck-Roman/ChronicleDeck-Roman.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Chronicle-Deck-Cond-Semi';
  src: url('https://recursos.ara.cat/hubfs/layout/fonts/00-Chronicle-Deck-Cond/ChronicleDeckCond-Semi.eot?') format('embedded-opentype'),
       url('https://recursos.ara.cat/hubfs/layout/fonts/00-Chronicle-Deck-Cond/ChronicleDeckCond-Semi.woff') format('woff'),
       url('https://recursos.ara.cat/hubfs/layout/fonts/00-Chronicle-Deck-Cond/ChronicleDeckCond-Semi.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RingsideNarrow-Book';
  src: url('https://recursos.ara.cat/hubfs/layout/fonts/00-Ringside-Narrow-Book/RingsideNarrow-Book.eot?') format('embedded-opentype'),
       url('https://recursos.ara.cat/hubfs/layout/fonts/00-Ringside-Narrow-Book/RingsideNarrow-Book.woff') format('woff'),
       url('https://recursos.ara.cat/hubfs/layout/fonts/00-Ringside-Narrow-Book/RingsideNarrow-Book.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:        #ffffff;
  --ink:       #111111;
  --ink-soft:  #2a2a2a;
  --ink-mute:  #6f6f6f;
  --red:       #d10e0e;   /* accent editorial (rgb 209,14,14) */
  --red-deep:  #c01818;
  --line:      #d9dbde;

  --serif:     "ChronicleDeck-Roman", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --cond:      "Chronicle-Deck-Cond-Semi", "ChronicleDeck-Roman", Georgia, serif;
  --sans:      "RingsideNarrow-Book", "Helvetica Neue", Arial, sans-serif;

  --wrap:      1180px;   /* columna de contingut (text) */
  --wide:      1440px;   /* seccions d'imatge / feature (ample únic) */
  --gut:       clamp(1.25rem, 5vw, 4rem);
  --ease:      cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
p { margin: 0 0 1.1rem; }
a { color: inherit; }

/* Focus visible per teclat (accessibilitat) */
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.center { text-align: center; }

/* Section rhythm — generós, editorial */
section { padding: clamp(4rem, 11vh, 9rem) 0; }

/* =========================================================
   HERO — conversió (test dels 3 segons)
   ========================================================= */
.hero { padding-top: clamp(3rem, 8vh, 6.5rem); padding-bottom: clamp(3rem, 7vh, 5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;   /* més espai per a la imatge de producte */
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: var(--wide); margin-inline: auto;
}
/* La imatge del hero omple la seva columna; tope a la mida original (1600 px). */
.hero-media img.product-img { width: 100%; max-width: 1600px; margin-inline: 0; }
.hero-eyebrow {
  font-family: var(--sans);
  font-size: .82rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-mute); margin: 0 0 1.1rem;
}
.hero-title {
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.06;
  letter-spacing: .005em;
  margin: 0 0 1.2rem;
}
.hero-sub {
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 0 0 1.8rem;
}

/* Prova / dades de conversió */
.hero-proof {
  list-style: none; margin: 0 0 2rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: 1rem 2rem;
}
.hero-proof li { font-size: .95rem; color: var(--ink-soft); line-height: 1.2; }
.hero-proof .proof-num {
  display: block; font-size: 2rem; font-weight: 500; color: var(--red); line-height: 1;
}

/* Accions */
.hero-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 1rem; }
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; cursor: pointer;
  font-family: var(--sans); font-weight: 700; font-size: .92rem; line-height: 1; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none;
  min-height: 3.4rem; padding: 0 2.2rem; border: 1px solid var(--red); border-radius: 4px;
  box-sizing: border-box;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: transparent; color: var(--red); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }
.btn-secondary svg { display: block; }

.hero-scarcity {
  margin: 1.4rem 0 0; font-size: .9rem; font-style: italic; color: var(--ink-mute);
}

/* Imatge de producte */
.hero-media { margin: 0; }
.hero-img { aspect-ratio: 4 / 5; }

/* =========================================================
   VIDEO LIGHTBOX
   ========================================================= */
.video-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; }
.video-modal[hidden] { display: none; }
.video-modal-backdrop { position: absolute; inset: 0; background: rgba(10,10,10,.88); }
.video-modal-inner { position: relative; width: min(1000px, 92vw); }
.modal-video { width: 100%; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 30px 80px -30px rgba(0,0,0,.7); }
.video-close {
  position: absolute; top: -2.6rem; right: 0; background: none; border: 0; cursor: pointer;
  color: #fff; font-size: 2.4rem; line-height: 1; padding: .2rem .6rem;
}
.video-close:hover { color: var(--red); }

/* =========================================================
   ESTOIG (full-bleed) + gavines
   ========================================================= */
.estoig { padding-top: clamp(2rem, 5vh, 4rem); padding-bottom: 0; position: relative; }
.gavines { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); position: relative; height: 90px; }
.gavina { position: absolute; opacity: .85; }
.gavina.g1 { width: 130px; top: 10px; left: 22%; }
.gavina.g2 { width: 100px; top: 40px; right: 14%; }

.fullbleed { margin: 2.5rem 0 0; }
.img-ph {
  width: 100%;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: repeating-linear-gradient(45deg, #e9ebee 0 16px, #eef0f2 16px 32px);
  border: 1px solid var(--line);
  color: var(--ink-mute);
  font-style: italic; font-size: 1.05rem; padding: 2rem;
}
.img-ph small { display: inline-block; font-size: .72rem; font-style: normal; letter-spacing: .12em; text-transform: uppercase; margin-top: .5rem; color: #9aa; }
/* Imatges de producte reals — mida original (sense escalar cap amunt);
   només es redueixen si no caben. Es centren dins del contenidor. */
img.product-img {
  width: auto; height: auto; max-width: 100%;
  aspect-ratio: auto; object-fit: contain;
  display: block; margin-inline: auto;
}

.ratio-wide   { aspect-ratio: 16 / 11; }
.ratio-wide2  { aspect-ratio: 16 / 7; }
.ratio-portrait { aspect-ratio: 3 / 4; }
.ratio-land   { aspect-ratio: 4 / 3; }
.ratio-tall   { aspect-ratio: 9 / 20; }

/* =========================================================
   QUOTE
   ========================================================= */
.quote-block { padding: clamp(3.5rem, 9vh, 7rem) 0; }
.quote {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  line-height: 1.15;
  color: var(--red);
  text-align: right;
  margin: 0;
}

/* =========================================================
   SUMARI
   ========================================================= */
.sumari-eyebrow {
  font-family: var(--sans);
  font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-mute); margin: 0 0 .8rem;
}
.alt-quadern {
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: .01em;
  margin: 0;
}
.sumari-sub {
  font-size: 1.15rem; color: var(--ink-soft);
  max-width: 40ch; margin: 1rem auto 0;
}

/* =========================================================
   QUÈ INCLOU
   ========================================================= */
.includes-title {
  font-weight: 500; font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  text-align: center; margin: 0 0 clamp(2.5rem, 5vw, 4rem);
}
.includes-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
}
.includes-grid li { border-top: 2px solid var(--red); padding-top: 1.1rem; }
.inc-num {
  display: block; font-family: var(--sans); font-size: .8rem; letter-spacing: .2em;
  color: var(--red); margin-bottom: .8rem;
}
.includes-grid h3 { font-weight: 500; font-size: 1.5rem; margin: 0 0 .5rem; line-height: 1.15; }
.includes-grid p { font-size: 1rem; line-height: 1.55; color: var(--ink-soft); margin: 0; }

/* =========================================================
   SHOWCASE PAIR (imatge · llista · imatge)
   ========================================================= */
.showcase-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem) clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: var(--wide); margin: 0 auto; padding: clamp(4rem,10vh,8rem) var(--gut);
}
/* Les imatges omplen la seva columna; tope a la mida original de cada arxiu. */
.showcase-pair img.product-img { width: 100%; margin-inline: auto; }
/* Carpeta: a dalt, ocupant tota l'amplada (tope mida original 2560 px) */
.pair-top { grid-column: 1 / -1; margin: 0 0 clamp(2rem, 4vw, 4rem); }
.pair-top img.product-img { max-width: 2560px; }
/* Llibre obert: al costat del text, columna esquerra (tope 1600 px) */
.pair-side { grid-column: 1; margin: 0; }
.pair-side img.product-img { max-width: 1600px; }
.pair-text { grid-column: 2; align-self: center; }
.poemaris-index { counter-reset: p; list-style: none; margin: 0; padding: 0; text-align: right; }
.poemaris-index li { counter-increment: p; font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.9; color: var(--ink-soft); }
.poemaris-index li::before { content: counter(p) ". "; color: var(--red); }

/* =========================================================
   ASSAIG
   ========================================================= */
.assaig-title { color: var(--red); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 500; margin: 0; }
.assaig-author { font-style: italic; font-size: clamp(1.3rem, 2.6vw, 1.8rem); color: var(--ink); margin: .3rem 0 0; }

/* =========================================================
   LLIBRE DE LLIBRES
   ========================================================= */
.llibre-title { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 500; line-height: 1.05; margin: 0 0 2rem; }
.llibre-specs { margin-top: 2.5rem; }
.spec-label { font-style: italic; font-size: 1.4rem; color: var(--red); margin: 0 0 .6rem; }
.spec-hero  { font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.2; color: var(--ink); margin: 0 0 .6rem; }
.spec-big   { color: var(--red); font-weight: 500; }
.spec-dims  { font-family: var(--sans); font-size: .95rem; color: var(--ink-mute); letter-spacing: .04em; margin: 0; }

/* =========================================================
   PERICO PASTOR
   ========================================================= */
.perico { text-align: center; }
.perico-name { color: var(--red); font-size: 1.4rem; letter-spacing: .04em; margin: 0 0 1rem; }
.perico-quote {
  border: 0; margin: 0 auto; max-width: 720px;
  font-style: italic; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.35; color: var(--ink);
}
.link-more {
  display: inline-block; margin-top: 2.2rem;
  font-family: var(--sans);
  font-size: .85rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
  text-decoration: none; border-bottom: 1px solid var(--red); padding-bottom: .3rem;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.link-more:hover { color: var(--red); }

/* =========================================================
   OBRA I JUSTIFICACIÓ
   ========================================================= */
.obra-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 38rem);
  gap: clamp(2rem, 6vw, 6rem); align-items: start;
  max-width: var(--wide); margin: 0 auto; padding: 0 var(--gut);
}
.obra-img { position: sticky; top: 3rem; }
/* La imatge omple la columna esquerra fins al marge de pàgina,
   però mai supera la seva mida original (1600 px). */
.obra-img img.product-img { width: 100%; max-width: 1600px; margin-inline: 0; }
.obra-text { max-width: 38rem; }
.obra-title { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 500; line-height: 1.05; color: var(--red); margin: 0 0 2rem; }
.obra-text p { font-size: 1.05rem; line-height: 1.7; color: var(--ink-soft); }
.tiratge { margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.tiratge em { font-style: normal; color: var(--red); }
.tiratge ul { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.tiratge li { font-size: 1rem; color: var(--ink-soft); line-height: 1.6; margin-bottom: .9rem; padding-left: 3.4rem; position: relative; }
.tiratge li span {
  position: absolute; left: 0; top: -.1rem;
  font-size: 1.6rem; color: var(--red); font-weight: 500;
}

/* =========================================================
   CTA — acció principal
   ========================================================= */
.cta { padding-top: clamp(3rem, 8vh, 6rem); padding-bottom: clamp(3rem, 8vh, 6rem); }
.cta-eyebrow {
  font-family: var(--sans);
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-mute); margin: 0 0 1.4rem;
}
.cta-btn {
  display: inline-block; cursor: pointer; text-decoration: none;
  font-family: var(--sans); font-weight: 700; font-size: .95rem; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; background: var(--red); padding: 1rem 2.6rem;
  border: 1px solid var(--red); border-radius: 4px;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.cta-btn:hover { background: transparent; color: var(--red); }

/* CTA flotant — apareix passat el hero (no hi ha header) */
.reserve-float {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 250;
  font-family: var(--sans); font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; background: var(--red); text-decoration: none;
  padding: .9rem 1.6rem; border-radius: 4px;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .35s var(--ease), transform .35s var(--ease), background .25s var(--ease);
}
.reserve-float.show { opacity: 1; transform: none; pointer-events: auto; }
.reserve-float:hover { background: var(--red-deep); }
@media (prefers-reduced-motion: reduce) {
  .reserve-float { transition: opacity .01s; transform: none; }
}

/* =========================================================
   CRÈDITS
   ========================================================= */
.credits { border-top: 1px solid var(--line); }
.credits-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 500; margin: 0 0 2.5rem; }
.credits-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 3rem; max-width: 900px; margin: 0 auto; text-align: left; }
.credits-list > div { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); padding-bottom: .9rem; }
.credits-list dt { font-family: var(--sans); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); }
.credits-list dd { margin: .2rem 0 0; font-size: 1.3rem; }

/* =========================================================
   REVEAL — mejora progresiva
   El contenido es VISIBLE por defecto. Solo se oculta para animar
   cuando hay JS activo (classe .js) y el usuario no pide menys moviment.
   Així, sense JS / amb JS lent / a impressió, tot es veu igual.
   ========================================================= */
.reveal { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(30px); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .obra-img { position: static; }
}
@media print {
  .reveal, .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  body { font-size: 18px; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-media { order: -1; }            /* imatge primer en mòbil (ancoratge visual) */
  .hero-img { aspect-ratio: 4 / 3; max-width: 520px; margin: 0 auto; }
  .hero-sub { max-width: none; }
  .includes-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-actions { }
  .btn-primary, .btn-secondary { flex: 1 1 auto; justify-content: center; }
  .showcase-pair { grid-template-columns: 1fr; }
  .pair-top { grid-column: 1; }
  .pair-side { grid-column: 1; }
  .pair-text { grid-column: 1; }
  .poemaris-index { text-align: center; }
  .obra-grid { grid-template-columns: 1fr; }
  .obra-img { position: static; max-width: 420px; margin: 0 auto; }
  .credits-list { grid-template-columns: 1fr; }
  .quote { text-align: center; }
}

@media (max-width: 560px) {
  .includes-grid { grid-template-columns: 1fr; }
  .hero-proof { gap: 1.2rem 1.6rem; }
}
