/* ==========================================================================
   Museu Mastodonte — CTC Mastodonte
   Paleta tirada dos materiais do próprio museu: breu de caverna, osso,
   âmbar fóssil e sedimento.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Cores */
  --breu: #0d0a07;
  --basalto: #17120d;
  --basalto-2: #221a13;
  --osso: #eadfc8;
  --osso-gasto: #a39680;
  --ambar: #c99a5b;
  --sedimento: #cdbf9f;
  --sedimento-tinta: #2a1f16;
  --sedimento-gasto: #5c4c3b;
  --linha: rgba(234, 223, 200, 0.14);
  --linha-forte: rgba(234, 223, 200, 0.32);

  /* Tipografia */
  --font-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-tag: "Courier Prime", "Courier New", ui-monospace, monospace;

  --fs-tag: 0.75rem;
  --fs-small: 0.875rem;
  --fs-body: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  --fs-lead: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  --fs-caps: clamp(1.25rem, 0.8rem + 2vw, 3rem);
  --fs-serif: clamp(3rem, 1.4rem + 7vw, 8.5rem);
  --fs-mega: 19.4vw;

  /* Layout */
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 3rem);
  --container: 1440px;
  --header-h: 76px;
  --space-section: clamp(6rem, 4rem + 8vw, 12rem);

  /* Movimento */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 350;
  line-height: 1.6;
  color: var(--osso);
  background-color: var(--breu);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Grão de filme sobre tudo */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img,
picture,
video,
svg,
canvas,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

em {
  font-style: italic;
}

::selection {
  background: var(--ambar);
  color: var(--breu);
}

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

/* ---------- 3. Utilitários ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: var(--gutter);
  z-index: 300;
  padding: 0.75rem 1.25rem;
  background: var(--osso);
  color: var(--breu);
}

.skip-link:focus {
  top: 1rem;
}

/* Etiqueta de acervo */
.tag {
  font-family: var(--font-tag);
  font-size: var(--fs-tag);
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--osso-gasto);
}

.link {
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.5s var(--ease), color 0.3s;
}

.link:hover {
  color: var(--ambar);
  background-size: 0% 1px;
  background-position: right bottom;
}

/* Título de seção: caixa-alta larga + serifa itálica (mesma receita em todo o site) */
.heading {
  display: flex;
  flex-direction: column;
  font-weight: 400;
}

.heading > span {
  display: block;
  overflow: hidden;
}

.heading > span > span {
  display: inline-block;
}

.heading__caps {
  font-family: var(--font-body);
  font-size: var(--fs-caps);
  font-weight: 300;
  font-stretch: 125%;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
}

/* Espaço extra embaixo para as descendentes (g, p, q) não serem cortadas pela máscara */
.heading__caps {
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}

.heading__serif {
  font-family: var(--font-display);
  font-size: var(--fs-serif);
  font-style: italic;
  line-height: 0.95;
  letter-spacing: -0.02em;
  padding: 0 0.08em 0.3em;
  margin: 0 0 -0.22em 0.52em;
}

