/* ==========================================================================
   Lectorium — site público (homepage + documentos legais)
   Design: "A obra em capítulos" — Bona Nova sobre creme, vermelho Rosso.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fontes auto-hospedadas (o CSP do site bloqueia fonts.googleapis.com)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Bona Nova';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/bona-nova-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bona Nova';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/bona-nova-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bona Nova';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/bona-nova-400-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bona Nova';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/bona-nova-400-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bona Nova';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/bona-nova-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bona Nova';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/bona-nova-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bona Nova SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/bona-nova-sc-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bona Nova SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/bona-nova-sc-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bona Nova SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/bona-nova-sc-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bona Nova SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/bona-nova-sc-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  --cream: #f6f1e8;
  --cream-panel: #efe7d9;
  --ink: #1b1a17;
  --body: #3a352e;
  --muted: #5d574c;
  --rosso: #da291c;
  --rosso-dark: #b8200f;
  --dark: #131211;
  --serif: 'Bona Nova', Georgia, 'Songti SC', 'Noto Serif CJK SC', serif;
  --sc: 'Bona Nova SC', Georgia, 'Songti SC', 'Noto Serif CJK SC', serif;
  --sans: ui-sans-serif, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --motion-fast: 160ms;
  --motion-base: 260ms;
  --motion-slow: 560ms;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
}

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

::selection {
  background: var(--rosso);
  color: #f9f5ec;
}

:focus-visible {
  outline: 2px solid var(--rosso);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--dark);
  color: #fbf3e4;
  font-family: var(--sc);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Navegação fixa
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 6px clamp(20px, 4vw, 56px);
  background: rgba(18, 17, 16, 0.2);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.4s ease;
}

/* A homepage usa um nav ligeiramente mais escuro que o das páginas
   jurídicas — nuance do design original, perdida quando as duas telas
   passaram a compartilhar as mesmas regras de nav-bar. */
.nav--home .nav-bar {
  background: rgba(15, 14, 13, 0.5);
}

.nav-brand {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.08em;
  color: #f7f2e8;
  text-decoration: none;
  flex: 0 0 auto;
}

.nav-brand:hover {
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-family: var(--sc);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.9);
}

.nav-links a {
  position: relative;
  color: inherit;
  text-decoration: none;
  transition: color var(--motion-fast) ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  background: var(--rosso);
  content: '';
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--motion-fast) var(--ease-out);
}

.nav-links a[aria-current='location']::after {
  transform: scaleX(1);
}

.nav-side {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.nav-cta {
  font-family: var(--sc);
  font-size: 13px;
  letter-spacing: 0.16em;
  padding: 9px 20px;
  background: rgba(10, 9, 8, 0.72);
  border: 1px solid var(--rosso);
  color: #fff;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.25s ease;
}

.nav-cta:hover {
  background: var(--rosso);
  color: #fff;
}

/* Seletor de idioma — o site é publicado em cinco línguas */
.lang {
  position: relative;
}

.lang > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-family: var(--sc);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.24);
  white-space: nowrap;
}

.lang > summary::-webkit-details-marker {
  display: none;
}

.lang > summary:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  min-width: 150px;
  background: rgba(12, 11, 10, 0.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--motion-fast) var(--ease-out), transform var(--motion-fast) var(--ease-out);
}

.lang[open] .lang-menu {
  opacity: 1;
  transform: translateY(0);
}

