/* Tema do site estático altalinguagem.com (Central, out/2026).
   Sem JavaScript; o menu do celular usa a etiqueta details. Sem estilo embutido no HTML
   (a CSP não tem 'unsafe-inline'). Fontes servidas do próprio site (EB Garamond, OFL). */

@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fontes/EBGaramond-Variable.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fontes/EBGaramond-Italic-Variable.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --papel: #f6f1e7;
  --papel-2: #ede5d5;
  --papel-3: #e4d9c4;
  --tinta: #1f1c18;
  --tinta-2: #514a40;
  --tinta-3: #6f675b;
  --linha: #d6cab4;
  --ouro: #8a6516;
  --ouro-vivo: #e0b54a;
  --ouro-claro: #f0d48a;
  --noite: #16130f;
  --noite-2: #241f18;
  --noite-texto: #ece3d0;
  --noite-texto-2: #b9ae98;
  --serif: "EB Garamond", "Garamond", "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --largura: 1180px;
  --medida: 40rem;
  --raio: 3px;
  --sombra: 0 1px 2px rgba(31, 28, 24, .08), 0 8px 24px -12px rgba(31, 28, 24, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.06rem + .28vw, 1.3rem);
  line-height: 1.6;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ouro); }
:focus-visible { outline: 2px solid var(--ouro); outline-offset: 3px; }
h1, h2, h3 { font-weight: 500; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.7rem); }
h2 { font-size: clamp(1.75rem, 1.35rem + 1.7vw, 2.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; text-wrap: pretty; }

.pular {
  position: absolute; left: -999px; top: 0;
  background: var(--tinta); color: var(--papel); padding: .5em 1em; z-index: 20;
}
.pular:focus { left: 1rem; top: 1rem; }

.contem { width: min(100% - 2.5rem, var(--largura)); margin-inline: auto; }
.versalete {
  font-variant-caps: all-small-caps;
  letter-spacing: .08em;
  font-variant-numeric: lining-nums;
}
.chapeu {
  font-variant-caps: all-small-caps; letter-spacing: .14em; font-size: 1.05rem;
  color: var(--ouro); margin: 0 0 .9rem; font-weight: 600;
}

/* ---------- cabeçalho ---------- */
.topo {
  position: sticky; top: 0; z-index: 10;
  background: rgba(246, 241, 231, .96);
  border-bottom: 1px solid var(--linha);
}
.topo-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.marca { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.marca img { width: 2.9rem; height: 2.9rem; }
.marca span { font-size: 1.35rem; font-variant-caps: all-small-caps; letter-spacing: .1em; font-weight: 600; }
.marca:hover { color: inherit; }
.marca span { white-space: nowrap; }
@media (max-width: 479px) {
  .marca img { width: 2.5rem; height: 2.5rem; }
  .marca span { font-size: 1.12rem; letter-spacing: .07em; }
}

.nav-larga ul { display: flex; gap: clamp(1rem, 2vw, 1.8rem); list-style: none; margin: 0; padding: 0; }
.nav-larga a, .menu-movel a {
  text-decoration: none; font-variant-caps: all-small-caps; letter-spacing: .09em; font-size: 1.12rem; font-weight: 500;
}
.nav-larga a[aria-current="page"] { border-bottom: 1px solid var(--ouro); }

.menu-movel { display: none; }
.menu-movel summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .55rem;
  font-variant-caps: all-small-caps; letter-spacing: .1em; font-size: 1.15rem; font-weight: 600;
  padding: .4rem .2rem;
}
.menu-movel summary::-webkit-details-marker { display: none; }
.menu-movel summary::before {
  content: ""; width: 1.25rem; height: .8rem;
  border-top: 2px solid currentColor; border-bottom: 2px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
}
.menu-movel[open] summary::before {
  height: 1.1rem; border: 0;
  background:
    linear-gradient(45deg, transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(-45deg, transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px));
}
.menu-painel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--papel); border-bottom: 1px solid var(--linha);
  box-shadow: 0 18px 30px -20px rgba(31, 28, 24, .45);
  padding: .5rem 1.25rem 1.5rem; max-height: calc(100vh - 4.25rem); overflow-y: auto;
}
.menu-painel ul { list-style: none; margin: 0; padding: 0; }
.menu-painel nav a { display: block; padding: .65rem 0; border-bottom: 1px solid var(--linha); font-size: 1.3rem; }
.menu-grupos { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 1rem 1.5rem; margin-top: 1.1rem; }
.menu-grupos h3 { font-size: 1rem; color: var(--ouro); margin: 0 0 .3rem; font-variant-caps: all-small-caps; letter-spacing: .12em; font-weight: 600; }
.menu-grupos a { display: block; padding: .3rem 0; font-size: 1.1rem; font-variant-caps: normal; letter-spacing: 0; line-height: 1.3; }