.heading--dark {
  color: var(--sedimento-tinta);
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.9rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.btn--line {
  border: 1px solid var(--linha-forte);
}

.btn--line:hover {
  background: var(--osso);
  color: var(--breu);
  border-color: var(--osso);
}

.btn--solid {
  background: var(--osso);
  color: var(--breu);
}

.btn--solid:hover {
  background: var(--ambar);
}

.btn__arrow {
  transition: transform 0.4s var(--ease);
}

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

/* Logo (SVG como máscara para herdar a cor do texto) */
.logo {
  display: block;
  aspect-ratio: 1.262;
  background-color: currentColor;
  -webkit-mask: url("../svg/logo-mastodonte.svg") center / contain no-repeat;
  mask: url("../svg/logo-mastodonte.svg") center / contain no-repeat;
}

/* ---------- 4. Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
  padding-inline: var(--gutter);
  transition: transform 0.6s var(--ease), background-color 0.4s var(--ease);
}

.header.is-solid {
  background-color: rgba(13, 10, 7, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.header.is-hidden {
  transform: translateY(-100%);
}

.header__logo {
  justify-self: start;
  width: 72px;
}

.header__cta {
  justify-self: end;
}

.nav__list {
  display: flex;
  gap: clamp(1.25rem, 2.5vw, 2.75rem);
}

.nav__link {
  font-size: 0.75rem;
  font-weight: 450;
  font-stretch: 112%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--osso);
  background: linear-gradient(var(--ambar), var(--ambar)) left bottom / 0% 1px no-repeat;
  padding-block: 0.4rem;
  transition: background-size 0.5s var(--ease), color 0.3s;
}

.nav__link:hover,
.nav__link[aria-current="true"] {
  color: var(--ambar);
  background-size: 100% 1px;
}

.nav__meta {
  display: none;
}

.header__toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  justify-self: end;
}

.header__toggle span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1px;
  background: var(--osso);
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}

.header__toggle span:first-child {
  top: 18px;
}

.header__toggle span:last-child {
  top: 26px;
}

.header__toggle[aria-expanded="true"] span:first-child {
  top: 22px;
  transform: rotate(45deg);
}

.header__toggle[aria-expanded="true"] span:last-child {
  top: 22px;
  transform: rotate(-45deg);
}

/* ---------- 5. Hero · viagem no tempo ---------- */
.hero {
  position: relative;
  height: 340vh;
  background: var(--breu);
}

.hero__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__img--past,
.hero__video {
  opacity: 0;
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(13, 10, 7, 0.7) 0%, rgba(13, 10, 7, 0) 26%),
    linear-gradient(to top, rgba(13, 10, 7, 0.96) 0%, rgba(13, 10, 7, 0.55) 30%, rgba(13, 10, 7, 0) 58%),
    radial-gradient(120% 90% at 50% 40%, rgba(13, 10, 7, 0) 50%, rgba(13, 10, 7, 0.45) 100%);
}

.hero__corners {
  position: absolute;
  top: calc(var(--header-h) + 0.75rem);
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--linha);
  font-family: var(--font-tag);
  font-size: var(--fs-tag);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--osso);
}

.hero__place {
  min-width: 16ch;
  text-align: right;
}

.hero__time {
  position: absolute;
  right: var(--gutter);
  bottom: calc(var(--fs-mega) * 0.72 + 0.5rem);
  display: grid;
  gap: 0.9rem;
  width: min(420px, calc(100% - var(--gutter) * 2));
  text-align: right;
}

.ruler {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-tag);
  font-size: var(--fs-tag);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--osso-gasto);
}

.ruler__track {
  position: relative;
  height: 9px;
  background:
    repeating-linear-gradient(to right, var(--linha-forte) 0 1px, transparent 1px 10%) center / 100% 5px no-repeat,
    linear-gradient(var(--linha-forte), var(--linha-forte)) center / 100% 1px no-repeat;
}

.ruler__fill {
  position: absolute;
  left: 0;
  top: 50%;
  width: calc(var(--p, 0) * 100%);
  height: 1px;
  background: var(--ambar);
}

.ruler__fill::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ambar);
}

.hero__era {
  order: -1;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 0.9rem + 0.8vw, 1.6rem);
  color: var(--osso);
}

.hero__lede {
  position: absolute;
  left: var(--gutter);
  bottom: calc(var(--fs-mega) * 0.72 + 4.5rem);
  max-width: calc(100% - var(--gutter) * 2);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 0.95rem + 3.5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.hero__lede em {
  color: var(--ambar);
}

.js .hero__lede {
  opacity: 0;
}

.hero__title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  font-weight: 400;
  line-height: 1;
  pointer-events: none;
}

.hero__kicker {
  display: block;
  padding-left: calc(var(--gutter) + 0.1em);
  margin-bottom: -0.4em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.4rem, 0.8rem + 2.6vw, 3.6rem);
  color: var(--ambar);
}

