/* ==========================================================================
   Para Cheru — Editorial Storytelling Stylesheet
   ========================================================================== */

:root {
  --bg: #fbf7f1;
  --surface: #f2ebe0;
  --dark: #1c1815;
  --dark-elevated: #27211d;
  --ink: #1f1a17;
  --ink-muted: #665b52;
  --ink-light: #f5efe6;
  --ink-light-muted: #bdb2a6;
  --accent: #9b4436;
  --accent-hover: #7f3428;
  --gold: #bfa07a;
  --line: rgba(31, 26, 23, 0.11);
  --line-light: rgba(245, 239, 230, 0.14);

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-pill: 999px;

  --shadow-soft: 0 18px 48px rgba(31, 26, 23, 0.08);
  --shadow-deep: 0 28px 70px rgba(0, 0, 0, 0.42);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --wrap-max: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

section[id],
.letter-paper {
  scroll-margin-top: 84px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

/* Textura sutil de papel editorial */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- Capa Editorial de Entrada ---------- */
.intro-gate {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 35%, #fdfaf5 0%, #f2ebe0 100%);
  transition: opacity 720ms var(--ease), visibility 720ms var(--ease);
}

.intro-gate.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-gate__card {
  width: 100%;
  max-width: 480px;
  padding: clamp(40px, 7vw, 64px) clamp(26px, 6vw, 48px);
  text-align: center;
  background: rgba(251, 247, 241, 0.85);
  border: 1px solid rgba(191, 160, 122, 0.34);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.intro-gate__card::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(191, 160, 122, 0.2);
  border-radius: 4px;
  pointer-events: none;
}

.intro-gate__mono {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.intro-gate__mono em {
  color: var(--accent);
}

.intro-gate__eyebrow {
  margin-bottom: 12px;
}

.intro-gate__title {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 6vw, 54px);
  font-weight: 400;
  line-height: 1.06;
  color: var(--ink);
}

.intro-gate__title em {
  font-style: italic;
  color: var(--accent);
}

.intro-gate__sub {
  margin: 0 0 30px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 30ch;
}

.intro-gate__cta {
  min-width: 220px;
  min-height: 52px;
  padding-inline: 30px;
  font-size: 15px;
}

.intro-gate__track {
  margin: 18px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-muted);
}

.intro-gate__silent {
  margin-top: 22px;
  background: none;
  border: 0;
  padding: 6px 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  opacity: 0.72;
  transition: opacity 200ms var(--ease), color 200ms var(--ease);
}

.intro-gate__silent:hover {
  opacity: 1;
  color: var(--ink);
}

/* ---------- Barra de progresso ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1000;
  background: transparent;
}

.reading-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 120ms linear;
}

/* ---------- Navegação ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding-block: 16px;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease), padding 300ms var(--ease);
  border-bottom: 1px solid transparent;
}

.topbar.is-scrolled {
  background-color: rgba(251, 247, 241, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-block: 12px;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.brand__amp {
  font-style: italic;
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}

.nav__link {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  position: relative;
  padding-block: 6px;
  transition: color 220ms var(--ease);
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms var(--ease);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--ink);
  outline: none;
}

.nav__link:hover::after,
.nav__link:focus-visible::after {
  transform: scaleX(1);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 220ms var(--ease), background-color 220ms var(--ease), border-color 220ms var(--ease), color 220ms var(--ease);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn--primary {
  background: var(--ink);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.btn-link {
  background: none;
  border: none;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line);
  transition: color 220ms var(--ease), border-color 220ms var(--ease);
}

.btn-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: clamp(92px, 11vh, 128px);
  padding-bottom: clamp(48px, 7vh, 84px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(32px, 6vw, 84px);
}

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

.hero__title {
  margin: 0 0 22px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.4vw, 62px);
  font-weight: 400;
  line-height: 1.07;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.hero__lead {
  margin: 0 0 32px;
  max-width: 48ch;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.72;
  color: var(--ink-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.hero__note {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-muted);
}

.hero__visual {
  display: flex;
  justify-content: flex-end;
}

/* ---------- Molduras de Fotos ---------- */
.photo-frame {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 650ms var(--ease);
}

.photo-frame:hover img,
.photo-frame:focus-visible img {
  transform: scale(1.035);
}

.photo-frame:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.photo-frame--hero {
  max-width: 470px;
  aspect-ratio: 3 / 4;
  animation: heroReveal 1.1s var(--ease) both;
}

.photo-frame--hero img {
  object-position: 50% 24%;
}

.photo-frame--tall {
  aspect-ratio: 4 / 5;
  height: 100%;
}

.photo-frame--portrait {
  aspect-ratio: 3 / 4;
}

.photo-frame--wide-portrait {
  aspect-ratio: 4 / 5;
}

.photo-frame--feature {
  aspect-ratio: 4 / 5;
}

.photo-frame--mosaic-main {
  aspect-ratio: 4 / 5;
}

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

/* ---------- Capítulos ---------- */
.chapter {
  padding-block: clamp(72px, 10vw, 132px);
}

.chapter--surface {
  background-color: var(--surface);
}

.chapter__header {
  max-width: 640px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.chapter__header--center {
  margin-inline: auto;
  text-align: center;
}

.chapter__num {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.chapter__num--light {
  color: var(--gold);
}

.chapter__title {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.2vw, 54px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.chapter__title em {
  font-style: italic;
  color: var(--accent);
}

.chapter__title--light {
  color: var(--ink-light);
}

.chapter__title--light em {
  color: var(--gold);
}

.chapter__text {
  margin: 0 0 16px;
  font-size: clamp(15.5px, 1.2vw, 17px);
  line-height: 1.78;
  color: var(--ink-muted);
}

.chapter__text:last-child {
  margin-bottom: 0;
}

.chapter__text--muted {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.78;
  margin-top: 22px;
}

/* Composição Capítulo I — Assimétrica */
.spread--asymmetric {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(14px, 2vw, 24px);
  align-items: stretch;
}

.spread__stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: clamp(14px, 2vw, 24px);
}

/* Composição Capítulos II e V — Split com texto sticky */
.chapter__split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.chapter__split--reverse {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.chapter__sticky {
  position: sticky;
  top: 108px;
}

.quad-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 22px);
}

.quad-grid .photo-frame:nth-child(2),
.quad-grid .photo-frame:nth-child(4) {
  transform: translateY(24px);
}

/* Interlúdio poético */
.interlude {
  padding-block: clamp(56px, 8vw, 108px);
  background: var(--bg);
}

.interlude__inner {
  max-width: 820px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.interlude__rule {
  width: 56px;
  height: 1px;
  background: var(--gold);
}

.interlude__quote {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 400;
  line-height: 1.28;
  color: var(--ink);
}

/* Composição Capítulo III — Tríptico + Díptico */
.triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 24px);
}

.triptych--compact {
  margin-top: clamp(14px, 2vw, 24px);
}

.diptych-sub {
  margin-top: clamp(14px, 2vw, 24px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 24px);
}

/* Composição Capítulo IV — Par destaque */
.feature-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 2.2vw, 28px);
}