@media (max-width: 899px) {
  .nav-larga { display: none; }
  .menu-movel { display: block; }
}

/* ---------- botões ---------- */
.botoes { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.botao {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem;
  padding: .55rem 1.5rem; border-radius: var(--raio); text-decoration: none;
  font-variant-caps: all-small-caps; letter-spacing: .12em; font-size: 1.15rem; font-weight: 600;
  background: var(--tinta); color: var(--papel); border: 1px solid var(--tinta);
  transition: background-color .15s, color .15s, border-color .15s;
}
.botao:hover { background: var(--ouro); border-color: var(--ouro); color: #fff; }
.botao-ouro { background: var(--ouro-vivo); border-color: var(--ouro-vivo); color: var(--tinta); }
.botao-ouro:hover { background: var(--ouro-claro); border-color: var(--ouro-claro); color: var(--tinta); }
.botao-linha { background: transparent; color: var(--tinta); border-color: var(--tinta-3); }
.botao-linha:hover { background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
.escuro .botao-linha { color: var(--noite-texto); border-color: var(--noite-texto-2); }
.escuro .botao-linha:hover { background: var(--noite-texto); color: var(--noite); }

/* ---------- seções ---------- */
.secao { padding-block: clamp(3.5rem, 2rem + 6vw, 6.5rem); }
.secao-2 { background: var(--papel-2); }
.escuro { background: var(--noite); color: var(--noite-texto); }
.escuro a:hover { color: var(--ouro-claro); }
.escuro .chapeu { color: var(--ouro-vivo); }
.cabeca-secao { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2.4rem; }
.cabeca-secao p { margin: 0; color: var(--tinta-2); max-width: 34rem; }
.cabeca-secao h2 { margin: 0 0 .25em; }

.dupla { display: grid; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
@media (min-width: 900px) {
  .dupla { grid-template-columns: 1.05fr .95fr; }
  .dupla-inversa > :first-child { order: 2; }
}
.lead { font-size: 1.2em; color: var(--tinta-2); max-width: 34rem; }
.escuro .lead, .escuro p { color: var(--noite-texto-2); }
.escuro h2 { color: var(--noite-texto); }

.abertura { padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem); }
.abertura h1 { max-width: 15ch; }
.figura-moldura { border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra); }
.figura-moldura img { width: 100%; }
.escuro .figura-moldura { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); }

/* ---------- livros ---------- */
.grade-livros {
  display: grid; gap: 2.2rem 1.4rem; list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(10.5rem, 38vw), 1fr));
}
@media (max-width: 899px) {
  .grade-livros.faixa {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(11rem, 44vw);
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; overscroll-behavior-x: contain;
  }
  .grade-livros.faixa > li { scroll-snap-align: start; }
}
.livro { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.livro-capa {
  position: relative; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 3 / 4; background: var(--papel-2); border-radius: var(--raio);
  overflow: hidden; margin-bottom: .85rem;
  box-shadow: inset 0 0 0 1px rgba(31, 28, 24, .06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.secao-2 .livro-capa { background: var(--papel); }
.livro-capa img { width: 100%; height: 100%; object-fit: contain; }
.livro:hover .livro-capa { transform: translateY(-3px); box-shadow: var(--sombra); }
.livro:hover { color: inherit; }
.livro-titulo { font-size: 1.12rem; line-height: 1.25; font-weight: 600; }
.livro-autor { font-style: italic; color: var(--tinta-2); font-size: 1.02rem; margin-top: .2rem; }
.livro-formato {
  font-variant-caps: all-small-caps; letter-spacing: .1em; color: var(--tinta-3); font-size: .98rem; margin-top: .15rem;
}
.livro-acao {
  margin-top: auto; padding-top: .55rem; color: var(--ouro);
  font-variant-caps: all-small-caps; letter-spacing: .05em; font-weight: 600; font-size: 1rem;
}
.livro:hover .livro-acao { text-decoration: underline; text-underline-offset: .2em; }
.selo {
  position: absolute; z-index: 1; left: .5rem; top: .5rem; background: var(--tinta); color: var(--papel);
  font-variant-caps: all-small-caps; letter-spacing: .1em; font-size: .92rem; padding: .05rem .5rem; border-radius: 2px;
}
.livro-indisponivel .livro-capa img { opacity: .72; filter: grayscale(.35); }

.pagina-cabeca { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); border-bottom: 1px solid var(--linha); }
.pagina-cabeca + .secao { padding-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.pagina-cabeca p { color: var(--tinta-2); max-width: 38rem; margin: 0; }
.indice { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: 1.4rem; padding: 0; list-style: none; }
.indice a { font-variant-caps: all-small-caps; letter-spacing: .1em; font-weight: 600; text-decoration: none; color: var(--ouro); }
.grupo-livros { scroll-margin-top: 5.5rem; }
.grupo-livros + .grupo-livros { margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); }
.grupo-livros > h2 { display: flex; align-items: baseline; gap: .7rem; }
.grupo-livros > h2 small { font-size: 1.05rem; color: var(--tinta-3); font-weight: 400; font-variant-numeric: lining-nums; }
.nota { color: var(--tinta-3); font-style: italic; margin: -.3rem 0 1.6rem; }

/* ---------- citação e texto corrido ---------- */
.citacao { max-width: 46rem; margin: 0 auto; text-align: center; }
.citacao blockquote { margin: 0; font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2.1rem); line-height: 1.35; font-style: italic; }
.citacao blockquote::before {
  content: "\201C"; display: block; font-size: 4rem; line-height: .6; color: var(--ouro); font-style: normal; margin-bottom: .6rem;
}
.citacao p { margin-top: 1.3rem; }

.ornamento { border: 0; height: 1rem; margin: 2.8rem auto; max-width: 12rem; position: relative; overflow: visible; }
.ornamento::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--linha);
}
.ornamento::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: .5rem; height: .5rem; margin: -.25rem 0 0 -.25rem;
  background: var(--papel); border: 1px solid var(--ouro); transform: rotate(45deg);
}

