/* Asclepius Labs, amostra v1. Letras guardadas no próprio site (vendor/fonts). */

@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url("../vendor/fonts/hanken-grotesk-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300 500; font-display: swap;
  src: url("../vendor/fonts/hanken-grotesk-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: "Hanken Grotesk Reserva"; font-style: normal; font-weight: 300 500;
  src: local("Helvetica Neue"), local("HelveticaNeue");
  size-adjust: 99.23%; ascent-override: 100.78%; descent-override: 30.23%; line-gap-override: 0%; }

:root {
  --sans: "Hanken Grotesk", "Hanken Grotesk Reserva", "Helvetica Neue", Arial, sans-serif;

  --margem: clamp(1.25rem, 0.4rem + 3.4vw, 4.75rem);
  --texto-corpo: clamp(1.02rem, 0.96rem + 0.28vw, 1.2rem);
  --texto-titulo: clamp(1.9rem, 1.1rem + 2.5vw, 3.4rem);
  --texto-abertura: clamp(2.3rem, 1rem + 3.5vw, 4.5rem);
  --texto-miudo: 0.8125rem;
  --texto-mini: 0.75rem;
  --toque: 150ms;      /* resposta a hover e clique */
  --desliza: 240ms;    /* pequenos deslocamentos */

  --saida: cubic-bezier(0.16, 1, 0.3, 1);
  --troca: 0.7s;
}

html[data-tema="escuro"] {
  color-scheme: dark;
  --fundo: #05070d;
  --fundo-rgb: 5 7 13;
  --texto: #f4efe4;
  --texto-suave: #b6b9c6;
  --linha: rgb(244 239 228 / 0.16);
  --linha-forte: rgb(244 239 228 / 0.34);
  --destaque: #f4b860;
  --botao-fundo: #f4b860;
  --botao-fundo-ativo: #ffd08a;
  --botao-texto: #160f04;
  --vidro: rgb(12 15 24 / 0.52);
  --vidro-ativo: rgb(244 184 96 / 0.1);
  --sombra: 0 30px 80px -30px rgb(0 0 0 / 0.8);
  --selecao: rgb(244 184 96 / 0.32);
}

html[data-tema="claro"] {
  color-scheme: light;
  --fundo: #dcdddd;
  --fundo-rgb: 220 221 221;
  --texto: #111318;
  --texto-suave: #43464e;
  --linha: rgb(17 19 24 / 0.16);
  --linha-forte: rgb(17 19 24 / 0.4);
  --destaque: #8a4300;
  --botao-fundo: #111318;
  --botao-fundo-ativo: #2b2f38;
  --botao-texto: #f2f1ee;
  --vidro: rgb(236 236 235 / 0.56);
  --vidro-ativo: rgb(17 19 24 / 0.06);
  --sombra: 0 30px 70px -34px rgb(17 19 24 / 0.38);
  --selecao: rgb(214 122 20 / 0.3);
}

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

html {
  background: var(--fundo);
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  scrollbar-color: var(--linha-forte) transparent;
  scrollbar-width: thin;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--sans);
  font-size: var(--texto-corpo);
  font-weight: 300;
  line-height: 1.55;
  caret-color: var(--destaque);
  transition: background-color var(--troca) ease, color var(--troca) ease;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--selecao); color: var(--texto); }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 2px solid var(--destaque);
  outline-offset: 4px;
  border-radius: 4px;
}

.pular {
  position: fixed; left: var(--margem); top: 0.75rem; z-index: 30;
  padding: 0.6rem 1rem; border-radius: 999px;
  background: var(--botao-fundo); color: var(--botao-texto);
  font-weight: 500; text-decoration: none;
  transform: translateY(-200%);
}
.pular:focus { transform: none; }

/* ---------- cena ---------- */

#cena {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  display: block;
}

/* véu: escurece (ou clareia) só o lado onde o texto fica, para a leitura não disputar com os pontos */
.veu {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgb(var(--fundo-rgb) / 0.72) 0, rgb(var(--fundo-rgb) / 0) 9rem),
    radial-gradient(120% 90% at 50% 50%, rgb(var(--fundo-rgb) / 0) 55%, rgb(var(--fundo-rgb) / 0.55) 100%);
  transition: background var(--troca) ease;
}

#rotulos { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }

.rotulo {
  position: absolute; left: 0; top: 0;
  font-size: var(--texto-mini); font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--texto);
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity;
}

/* ---------- topo ---------- */

.topo {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem max(var(--margem), env(safe-area-inset-right)) 1rem max(var(--margem), env(safe-area-inset-left));
  padding-top: max(1rem, env(safe-area-inset-top));
}

.marca {
  font-size: var(--texto-miudo); font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  margin-right: auto;
  padding: 0.85rem 0;
}