@starting-style {
  .lang[open] .lang-menu {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.lang-menu a {
  display: block;
  padding: 9px 16px;
  font-family: var(--sc);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.lang-menu a:hover,
.lang-menu a[aria-current='true'] {
  background: rgba(218, 41, 28, 0.9);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Homepage — capítulos em tela cheia
   -------------------------------------------------------------------------- */
.home {
  background: var(--cream);
  overflow-x: hidden;
}

/* :where() zera a especificidade deste reset — ele nunca deve vencer uma
   classe de componente (.nav-cta, .btn--*, .nav-links a…), só preencher
   onde nada mais se aplica. Sem isso, ".home a" (classe+elemento) empata
   ou supera seletores de um componente só e vence por ordem no arquivo. */
:where(.home) a {
  color: var(--ink);
  text-decoration: none;
}

.chapter {
  position: relative;
  min-height: 100svh;
  display: flex;
  overflow: hidden;
}

.chapter--center {
  align-items: center;
}

.chapter--top {
  align-items: flex-start;
}

.chapter-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}

.chapter-veil {
  position: absolute;
  inset: 0;
}

.chapter-inner {
  position: relative;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: clamp(120px, 14vh, 180px) clamp(24px, 4.4vw, 84px) clamp(74px, 10vh, 120px);
}

.chapter-inner--narrow {
  max-width: 1080px;
  padding: clamp(110px, 13vh, 170px) clamp(24px, 4vw, 60px) 70px;
  text-align: center;
}

.chapter-inner--mid {
  max-width: 1180px;
  padding: clamp(110px, 13vh, 170px) clamp(24px, 4vw, 60px) 80px;
  text-align: center;
}

.kicker {
  font-family: var(--sc);
  font-size: 13px;
  letter-spacing: 0.32em;
  margin: 0 0 26px;
  color: rgba(247, 235, 214, 0.92);
}

.kicker--shadow {
  text-shadow: 0 1px 20px rgba(60, 6, 4, 0.6);
}

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 98px);
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 30px;
  color: #fbf3e4;
  text-shadow: 0 2px 40px rgba(60, 6, 4, 0.5);
  text-wrap: pretty;
}

.hero-title em {
  font-style: italic;
}

.hero-lede {
  font-size: clamp(17px, 1.15vw, 20px);
  line-height: 1.68;
  color: rgba(251, 243, 228, 0.92);
  max-width: 480px;
  margin: 0 0 42px;
  text-shadow: 0 1px 22px rgba(60, 6, 4, 0.65);
  text-wrap: pretty;
}

.chapter-h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.04;
  margin: 0 0 24px;
  text-wrap: pretty;
}

.chapter-p {
  line-height: 1.7;
  margin: 0 0 18px;
  text-wrap: pretty;
}

/* Botões */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sc);
  letter-spacing: 0.14em;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease,
    border-color var(--motion-fast) ease, transform var(--motion-fast) var(--ease-out);
}

