
* { box-sizing: border-box; }

:root {
  --bg: #080808;
  --bg2: #0d0d0d;
  --panel: #101010;
  --panel2: #141414;
  --text: #f1eee8;
  --muted: #a9a49d;
  --line: rgba(255,255,255,.10);
  --line2: rgba(255,255,255,.16);
  --accent: #b66b2c;
  --blue: #6e8daa;
  --paper: #ddd8ce;
  --max: 1240px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: 82px;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 max(24px, calc((100vw - var(--max))/2));
  background: linear-gradient(to bottom, rgba(8,8,8,.95), rgba(8,8,8,.45), transparent);
  transition: .25s ease;
}

.site-header.scrolled {
  background: rgba(8,8,8,.90);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: .18em;
  font-size: .82rem;
  font-weight: 600;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.24);
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  transform: rotate(45deg);
}
.brand-mark span { transform: rotate(-45deg); }

.nav {
  display: flex;
  gap: 32px;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
}
.nav a { color: var(--muted); }
.nav a:hover, .nav a.active { color: var(--text); }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.menu-toggle span {
  width: 24px;
  height: 1px;
  background: var(--text);
  display: block;
  margin: 7px auto;
}

.hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 120px 24px 80px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 42%, rgba(182,107,44,.10), transparent 27%),
    radial-gradient(circle at 20% 68%, rgba(110,141,170,.07), transparent 24%),
    linear-gradient(145deg, #090909, #050505 72%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .20;
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(255,255,255,.04) 50%, transparent 50.1%),
    linear-gradient(0deg, transparent 49.9%, rgba(255,255,255,.025) 50%, transparent 50.1%);
  background-size: 120px 120px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  width: min(920px, 100%);
}

.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .68rem;
  font-weight: 600;
  margin: 0 0 18px;
}

.hero h1,
.section-heading h2,
.about h2,
.book-page h1,
.series-intro h2,
.sem-feature h3,
.cta h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
}

.hero h1 {
  margin: 0;
  font-size: clamp(5rem, 14vw, 10.4rem);
  line-height: .84;
  letter-spacing: .07em;
}

.hero-line {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: #cbc5bd;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.35;
  margin: 38px auto 0;
  max-width: 680px;
}

.hero-actions, .purchase-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-actions { justify-content: center; margin-top: 42px; }

.btn {
  min-height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .68rem;
  transition: .2s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--text); color: #0b0b0b; }
.btn-ghost { border-color: var(--line2); background: rgba(255,255,255,.01); }
.btn-ghost:hover { border-color: rgba(255,255,255,.4); }

.section {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: 115px 0;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 58px;
}
.section-heading h2, .series-intro h2, .cta h2 {
  margin: 0 0 18px;
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: .92;
}
.section-heading p:last-child, .series-copy, .about p, .cta p { color: var(--muted); }

.series-intro {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(40px, 7vw, 90px);
  align-items: start;
}
.series-copy p {
  margin-top: 0;
}
.series-copy .series-closing {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  color: var(--text);
  line-height: 1.35;
  margin-top: 26px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: clamp(28px, 5vw, 68px);
}

.book-card {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 28px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg,#101010,#0a0a0a);
}

.real-cover {
  aspect-ratio: 1432 / 2048;
  overflow: hidden;
  box-shadow: 0 28px 56px rgba(0,0,0,.5);
  border: 1px solid rgba(255,255,255,.08);
  transition: .3s ease;
  background:#111;
}
.real-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.book-card:hover .real-cover,
.sem-covers figure:hover .real-cover {
  transform: translateY(-7px);
  box-shadow: 0 38px 70px rgba(0,0,0,.62);
}

.book-number {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .64rem;
  margin: 0 0 7px;
}
.book-meta h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.4rem;
  line-height: .95;
  margin: 0 0 14px;
}
.book-meta p { color: var(--muted); font-size: .9rem; }

.text-link {
  display: inline-flex;
  gap: 9px;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .66rem;
  border-bottom: 1px solid var(--line2);
  padding-bottom: 5px;
  margin-top: 8px;
}

.sem-feature {
  margin-top: 80px;
  padding: clamp(28px, 5vw, 60px);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: clamp(36px, 7vw, 86px);
  align-items: center;
  background:
    radial-gradient(circle at 78% 22%, rgba(255,255,255,.07), transparent 25%),
    linear-gradient(145deg,#121212,#090909 70%);
}
.sem-feature h3 {
  font-size: clamp(3.4rem, 6vw, 6rem);
  margin: 0 0 14px;
  line-height: .9;
}
.sem-feature p { color: var(--muted); }
.sem-covers {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: clamp(15px,3vw,32px);
}
.sem-covers figure { margin: 0; }
.sem-covers figcaption {
  text-align: center;
  margin-top: 12px;
  color: #b9b3aa;
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .16em;
}

.quote-band {
  min-height: 410px;
  display: grid;
  place-items: center;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 50%, rgba(182,107,44,.08), transparent 30%),
    #090909;
  padding: 40px 24px;
}
.quote-band blockquote {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem,4vw,4rem);
  line-height: 1.12;
}
.quote-band small {
  color: var(--muted);
  display:block;
  margin-top:18px;
  text-transform:uppercase;
  letter-spacing:.15em;
  font-size:.62rem;
}