.hero__word {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-mega);
  font-weight: 400;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 28;
  letter-spacing: -0.035em;
  line-height: 0.78;
  text-align: center;
  white-space: nowrap;
  transform: translateY(0.13em);
}

.hero__word .char {
  display: inline-block;
}

/* ---------- 6. Manifesto ---------- */
.manifesto {
  padding-block: var(--space-section);
  background: var(--breu);
}

.manifesto__inner {
  display: grid;
  gap: 3rem;
}

.manifesto__text {
  max-width: 26ch;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.1rem + 3vw, 4.4rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.manifesto__text em {
  color: var(--ambar);
}

.manifesto__coda {
  justify-self: end;
  font-family: var(--font-body);
  font-size: var(--fs-caps);
  font-weight: 300;
  font-stretch: 125%;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: right;
}

.manifesto__coda em {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6em;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ambar);
}

/* ---------- 7. Sobre (sedimento) ---------- */
.sobre {
  padding-block: var(--space-section);
  background: var(--sedimento);
  color: var(--sedimento-tinta);
}

.sobre__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3rem var(--gutter);
}

.sobre .heading {
  grid-column: 1 / -1;
}

/* Texto começa na mesma linha do topo da gravura */
.sobre__text {
  grid-column: 8 / 13;
  grid-row: 2;
  align-self: start;
  display: grid;
  gap: 1.25rem;
  color: var(--sedimento-gasto);
}

.sobre__lead {
  margin-top: -0.3em;
}

.sobre__lead {
  font-size: var(--fs-lead);
  line-height: 1.4;
  color: var(--sedimento-tinta);
}

.sobre__plate {
  grid-column: 1 / 8;
  grid-row: 2;
}

.sobre__plate img {
  width: 100%;
  mix-blend-mode: multiply;
}

.sobre__plate figcaption {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(42, 31, 22, 0.25);
  color: var(--sedimento-gasto);
}

/* ---------- 8. Gigantes ---------- */
.gigantes {
  padding-block: var(--space-section);
  background: var(--breu);
}

.gigantes__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.gigantes__intro {
  max-width: 34ch;
  color: var(--osso-gasto);
}

.gigantes__stage {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.gigantes__cards {
  order: 2;
  display: flex;
  gap: 10px;
  height: clamp(440px, 74vh, 760px);
}

.gigantes__side {
  order: 1;
  display: grid;
  gap: 2.5rem;
}

.gigantes__panels {
  display: grid;
}

/* Setas para trocar de gigante */
.gigantes__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.arrow {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(201, 154, 91, 0.55);
  border-radius: 50%;
  color: var(--osso);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  transition: transform 0.4s var(--ease);
}

.arrow:hover {
  background: var(--ambar);
  border-color: var(--ambar);
  color: var(--breu);
}

.arrow[data-step="1"]:hover svg {
  transform: translateX(3px);
}

.arrow[data-step="-1"]:hover svg {
  transform: translateX(-3px);
}

.gigantes__count {
  display: grid;
  gap: 0.2rem;
  margin-left: 1rem;
}

.gigantes__next {
  font-size: var(--fs-small);
  color: var(--osso-gasto);
}

.gigantes__next em {
  font-family: var(--font-display);
  font-size: 1.1em;
  color: var(--osso);
}

/* Card com moldura dourada (referência: seleção de personagem) */
.card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  background: var(--basalto);
  text-align: left;
  transition: flex-grow 0.9s var(--ease);
}

.card.is-active {
  flex-grow: 4.2;
}

.card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  filter: grayscale(0.7) brightness(0.45);
  transform: scale(1.04);
  transition: filter 0.9s var(--ease), transform 1.2s var(--ease);
}

.card:hover img {
  filter: grayscale(0.3) brightness(0.65);
}

.card.is-active img {
  filter: none;
  transform: scale(1);
}

.card::before,
.card::after {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 1;
  pointer-events: none;
}

