/* ============================================================
   fernandojaccoud.com — estilo
   Fontes: Bodoni Moda (textos e títulos) e Hanken Grotesk (menu e detalhes)
   As cores --fundo e --tinta mudam durante a rolagem (principal.js).
   ============================================================ */

@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/bodoni-moda.woff2) format('woff2-variations'), url(../fonts/bodoni-moda.woff2) format('woff2');
}
@font-face {
  font-family: 'Bodoni Moda';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url(../fonts/bodoni-moda-italico.woff2) format('woff2-variations'), url(../fonts/bodoni-moda-italico.woff2) format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/hanken-grotesk.woff2) format('woff2-variations'), url(../fonts/hanken-grotesk.woff2) format('woff2');
}

:root {
  --fundo: #dad7e3;
  --tinta: #26233f;
  --suave: color-mix(in srgb, var(--tinta) 64%, var(--fundo));
  --serif: 'Bodoni Moda', 'Bodoni 72', Didot, Georgia, serif;
  --sans: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --margem: clamp(20px, 4vw, 64px);
  --topo: 64px;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--fundo);
  color: var(--tinta);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--tinta); color: var(--fundo); }
:focus-visible { outline: 1.5px solid currentColor; outline-offset: 4px; }

.pular {
  position: absolute; left: var(--margem); top: -60px; z-index: 20;
  font-family: var(--sans); font-size: 13px; background: var(--tinta); color: var(--fundo); padding: 8px 12px;
}
.pular:focus { top: 12px; }

/* ---------- topo (menu) ---------- */