.about {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(45px, 8vw, 100px);
  align-items: center;
}
.portrait-placeholder {
  width: min(390px,100%);
  aspect-ratio: 4/5;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  background:
    radial-gradient(circle at 45% 35%, rgba(255,255,255,.08), transparent 20%),
    linear-gradient(145deg,#141414,#070707);
}
.portrait-placeholder span {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(4rem,8vw,7rem);
  color: rgba(255,255,255,.12);
}
.about h2 { font-size: clamp(3rem,6vw,5.2rem); margin:0 0 20px; }

.cta-card {
  border:1px solid var(--line);
  padding: clamp(34px,7vw,84px);
  background: radial-gradient(circle at 90% 0, rgba(182,107,44,.13), transparent 25%), #0b0b0b;
}
.socials { display:flex; gap:12px; flex-wrap:wrap; margin-top:30px; }
.socials a {
  border:1px solid var(--line2);
  padding:11px 15px;
  text-transform:uppercase;
  letter-spacing:.12em;
  font-size:.66rem;
}

footer {
  width:min(calc(100% - 48px),var(--max));
  margin:0 auto;
  border-top:1px solid var(--line);
  padding:34px 0 46px;
  display:flex;
  justify-content:space-between;
  gap:20px;
  color:#75716c;
  font-size:.72rem;
}

/* BOOK PAGES */
.book-page {
  min-height:100vh;
  padding-top:120px;
}
.book-hero {
  width:min(calc(100% - 48px),var(--max));
  margin:0 auto;
  min-height: 720px;
  display:grid;
  grid-template-columns:.72fr 1.28fr;
  gap: clamp(45px,8vw,100px);
  align-items:center;
  padding: 45px 0 95px;
}
.book-hero-cover { max-width:430px; }
.book-page h1 {
  font-size:clamp(4rem,8vw,7rem);
  line-height:.86;
  margin:0 0 22px;
}
.book-page .tagline {
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:clamp(1.45rem,2.5vw,2.15rem);
  line-height:1.35;
  margin: 18px 0 22px;
}
.book-page .short-description {
  color:var(--muted);
  max-width:720px;
}
.book-label {
  color:var(--accent);
  font-size:.67rem;
  text-transform:uppercase;
  letter-spacing:.2em;
  margin:0 0 12px;
}

.synopsis-section {
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:#0b0b0b;
}
.synopsis-inner {
  width:min(calc(100% - 48px),900px);
  margin:0 auto;
  padding:100px 0;
}
.synopsis-inner h2 {
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:clamp(2.8rem,5vw,4.8rem);
  margin:0 0 30px;
}
.synopsis-inner p {
  color:#c8c2b9;
  font-size:1.02rem;
}
.synopsis-inner p.emphasis {
  color:var(--text);
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:1.45rem;
  line-height:1.35;
}

.buy-section {
  width:min(calc(100% - 48px),var(--max));
  margin:0 auto;
  padding:100px 0 120px;
}
.buy-section h2 {
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:clamp(2.8rem,5vw,4.8rem);
  margin:0 0 36px;
}
.store-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}
.store-card {
  border:1px solid var(--line);
  background:linear-gradient(145deg,#111,#0b0b0b);
  padding:28px;
}
.store-card h3 { margin:0 0 4px; font-size:1.1rem; }
.store-card .format {
  color:var(--muted);
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.store-card .price {
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:2rem;
  margin:20px 0;
}
.store-card .btn { width:100%; }

.sem-tome {
  width:min(calc(100% - 48px),var(--max));
  margin:0 auto;
  padding:95px 0;
  display:grid;
  grid-template-columns:.72fr 1.28fr;
  gap:clamp(42px,7vw,90px);
  align-items:start;
  border-bottom:1px solid var(--line);
}
.sem-tome:last-of-type { border-bottom:0; }
.sem-tome .cover-wrap { max-width:400px; }
.sem-tome h2 {
  font-family:"Cormorant Garamond",Georgia,serif;
  font-size:clamp(3.4rem,6vw,5.8rem);
  line-height:.9;
  margin:0 0 20px;
}
.sem-tome .short-description { color:var(--muted); }
.sem-tome .synopsis-copy { margin-top:28px; }
.sem-tome .synopsis-copy p { color:#c8c2b9; }
.sem-tome .store-grid { margin-top:34px; }

.back-link {
  display:inline-flex;
  gap:8px;
  margin-bottom:24px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.65rem;
}

.reveal {
  opacity:0;
  transform:translateY(22px);
  transition:opacity .75s ease, transform .75s ease;
}
.reveal.visible {
  opacity:1;
  transform:translateY(0);
}

@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  .reveal { opacity:1; transform:none; transition:none; }
}

@media (max-width: 980px) {
  .series-intro, .about, .book-hero, .sem-tome, .sem-feature {
    grid-template-columns:1fr;
  }
  .book-grid { grid-template-columns:1fr; }
  .store-grid { grid-template-columns:1fr; }
  .book-hero-cover, .sem-tome .cover-wrap { max-width:380px; }
  .sem-feature { gap:40px; }
}

@media (max-width: 700px) {
  .site-header { height:72px; }
  .menu-toggle { display:block; position:relative; z-index:3; }
  .nav {
    position:fixed;
    inset:0;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:28px;
    background:rgba(6,6,6,.98);
    transform:translateY(-100%);
    transition:.3s ease;
  }
  .nav.open { transform:translateY(0); }
  .nav a {
    font-family:"Cormorant Garamond",Georgia,serif;
    font-size:2.3rem;
    text-transform:none;
    letter-spacing:.02em;
  }
  .section, .book-hero, .buy-section, .sem-tome, footer {
    width:min(calc(100% - 36px),var(--max));
  }
  .section { padding:85px 0; }
  .book-card {
    grid-template-columns:1fr;
  }
  .book-card .real-cover { max-width:320px; }
  .sem-covers { gap:12px; }
  .book-page { padding-top:92px; }
}


/* ===== V4 — identidade de autor, não limitada à Trilogia Mark ===== */

.author-hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 130px max(24px, calc((100vw - var(--max))/2)) 90px;
  background:
    radial-gradient(circle at 72% 30%, rgba(182,107,44,.12), transparent 26%),
    radial-gradient(circle at 28% 72%, rgba(110,141,170,.07), transparent 24%),
    linear-gradient(135deg, #0a0a0a 0%, #060606 55%, #0a0807 100%);
}

.author-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 48%, rgba(255,255,255,.018) 49%, transparent 50%),
    radial-gradient(circle at 75% 50%, rgba(255,255,255,.04), transparent 18%);
  pointer-events: none;
}

.author-hero::after {
  content: "";
  position: absolute;
  width: min(44vw, 610px);
  aspect-ratio: 1;
  right: -7vw;
  top: 50%;
  transform: translateY(-50%) rotate(16deg);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow:
    0 0 0 70px rgba(255,255,255,.018),
    0 0 0 140px rgba(255,255,255,.012),
    0 0 110px rgba(182,107,44,.05);
}

.author-hero-inner {
  position: relative;
  z-index: 2;
  width: min(820px, 100%);
}

.author-hero h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(5.5rem, 13vw, 10.5rem);
  line-height: .8;
  letter-spacing: .07em;
  margin: 0;
  font-weight: 600;
}

.author-hero .manifesto {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.55rem, 3vw, 2.5rem);
  line-height: 1.25;
  max-width: 720px;
  margin: 38px 0 0;
  color: #d5cec4;
}

.author-hero .manifesto strong {
  color: var(--text);
  font-weight: 600;
}

.author-hero .subline {
  color: var(--muted);
  max-width: 620px;
  margin: 22px 0 0;
  font-size: .95rem;
}

.author-hero .hero-actions {
  justify-content: flex-start;
}

.library-heading {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: end;
  margin-bottom: 48px;
}

.library-heading > div:last-child {
  max-width: 560px;
  color: var(--muted);
}

.series-shell {
  border: 1px solid var(--line);
  padding: clamp(28px, 5vw, 64px);
  background:
    radial-gradient(circle at 84% 10%, rgba(110,141,170,.08), transparent 22%),
    linear-gradient(145deg, #101010, #090909 72%);
}

.series-shell .series-top {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(36px, 7vw, 84px);
  align-items: start;
  margin-bottom: 52px;
}

.series-shell .series-top h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3rem, 6vw, 5.7rem);
  line-height: .9;
  margin: 0 0 12px;
}

.series-shell .series-top p {
  color: var(--muted);
}

.series-books {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 2vw, 26px);
  align-items: end;
}

.series-book {
  min-width: 0;
}

.series-book .real-cover {
  width: 100%;
}

.series-book h4 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
  margin: 14px 0 2px;
}

.series-book p {
  margin: 0;
  color: var(--muted);
  font-size: .75rem;
}

.future-note {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 30px;
  color: var(--muted);
  align-items: center;
}

.future-note strong {
  color: var(--text);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 500;
}

.about-v4 {
  display: grid;
  grid-template-columns: minmax(280px,.85fr) minmax(0,1.15fr);
  gap: clamp(48px,8vw,110px);
  align-items: center;
}

.author-photo {
  position: relative;
  max-width: 520px;
}

.author-photo::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid rgba(182,107,44,.28);
  z-index: -1;
}