/* Composição Capítulo V — Mosaico editorial */
.editorial-mosaic {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vw, 22px);
}

.editorial-mosaic__row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 22px);
}

/* ---------- A Carta Final (Seção Escura Intimista) ---------- */
.letter-section {
  background: radial-gradient(circle at 50% 0%, #2a221d 0%, var(--dark) 68%);
  color: var(--ink-light);
  padding-block: clamp(88px, 11vw, 148px);
  position: relative;
}

.letter-section__inner {
  max-width: 780px;
}

.letter-section__intro {
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 64px);
}

/* Envelope interativo */
.envelope-stage {
  display: flex;
  justify-content: center;
}

.envelope {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(160deg, #f7f0e6 0%, #ede2d3 100%);
  color: var(--ink);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 420ms var(--ease), opacity 420ms var(--ease);
}

.envelope.is-opening {
  transform: translateY(-10px) scale(0.98);
  opacity: 0;
}

.envelope__flap {
  position: relative;
  height: 112px;
  background: linear-gradient(180deg, #e7d9c6 0%, #efe5d7 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-bottom: 1px solid rgba(31, 26, 23, 0.08);
  transform-origin: top center;
  transition: transform 480ms var(--ease);
}

.envelope.is-opening .envelope__flap {
  transform: rotateX(160deg);
}

.envelope__body {
  padding: 20px 32px 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: -34px;
  position: relative;
  z-index: 2;
}

.envelope__meta {
  margin-bottom: 24px;
}

.envelope__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.envelope__to {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 32px;
  color: var(--ink);
}

.wax-seal {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 0;
  background: radial-gradient(circle at 35% 30%, #b85647 0%, #8f3729 65%, #6d261b 100%);
  color: #f8ede3;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow:
    0 10px 24px rgba(109, 38, 27, 0.42),
    inset 0 2px 4px rgba(255, 255, 255, 0.25),
    inset 0 -3px 6px rgba(0, 0, 0, 0.28);
  transition: transform 280ms var(--ease), box-shadow 280ms var(--ease);
}

.wax-seal__ring {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(248, 237, 227, 0.35);
}

.wax-seal__mark {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.wax-seal:hover {
  transform: scale(1.06);
  box-shadow:
    0 14px 30px rgba(155, 68, 54, 0.55),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.wax-seal:active {
  transform: scale(0.97);
}

.envelope__hint {
  margin: 22px 0 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

/* Papel da carta aberta */
.letter-paper {
  background: #fbf7f1;
  color: var(--ink);
  border-radius: 6px;
  padding: clamp(32px, 6vw, 68px) clamp(24px, 6vw, 64px);
  box-shadow: var(--shadow-deep);
  position: relative;
  animation: unfoldPaper 680ms var(--ease) both;
}

.letter-paper::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(191, 160, 122, 0.3);
  border-radius: 3px;
  pointer-events: none;
}

@keyframes unfoldPaper {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.letter-paper__header {
  margin-bottom: 28px;
}

.letter-paper__date {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.letter-paper__salutation {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 500;
  color: var(--ink);
}

.letter-paper__body {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.2vw, 23px);
  line-height: 1.72;
  color: #29221e;
}

.letter-paper__body p {
  margin: 0 0 22px;
}

.letter-paper__body strong {
  font-weight: 600;
  color: var(--accent);
}

.letter-paper__climax {
  padding-left: 18px;
  border-left: 2px solid var(--accent);
  color: var(--ink);
  font-weight: 500;
  margin-top: 28px !important;
}

.letter-paper__footer {
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.letter-paper__closing {
  display: block;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.letter-paper__name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 38px;
  line-height: 1;
  color: var(--accent);
}

/* ---------- Galeria Extra ---------- */
.gallery-section {
  padding-block: clamp(72px, 10vw, 128px);
  background: var(--bg);
}

.gallery-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}

.filter-pill:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.filter-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 1.6vw, 18px);
}

.gallery-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 0;
  padding: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(31, 26, 23, 0.06);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 24%;
  transition: transform 550ms var(--ease);
}

.gallery-card:hover img {
  transform: scale(1.045);
}

.gallery-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Rodapé ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 36px calc(36px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer__line {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.site-footer__line strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Player de Música Flutuante ---------- */
.audio-pill {
  position: fixed;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.audio-drawer {
  width: min(300px, calc(100vw - 36px));
  background: rgba(28, 24, 21, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(251, 247, 241, 0.14);
  border-radius: 12px;
  padding: 12px;
  color: var(--bg);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.36);
  /* Mantém o iframe renderizado (sem visibility:hidden/display:none) para o YouTube tocar em segundo plano */
  opacity: 0.001;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}

.audio-drawer.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.audio-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.audio-drawer__title {
  display: block;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.1;
  color: var(--ink-light);
}

.audio-drawer__artist {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-light-muted);
  margin-top: 2px;
}

.audio-drawer__close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-light);
  background: transparent;
  color: var(--ink-light-muted);
  display: grid;
  place-items: center;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}

.audio-drawer__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink-light);
}

.audio-drawer__frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #120f0d;
}