.topo {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  height: var(--topo);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 var(--margem);
  color: var(--tinta);
  transition: background-color .35s ease;
}
.topo.solido {
  background: color-mix(in srgb, var(--fundo) 86%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.marca {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 450;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .4s ease;
}
.marca-logo {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 11; stroke-linejoin: round;
}
.inicio .marca { opacity: 0; pointer-events: none; }
.inicio.passou .marca { opacity: 1; pointer-events: auto; }

.menu { display: flex; gap: clamp(18px, 2.4vw, 36px); }
.menu a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 450;
  letter-spacing: .01em;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.menu a:hover, .menu a[aria-current="page"] { border-bottom-color: currentColor; }

@media (max-width: 520px) {
  .topo { gap: 12px; }
  .marca { font-size: 15px; gap: 8px; }
  .marca-logo { width: 20px; height: 20px; }
  .menu { gap: 16px; }
  .menu a { font-size: 13px; }
}
@media (max-width: 400px) {
  .marca .nome-1 { display: none; }
}

/* ---------- abertura ---------- */

.abertura {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
}
.logo-caixa {
  position: absolute;
  left: 50%; top: 44%;
  width: min(80vw, 54svh);
  transform: translate(-50%, -50%);
}
.logo { display: block; width: 100%; height: auto; overflow: visible; touch-action: manipulation; }
.logo-rosa, .logo-circulo { fill: none; stroke: currentColor; stroke-linejoin: round; pointer-events: none; }

.regiao {
  fill: var(--cor, transparent);
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: fill .55s ease;
}
.regiao[data-estado="0"]:hover { fill: color-mix(in srgb, currentColor 7%, transparent); }
.regiao:focus-visible { stroke: currentColor; stroke-width: .9; stroke-dasharray: 2 2; }

.apagar {
  position: absolute; left: 50%; top: 100%;
  transform: translate(-50%, 10px);
  background: none; border: 0; padding: 6px 4px; cursor: pointer;
  color: var(--suave);
  font-family: var(--sans); font-size: 13px;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.apagar[hidden] { display: none; }
.logo-rosa {
  stroke-width: .85;
  stroke-dasharray: 1;
  animation: tracar 4.2s cubic-bezier(.5, .1, .2, 1) .25s both;
}
.logo-circulo {
  stroke-width: .5;
  opacity: .28;
  animation: surgir 1.6s ease 3.6s both;
}

.abertura .pe {
  position: absolute;
  left: var(--margem); right: var(--margem); bottom: 26px;
  display: flex; flex-direction: column; gap: 14px;
}
.nome {
  margin: 0;
  font-family: var(--serif);
  font-weight: 420;
  font-variation-settings: 'opsz' 96;
  font-size: 13.2vw;
  line-height: .9;
  letter-spacing: -.015em;
  animation: subir 1.6s cubic-bezier(.2, .7, .1, 1) .5s both;
}
.pe-dir { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.frase {
  margin: 0;
  font-style: italic;
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.3;
}
.rolar {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .01em;
  color: var(--suave);
  white-space: nowrap;
}

@keyframes tracar { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes surgir { from { opacity: 0; } }
@keyframes subir { from { transform: translateY(18%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- seções (celular primeiro) ---------- */

.secao { position: relative; padding: 14vh 0; }
.foto { margin: 0; }
.foto img { width: 100%; height: auto; }

.texto { padding: 7vh var(--margem) 0; max-width: 40em; }
.texto p { margin: 0; }
.texto p + p { margin-top: .95em; }
.texto p.continua { margin-top: 0; }

.corpo, .resto { font-size: 18px; line-height: 1.62; }
.grande .corpo { font-size: clamp(25px, 6.4vw, 30px); line-height: 1.26; font-style: italic; }
.grande .corpo p + p { margin-top: .7em; }

.resto { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .8s cubic-bezier(.3, .7, .1, 1); }
.resto > div { overflow: hidden; opacity: 0; transition: opacity .6s ease .1s; }
.resto > div > p:first-child:not(.continua) { margin-top: .95em; }
.aberto .resto { grid-template-rows: 1fr; }
.aberto .resto > div { opacity: 1; }

.ler {
  margin-top: 1.4em;
  padding: 4px 0;
  background: none; border: 0;
  color: inherit;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
  cursor: pointer;
}
.credito {
  margin-top: 2.2em !important;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.4;
  color: var(--suave);
}
.reservado {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--suave);
  border: 1px dashed var(--suave);
  padding: 16px 18px;
}
.reservado code { font-size: 13px; }

.l-texto { padding: 22vh 0; }
.l-texto .texto { padding-top: 0; }
.l-pequena .foto { width: 76%; margin-left: auto; }

/* ---------- rodapé ---------- */

.fim {
  padding: 22vh var(--margem) 32px;
}
.fim-links { display: flex; flex-direction: column; }
.fim-links a {
  font-family: var(--serif);
  font-weight: 430;
  font-variation-settings: 'opsz' 96;
  font-size: 15vw;
  line-height: .95;
  text-decoration: none;
  letter-spacing: -.015em;
}
.fim-links a:hover { font-style: italic; }
.assinatura {
  margin: 16vh 0 0;
  display: flex; justify-content: space-between; gap: 16px;
  font-family: var(--sans); font-size: 12px; color: var(--suave);
}

/* ---------- telas largas ---------- */

@media (min-width: 900px) {
  body { font-size: 19px; }

  .logo-caixa { top: 45%; width: min(46vw, 60svh); }
  .logo-rosa { stroke-width: .55; }
  .logo-circulo { stroke-width: .35; }
  .abertura .pe { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 40px; bottom: 32px; }
  .nome { font-size: clamp(56px, 6.4vw, 112px); }
  .pe-dir { flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; padding-bottom: .5em; }

  .secao {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 2vw;
    align-items: center;
    padding: 18vh var(--margem);
  }
  .texto { padding: 0; }
  .corpo, .resto { font-size: clamp(18px, 1.3vw, 21px); }
  .grande .corpo { font-size: clamp(30px, 2.9vw, 48px); }

  .foto img { width: auto; height: auto; max-width: 100%; max-height: 88svh; }

  .l-esquerda .foto { grid-column: 1 / 7; justify-self: start; margin-left: calc(-1 * var(--margem)); }
  .l-esquerda .texto { grid-column: 8 / 12; }

  .l-direita .foto { grid-column: 7 / 13; grid-row: 1; justify-self: end; margin-right: calc(-1 * var(--margem)); }
  .l-direita .texto { grid-column: 2 / 6; grid-row: 1; }

  .l-pequena { align-items: start; }
  .l-pequena .foto { grid-column: 8 / 12; grid-row: 1; width: auto; justify-self: end; }
  .l-pequena .foto img { max-height: 70svh; }
  .l-pequena .texto { grid-column: 2 / 6; grid-row: 1; margin-top: 12vh; }

  .l-cheia { padding-left: 0; padding-right: 0; }
  .l-cheia .foto { grid-column: 1 / -1; }
  .l-cheia .foto img { width: 100%; max-height: none; }
  .l-cheia .texto { grid-column: 2 / 7; padding-top: 9vh; }

  .l-larga .foto { grid-column: 3 / 13; justify-self: end; margin-right: calc(-1 * var(--margem)); }
  .l-larga .foto img { max-height: 92svh; }
  .l-larga .texto { grid-column: 3 / 8; padding-top: 8vh; }

  .l-texto { padding: 28vh var(--margem); }
  .l-texto .texto { grid-column: 3 / 10; max-width: none; }
  .l-texto .grande { grid-column: 3 / 11; }

  .fim { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 2vw; }
  .fim-links { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
  .fim-links a { font-size: 7.4vw; }
  .assinatura { grid-column: 1 / -1; }
}


/* ---------- player secreto ---------- */

.player {
  position: fixed; z-index: 30;
  left: 12px; right: 12px; bottom: 12px;
  background: var(--fundo);
  color: var(--tinta);
  border: 1px solid color-mix(in srgb, var(--tinta) 22%, transparent);
  box-shadow: 0 20px 60px rgba(20, 20, 40, .22);
  opacity: 0; transform: translateY(16px);
  transition: opacity .4s ease, transform .4s cubic-bezier(.2, .7, .1, 1);
}
.player.visivel { opacity: 1; transform: none; }
.player[hidden] { display: none; }
.player-video { position: relative; width: 100%; height: max(220px, calc((100vw - 26px) * 9 / 16)); background: #000; }
.player-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-aviso {
  position: absolute; inset: auto 0 0 0; margin: 0; padding: 10px 14px;
  font-family: var(--sans); font-size: 13px; color: #fff; background: rgba(0, 0, 0, .7);
}
.player-info { padding: 14px 16px 0; }
.player-info p { margin: 0; }
.player-faixa { font-style: italic; font-size: 21px; line-height: 1.2; text-transform: lowercase; }
.player-artista { margin-top: 2px !important; font-family: var(--sans); font-size: 13px; color: var(--suave); text-transform: lowercase; }
.player-controles { display: flex; gap: 18px; padding: 10px 16px 14px; }
.player-controles button, .player-lista button {
  background: none; border: 0; padding: 4px 0; color: inherit; cursor: pointer; font-family: var(--sans); font-size: 13px;
}
.player-controles button { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.player-fechar { margin-left: auto; color: var(--suave) !important; }
.player-lista { display: none; }

@media (min-width: 640px) {
  .player { left: auto; right: var(--margem); bottom: 20px; width: 392px; }
  .player-video { height: 220px; }
  .player-lista {
    display: block; list-style: none; margin: 0 16px; padding: 10px 0 12px;
    border-top: 1px solid color-mix(in srgb, var(--tinta) 18%, transparent);
    counter-reset: faixa;
  }
  .player-lista li { counter-increment: faixa; display: flex; gap: 10px; align-items: baseline; }
  .player-lista li::before { content: counter(faixa); font-family: var(--sans); font-size: 11px; color: var(--suave); min-width: 12px; }
  .player-lista button { font-family: var(--serif); font-size: 16px; text-align: left; text-transform: lowercase; }
  .player-lista button[aria-current] { font-style: italic; }
}

/* ============================================================
   Páginas internas (Biblioteca, YouTube, leitura)
   ============================================================ */

.pagina { --fundo: #dde3ea; --tinta: #1c2a40; }
.pagina.pag-youtube { --fundo: #e6dcd6; --tinta: #3a1d1a; }
.pagina .topo { background: color-mix(in srgb, var(--fundo) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }

.cabeca {
  padding: calc(var(--topo) + 10vh) var(--margem) 6vh;
}
.cabeca h1 {
  margin: 0;
  font-weight: 430;
  font-variation-settings: 'opsz' 96;
  font-size: 17vw;
  line-height: .9;
  letter-spacing: -.015em;
}
.cabeca p {
  margin: 4vh 0 0;
  max-width: 34em;
  font-style: italic;
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.35;
}

.filtros {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  padding: 0 var(--margem) 5vh;
  border-bottom: 1px solid color-mix(in srgb, var(--tinta) 22%, transparent);
  margin: 0 var(--margem);
  padding-left: 0; padding-right: 0;
}
.filtros button {
  background: none; border: 0; padding: 6px 0; color: inherit; cursor: pointer;
  font-family: var(--sans); font-size: 14px; font-weight: 450; letter-spacing: .01em; text-transform: lowercase;
  border-bottom: 1px solid transparent;
}
.filtros button sup { font-size: 10px; letter-spacing: 0; margin-left: 3px; color: var(--suave); }
.filtros button[aria-pressed="true"] { border-bottom-color: currentColor; }

.lista { list-style: none; margin: 0; padding: 0 var(--margem) 14vh; }
.item {
  display: grid; gap: 10px;
  padding: 5vh 0;
  border-bottom: 1px solid color-mix(in srgb, var(--tinta) 22%, transparent);
}
.item h2 { margin: 0; font-weight: 450; font-size: clamp(26px, 3vw, 40px); line-height: 1.12; }
.item h2 a { text-decoration: none; }
.item h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.item .detalhe { margin: 0; font-family: var(--sans); font-size: 13px; color: var(--suave); text-transform: lowercase; }
.item .detalhe span + span { margin-left: 18px; }
.item .resumo { margin: 0; max-width: 36em; }
.item .acoes { display: flex; gap: 24px; margin-top: 6px; }
.item .acoes a {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
}
.vazio {
  padding: 8vh 0 0;
  font-style: italic;
  font-size: clamp(20px, 1.8vw, 26px);
  color: var(--suave);
}

@media (min-width: 900px) {
  .cabeca h1 { font-size: 10vw; }
  .item { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 2vw; align-items: baseline; }
  .item h2 { grid-column: 1 / 7; }
  .item .detalhe { grid-column: 7 / 9; }
  .item .resumo { grid-column: 9 / 13; font-size: 17px; }
  .item .acoes { grid-column: 9 / 13; }
}

/* ---------- YouTube ---------- */

.videos {
  list-style: none; margin: 0; padding: 4vh var(--margem) 14vh;
  display: grid; gap: 7vh 2vw;
}
.video .tela {
  position: relative; aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--tinta) 14%, var(--fundo));
  overflow: hidden;
}
.video .tela img, .video .tela iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video .tocar {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: none; border: 0; cursor: pointer; padding: 0;
}
.video .tocar span {
  position: absolute; left: 18px; bottom: 16px;
  font-family: var(--sans); font-size: 13px; font-weight: 450; letter-spacing: .01em;
  color: #fff; background: rgba(0, 0, 0, .55); padding: 7px 12px;
}
.video h2 { margin: 16px 0 0; font-weight: 450; font-size: clamp(21px, 1.8vw, 28px); line-height: 1.2; }
.video .detalhe { margin: 6px 0 0; font-family: var(--sans); font-size: 13px; color: var(--suave); }

@media (min-width: 900px) {
  .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- página de leitura ---------- */

.leitura { padding: calc(var(--topo) + 10vh) var(--margem) 16vh; }
.leitura .voltar { font-family: var(--sans); font-size: 13px; font-weight: 500; }
.leitura header { max-width: 36em; margin: 6vh auto 7vh; }
.leitura h1 { margin: 0; font-weight: 450; font-size: clamp(36px, 5vw, 72px); line-height: 1.04; }
.leitura .detalhe { margin: 18px 0 0; font-family: var(--sans); font-size: 13px; color: var(--suave); text-transform: lowercase; }
.leitura .detalhe span + span { margin-left: 18px; }
.baixar {
  display: inline-block; margin-top: 26px; padding: 12px 18px;
  font-family: var(--sans); font-size: 13px; font-weight: 450; letter-spacing: .01em;
  text-decoration: none; border: 1px solid currentColor;
}
.baixar:hover { background: var(--tinta); color: var(--fundo); }
.artigo { max-width: 36em; margin: 0 auto; font-size: 19px; line-height: 1.7; }
.artigo h2 { font-weight: 500; font-size: 1.5em; line-height: 1.2; margin: 2.2em 0 .6em; }
.artigo h3 { font-weight: 500; font-size: 1.15em; margin: 1.8em 0 .4em; }
.artigo p { margin: 0 0 1em; }
.artigo blockquote { margin: 1.6em 0; padding-left: 1.2em; border-left: 1px solid currentColor; font-style: italic; }
.artigo ul, .artigo ol { padding-left: 1.3em; }
.artigo table { width: 100%; border-collapse: collapse; font-size: .9em; margin: 1.6em 0; }
.artigo th, .artigo td { text-align: left; padding: 8px 10px; border-bottom: 1px solid color-mix(in srgb, var(--tinta) 22%, transparent); }
.artigo .notas { font-size: .85em; color: var(--suave); border-top: 1px solid color-mix(in srgb, var(--tinta) 22%, transparent); margin-top: 3em; padding-top: 1.4em; }

/* ---------- menos movimento ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .topo, .ler, .baixar { display: none; }
  .resto { grid-template-rows: 1fr; }
  .resto > div { opacity: 1; }
}