.menu { display: flex; gap: clamp(1rem, 2.4vw, 2.4rem); }
.menu a {
  font-size: var(--texto-miudo); font-weight: 400;
  letter-spacing: 0.06em;
  text-decoration: none; white-space: nowrap;
  padding: 0.85rem 0;
  /* traço de 1px sob o link (cor única, sem degradê) */
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 0.55rem) / 0 1px no-repeat;
  transition: background-size var(--desliza) var(--saida);
}
.menu a:hover, .menu a:focus-visible, .menu a[aria-current="true"] { background-size: 100% 1px; }

.tema {
  display: flex; padding: 3px; gap: 2px;
  border: 1px solid var(--linha); border-radius: 999px;
  background: rgb(var(--fundo-rgb) / 0.4);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.tema button {
  appearance: none; border: 0; cursor: pointer;
  min-height: 2.5rem; padding: 0 0.95rem; border-radius: 999px;
  background: transparent; color: var(--texto-suave);
  font: inherit; font-size: var(--texto-mini); font-weight: 500; letter-spacing: 0.06em;
  transition: background-color var(--toque) ease, color var(--toque) ease, transform var(--toque) ease;
}
.tema button:active { transform: scale(0.96); }
.tema button:hover { color: var(--texto); }
.tema button[aria-pressed="true"] { background: var(--texto); color: var(--fundo); }

/* botão de pausar o movimento do fundo */
.pausa {
  appearance: none; cursor: pointer; position: relative;
  width: 2.75rem; height: 2.75rem; flex: none;
  border: 0; border-radius: 999px;
  background: rgb(var(--fundo-rgb) / 0.4);
  box-shadow: inset 0 0 0 1px var(--linha);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--texto-suave);
  transition: color var(--toque) ease, transform var(--toque) ease;
}
.pausa:hover { color: var(--texto); }
.pausa:active { transform: scale(0.96); }
.pausa svg {
  position: absolute; inset: 0; margin: auto; width: 1rem; height: 1rem;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  transition: opacity var(--desliza) cubic-bezier(0.2, 0, 0, 1), transform var(--desliza) cubic-bezier(0.2, 0, 0, 1), filter var(--desliza) cubic-bezier(0.2, 0, 0, 1);
}
.pausa .icone-toca { fill: currentColor; stroke-width: 1; }
.pausa[aria-pressed="false"] .icone-toca,
.pausa[aria-pressed="true"] .icone-pausa { opacity: 0; transform: scale(0.25); filter: blur(4px); }

/* ---------- partes ---------- */

main { position: relative; z-index: 3; }

.parte {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: clamp(6rem, 14vh, 10rem) var(--margem);
}

.coluna { width: min(33rem, 100%); }
.coluna.larga { width: min(40rem, 100%); }
.coluna.direita { margin-left: auto; }
.coluna.centro { margin-inline: auto; text-align: center; width: min(36rem, 100%); }