.btn svg {
  transition: transform var(--motion-fast) var(--ease-out);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:hover svg {
  transform: translateX(4px);
}

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

.btn--cream {
  background: #fbf3e4;
  color: #17110f;
  padding: 17px 32px;
  font-size: 15.5px;
}

.btn--cream:hover {
  background: #fff;
  color: #17110f;
}

.btn--ghost {
  background: #2c2a27;
  border: 1px solid rgba(251, 243, 228, 0.28);
  color: #fbf3e4;
  padding: 17px 26px;
  font-size: 15.5px;
}

.btn--ghost:hover {
  background: #3a3733;
  border-color: rgba(251, 243, 228, 0.5);
  color: #fbf3e4;
}

.btn--rosso {
  background: var(--rosso);
  color: #fff;
  padding: 18px 38px;
  font-size: 16px;
}

.btn--rosso:hover {
  background: var(--rosso-dark);
  color: #fff;
}

.btn--glass {
  padding: 16px 30px;
  font-size: 15px;
  background: rgba(9, 20, 40, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn--glass:hover {
  background: #fff;
  color: #0b1730;
  border-color: #fff;
}

.link-underline {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fbf5e9;
  font-family: var(--sc);
  font-size: 15px;
  letter-spacing: 0.14em;
  border-bottom: 0;
  padding-bottom: 7px;
  text-decoration: none;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.link-underline::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--rosso);
  content: '';
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms var(--ease-out);
}

.link-underline:hover {
  color: #fff;
}

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

/* Capítulo I — o chamado */
.chapter--hero .chapter-bg {
  object-position: 70% center;
  --parallax-scale-start: 1.07;
  --parallax-scale-mid: 1.1;
  --parallax-scale-end: 1.14;
  --parallax-y-start: 28px;
  --parallax-y-mid: 0px;
  --parallax-y-end: -28px;
}

.chapter--hero .hero-content {
  max-width: 640px;
}

.chapter--hero .kicker {
  margin-bottom: 30px;
}

/* Capítulo II — a entrada */
.chapter--entrada .chapter-bg {
  object-position: 58% 62%;
  --parallax-scale-start: 1.08;
  --parallax-scale-mid: 1.12;
  --parallax-scale-end: 1.16;
  --parallax-y-start: 36px;
  --parallax-y-mid: 0px;
  --parallax-y-end: -36px;
}

.chapter--entrada .chapter-veil {
  background: linear-gradient(90deg, rgba(6, 18, 46, 0.62) 0%, rgba(6, 18, 46, 0.28) 42%, rgba(6, 18, 46, 0.06) 70%, rgba(6, 18, 46, 0) 100%);
}

.chapter--entrada .chapter-inner {
  padding: clamp(120px, 14vh, 180px) clamp(24px, 4vw, 84px) 96px;
}

.chapter--entrada .chapter-copy {
  max-width: 660px;
}

.chapter--entrada .kicker {
  color: #f4e7cf;
  text-shadow: 0 1px 14px rgba(12, 20, 48, 0.55);
}

.chapter--entrada .chapter-h2 {
  font-size: clamp(38px, 4.6vw, 70px);
  color: #fdfaf3;
  text-shadow: 0 2px 26px rgba(12, 20, 48, 0.5);
}

.chapter--entrada .chapter-p {
  font-size: clamp(17px, 1.2vw, 20px);
  color: #f1ece2;
  max-width: 540px;
  text-shadow: 0 1px 16px rgba(12, 20, 48, 0.6);
}

.chapter--entrada .chapter-p:last-of-type {
  color: rgba(241, 236, 226, 0.92);
  margin-bottom: clamp(30px, 4vh, 44px);
}

.entrada-figure {
  margin: clamp(34px, 5vh, 56px) 0 0;
  max-width: 574px;
}

.entrada-figure img {
  width: 100%;
  height: auto;
  box-shadow: 0 50px 90px -50px rgba(4, 10, 28, 0.9);
}

/* Capítulo III — o gabinete */
.chapter--gabinete .chapter-bg {
  object-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity var(--motion-slow) var(--ease-out), transform var(--motion-slow) var(--ease-out);
}

.chapter--gabinete .chapter-bg.is-active {
  opacity: 1;
  animation: gabinete-background-in 640ms var(--ease-out) both;
}

.chapter--gabinete .chapter-veil {
  background: linear-gradient(to bottom, rgba(8, 10, 16, 0.55) 0%, rgba(8, 10, 16, 0.35) 45%, rgba(8, 10, 16, 0.6) 100%);
}

.chapter--gabinete .kicker {
  color: rgba(247, 235, 214, 0.9);
  margin-bottom: 22px;
  text-shadow: 0 1px 18px rgba(6, 8, 14, 0.7);
}

.chapter--gabinete .chapter-h2 {
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.06;
  margin-bottom: 34px;
  color: #fbf5e9;
  text-shadow: 0 2px 30px rgba(6, 8, 14, 0.65);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(16px, 3vw, 44px);
  margin: 0 0 34px;
}

.tab {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px 2px 12px;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--sc);
  font-size: 15px;
  letter-spacing: 0.18em;
  color: rgba(251, 245, 233, 0.62);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.tab:hover {
  color: #fbf5e9;
}

.tab[aria-selected='true'] {
  color: #fbf5e9;
  border-bottom-color: var(--rosso);
}

.tab-figure {
  margin: 0 auto;
  max-width: 640px;
  background: rgba(12, 11, 10, 0.66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 40px 80px -46px rgba(0, 0, 0, 0.9);
}

.tab-figure img {
  width: 100%;
  height: auto;
}

.tab-panels {
  max-width: 640px;
  margin: 30px auto 0;
  min-height: 120px;
  padding: 26px 30px;
  background: rgba(10, 12, 18, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-align: left;
}

.tab-panel h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.3vw, 32px);
  line-height: 1.2;
  margin: 0 0 12px;
  color: #fbf5e9;
}

.tab-panel p {
  font-size: 17px;
  line-height: 1.68;
  color: rgba(251, 245, 233, 0.86);
  margin: 0;
}

[hidden] {
  display: none !important;
}

/* Capítulo IV — as conexões */
.chapter--conexoes .chapter-bg {
  object-position: 64% center;
  --parallax-scale-start: 1.07;
  --parallax-scale-mid: 1.11;
  --parallax-scale-end: 1.15;
  --parallax-y-start: 32px;
  --parallax-y-mid: 0px;
  --parallax-y-end: -32px;
}

.chapter--conexoes .chapter-veil {
  background: linear-gradient(94deg, rgba(10, 11, 14, 0.9) 0%, rgba(10, 11, 14, 0.78) 46%, rgba(10, 11, 14, 0.42) 70%, rgba(10, 11, 14, 0.1) 92%, rgba(10, 11, 14, 0) 100%);
}

.chapter--conexoes .chapter-inner {
  padding: clamp(110px, 13vh, 170px) clamp(24px, 4vw, 84px) 80px;
}

.chapter--conexoes .chapter-copy {
  max-width: 660px;
}

.chapter--conexoes .kicker {
  color: rgba(247, 235, 214, 0.9);
}

.chapter--conexoes .chapter-h2 {
  font-size: clamp(36px, 4.2vw, 64px);
  margin-bottom: 26px;
  color: #fbf5e9;
}

.chapter--conexoes .chapter-p {
  font-size: clamp(17px, 1.2vw, 20px);
  line-height: 1.72;
  color: rgba(251, 245, 233, 0.9);
  max-width: 600px;
  margin-bottom: 20px;
}

.chapter--conexoes .chapter-p:last-of-type {
  color: rgba(251, 245, 233, 0.78);
  margin-bottom: 34px;
}

.art-placeholder {
  width: min(340px, 100%);
  aspect-ratio: 4 / 3;
  margin: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(251, 245, 233, 0.42);
  background: repeating-linear-gradient(135deg, rgba(251, 245, 233, 0.06) 0 10px, rgba(251, 245, 233, 0.02) 10px 20px);
}

.art-placeholder span {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(251, 245, 233, 0.66);
  text-transform: uppercase;
}

/* Figura do caderno — Capítulo IV */
.conexoes-figure {
  margin: 0 0 34px;
  max-width: 340px;
  width: 100%;
}

.conexoes-figure img {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 50px 90px -50px rgba(4, 10, 28, 0.9);
}

/* Capítulo V — o céu aberto */
.chapter--ceu .chapter-bg {
  object-position: center 55%;
  --parallax-scale-start: 1.06;
  --parallax-scale-mid: 1.085;
  --parallax-scale-end: 1.11;
  --parallax-y-start: 24px;
  --parallax-y-mid: 0px;
  --parallax-y-end: -24px;
}

.chapter--ceu .chapter-veil {
  background: linear-gradient(to bottom, rgba(8, 18, 38, 0.5) 0%, rgba(8, 18, 38, 0.16) 42%, rgba(8, 18, 38, 0.42) 100%);
}

.ceu-statement {
  max-width: 760px;
  margin: 0 auto 56px;
  padding: clamp(28px, 3vw, 44px);
  background: rgba(12, 26, 50, 0.44);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.ceu-statement .kicker {
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 22px;
}

.ceu-statement h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 4.6vw, 72px);
  line-height: 1.03;
  margin: 0 0 22px;
  color: #fff;
  text-wrap: pretty;
}

.ceu-statement p {
  font-size: clamp(17px, 1.25vw, 21px);
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.92);
  max-width: 620px;
  margin: 0 auto;
  text-wrap: pretty;
}