.author-photo img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--line);
  filter: saturate(.88) contrast(1.03);
  box-shadow: 0 34px 80px rgba(0,0,0,.55);
}

.about-v4 .author-copy h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3.2rem,6vw,5.4rem);
  line-height: .9;
  margin: 0 0 26px;
}

.about-v4 .author-copy p {
  color: #b8b2aa;
  max-width: 720px;
}

.about-v4 .author-copy p.signature-line {
  color: var(--text);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  line-height: 1.35;
  margin-top: 28px;
}

@media (max-width: 980px) {
  .series-shell .series-top,
  .about-v4 {
    grid-template-columns: 1fr;
  }
  .series-books {
    grid-template-columns: repeat(2, 1fr);
  }
  .library-heading {
    display: block;
  }
  .library-heading > div:last-child {
    margin-top: 20px;
  }
}

@media (max-width: 620px) {
  .series-books {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .future-note {
    display: block;
  }
  .future-note .btn {
    margin-top: 18px;
  }
  .author-photo {
    max-width: 420px;
  }
  .author-hero::after {
    width: 100vw;
    right: -65vw;
  }
}


/* ===== V5 — imagem real no hero e texto editorial corrigido ===== */

.author-hero {
  display: block;
}

.author-hero::after {
  display: none;
}

.author-hero-layout {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max));
  margin: 0 auto;
  min-height: calc(100vh - 220px);
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(390px, 1.08fr);
  gap: clamp(46px, 7vw, 100px);
  align-items: center;
}

.author-hero-inner {
  width: 100%;
}

.hero-visual {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 36px 90px rgba(0,0,0,.58);
  background: #0b0b0b;
  isolation: isolate;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(182,107,44,.22);
  z-index: 3;
  pointer-events: none;
}

.hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(1.06);
  filter: brightness(.82) contrast(1.08) saturate(.78);
}

.hero-visual-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to right, rgba(8,8,8,.58) 0%, transparent 28%),
    linear-gradient(to top, rgba(8,8,8,.40), transparent 45%),
    radial-gradient(circle at 66% 45%, transparent 0 28%, rgba(4,4,4,.18) 68%, rgba(4,4,4,.48) 100%);
  pointer-events: none;
}

.future-note {
  background: rgba(255,255,255,.012);
  padding: 26px 0 0;
}

@media (max-width: 980px) {
  .author-hero-layout {
    grid-template-columns: 1fr;
    padding-top: 30px;
  }

  .hero-visual {
    min-height: 460px;
  }
}

@media (max-width: 620px) {
  .author-hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .author-hero-layout {
    min-height: auto;
  }

  .hero-visual {
    min-height: 360px;
  }

  .hero-visual::before {
    inset: 9px;
  }
}


/* ===== V6 — ecrã de entrada cinematográfico ===== */

body.intro-active {
  overflow: hidden;
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #050505;
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease, visibility 1s ease;
}

.intro-screen.intro-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-bg {
  position: absolute;
  inset: -3%;
  background-image: url("../images/intro-mnox.webp");
  background-size: cover;
  background-position: center center;
  transform: scale(1.045);
  filter: brightness(.76) saturate(.82);
  animation: introDrift 15s ease-out forwards;
}

.intro-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4,4,4,.94) 0%, rgba(4,4,4,.77) 28%, rgba(4,4,4,.30) 58%, rgba(4,4,4,.18) 100%),
    linear-gradient(0deg, rgba(3,3,3,.68) 0%, transparent 40%),
    radial-gradient(circle at 72% 42%, transparent 0 18%, rgba(0,0,0,.18) 48%, rgba(0,0,0,.48) 100%);
}

.intro-content {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  transform: translateY(8px);
}

.intro-kicker,
.intro-title,
.intro-text,
.intro-enter {
  opacity: 0;
  transform: translateY(18px);
}

.intro-ready .intro-kicker {
  animation: introFadeUp .8s .3s ease forwards;
}

.intro-ready .intro-title {
  animation: introFadeUp 1.15s .72s ease forwards;
}

.intro-ready .intro-text {
  animation: introFadeUp 1s 1.45s ease forwards;
}

.intro-ready .intro-enter {
  animation: introFadeUp .85s 2.2s ease forwards;
}

.intro-kicker {
  margin: 0 0 10px;
  color: #c4864e;
  font-size: .68rem;
  letter-spacing: .28em;
  font-weight: 600;
}

.intro-title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(5.8rem, 14vw, 11.5rem);
  line-height: .78;
  letter-spacing: .07em;
  font-weight: 600;
  text-shadow: 0 10px 45px rgba(0,0,0,.55);
}

.intro-text {
  margin: 34px 0 0;
  max-width: 610px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.4rem, 2.5vw, 2.15rem);
  line-height: 1.32;
  color: #d9d1c7;
}

.intro-enter {
  margin-top: 36px;
  min-width: 170px;
  min-height: 50px;
  border: 1px solid rgba(219,169,111,.55);
  background: rgba(7,7,7,.42);
  color: #f0ece5;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .66rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}

.intro-enter:hover {
  background: rgba(182,107,44,.13);
  border-color: rgba(228,182,127,.9);
  transform: translateY(-2px);
}

.intro-line {
  position: absolute;
  left: max(24px, calc((100vw - var(--max))/2));
  right: max(24px, calc((100vw - var(--max))/2));
  bottom: 35px;
  height: 1px;
  background: linear-gradient(to right, rgba(182,107,44,.42), rgba(255,255,255,.08), transparent);
  opacity: 0;
}

.intro-ready .intro-line {
  animation: introLine 1.5s 2.55s ease forwards;
}

.intro-leaving .intro-content,
.intro-leaving .intro-line {
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .55s ease, transform .7s ease;
}

.intro-leaving .intro-bg {
  transform: scale(1.09);
  filter: brightness(.42) saturate(.6);
  transition: transform 1.2s ease, filter 1.2s ease;
}

.intro-leaving {
  opacity: 0;
  transition: opacity 1s .15s ease;
}

body.intro-active .site-header {
  opacity: 0;
  pointer-events: none;
}

body.site-entering .site-header,
body.site-entered .site-header {
  animation: siteHeaderIn .7s .3s ease both;
}

.library-first {
  padding-top: 150px;
}

@keyframes introFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes introLine {
  from { opacity: 0; transform: scaleX(.2); transform-origin: left; }
  to { opacity: 1; transform: scaleX(1); transform-origin: left; }
}

@keyframes introDrift {
  from { transform: scale(1.045); }
  to { transform: scale(1.085); }
}

@keyframes siteHeaderIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .intro-bg {
    background-position: 62% center;
  }

  .intro-overlay {
    background:
      linear-gradient(0deg, rgba(4,4,4,.92) 0%, rgba(4,4,4,.50) 48%, rgba(4,4,4,.22) 100%),
      linear-gradient(90deg, rgba(4,4,4,.60), rgba(4,4,4,.10));
  }

  .intro-content {
    align-self: end;
    padding-bottom: 100px;
  }

  .intro-title {
    font-size: clamp(4.6rem, 22vw, 7.5rem);
  }

  .intro-text {
    max-width: 430px;
  }

  .intro-line {
    bottom: 26px;
    left: 18px;
    right: 18px;
  }

  .library-first {
    padding-top: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-bg,
  .intro-kicker,
  .intro-title,
  .intro-text,
  .intro-enter,
  .intro-line {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .intro-screen,
  .intro-leaving,
  .intro-leaving .intro-content,
  .intro-leaving .intro-bg {
    transition-duration: .15s;
  }
}


/* ===== V9 — contactos reais + email visível + compras sem preços ===== */

.contact-email {
  margin: 26px 0 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.contact-email span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .64rem;
}

.contact-email a {
  color: var(--text);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  border-bottom: 1px solid rgba(255,255,255,.18);
  padding-bottom: 2px;
  transition: border-color .2s ease, color .2s ease;
}

.contact-email a:hover {
  border-color: rgba(182,107,44,.72);
  color: #fff;
}

.store-card .format {
  margin-bottom: 24px;
}

.store-card .price {
  display: none;
}


/* ===== V10 — refinamento cinematográfico da intro ===== */

/* Movimento da imagem: zoom muito lento + deslocação lateral/vertical */
.intro-bg {
  transform: scale(1.055) translate3d(0, 0, 0);
  animation: introCinematicDrift 18s cubic-bezier(.18,.7,.2,1) forwards;
  will-change: transform, filter, opacity;
}

/* O overlay respira muito subtilmente, sem parecer uma animação decorativa. */
.intro-overlay {
  animation: introOverlayBreathe 8s ease-in-out infinite alternate;
}

/* O botão passa a ter um pequeno indicador vivo à direita. */
.intro-enter {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 18px 0 22px;
  min-width: 188px;
}

.intro-enter-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 20px;
}

.intro-enter-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d6a06a;
  box-shadow: 0 0 0 0 rgba(214,160,106,.45);
  animation: introDotPulse 2s ease-out infinite;
}