h1, h2 {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

h1 { font-size: var(--texto-abertura); line-height: 1.02; }
h2 { font-size: var(--texto-titulo); line-height: 1.08; }

p { margin: 0; max-width: 34em; color: var(--texto-suave); text-wrap: pretty; }
h1 + p, h2 + p { margin-top: clamp(1.4rem, 2.6vh, 2.2rem); }
p + p { margin-top: 1.1em; }
.centro p { margin-inline: auto; }

/* abertura */

.abertura { align-items: center; }
.abertura .coluna { width: min(50rem, 100%); }
.abertura .apoio { max-width: 27em; color: var(--texto); }

.linha { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.linha > span { display: block; }
@media (min-width: 901px) { .linha > span { white-space: nowrap; } }

@media (prefers-reduced-motion: no-preference) {
  .linha > span { animation: sobe 1.1s var(--saida) both; }
  .linha:nth-child(2) > span { animation-delay: 0.09s; }
  .linha:nth-child(3) > span { animation-delay: 0.18s; }
  .abertura .apoio, .abertura .acoes, .abertura .legenda { animation: surge 1.2s var(--saida) 0.35s both; }
}
@keyframes sobe { from { transform: translateY(108%); } to { transform: none; } }
@keyframes surge { from { opacity: 0; transform: translateY(0.8rem); } to { opacity: 1; transform: none; } }

.acoes {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.8rem;
  margin-top: clamp(1.8rem, 3.6vh, 2.8rem);
}

.botao {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.1rem; padding: 0 1.55rem; border-radius: 999px;
  background: var(--botao-fundo); color: var(--botao-texto);
  font-size: 1rem; font-weight: 500; letter-spacing: 0.005em;
  text-decoration: none;
  transition: background-color var(--toque) ease, transform var(--desliza) var(--saida);
}
.botao:hover { background: var(--botao-fundo-ativo); transform: translateY(-2px); }
.botao:active { transform: scale(0.96); transition-duration: var(--toque); }

.elo {
  font-size: 1rem; font-weight: 400;
  text-decoration: none;
  padding: 0.75rem 0;
  /* traço de 1px sob o link (cor única, sem degradê) */
  background: linear-gradient(var(--linha-forte), var(--linha-forte)) 0 calc(100% - 0.35rem) / 100% 1px no-repeat;
  transition: opacity var(--toque) ease;
}
.elo:hover { background-image: linear-gradient(currentColor, currentColor); }
.elo:active { opacity: 0.7; }

.legenda {
  position: absolute; left: var(--margem); bottom: clamp(1.4rem, 4vh, 2.6rem);
  max-width: 21rem;
  font-size: var(--texto-miudo); line-height: 1.5;
  color: var(--texto-suave);
}

/* o que fazemos */

.lista { margin: clamp(2rem, 4vh, 3rem) 0 0; border-bottom: 1px solid var(--linha); }
.lista > div {
  display: grid; grid-template-columns: minmax(9.5rem, 0.42fr) 1fr; gap: 0.4rem 1.6rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--linha);
}
.lista dt { font-size: 1.2em; font-weight: 400; letter-spacing: -0.012em; line-height: 1.25; }
.lista dd { margin: 0; color: var(--texto-suave); }

/* trabalhos */

.conta { color: var(--destaque); font-variant-numeric: tabular-nums; font-weight: 400; }

.vidro {
  list-style: none; margin: clamp(1.8rem, 4vh, 2.8rem) 0 0; padding: 0.35rem;
  border-radius: 22px;
  background: var(--vidro);
  /* o vidro existe para os pontos passarem por trás da lista; contorno e sombra numa regra só */
  -webkit-backdrop-filter: blur(18px) saturate(1.25); backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: inset 0 0 0 1px var(--linha), var(--sombra);
  isolation: isolate;
}
.vidro li + li { border-top: 1px solid var(--linha); }
.vidro li > * {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "nome onde" "tipo onde";
  align-items: center; gap: 0.1rem 1.2rem;
  padding: 1rem 1.125rem; border-radius: 16px;
  text-decoration: none;
  transition: background-color var(--toque) ease;
}
.vidro .nome { grid-area: nome; font-weight: 400; font-size: 1.2em; letter-spacing: -0.012em; line-height: 1.25; }
.vidro .tipo { grid-area: tipo; font-size: var(--texto-miudo); color: var(--texto-suave); }
.vidro .onde {
  grid-area: onde; font-size: var(--texto-miudo); color: var(--texto-suave);
  transition: color var(--toque) ease, transform var(--desliza) var(--saida);
}
.vidro a:hover, .vidro a:focus-visible { background: var(--vidro-ativo); }
.vidro a:active { background: var(--vidro-ativo); opacity: 0.8; }
.vidro a:hover .onde, .vidro a:focus-visible .onde { color: var(--destaque); transform: translateX(-4px); }
/* seta de "abre em outro endereço", desenhada (não é letra) */
.vidro a .onde::after {
  content: ""; display: inline-block; width: 0.62em; height: 0.62em; margin-left: 0.5em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 9.5 9.5 2.5M4 2.5h5.5V8' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 9.5 9.5 2.5M4 2.5h5.5V8' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* fecho */

.fecho .botao { margin-top: clamp(1.8rem, 3.6vh, 2.6rem); }
.nota { margin-top: 1.1rem; font-size: var(--texto-miudo); }

.rodape {
  position: relative; z-index: 3;
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 1.6rem var(--margem) 2rem;
  border-top: 1px solid var(--linha);
  font-size: var(--texto-miudo); color: var(--texto-suave);
}
.rodape { align-items: center; }
.rodape a { text-decoration: none; padding: 0.75rem 0; }
.rodape a:hover { color: var(--texto); text-decoration: underline; }

/* ---------- telas estreitas ---------- */

@media (max-width: 900px) {
  .veu {
    background:
      linear-gradient(180deg, rgb(var(--fundo-rgb) / 0.78) 0, rgb(var(--fundo-rgb) / 0) 8rem),
      linear-gradient(180deg, rgb(var(--fundo-rgb) / 0.35), rgb(var(--fundo-rgb) / 0.35));
  }
  .coluna, .coluna.larga, .abertura .coluna { width: 100%; }
  .coluna.direita { margin-left: 0; }
  /* a abertura ganha meia tela a mais: o texto sobe e as placas ficam sozinhas antes de se juntarem */
  .abertura { align-items: flex-start; padding-top: clamp(6.5rem, 16vh, 9rem); min-height: 150vh; min-height: 150svh; }
  .legenda { position: static; margin-top: 2.2rem; max-width: none; }
  .abertura { flex-direction: column; }
}

@media (max-width: 760px) {
  .menu { display: none; }
}

@media (max-width: 640px) {
  .topo { gap: 0.5rem; }
  .marca { letter-spacing: 0.12em; }
  .tema button { padding: 0 0.7rem; }
  .lista > div { grid-template-columns: 1fr; }
  .vidro li > * { grid-template-columns: 1fr; grid-template-areas: "nome" "tipo" "onde"; }
  .vidro .onde { margin-top: 0.3rem; }
  .botao { width: 100%; }
  .acoes { gap: 0.6rem 1.8rem; }
  .rotulo { font-size: 0.6875rem; }
}

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