.ceu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(20px, 2.6vw, 34px);
  max-width: 1000px;
  margin: 0 auto 52px;
}

.ceu-card {
  background: rgba(12, 26, 50, 0.42);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 28px 26px;
  text-align: left;
}

.ceu-card strong {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 25px;
  color: #fff;
  margin-bottom: 8px;
}

.ceu-card p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
}

.ceu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* Capítulo VI — o banquete */
.chapter--banquete {
  display: grid;
  grid-template-rows: 1.1fr auto;
  min-height: 100svh;
}

.banquete-figure {
  margin: 0;
  position: relative;
  overflow: hidden;
}

.banquete-figure .chapter-bg {
  object-position: center 40%;
  --parallax-scale-start: 1.1;
  --parallax-scale-mid: 1.06;
  --parallax-scale-end: 1.02;
  --parallax-y-start: 28px;
  --parallax-y-mid: 0px;
  --parallax-y-end: -20px;
}

.banquete-copy {
  background: var(--dark);
  padding: clamp(48px, 6vh, 84px) clamp(24px, 4vw, 60px) clamp(56px, 7vh, 90px);
  text-align: center;
}

.banquete-copy .kicker {
  color: var(--rosso);
  margin-bottom: 22px;
}

.banquete-copy h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 66px);
  line-height: 1.04;
  margin: 0 auto 22px;
  max-width: 900px;
  color: #fbf7ef;
  text-wrap: pretty;
}