.intro-enter-arrow {
  display: inline-block;
  color: #d6a06a;
  font-size: .9rem;
  line-height: 1;
  transform: translateX(0);
  transition: transform .25s ease;
}

.intro-enter:hover .intro-enter-arrow,
.intro-enter:focus-visible .intro-enter-arrow {
  transform: translateX(4px);
}

.intro-enter:focus-visible {
  outline: 1px solid rgba(228,182,127,.92);
  outline-offset: 4px;
}

/* Fade de saída em camadas:
   1. texto/botão
   2. linha
   3. imagem
   4. ecrã inteiro
*/
.intro-leaving .intro-kicker {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .28s ease, transform .38s ease;
}

.intro-leaving .intro-title {
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .38s .05s ease, transform .48s .05s ease;
}

.intro-leaving .intro-text {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .42s .12s ease, transform .52s .12s ease;
}

.intro-leaving .intro-enter {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .28s .03s ease, transform .38s .03s ease;
}

.intro-leaving .intro-line {
  opacity: 0;
  transform: scaleX(.72);
  transform-origin: left;
  transition: opacity .34s .22s ease, transform .55s .16s ease;
}

/* A imagem fica um pouco mais tempo e aproxima-se ligeiramente antes de desaparecer. */
.intro-leaving .intro-bg {
  opacity: .72;
  transform: scale(1.105) translate3d(-.6%, -.4%, 0);
  filter: brightness(.50) saturate(.62) blur(.2px);
  transition:
    transform 1.15s cubic-bezier(.2,.75,.2,1),
    filter 1.05s ease,
    opacity .75s .28s ease;
}

/* Overlay desaparece a meio da transição, criando separação entre texto e imagem. */
.intro-leaving .intro-overlay {
  opacity: .34;
  transition: opacity .7s .22s ease;
}

/* O content já é tratado elemento a elemento nesta versão. */
.intro-leaving .intro-content {
  opacity: 1;
  transform: translateY(0);
  transition: none;
}

/* O ecrã só fecha no fim, evitando um fade geral demasiado cedo. */
.intro-leaving {
  opacity: 1;
  transition: opacity .35s .72s ease;
}

@keyframes introCinematicDrift {
  0% {
    transform: scale(1.055) translate3d(0, 0, 0);
  }
  45% {
    transform: scale(1.075) translate3d(-.35%, -.15%, 0);
  }
  100% {
    transform: scale(1.095) translate3d(-.75%, -.35%, 0);
  }
}

@keyframes introOverlayBreathe {
  from { opacity: .94; }
  to { opacity: 1; }
}

@keyframes introDotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(214,160,106,.42);
    opacity: .72;
  }
  55% {
    box-shadow: 0 0 0 6px rgba(214,160,106,0);
    opacity: 1;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(214,160,106,0);
    opacity: .72;
  }
}

@media (max-width: 760px) {
  .intro-enter {
    min-width: 178px;
  }

  .intro-bg {
    animation-duration: 16s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-bg,
  .intro-overlay,
  .intro-enter-dot {
    animation: none !important;
  }

  .intro-enter-arrow {
    transition: none;
  }
}


/* ===== V11 — indicador alinhado + transição intro/site mais suave ===== */

.intro-enter-indicator {
  display: inline-grid;
  grid-template-columns: 8px 14px;
  align-items: center;
  justify-items: center;
  column-gap: 5px;
  height: 24px;
  line-height: 1;
}

.intro-enter-dot {
  display: block;
  margin: 0;
  align-self: center;
}

.intro-enter-arrow {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  line-height: 1;
  font-family: Arial, sans-serif;
  font-size: 13px;
  transform: translate(0, 0);
}

.intro-enter:hover .intro-enter-arrow,
.intro-enter:focus-visible .intro-enter-arrow {
  transform: translate(4px, 0);
}

/* Véu negro que recebe a imagem antes de revelar o site. */
.site-transition-veil {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #050505;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .5s ease;
}

.site-transition-veil.veil-in {
  visibility: visible;
  opacity: 1;
}

.site-transition-veil.veil-out {
  visibility: visible;
  opacity: 0;
  transition: opacity .9s cubic-bezier(.22,.7,.25,1);
}

.site-transition-veil.veil-hidden {
  visibility: hidden;
  opacity: 0;
}

/* Mantém o site escondido enquanto o véu recebe a intro. */
body.site-entering main,
body.site-entering footer,
body.site-entering .site-header {
  opacity: 0;
}

/* O site surge por baixo do véu com um movimento quase imperceptível. */
body.site-entered main,
body.site-entered footer {
  animation: siteBodyReveal .95s .06s cubic-bezier(.22,.7,.25,1) both;
}

body.site-entered .site-header {
  animation: siteHeaderIn .8s .18s cubic-bezier(.22,.7,.25,1) both;
}

@keyframes siteBodyReveal {
  from {
    opacity: 0;
    transform: translateY(7px);
    filter: brightness(.82);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: brightness(1);
  }
}

/* A imagem mergulha no negro antes de desaparecer. */
.intro-leaving .intro-bg {
  opacity: .42;
  transform: scale(1.115) translate3d(-.75%, -.55%, 0);
  filter: brightness(.28) saturate(.54) blur(.35px);
  transition:
    transform 1.15s cubic-bezier(.2,.75,.2,1),
    filter 1.05s ease,
    opacity .66s .30s ease;
}

.intro-leaving .intro-overlay {
  opacity: .72;
  background: #050505;
  transition: opacity .72s .20s ease, background .72s .20s ease;
}

/* O véu passa a controlar o último fade; a intro já não corta para o site. */
.intro-leaving {
  opacity: 1;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .site-transition-veil,
  .site-transition-veil.veil-out {
    transition-duration: .15s;
  }

  body.site-entered main,
  body.site-entered footer,
  body.site-entered .site-header {
    animation-duration: .15s;
    animation-delay: 0s;
  }
}


/* ===== V12 — fade real do texto + indicador sem seta ===== */

/* O indicador fica reduzido a um único ponto subtil. */
.intro-enter {
  min-width: 170px;
  gap: 18px;
}

.intro-enter-indicator {
  display: grid;
  place-items: center;
  width: 14px;
  height: 24px;
  line-height: 1;
}

.intro-enter-dot {
  width: 4px;
  height: 4px;
  margin: 0;
  align-self: center;
  justify-self: center;
}

/* A seta foi removida do HTML; esta regra garante que não sobra espaço dela. */
.intro-enter-arrow {
  display: none !important;
}

/*
  IMPORTANTE:
  As animações de entrada usam animation-fill-mode: forwards.
  Por isso, na saída substituímos explicitamente essas animações por
  keyframes próprios. Assim a opacidade já não fica "presa" em 1.
*/
.intro-leaving .intro-kicker {
  animation: introKickerOut .52s .06s cubic-bezier(.4,0,.2,1) forwards !important;
}

.intro-leaving .intro-title {
  animation: introTitleOut .82s .12s cubic-bezier(.4,0,.2,1) forwards !important;
}

.intro-leaving .intro-text {
  animation: introTextOut .68s .02s cubic-bezier(.4,0,.2,1) forwards !important;
}

.intro-leaving .intro-enter {
  animation: introButtonOut .44s 0s cubic-bezier(.4,0,.2,1) forwards !important;
}

.intro-leaving .intro-line {
  animation: introLineOut .62s .16s cubic-bezier(.4,0,.2,1) forwards !important;
}

@keyframes introButtonOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes introTextOut {
  from {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
    filter: blur(.7px);
  }
}

@keyframes introKickerOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-5px);
  }
}