.texto { max-width: var(--medida); margin-inline: auto; hyphens: auto; -webkit-hyphens: auto; }
.texto p { text-align: justify; }
@media (max-width: 599px) { .texto p { text-align: left; hyphens: manual; -webkit-hyphens: manual; } .grade-livros { gap: 1.8rem 1rem; } .livro-titulo { font-size: 1.06rem; } }
@media (max-width: 899px) { .livro-acao { font-size: .95rem; letter-spacing: .03em; } }
.texto > p:first-of-type::first-letter {
  float: left; font-size: 4.1em; line-height: .82; padding: .06em .08em 0 0; color: var(--ouro); font-weight: 500;
}
.texto h2 { margin-top: 2.2rem; text-align: center; }
.texto blockquote {
  margin: 1.6rem 0; padding: .3rem 0 .3rem 1.3rem; border-left: 2px solid var(--ouro);
  color: var(--tinta-2); font-size: .97em;
}
.texto blockquote p { text-align: left; }
.texto .botoes { justify-content: center; margin: 2.2rem 0 1rem; }

/* ---------- ouvir, assistir, apoiar ---------- */
.colunas-links { display: grid; gap: 2rem 3rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.colunas-links h3 { font-variant-caps: all-small-caps; letter-spacing: .12em; color: var(--ouro); font-weight: 600; font-size: 1.15rem; margin-bottom: .6rem; }
.lista-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linha); }
.lista-links li { border-bottom: 1px solid var(--linha); }
.lista-links a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .6rem 0; text-decoration: none; }
.lista-links a::after { content: "\2192"; color: var(--tinta-3); }
.lista-links a:hover::after { color: var(--ouro); }

/* ---------- contato ---------- */
.redes { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); list-style: none; padding: 0; margin: 2rem 0 0; }
.redes a {
  display: block; padding: 1.2rem 1.4rem; border: 1px solid var(--linha); border-radius: var(--raio);
  background: var(--papel); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.redes a:hover { border-color: var(--ouro); box-shadow: var(--sombra); color: inherit; }
.redes strong { display: block; font-size: 1.3rem; font-weight: 600; }
.redes span { color: var(--tinta-2); font-style: italic; }

/* ---------- rodapé ---------- */
.rodape { background: var(--noite); color: var(--noite-texto-2); padding-block: 4rem 2rem; font-size: 1.05rem; }
.rodape a { text-decoration: none; color: var(--noite-texto); }
.rodape a:hover { color: var(--ouro-claro); }
.rodape-grade { display: grid; gap: 2.2rem 2rem; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); }
.rodape-marca img { width: 6rem; margin-bottom: 1rem; }
.rodape-marca p { max-width: 17rem; }
.rodape h3 { color: var(--ouro-vivo); font-size: 1rem; font-variant-caps: all-small-caps; letter-spacing: .14em; font-weight: 600; margin-bottom: .7rem; }
.rodape ul { list-style: none; margin: 0; padding: 0; }
.rodape .rodape-sub { margin-top: 1.6rem; }
.rodape li { padding: .18rem 0; }
.rodape-base {
  margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid rgba(236, 227, 208, .14);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; font-size: .98rem;
}

/* ---------- 404 ---------- */
.erro { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: 4rem; }
.erro .botoes { justify-content: center; }
.erro .numero { font-size: clamp(4rem, 3rem + 6vw, 8rem); color: var(--ouro); line-height: 1; margin-bottom: .5rem; font-variant-numeric: lining-nums; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media print {
  .topo, .rodape, .botoes { display: none; }
  body { background: #fff; }
}