.banquete-copy > p {
  font-size: clamp(17px, 1.2vw, 20px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  max-width: 560px;
  margin: 0 auto 34px;
}

/* --------------------------------------------------------------------------
   Rodapé da homepage
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.82);
}

.footer-grid {
  max-width: 1560px;
  margin: 0 auto;
  padding: 72px clamp(24px, 4vw, 84px) 38px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 44px;
}

.footer-brand p:first-child {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 25px;
  letter-spacing: 0.08em;
  color: #fbf7ef;
}

.footer-brand p:last-child {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  max-width: 300px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
}

.footer-col-title {
  margin: 0 0 4px;
  font-family: var(--sc);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.82);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.footer-col a:hover {
  color: #fbf7ef;
}

.footer-bottom {
  max-width: 1560px;
  margin: 0 auto;
  padding: 22px clamp(24px, 4vw, 84px) 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.82);
}

.footer-bottom p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Documentos legais
   -------------------------------------------------------------------------- */
/* Mesmo motivo do :where(.home) acima — este reset não pode vencer
   .nav-cta, .nav-links a, .legal-footer a etc. */
:where(.legal) a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(218, 41, 28, 0.45);
}

:where(.legal) a:hover {
  color: var(--rosso);
}

.legal-hero {
  position: relative;
  min-height: 62svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.legal-hero .chapter-bg {
  object-position: center 42%;
}

.legal-hero--terms .chapter-bg {
  object-position: center 52%;
}

.legal-hero .chapter-veil {
  background: linear-gradient(to bottom, rgba(12, 10, 8, 0.5) 0%, rgba(12, 10, 8, 0.1) 40%, rgba(12, 10, 8, 0.72) 100%);
}

.legal-hero--terms .chapter-veil {
  background: linear-gradient(to bottom, rgba(10, 12, 18, 0.5) 0%, rgba(10, 12, 18, 0.12) 38%, rgba(10, 12, 18, 0.76) 100%);
}

.legal-hero-inner {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 64px) clamp(46px, 7vh, 78px);
}

.legal-hero .kicker {
  margin-bottom: 20px;
}

.legal-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 5.4vw, 84px);
  line-height: 1;
  margin: 0 0 18px;
  color: #fbf3e4;
  text-wrap: pretty;
}

.legal-date {
  margin: 0;
  font-size: 16px;
  color: rgba(251, 243, 228, 0.86);
  letter-spacing: 0.02em;
}

.legal-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(48px, 7vh, 90px) clamp(24px, 4vw, 64px) clamp(60px, 9vh, 120px);
}

.legal-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0 0 clamp(38px, 5vh, 60px);
  font-family: var(--sc);
  font-size: 13.5px;
  letter-spacing: 0.16em;
}

.legal-crumbs a {
  text-decoration: none;
  color: var(--muted);
}

.legal-crumbs a:hover {
  color: var(--rosso);
}

.legal-lede {
  max-width: 760px;
  margin: 0 0 clamp(44px, 6vh, 72px);
  padding: 26px 30px;
  border-left: 2px solid var(--rosso);
  background: var(--cream-panel);
  font-size: 19px;
  line-height: 1.68;
  color: var(--body);
  text-wrap: pretty;
}

.legal-section {
  max-width: 760px;
  margin: 0 0 clamp(40px, 5vh, 64px);
}

.legal-section--wide {
  max-width: 1000px;
  margin-bottom: clamp(44px, 6vh, 72px);
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.14;
  margin: 0 0 18px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.legal-section--wide h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
  margin-bottom: 24px;
  display: block;
}