@keyframes introTitleOut {
  0% {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: .07em;
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-9px);
    letter-spacing: .085em;
    filter: blur(.6px);
  }
}

@keyframes introLineOut {
  from {
    opacity: 1;
    transform: scaleX(1);
    transform-origin: left;
  }
  to {
    opacity: 0;
    transform: scaleX(.72);
    transform-origin: left;
  }
}

/* A imagem continua depois do texto e afunda-se gradualmente no negro. */
.intro-leaving .intro-bg {
  opacity: .18;
  transform: scale(1.12) translate3d(-.8%, -.6%, 0);
  filter: brightness(.18) saturate(.50) blur(.45px);
  transition:
    transform 1.42s cubic-bezier(.2,.75,.2,1),
    filter 1.35s ease,
    opacity 1.05s .25s ease;
}

.intro-leaving .intro-overlay {
  opacity: .92;
  background: #050505;
  transition:
    opacity 1.12s .18s ease,
    background 1.12s .18s ease;
}

/* O véu entra devagar, em vez de fechar a imagem num instante. */
.site-transition-veil {
  transition: opacity .46s ease;
}

.site-transition-veil.veil-out {
  transition: opacity 1.14s cubic-bezier(.22,.7,.25,1);
}

/* O conteúdo do site também entra um pouco mais progressivamente. */
body.site-entered main,
body.site-entered footer {
  animation: siteBodyRevealV12 1.08s .08s cubic-bezier(.22,.7,.25,1) both;
}

body.site-entered .site-header {
  animation: siteHeaderRevealV12 .9s .20s cubic-bezier(.22,.7,.25,1) both;
}

@keyframes siteBodyRevealV12 {
  from {
    opacity: 0;
    transform: translateY(5px);
    filter: brightness(.74);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: brightness(1);
  }
}

@keyframes siteHeaderRevealV12 {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-leaving .intro-kicker,
  .intro-leaving .intro-title,
  .intro-leaving .intro-text,
  .intro-leaving .intro-enter,
  .intro-leaving .intro-line {
    animation-duration: .15s !important;
    animation-delay: 0s !important;
  }
}


/* ===== V13 — tipografia do título da intro ===== */

.intro-title {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 500;
  letter-spacing: .025em;
  font-size: clamp(5.3rem, 12.5vw, 10.2rem);
  line-height: .82;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

/* O fade de saída mantém o título coeso, sem abrir demasiado as letras. */
@keyframes introTitleOut {
  0% {
    opacity: 1;
    transform: translateY(0);
    letter-spacing: .025em;
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-9px);
    letter-spacing: .035em;
    filter: blur(.6px);
  }
}

@media (max-width: 760px) {
  .intro-title {
    font-size: clamp(4.4rem, 19vw, 7rem);
    letter-spacing: .018em;
  }
}


/* ===== V14 — arquitectura escalável para séries e futuros livros ===== */

.collection-grid {
  display: grid;
  gap: 30px;
}

.collection-card {
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 15% 20%, rgba(110,141,170,.10), transparent 22%),
    linear-gradient(145deg,#101010,#090909 72%);
  padding: clamp(28px, 5vw, 58px);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(36px, 6vw, 78px);
  align-items: center;
  overflow: hidden;
}

.collection-card-visual {
  min-width: 0;
}

.collection-cover-stack {
  min-height: 430px;
  position: relative;
  display: grid;
  place-items: center;
}

.collection-cover-stack img {
  position: absolute;
  width: min(42%, 220px);
  aspect-ratio: 1432/2048;
  object-fit: cover;
  box-shadow: 0 28px 65px rgba(0,0,0,.58);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .35s ease;
}

.collection-cover-stack img:nth-child(1) {
  transform: translateX(-54%) rotate(-5deg);
  z-index: 1;
}

.collection-cover-stack img:nth-child(2) {
  transform: translateX(0) translateY(-10px);
  z-index: 3;
}

.collection-cover-stack img:nth-child(3) {
  transform: translateX(54%) rotate(5deg);
  z-index: 2;
}

.collection-card:hover .collection-cover-stack img:nth-child(1) {
  transform: translateX(-58%) rotate(-6deg) translateY(-4px);
}

.collection-card:hover .collection-cover-stack img:nth-child(2) {
  transform: translateX(0) translateY(-16px);
}

.collection-card:hover .collection-cover-stack img:nth-child(3) {
  transform: translateX(58%) rotate(6deg) translateY(-4px);
}

.collection-card-copy h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3rem, 5.5vw, 5.4rem);
  line-height: .9;
  margin: 0 0 20px;
}

.collection-card-copy p:not(.book-number) {
  color: var(--muted);
  max-width: 560px;
}

.collection-card-copy .btn {
  margin-top: 16px;
}

.library-more {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: var(--muted);
}

.library-page,
.series-page {
  padding-top: 96px;
}

.library-page-head h1,
.series-page-hero h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(4rem, 8vw, 7rem);
  line-height: .85;
  margin: 0 0 24px;
  font-weight: 600;
}

.library-page-head > p:last-child {
  color: var(--muted);
  max-width: 680px;
}

.library-page-content {
  padding-top: 10px;
}

.library-series-card {
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 16% 18%, rgba(110,141,170,.10), transparent 24%),
    linear-gradient(145deg,#101010,#090909 72%);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(38px, 7vw, 88px);
  align-items: center;
  padding: clamp(30px, 5vw, 62px);
}