.card::before {
  border: 1px solid rgba(201, 154, 91, 0.28);
  transition: border-color 0.6s;
}

.card.is-active::before {
  border-color: rgba(201, 154, 91, 0.7);
}

/* Cantoneiras */
.card::after {
  inset: 6px;
  --c: var(--ambar);
  background:
    linear-gradient(var(--c), var(--c)) top left / 18px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 1px 18px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 18px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 1px 18px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 18px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 1px 18px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 18px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 1px 18px no-repeat;
  opacity: 0;
  transition: opacity 0.6s;
}

.card.is-active::after {
  opacity: 1;
}

.card__name {
  position: absolute;
  z-index: 2;
  left: 1.6rem;
  bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 0.6rem + 1.4vw, 2rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--osso);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.card__name em {
  display: block;
  margin-bottom: 0.15em;
  font-size: 0.72em;
  text-transform: none;
  color: var(--ambar);
}

.card:not(.is-active) .card__name {
  left: 50%;
  bottom: 1.75rem;
  font-size: 0.8rem;
  font-family: var(--font-tag);
  letter-spacing: 0.1em;
  writing-mode: vertical-rl;
  transform: translateX(-50%) rotate(180deg);
  color: var(--osso-gasto);
}

.card:not(.is-active) .card__name em {
  display: none;
}

/* Painel de informações */
.gigante {
  grid-area: 1 / 1;
}

.gigante[hidden] {
  display: none;
}

.gigante:focus-visible {
  outline-offset: 12px;
}

.gigante__sci {
  font-family: var(--font-tag);
  font-size: var(--fs-small);
  font-style: italic;
  color: var(--ambar);
}

.gigante__name {
  margin: 0.4rem 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.4rem + 3vw, 4.8rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.gigante__name em {
  display: block;
  font-size: 0.5em;
  text-transform: none;
  color: var(--osso-gasto);
}

.gigante__desc {
  max-width: 40ch;
  margin-bottom: 2.5rem;
  color: var(--osso-gasto);
}

.stats__row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  align-items: center;
  padding-block: 0.85rem;
  border-top: 1px solid var(--linha);
}

.stats__row:last-child {
  border-bottom: 1px solid var(--linha);
}

.stats dt {
  font-family: var(--font-tag);
  font-size: var(--fs-tag);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--osso-gasto);
}

.stats dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-size: var(--fs-small);
}

/* Escala de peso: 10 pontos, preenchidos até --n */
.dots {
  --size: 11px;
  display: inline-block;
  width: calc(var(--size) * 10);
  height: var(--size);
  background: radial-gradient(circle, var(--ambar) 30%, transparent 36%) left center / var(--size) var(--size) repeat-x;
  -webkit-mask: linear-gradient(to right, #000 calc(var(--n) * var(--size)), rgba(0, 0, 0, 0.22) 0);
  mask: linear-gradient(to right, #000 calc(var(--n) * var(--size)), rgba(0, 0, 0, 0.22) 0);
}

.note {
  max-width: 44ch;
  font-size: var(--fs-small);
  color: var(--osso-gasto);
  opacity: 0.8;
}

/* Fóssil em 3D */
.fossil {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  margin-top: var(--space-section);
  padding-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--linha);
}

.fossil__text {
  display: grid;
  gap: 1.25rem;
  color: var(--osso-gasto);
}

.fossil__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.4rem + 2.6vw, 4rem);
  font-weight: 400;
  line-height: 1;
  color: var(--osso);
}

.fossil__title em {
  color: var(--ambar);
}

.fossil__viewer {
  position: relative;
  height: clamp(360px, 62vh, 640px);
  background: radial-gradient(50% 55% at 50% 52%, rgba(201, 154, 91, 0.2) 0%, rgba(201, 154, 91, 0.05) 45%, transparent 75%);
}

.fossil__viewer model-viewer {
  width: 100%;
  height: 100%;
  --poster-color: transparent;
  --progress-bar-height: 0px;
}

.fossil__viewer::before {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 12%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--linha-forte), transparent);
}