.audio-drawer__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.audio-drawer__note {
  margin: 10px 0 2px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-light-muted);
}

.audio-drawer__note a {
  display: inline-block;
  margin-top: 4px;
  color: var(--gold);
  text-decoration: underline;
}

.audio-pill__controls {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(251, 247, 241, 0.16);
  background: rgba(31, 26, 23, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.audio-pill__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 16px 10px 18px;
  border: 0;
  background: transparent;
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  transition: background-color 220ms var(--ease);
}

.audio-pill__btn:hover {
  background: var(--accent);
}

.audio-pill__expand {
  display: grid;
  place-items: center;
  width: 38px;
  min-height: 46px;
  border: 0;
  border-left: 1px solid rgba(251, 247, 241, 0.14);
  background: transparent;
  color: var(--ink-light-muted);
  transition: background-color 200ms var(--ease), color 200ms var(--ease), transform 220ms var(--ease);
}

.audio-pill__expand:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--bg);
}

.audio-pill__expand[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.audio-pill__icon {
  display: grid;
  place-items: center;
}

.audio-pill__btn .icon-pause {
  display: none;
}

.audio-pill__btn.is-playing .icon-play {
  display: none;
}

.audio-pill__btn.is-playing .icon-pause {
  display: block;
}

.audio-pill__eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.audio-pill__btn.is-playing .audio-pill__eq {
  display: inline-flex;
}

.audio-pill__eq span {
  width: 2px;
  background: var(--gold);
  border-radius: 2px;
  animation: eqBar 1.1s ease-in-out infinite;
}

.audio-pill__eq span:nth-child(1) { height: 6px; animation-delay: 0s; }
.audio-pill__eq span:nth-child(2) { height: 12px; animation-delay: 0.25s; }
.audio-pill__eq span:nth-child(3) { height: 8px; animation-delay: 0.5s; }

@keyframes eqBar {
  0%, 100% { transform: scaleY(0.45); }
  50% { transform: scaleY(1); }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 68px 20px 44px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 14, 12, 0.94);
  backdrop-filter: blur(8px);
}