.library-series-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: end;
}

.library-series-covers img {
  width: 100%;
  aspect-ratio: 1432/2048;
  object-fit: cover;
  box-shadow: 0 22px 50px rgba(0,0,0,.52);
  border: 1px solid rgba(255,255,255,.07);
}

.library-series-copy h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3rem, 5vw, 5.2rem);
  line-height: .9;
  margin: 0 0 20px;
}

.library-series-copy p:not(.book-number) {
  color: var(--muted);
}

.library-series-copy .btn {
  margin-top: 16px;
}

.future-library-slot {
  min-height: 160px;
  margin-top: 40px;
  border: 1px dashed rgba(255,255,255,.11);
  display: grid;
  place-items: center;
  text-align: center;
  color: #6f6b65;
  position: relative;
  overflow: hidden;
}

.future-library-slot p {
  position: relative;
  z-index: 1;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .64rem;
}

.future-library-line {
  position: absolute;
  width: 38%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(182,107,44,.28), transparent);
}

.series-page-hero {
  padding-bottom: 55px;
}

.series-page-intro {
  max-width: 830px;
  color: var(--muted);
}

.series-page-intro .series-closing {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--text);
  font-size: 1.48rem;
  line-height: 1.35;
  margin-top: 28px;
}

.series-page-books {
  padding-top: 30px;
}

.series-page-book {
  display: grid;
  grid-template-columns: minmax(220px, .52fr) minmax(0, 1.48fr);
  gap: clamp(38px, 7vw, 90px);
  align-items: center;
  padding: 62px 0;
  border-top: 1px solid var(--line);
}

.series-page-cover {
  display: block;
  max-width: 360px;
}

.series-page-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 1432/2048;
  object-fit: cover;
  box-shadow: 0 28px 65px rgba(0,0,0,.56);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .3s ease, box-shadow .3s ease;
}

.series-page-cover:hover img {
  transform: translateY(-6px);
  box-shadow: 0 38px 75px rgba(0,0,0,.66);
}

.series-page-book h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: .9;
  margin: 0 0 18px;
}

.series-page-book > div:last-child > p:not(.book-number) {
  color: var(--muted);
  max-width: 680px;
}

.series-page-double-cover {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
  max-width: 500px;
}

.series-page-double-cover .series-page-cover {
  max-width: none;
}

@media (max-width: 980px) {
  .collection-card,
  .library-series-card,
  .series-page-book {
    grid-template-columns: 1fr;
  }

  .collection-cover-stack {
    min-height: 390px;
  }

  .library-series-covers {
    max-width: 700px;
  }

  .series-page-cover {
    max-width: 320px;
  }

  .series-page-double-cover {
    max-width: 440px;
  }
}

@media (max-width: 620px) {
  .collection-card {
    padding: 24px 18px;
  }

  .collection-cover-stack {
    min-height: 320px;
  }

  .collection-cover-stack img {
    width: min(45%, 170px);
  }

  .library-more {
    display: block;
  }

  .library-more .text-link {
    margin-top: 14px;
  }

  .library-series-card {
    padding: 22px 16px;
  }

  .library-series-covers {
    grid-template-columns: repeat(2, 1fr);
  }

  .series-page-book {
    padding: 46px 0;
  }

  .series-page-double-cover {
    gap: 10px;
  }
}


/* ===== V15 — acabamentos profissionais / acessibilidade ===== */

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: #f2efe9;
  color: #080808;
  border: 1px solid #080808;
  font-size: .78rem;
  transform: translateY(-160%);
  transition: transform .18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #d39a62;
  outline-offset: 4px;
}

img {
  height: auto;
}

@media (max-width: 700px) {
  .nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }
}


.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 130px 24px 80px;
  background:
    radial-gradient(circle at 70% 35%, rgba(182,107,44,.09), transparent 22%),
    #080808;
}

.error-card {
  width: min(900px, 100%);
}

.error-card h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3.4rem, 8vw, 7rem);
  line-height: .9;
  margin: 0 0 26px;
}

.error-card > p:not(.eyebrow) {
  max-width: 600px;
  color: var(--muted);
  font-size: 1rem;
}

.error-card .hero-actions {
  justify-content: flex-start;
  margin-top: 34px;
}


body.intro-active .skip-link {
  display: none;
}


/* ===== V16 — identidade M. Nox / Opção 2 ===== */

.brand {
  gap: 11px;
}

.brand-mark-logo {
  width: 42px;
  height: 42px;
  border: 0;
  transform: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  flex: 0 0 auto;
}

.brand-mark-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  transform: scale(1.02);
  filter: contrast(1.03) saturate(.94);
}

.brand-wordmark {
  font-family: "Cinzel", Georgia, serif;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .16em;
  color: #f0ece5;
  white-space: nowrap;
}

.site-header.scrolled .brand-mark-logo {
  filter: drop-shadow(0 0 8px rgba(182,107,44,.08));
}

@media (max-width: 700px) {
  .brand-mark-logo {
    width: 38px;
    height: 38px;
  }

  .brand-wordmark {
    font-size: .78rem;
    letter-spacing: .13em;
  }
}


/* ===== V17 — monograma MN limpo / asset transparente ===== */

.brand-mark-logo {
  overflow: visible;
  border-radius: 0;
}

.brand-mark-logo img {
  object-fit: contain;
  border-radius: 0;
  transform: none;
  filter: none;
}

.site-header.scrolled .brand-mark-logo {
  filter: none;
}


/* ===== V18 — afinação mobile / iPhone ===== */