.fossil__hint {
  position: absolute;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  pointer-events: none;
}

/* ---------- 9. Acervo ---------- */
.acervo {
  background: var(--basalto);
}

.acervo__pin {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2.5rem, 5vh, 4rem);
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + 2rem) 3rem;
  overflow: hidden;
}

.acervo__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

.acervo__intro {
  max-width: 30ch;
  color: var(--osso-gasto);
}

.acervo__track {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.25rem, 3vw, 3.5rem);
  width: max-content;
  padding-inline: var(--gutter);
}

.shot {
  position: relative;
  flex: 0 0 auto;
  width: clamp(240px, 24vw, 440px);
}

.shot:nth-child(even) {
  margin-top: 9vh;
}

.shot img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--basalto-2);
}

/* Marcadores de canto (referência: ooopen) */
.shot::before,
.shot::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--linha-forte);
}

.shot::before {
  top: -7px;
  left: -7px;
}

.shot::after {
  right: -7px;
  top: calc((100% - 3.5rem) - 7px);
}

.shot figcaption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-top: 1rem;
}

.shot__title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 0.9rem + 0.6vw, 1.5rem);
  line-height: 1.2;
}

/* Desktop: o título fica fixo à esquerda e as fotos passam por cima dele */
@media (min-width: 901px) {
  .acervo__pin {
    position: relative;
    padding-block: calc(var(--header-h) + 1rem) 2rem;
  }

  .acervo__head {
    position: absolute;
    top: calc(var(--header-h) + 2.5rem);
    left: 0;
    width: 46vw;
    max-width: none;
    margin: 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .acervo__track {
    position: relative;
    z-index: 1;
    align-items: center;
    padding-left: 48vw;
  }

  .shot {
    width: min(calc(56vh * 0.75), 440px);
  }

  .shot:nth-child(even) {
    margin-top: 10vh;
  }
}

/* Tour: texto · player vertical · trechos, sobre a luz do próprio vídeo */
.tour {
  position: relative;
  padding-block: var(--space-section);
  overflow: hidden;
  isolation: isolate;
}

.tour__ambient {
  position: absolute;
  inset: -10%;
  z-index: -1;
  background: var(--ambient, url("../images/acervo/tour-poster.webp")) center / cover no-repeat;
  filter: blur(70px) saturate(1.3) brightness(0.45);
  opacity: 0.55;
  transition: opacity 1s var(--ease);
}

.tour__ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 70% at 50% 50%, transparent 0%, var(--basalto) 85%);
}

.tour.is-playing .tour__ambient {
  opacity: 0.85;
}

.tour__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 6rem);
}

.tour__intro {
  display: grid;
  gap: 1.5rem;
  align-content: center;
  color: var(--osso-gasto);
}

.tour__intro > p:not(.tag) {
  max-width: 32ch;
}

.tour__frame {
  position: relative;
  width: clamp(250px, 25vw, 400px);
  aspect-ratio: 9 / 16;
  background: var(--breu);
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
}

.tour__frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 2;
  border: 1px solid rgba(201, 154, 91, 0.35);
  pointer-events: none;
  transition: opacity 0.6s;
}

.tour__frame.is-playing::before {
  opacity: 0;
}

.tour__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 2px;
  background: rgba(234, 223, 200, 0.15);
  pointer-events: none;
}

.tour__progress span {
  display: block;
  width: calc(var(--t, 0) * 100%);
  height: 100%;
  background: var(--ambar);
}

/* Trechos do tour */
.tour__chapters {
  display: grid;
  gap: 1.25rem;
  align-content: center;
}

.chapters {
  list-style: none;
  counter-reset: none;
}

.chapter {
  display: grid;
  grid-template-columns: 44px 3rem 1fr;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.55rem 0;
  border-top: 1px solid var(--linha);
  text-align: left;
  color: var(--osso-gasto);
  transition: color 0.3s;
}

.chapters li:last-child .chapter {
  border-bottom: 1px solid var(--linha);
}