.legal-num {
  font-family: var(--sc);
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--rosso);
}

.legal-section h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  margin: 28px 0 12px;
}

.legal-section p {
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--body);
  margin: 0 0 12px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section strong {
  font-weight: 700;
}

.legal-section ul {
  margin: 0 0 14px;
  padding-left: 22px;
  font-size: 17.5px;
  line-height: 1.72;
  color: var(--body);
}

.legal-section ul:last-child {
  margin-bottom: 0;
}

.legal-section li + li {
  margin-top: 8px;
}

.legal-section code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15.5px;
  background: var(--cream-panel);
  padding: 2px 6px;
}

.legal-warning {
  margin: 0 0 18px;
  padding: 22px 26px;
  background: #2c2a27;
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
  line-height: 1.68;
}

.legal-warning strong {
  font-weight: 700;
  color: #fff;
}

/* Tabela-resumo da política */
.legal-table {
  display: grid;
  gap: 1px;
  background: rgba(27, 26, 23, 0.16);
  border: 1px solid rgba(27, 26, 23, 0.16);
}

.legal-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: rgba(27, 26, 23, 0.16);
}

.legal-row p {
  margin: 0;
  background: var(--cream);
  padding: 16px 18px;
  font-size: 15.5px;
  line-height: 1.55;
}

.legal-row p + p {
  color: var(--muted);
}

.legal-row--head p {
  background: var(--cream-panel);
  padding: 14px 18px;
  font-family: var(--sc);
  font-size: 12.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* Rodapé enxuto dos documentos legais */
.legal-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.82);
}

.legal-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 44px clamp(24px, 4vw, 64px);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  font-size: 14.5px;
}

.legal-footer-brand {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.08em;
  color: #fbf7ef;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}

.legal-footer a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}

.legal-footer a:hover {
  color: #fbf7ef;
}

.legal-footer-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------------------------
   Homepage — movimento (CSS-native progressive enhancement)
   -------------------------------------------------------------------------- */
@keyframes chapter-parallax {
  0% {
    transform: translate3d(0, var(--parallax-y-start, 28px), 0) scale(var(--parallax-scale-start, 1.07));
  }

  50% {
    transform: translate3d(0, var(--parallax-y-mid, 0px), 0) scale(var(--parallax-scale-mid, 1.1));
  }

  100% {
    transform: translate3d(0, var(--parallax-y-end, -28px), 0) scale(var(--parallax-scale-end, 1.14));
  }
}