/* Corrige o menu mobile para que nenhum link "escape" quando está fechado. */
@media (max-width: 700px) {
  .nav {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: rgba(6,6,6,.985);
    backdrop-filter: blur(16px);
    transform: translateY(-105%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform .34s cubic-bezier(.22,.7,.25,1),
      opacity .26s ease,
      visibility .34s ease;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav a {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 2.3rem;
    line-height: 1.05;
    min-height: auto;
    display: block;
    text-transform: none;
    letter-spacing: .02em;
  }

  .menu-toggle {
    display: block;
    position: relative;
    z-index: 50;
  }

  .brand {
    position: relative;
    z-index: 50;
  }
}

/* iPhone / telemóveis estreitos: enquadramento mais favorável da intro */
@media (max-width: 520px) {
  .intro-bg {
    background-position: 68% 18%;
  }

  .intro-content {
    padding-bottom: 76px;
  }

  .intro-title {
    font-size: clamp(4.15rem, 19vw, 6.2rem);
    line-height: .84;
  }

  .intro-text {
    max-width: 330px;
    font-size: 1.18rem;
    line-height: 1.42;
  }

  .intro-enter {
    margin-top: 30px;
  }

  .collection-card {
    gap: 30px;
  }

  .collection-card-copy {
    padding-top: 10px;
  }

  .collection-card-copy .book-number {
    margin-top: 6px;
    margin-bottom: 10px;
  }

  .collection-card-copy h3 {
    margin-top: 0;
  }
}


/* ===== V19 — afinação iPad / tablet ===== */

/* Tablets em retrato: recuperar mais do olho/rosto na intro sem afectar iPhone. */
@media (min-width: 701px) and (max-width: 980px) {
  .intro-bg {
    background-position: 64% 22%;
  }

  .intro-content {
    padding-bottom: 58px;
  }

  .collection-card {
    gap: 44px;
  }

  .collection-card-copy {
    padding-top: 18px;
  }

  .collection-card-copy .book-number {
    margin-top: 8px;
    margin-bottom: 12px;
  }
}

/* iPad Mini / tablets próximos de 768 px: um pouco mais de respiro no cartão. */
@media (min-width: 740px) and (max-width: 820px) {
  .collection-cover-stack {
    margin-bottom: 18px;
  }
}


/* ===== V20 — menu mobile corrigido + afinação final iPad ===== */

@media (max-width: 700px) {
  /*
    O header usa animações com transform. Um position:fixed dentro de um
    ancestral transformado pode ficar limitado à caixa do header.
    Por isso damos ao menu dimensões explícitas do viewport.
  */
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    width: 100vw;
    height: 100dvh;
    min-height: 100vh;
    z-index: 45;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;

    padding: 88px 24px 48px;
    background: rgba(6,6,6,.985);
    backdrop-filter: blur(16px);

    transform: translateY(-102%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
      transform .34s cubic-bezier(.22,.7,.25,1),
      opacity .26s ease,
      visibility .34s ease;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav a {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.72rem;
    line-height: 1.1;
    font-weight: 500;
    min-height: auto;
    padding: 8px 14px;
    display: block;
    text-transform: none;
    letter-spacing: .025em;
    color: #d3cdc4;
  }

  .nav a:hover,
  .nav a:focus-visible,
  .nav a.active {
    color: var(--text);
  }

  .brand,
  .menu-toggle {
    z-index: 50;
  }
}

/* Reduz ligeiramente o excesso de espaço detectado no iPad Mini. */
@media (min-width: 740px) and (max-width: 820px) {
  .collection-cover-stack {
    margin-bottom: 0;
  }

  .collection-card-copy {
    padding-top: 4px;
  }
}


/* ===== V21 — correcção dos links de topo ===== */

#topo {
  scroll-margin-top: 0;
}


/* ===== V23 — microafinações finais de pré-publicação ===== */

/* Mais contraste apenas no texto corrido que estava demasiado discreto. */
.about-v4 .author-copy p:not(.signature-line),
.series-page-intro,
.series-page-book > div:last-child > p:not(.book-number),
.collection-card-copy p:not(.book-number),
.library-series-copy p:not(.book-number) {
  color: #beb8af;
}

/* Mantém o texto de destaque do autor claramente acima do corpo normal. */
.about-v4 .author-copy p.signature-line {
  color: var(--text);
}


/* ===== V26 — Protocolo Perfeito ===== */

.collection-protocolo,
.library-series-protocolo {
  background:
    radial-gradient(circle at 16% 18%, rgba(146,47,56,.13), transparent 24%),
    radial-gradient(circle at 82% 15%, rgba(182,107,44,.08), transparent 24%),
    linear-gradient(145deg,#100b0c,#080808 72%);
}

.protocol-cover-stack {
  min-height: 430px;
  position: relative;
  display: grid;
  place-items: center;
}

.protocol-placeholder {
  position: relative;
  aspect-ratio: 2 / 3.05;
  overflow: hidden;
  border: 1px solid rgba(194,126,112,.24);
  background:
    linear-gradient(155deg, rgba(121,32,43,.18), transparent 34%),
    radial-gradient(circle at 66% 28%, rgba(182,107,44,.12), transparent 25%),
    linear-gradient(145deg,#151011,#070707 72%);
  box-shadow: 0 28px 60px rgba(0,0,0,.54);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px 22px;
  color: #eee7df;
  isolation: isolate;
}

.protocol-placeholder::before {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 50%;
  transform: scaleX(.68);
  z-index: -1;
}

.protocol-placeholder::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 120%;
  left: 50%;
  top: -10%;
  background: linear-gradient(to bottom, transparent, rgba(182,107,44,.28), transparent);
  transform: rotate(27deg);
  z-index: -1;
}

.protocol-placeholder strong {
  margin: auto 0;
  text-align: center;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.25rem, 2.4vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: .08em;
  font-weight: 500;
}

.protocol-placeholder small,
.protocol-kicker {
  font-size: .56rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: #b7aaa3;
}

.protocol-placeholder small {
  text-align: right;
}

.protocol-placeholder.mini {
  position: absolute;
  width: min(42%, 210px);
}

.protocol-placeholder.mini:nth-child(1) {
  transform: translateX(-55%) rotate(-5deg);
  z-index: 1;
}

.protocol-placeholder.mini:nth-child(2) {
  transform: translateY(-10px);
  z-index: 3;
}

.protocol-placeholder.mini:nth-child(3) {
  transform: translateX(55%) rotate(5deg);
  z-index: 2;
}

.collection-protocolo:hover .protocol-placeholder.mini:nth-child(1) {
  transform: translateX(-59%) rotate(-6deg) translateY(-4px);
}

.collection-protocolo:hover .protocol-placeholder.mini:nth-child(2) {
  transform: translateY(-16px);
}

.collection-protocolo:hover .protocol-placeholder.mini:nth-child(3) {
  transform: translateX(59%) rotate(6deg) translateY(-4px);
}

.protocol-placeholder.mini {
  transition: transform .35s ease;
}

.protocol-library-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: end;
}

.protocol-library-covers .protocol-placeholder {
  width: 100%;
}

.protocol-page {
  background:
    radial-gradient(circle at 82% 8%, rgba(113,28,38,.10), transparent 24%),
    var(--bg);
}

.protocol-hero .eyebrow,
.protocol-page .book-number {
  color: #b96d72;
}

.protocol-large {
  width: min(100%, 350px);
  min-height: 510px;
}

.protocol-large strong {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.coming-soon {
  display: inline-flex;
  margin-top: 16px;
  padding: 8px 12px;
  border: 1px solid rgba(185,109,114,.32);
  color: #c9b4b5;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .62rem;
}

@media (max-width: 980px) {
  .protocol-cover-stack {
    min-height: 390px;
  }

  .protocol-library-covers {
    max-width: 700px;
  }
}

@media (max-width: 620px) {
  .protocol-cover-stack {
    min-height: 315px;
  }

  .protocol-placeholder.mini {
    width: min(45%, 165px);
    padding: 18px 14px;
  }

  .protocol-placeholder.mini strong {
    font-size: .95rem;
  }

  .protocol-library-covers {
    gap: 8px;
  }

  .protocol-library-covers .protocol-placeholder {
    padding: 16px 10px;
  }

  .protocol-library-covers .protocol-placeholder strong {
    font-size: .85rem;
  }

  .protocol-library-covers .protocol-kicker,
  .protocol-library-covers .protocol-placeholder small {
    font-size: .42rem;
  }

  .protocol-large {
    max-width: 320px;
    min-height: 460px;
  }
}


/* ===== V28 — polimento visual Protocolo Perfeito ===== */

/* Mais margem interna para evitar que CAPA POR REVELAR toque nas bordas. */
.protocol-placeholder {
  padding-left: 30px;
  padding-right: 30px;
}

.protocol-placeholder strong {
  font-size: clamp(1.08rem, 2.05vw, 1.9rem);
  line-height: 1.12;
  letter-spacing: .065em;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: keep-all;
}

/* Nas capas grandes, o texto continua imponente mas sem ficar apertado. */
.protocol-large {
  padding-left: 38px;
  padding-right: 38px;
}

.protocol-large strong {
  font-size: clamp(1.8rem, 3.25vw, 3.05rem);
  letter-spacing: .055em;
}

/* Homepage: abrir a pilha para que as três capas continuem legíveis. */
.protocol-placeholder.mini {
  width: min(39%, 198px);
}

.protocol-placeholder.mini:nth-child(1) {
  transform: translateX(-67%) rotate(-5deg);
}

.protocol-placeholder.mini:nth-child(2) {
  transform: translateY(-10px);
}

.protocol-placeholder.mini:nth-child(3) {
  transform: translateX(67%) rotate(5deg);
}

.collection-protocolo:hover .protocol-placeholder.mini:nth-child(1) {
  transform: translateX(-71%) rotate(-6deg) translateY(-4px);
}

.collection-protocolo:hover .protocol-placeholder.mini:nth-child(2) {
  transform: translateY(-16px);
}

.collection-protocolo:hover .protocol-placeholder.mini:nth-child(3) {
  transform: translateX(71%) rotate(6deg) translateY(-4px);
}

/* O selo Brevemente deixou de existir; regra mantida inofensiva. */
.coming-soon {
  display: none !important;
}

/* Mobile: preservar margens e não voltar a apertar demasiado o texto. */
@media (max-width: 620px) {
  .protocol-placeholder {
    padding-left: 16px;
    padding-right: 16px;
  }

  .protocol-placeholder.mini {
    width: min(42%, 155px);
  }

  .protocol-placeholder.mini:nth-child(1) {
    transform: translateX(-64%) rotate(-5deg);
  }

  .protocol-placeholder.mini:nth-child(3) {
    transform: translateX(64%) rotate(5deg);
  }

  .collection-protocolo:hover .protocol-placeholder.mini:nth-child(1) {
    transform: translateX(-67%) rotate(-6deg) translateY(-3px);
  }

  .collection-protocolo:hover .protocol-placeholder.mini:nth-child(3) {
    transform: translateX(67%) rotate(6deg) translateY(-3px);
  }

  .protocol-placeholder.mini strong {
    font-size: .82rem;
    line-height: 1.12;
    letter-spacing: .05em;
  }

  .protocol-large {
    padding-left: 26px;
    padding-right: 26px;
  }

  .protocol-large strong {
    font-size: clamp(1.65rem, 8vw, 2.4rem);
  }
}


/* ===== V29 — alinhamento final das capas Protocolo Perfeito ===== */

/* ---------------------------------------------------------
   Página LIVROS — três capas perfeitamente coerentes
   --------------------------------------------------------- */

.protocol-library-covers {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  width: 100%;
  max-width: 620px;
}

.protocol-library-covers .protocol-placeholder {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 24px 22px;
  display: grid;
  grid-template-rows: 42px 1fr 42px;
  align-items: center;
}

/* Reserva a mesma altura no topo das três capas. */
.protocol-library-covers .protocol-kicker {
  min-height: 42px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  line-height: 1.35;
}

/* Centro exactamente igual nas três capas e mais afastado das margens. */
.protocol-library-covers .protocol-placeholder strong {
  margin: 0;
  align-self: center;
  justify-self: center;
  width: 100%;
  text-align: center;
  font-size: clamp(.98rem, 1.42vw, 1.48rem);
  line-height: 1.16;
  letter-spacing: .045em;
}

/* Reserva duas linhas no fundo, mesmo quando o título só ocupa uma. */
.protocol-library-covers .protocol-placeholder small {
  min-height: 42px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  line-height: 1.4;
  width: 100%;
}

/* ---------------------------------------------------------
   HOMEPAGE — fan das capas mais aberto
   --------------------------------------------------------- */

.protocol-placeholder.mini {
  width: min(37%, 190px);
}

.protocol-placeholder.mini strong {
  font-size: clamp(.88rem, 1.35vw, 1.16rem);
  line-height: 1.14;
  letter-spacing: .045em;
}

.protocol-placeholder.mini:nth-child(1) {
  transform: translateX(-78%) rotate(-5deg);
}

.protocol-placeholder.mini:nth-child(2) {
  transform: translateY(-10px);
}

.protocol-placeholder.mini:nth-child(3) {
  transform: translateX(78%) rotate(5deg);
}

.collection-protocolo:hover .protocol-placeholder.mini:nth-child(1) {
  transform: translateX(-82%) rotate(-6deg) translateY(-4px);
}

.collection-protocolo:hover .protocol-placeholder.mini:nth-child(2) {
  transform: translateY(-16px);
}

.collection-protocolo:hover .protocol-placeholder.mini:nth-child(3) {
  transform: translateX(82%) rotate(6deg) translateY(-4px);
}

/* ---------------------------------------------------------
   Página própria — só mais um pouco de ar nas capas grandes
   --------------------------------------------------------- */

.protocol-large {
  padding-left: 44px;
  padding-right: 44px;
}

.protocol-large strong {
  font-size: clamp(1.7rem, 3vw, 2.78rem);
  line-height: 1.14;
  letter-spacing: .045em;
}

/* ---------------------------------------------------------
   Tablet
   --------------------------------------------------------- */

@media (max-width: 980px) {
  .protocol-library-covers {
    max-width: 660px;
    gap: 14px;
  }

  .protocol-library-covers .protocol-placeholder {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 620px) {
  .protocol-library-covers {
    gap: 7px;
  }

  .protocol-library-covers .protocol-placeholder {
    padding: 14px 8px;
    grid-template-rows: 34px 1fr 38px;
  }

  .protocol-library-covers .protocol-kicker {
    min-height: 34px;
    font-size: .38rem;
    letter-spacing: .10em;
  }

  .protocol-library-covers .protocol-placeholder strong {
    font-size: clamp(.68rem, 3.1vw, .86rem);
    line-height: 1.17;
    letter-spacing: .035em;
  }

  .protocol-library-covers .protocol-placeholder small {
    min-height: 38px;
    font-size: .38rem;
  }

  .protocol-placeholder.mini {
    width: min(39%, 150px);
  }

  .protocol-placeholder.mini:nth-child(1) {
    transform: translateX(-73%) rotate(-5deg);
  }

  .protocol-placeholder.mini:nth-child(3) {
    transform: translateX(73%) rotate(5deg);
  }

  .collection-protocolo:hover .protocol-placeholder.mini:nth-child(1) {
    transform: translateX(-76%) rotate(-6deg) translateY(-3px);
  }

  .collection-protocolo:hover .protocol-placeholder.mini:nth-child(3) {
    transform: translateX(76%) rotate(6deg) translateY(-3px);
  }

  .protocol-large {
    padding-left: 32px;
    padding-right: 32px;
  }

  .protocol-large strong {
    font-size: clamp(1.5rem, 7.3vw, 2.15rem);
  }
}


/* ===== V32 — Mark: URL final + limpeza visual das capas ===== */

/* Remove o fino contorno claro das capas sobrepostas.
   A profundidade continua assegurada pela sombra. */
.collection-cover-stack img {
  border: 0 !important;
}

/* Também evita o mesmo efeito na grelha da biblioteca. */
.library-series-covers img {
  border: 0 !important;
}