.chapter img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  filter: grayscale(1) brightness(0.7);
  transition: filter 0.4s;
}

.chapter__time {
  font-family: var(--font-tag);
  font-size: var(--fs-tag);
  letter-spacing: 0.06em;
  color: var(--ambar);
}

.chapter__name {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 0.9rem + 0.4vw, 1.3rem);
  font-style: italic;
  line-height: 1.2;
  transition: transform 0.5s var(--ease);
}

.chapter:hover,
.chapter.is-active {
  color: var(--osso);
}

.chapter:hover img,
.chapter.is-active img {
  filter: none;
}

.chapter:hover .chapter__name {
  transform: translateX(6px);
}

.chapter.is-active .chapter__name::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 0.6rem;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--ambar);
}

.tour__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tour__play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: var(--font-tag);
  font-size: var(--fs-tag);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(to top, rgba(13, 10, 7, 0.7), rgba(13, 10, 7, 0.15));
  transition: background-color 0.4s;
}

.tour__play-icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px solid var(--osso);
  border-radius: 50%;
  transition: transform 0.6s var(--ease), background-color 0.4s;
}

.tour__play-icon::before {
  content: "";
  margin-left: 5px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--osso);
}

.tour__play:hover .tour__play-icon {
  transform: scale(1.08);
  background: rgba(234, 223, 200, 0.12);
}

.tour__frame.is-playing .tour__play {
  opacity: 0;
  pointer-events: none;
}

.tour__title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 1.4rem + 4vw, 5.6rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--osso);
}

.tour__title em {
  color: var(--ambar);
}

/* ---------- 10. Visita ---------- */
.visita {
  padding-block: var(--space-section);
  background: var(--breu);
}

.visita__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 7rem);
  align-items: start;
}

.visita__photo {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  overflow: hidden;
}

.visita__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: sepia(0.22) saturate(0.8) contrast(1.05) brightness(0.9);
}

.visita__photo figcaption {
  margin-top: 0.9rem;
}

.visita__info {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  justify-items: start;
}

.info {
  width: 100%;
}

.info__row {
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) 1fr;
  gap: 0.5rem 2rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--linha);
}

.info__row:last-child {
  border-bottom: 1px solid var(--linha);
}

.info dt {
  font-family: var(--font-tag);
  font-size: var(--fs-tag);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ambar);
  padding-top: 0.3rem;
}

.info dd {
  line-height: 1.65;
}

.mapa {
  margin-top: clamp(3rem, 7vw, 6rem);
  aspect-ratio: 21 / 8;
  border: 1px solid var(--linha);
  overflow: hidden;
}

.mapa iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) invert(0.92) sepia(0.4) contrast(0.9) brightness(0.85);
}

/* ---------- 11. Também no CTC (discreto) ---------- */
.ctc {
  background: var(--breu);
}

.ctc__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 2rem;
  padding-block: 2.25rem;
  border-top: 1px solid var(--linha);
  font-size: var(--fs-small);
}

.ctc__text {
  flex: 1 1 auto;
  color: var(--osso-gasto);
}

/* ---------- 12. Footer ---------- */
.footer {
  position: relative;
  padding-top: clamp(4rem, 8vw, 7rem);
  background: var(--basalto);
  overflow: hidden;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 2.5rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.footer__logo {
  width: 120px;
  color: var(--osso);
}

.footer__nav,
.footer__contact {
  display: grid;
  gap: 0.6rem;
  font-size: var(--fs-small);
}

.footer__nav a,
.footer__contact a {
  color: var(--osso);
  transition: color 0.3s;
}

.footer__nav a:hover,
.footer__contact a:hover {
  color: var(--ambar);
}

.footer__contact span {
  color: var(--osso-gasto);
}

.footer__legal {
  margin-top: 4rem;
  font-size: 0.8rem;
  color: var(--osso-gasto);
}

.footer__word {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-size: var(--fs-mega);
  line-height: 0.78;
  letter-spacing: -0.035em;
  text-align: center;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(234, 223, 200, 0.3);
  transform: translateY(0.12em);
  user-select: none;
}

/* ---------- 13. CTA flutuante (mobile) ---------- */
.float-cta {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 90;
  display: none;
  padding: 0.95rem 1.8rem;
  font-size: 0.75rem;
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--osso);
  color: var(--breu);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, 160%);
  transition: transform 0.6s var(--ease);
}