.lightbox__chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  color: var(--ink-light);
}

.lightbox__counter {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink-light-muted);
}

.lightbox__close,
.lightbox__nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-light);
  background: rgba(28, 24, 21, 0.72);
  color: var(--ink-light);
  display: grid;
  place-items: center;
  transition: background-color 200ms var(--ease), transform 200ms var(--ease);
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: var(--accent);
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
}

.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

.lightbox__stage {
  position: relative;
  z-index: 3;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(92vw, 880px);
  max-height: 82vh;
}

.lightbox__stage img {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: var(--shadow-deep);
}

.lightbox__date {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-light-muted);
}

/* ---------- Revelação suave ao rolar ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 720ms var(--ease), transform 720ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsivo (Tablet & Celular) ---------- */
@media (max-width: 960px) {
  .hero {
    min-height: auto;
    padding-top: 96px;
    padding-bottom: 56px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero__visual {
    justify-content: center;
  }

  .photo-frame--hero {
    max-width: 100%;
    aspect-ratio: 4 / 5;
  }

  .chapter__split,
  .chapter__split--reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .chapter__sticky {
    position: static;
  }

  .quad-grid .photo-frame:nth-child(2),
  .quad-grid .photo-frame:nth-child(4) {
    transform: none;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .topbar {
    padding-block: 12px;
  }

  .brand {
    font-size: 19px;
  }

  .nav {
    gap: 16px;
  }

  .nav__link {
    font-size: 11.5px;
    letter-spacing: 0.06em;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .spread--asymmetric {
    grid-template-columns: 1fr;
  }

  .spread__stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .triptych {
    grid-template-columns: 1fr;
  }

  .triptych--compact {
    grid-template-columns: repeat(2, 1fr);
  }

  .triptych--compact .photo-frame:last-child {
    grid-column: span 2;
    aspect-ratio: 4 / 3;
  }

  .feature-pair,
  .diptych-sub {
    grid-template-columns: 1fr;
  }

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

  .lightbox__nav {
    top: auto;
    bottom: 20px;
    transform: none;
  }

  .lightbox__nav--prev { left: 24px; }
  .lightbox__nav--next { right: 24px; }

  .letter-paper__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .audio-pill__btn {
    padding: 0;
    width: 46px;
    height: 46px;
    justify-content: center;
  }

  .audio-pill__expand {
    width: 34px;
  }

  .audio-pill__label,
  .audio-pill__btn.is-playing .audio-pill__eq {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