@keyframes chapter-reveal {
  0% {
    opacity: 0;
    transform: translateY(var(--reveal-distance, 20px)) scale(var(--reveal-scale, 1));
    filter: blur(var(--reveal-blur, 0px));
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes chapter-veil-light {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.88;
  }
}

@keyframes hero-intro-in {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-content-exit {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0.7;
    transform: translateY(-38px);
  }
}

@keyframes entrada-screenshot-depth {
  0% {
    transform: translateY(18px) scale(0.985);
  }

  50% {
    transform: translateY(0) scale(1);
  }

  100% {
    transform: translateY(-18px) scale(1.02);
  }
}

@keyframes gabinete-background-in {
  0% {
    opacity: 0;
    transform: scale(1.06);
  }

  100% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes nav-surface {
  0% {
    background: rgba(15, 14, 13, 0.5);
  }

  100% {
    background: rgba(12, 11, 10, 0.72);
  }
}

@keyframes gabinete-shot-in {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gabinete-shot-out {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.reveal--figure {
  --reveal-distance: 12px;
  --reveal-scale: 0.98;
}

.reveal--cta {
  --reveal-distance: 8px;
}

.js .hero-intro {
  opacity: 0;
  transform: translateY(12px);
  animation: hero-intro-in 700ms var(--ease-out) both;
}

.js .hero-intro--kicker {
  animation-delay: 100ms;
}

.js .hero-intro--title {
  animation-delay: 180ms;
}

.js .hero-intro--lede {
  animation-delay: 280ms;
}

.js .hero-intro--cta {
  animation-delay: 380ms;
}

@supports (animation-timeline: view()) and (animation-range: cover) {
  .home .parallax {
    animation: chapter-parallax linear both;
    animation-timeline: view();
    animation-range: cover;
  }

  .home .chapter-veil {
    animation: chapter-veil-light linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }

  .home .reveal {
    animation: chapter-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
    transition: none;
  }

  .home .hero-content {
    animation: hero-content-exit linear both;
    animation-timeline: view();
    animation-range: exit 0% exit 45%;
  }

  .entrada-figure img {
    animation: entrada-screenshot-depth linear both;
    animation-timeline: view();
    animation-range: cover;
  }

  .home .ceu-card {
    --reveal-distance: 12px;
    opacity: 0;
    transform: translateY(var(--reveal-distance));
    animation: chapter-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
  }

  .home .ceu-card:nth-child(2) {
    animation-delay: 60ms;
  }

  .home .ceu-card:nth-child(3) {
    animation-delay: 120ms;
  }

  .nav--home .nav-bar {
    animation: nav-surface linear both;
    animation-timeline: scroll(root);
    animation-range: 0 150px;
  }
}

@supports (view-transition-name: none) {
  .chapter--gabinete .chapter-bg.is-active {
    view-transition-name: gabinete-background;
  }

  .tab-figure [data-tab-shot].is-active {
    view-transition-name: gabinete-shot;
  }

  .tab-panel.is-active {
    view-transition-name: gabinete-copy;
  }

  ::view-transition-old(gabinete-shot),
  ::view-transition-old(gabinete-copy) {
    animation: gabinete-shot-out var(--motion-base) var(--ease-out) both;
  }

  ::view-transition-new(gabinete-shot),
  ::view-transition-new(gabinete-copy) {
    animation: gabinete-shot-in var(--motion-base) var(--ease-out) both;
  }

  ::view-transition-old(gabinete-background),
  ::view-transition-new(gabinete-background) {
    animation-duration: var(--motion-slow);
    animation-timing-function: var(--ease-out);
  }
}

/* --------------------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .chapter {
    min-height: auto;
  }

  .chapter-inner,
  .chapter-inner--narrow,
  .chapter-inner--mid,
  .chapter--entrada .chapter-inner,
  .chapter--conexoes .chapter-inner {
    padding-top: clamp(104px, 18vh, 150px);
    padding-bottom: clamp(64px, 10vh, 96px);
  }

  .chapter--banquete {
    grid-template-rows: 46svh auto;
  }

  .hero-lede,
  .chapter--entrada .chapter-p,
  .chapter--conexoes .chapter-p {
    max-width: none;
  }

  .legal-footer-inner {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .nav-bar {
    gap: 12px;
  }

  .nav-brand {
    font-size: 18px;
  }

  .nav-cta {
    padding: 8px 14px;
    font-size: 12px;
    letter-spacing: 0.1em;
  }

  .lang > summary {
    padding: 7px 10px;
    letter-spacing: 0.1em;
  }

  .btn--cream,
  .btn--ghost {
    padding: 15px 24px;
    font-size: 14.5px;
  }

  .tab-panels {
    padding: 22px 20px;
  }

  .legal-lede {
    padding: 22px 22px;
    font-size: 17.5px;
  }
}

/* --------------------------------------------------------------------------
   Preferências do usuário
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .home .reveal,
  .js .hero-intro,
  .home .hero-content,
  .home .ceu-card {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none !important;
    transition: none;
  }

  .home .parallax,
  .home .chapter-veil,
  .chapter--gabinete .chapter-bg,
  .entrada-figure img,
  .nav--home .nav-bar {
    animation: none !important;
    transform: none;
    transition: none;
  }

  .chapter--gabinete .chapter-bg {
    opacity: 0;
  }

  .chapter--gabinete .chapter-bg.is-active {
    opacity: 1;
  }

  .lang-menu,
  .lang[open] .lang-menu,
  .btn,
  .btn svg,
  .link-underline,
  .nav-links a {
    transform: none;
    transition: none;
  }

  .lang-menu {
    opacity: 1;
  }

  .link-underline::after,
  .nav-links a::after {
    transition: none;
  }
}

@media print {
  .nav,
  .skip-link,
  .chapter-bg,
  .chapter-veil {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