.float-cta.is-visible {
  transform: translate(-50%, 0);
}

/* ---------- 14. Responsivo ---------- */
@media (max-width: 1100px) {
  .gigantes__stage {
    grid-template-columns: 1fr;
  }

  .gigantes__cards {
    order: 0;
    height: clamp(380px, 62vh, 560px);
  }

  .gigantes__side {
    order: 1;
  }

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

  .tour__grid {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .tour__intro {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
  }

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

  .header__logo {
    width: 60px;
    position: relative;
    z-index: 2;
  }

  .header__cta {
    display: none;
  }

  .header__toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
    padding: calc(var(--header-h) + 2rem) var(--gutter) 2rem;
    background: var(--breu);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s var(--ease), visibility 0.5s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav__link {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 11vw, 4rem);
    font-style: italic;
    font-stretch: 100%;
    letter-spacing: -0.01em;
    text-transform: none;
    background: none;
  }

  .nav__meta {
    display: grid;
    gap: 0.5rem;
    font-family: var(--font-tag);
    font-size: var(--fs-tag);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--osso-gasto);
  }

  .hero__corners span:nth-child(2) {
    display: none;
  }

  .hero__time {
    bottom: calc(var(--fs-mega) * 0.72 + 2.9rem);
  }

  .hero__lede {
    bottom: calc(var(--fs-mega) * 0.72 + 8.5rem);
  }

  .hero__img,
  .hero__video {
    object-position: 58% 50%;
  }

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

  .sobre .heading,
  .sobre__text,
  .sobre__plate {
    grid-column: 1;
    grid-row: auto;
  }

  .gigantes__head,
  .acervo__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .acervo__pin {
    min-height: 0;
    padding-block: var(--space-section) 0;
  }

  .acervo__track {
    width: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 1rem;
  }

  .acervo__track::-webkit-scrollbar {
    display: none;
  }

  .shot {
    width: 74vw;
    scroll-snap-align: center;
  }

  .shot:nth-child(even) {
    margin-top: 0;
  }

  .tour__grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .tour__intro,
  .tour__chapters {
    width: 100%;
  }

  .tour__frame {
    width: min(78vw, 380px);
  }

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

  .visita__photo {
    position: relative;
    top: 0;
  }

  .visita__photo img {
    aspect-ratio: 4 / 3;
  }

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

  .mapa {
    aspect-ratio: 4 / 3;
  }

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

  .footer__logo {
    grid-column: 1 / -1;
  }

  .float-cta {
    display: inline-flex;
  }
}

@media (max-width: 520px) {
  .heading__serif {
    margin-left: 0;
  }

  .stats__row {
    grid-template-columns: 5.5rem 1fr;
  }

  .gigantes__cards {
    gap: 6px;
  }

  .card.is-active {
    flex-grow: 5;
  }

  .card__name {
    left: 1.1rem;
    bottom: 1.1rem;
    font-size: 1.2rem;
    white-space: normal;
  }

  .card:not(.is-active) .card__name {
    font-size: 0.7rem;
  }
}

/* ---------- 15. Hero estático (movimento reduzido ou sem JS) ---------- */
.no-js .hero,
.hero.is-static {
  height: auto;
}

.no-js .hero__stage,
.hero.is-static .hero__stage {
  position: relative;
}

.no-js .hero__img--past,
.hero.is-static .hero__img--past,
.hero.is-static .hero__lede {
  opacity: 1;
}

.no-js .ruler__fill {
  --p: 1;
}

/* ---------- 16. Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
