/* ==========================================================================
   Academia Calasans Camargo — Sistema de design
   Conceito: 40 anos de tradição, apresentados de forma atual.
   Assinatura: a "faixa" (barra vermelha) que estrutura e divide o site.
   ========================================================================== */

/* ---- Tokens ---------------------------------------------------------------- */
:root {
  /* Cores */
  --ink: #111111;          /* texto principal / seções escuras */
  --paper: #fafaf8;        /* fundo geral */
  --white: #ffffff;        /* cartões */
  --red: #c1121f;          /* vermelho da marca */
  --red-dark: #97060f;     /* hover / estados */
  --charcoal: #4a4a4a;     /* texto secundário */
  --line: #e4e1db;         /* fios / bordas */
  --ink-70: rgba(17, 17, 17, 0.7);
  --paper-60: rgba(250, 250, 248, 0.6);

  /* Tipografia */
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Escala de tipo (fluida) */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.13rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --step-3:  clamp(2.2rem, 1.6rem + 3vw, 4rem);
  --step-4:  clamp(3rem, 1.8rem + 6vw, 7rem);

  /* Espaçamento */
  --gutter: clamp(1.2rem, 5vw, 2.5rem);
  --section-y: clamp(3.5rem, 8vw, 7rem);
  --radius: 4px;
  --maxw: 1180px;

  /* Faixa (barra assinatura) */
  --belt: 6px;

  --shadow: 0 1px 2px rgba(17,17,17,.04), 0 8px 24px rgba(17,17,17,.06);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---- Reset enxuto ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---- Tipografia ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: .01em;
  text-transform: uppercase;
  margin: 0;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
p { margin: 0 0 1rem; max-width: 62ch; }
.lead { font-size: var(--step-1); color: var(--charcoal); line-height: 1.5; }

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1rem;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: var(--belt);
  background: var(--red);
  border-radius: 2px;
}

/* ---- Layout ---------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--dark { background: var(--ink); color: var(--paper); }
.section--dark .lead,
.section--dark p { color: var(--paper-60); }
.section--dark .eyebrow { color: #ff5c5c; }

.grid { display: grid; gap: clamp(1rem, 3vw, 2rem); }
@media (min-width: 560px)  { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px)  { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px)  { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.measure { max-width: 58ch; }
.section__head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }

/* ---- Faixa (divisor assinatura) ------------------------------------------- */
.belt {
  height: var(--belt);
  background: var(--red);
  width: 100%;
}
.belt--split {
  background: linear-gradient(90deg, var(--ink) 0 50%, var(--red) 50% 100%);
}

/* ---- Botões ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-0);
  text-transform: uppercase;
  letter-spacing: .05em;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  transition: transform .15s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { background: var(--red); border-color: var(--red); transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.btn--red { background: var(--red); border-color: var(--red); }
.btn--red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.section--dark .btn--ghost { color: var(--paper); border-color: var(--paper); }
.section--dark .btn--ghost:hover { background: var(--paper); color: var(--ink); }

/* ---- Cabeçalho ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand__mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  border-radius: var(--radius);
  border-left: var(--belt) solid var(--red);
}
.brand__name {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  line-height: .95;
  font-size: 1.15rem;
  letter-spacing: .02em;
}
.brand__name span { display: block; font-size: .62rem; letter-spacing: .28em; color: var(--red); font-weight: 600; }
/* Logo (imagem) — cabeçalho e rodapé */
.brand__logo { height: clamp(38px, 6.5vw, 48px); width: auto; display: block; }
.brand__logo--footer { height: 58px; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav__list { display: flex; gap: 1.4rem; }
.nav__link {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: .06em;
  font-size: .95rem;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="page"] { border-color: var(--red); color: var(--red); }

.nav__toggle { display: none; }

/* Menu mobile */
@media (max-width: 900px) {
  .nav__toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    padding: .6rem;
  }
  .nav__toggle span { width: 26px; height: 2px; background: var(--ink); transition: transform .25s var(--ease), opacity .2s; }
  .nav[data-open="true"] .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav[data-open="true"] .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav[data-open="true"] .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav__list {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.5rem;
    transform: translateY(-120%);
    transition: transform .3s var(--ease);
    box-shadow: var(--shadow);
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
  .nav[data-open="true"] .nav__list { transform: translateY(0); }
  .nav__link { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav__link:last-child { border-bottom: 0; }
}

/* ---- Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: flex-end;
  color: var(--paper);
  background: var(--ink);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(17,17,17,.35) 0%, rgba(17,17,17,.15) 40%, rgba(17,17,17,.92) 100%);
}
.hero__inner { position: relative; z-index: 1; padding-block: clamp(2.5rem, 8vw, 5rem); width: 100%; }
.hero__since {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .18em; font-weight: 600; font-size: var(--step--1);
  margin-bottom: 1.2rem;
}
.hero__since b { color: #ff5c5c; }
.hero h1 { max-width: 16ch; }
.hero h1 em { color: var(--red); font-style: normal; }
.hero__sub { font-size: var(--step-1); color: var(--paper-60); max-width: 48ch; margin-top: 1.2rem; }

/* Acessos rápidos (chips) */
.quick {
  display: flex; flex-wrap: wrap; gap: .6rem;
  margin-top: 2rem;
}
.quick a {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem;
  border: 1px solid rgba(250,250,248,.35);
  border-radius: 999px;
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .05em; font-weight: 500; font-size: .9rem;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s;
}
.quick a:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---- Cartões --------------------------------------------------------------- */
.card {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 4 / 3; background: var(--line); position: relative; }
.card__media--tall { aspect-ratio: 3 / 4; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card__body h3 { font-size: var(--step-1); }
.card__meta { font-size: var(--step--1); color: var(--charcoal); }
.card__tag {
  align-self: flex-start;
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .08em; font-weight: 600; font-size: .72rem;
  color: var(--red);
}
.card__more {
  margin-top: auto; padding-top: .6rem;
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .06em; font-weight: 600; font-size: .85rem;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: .4rem;
}
a.card:hover .card__more { color: var(--red); }

/* ---- Placeholder de imagem ------------------------------------------------- */
/* Slot de foto visível — troque por <img> real (ver README). */
.ph {
  background-color: #e7e3dc;
  background-image:
    repeating-linear-gradient(45deg, rgba(17,17,17,.045) 0 14px, transparent 14px 28px);
  border: 1.5px dashed #b9b2a6;
  display: grid; place-items: center;
  gap: .5rem;
  color: #8a8377; font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: .12em; font-weight: 600; font-size: .82rem;
  text-align: center; padding: 1rem;
}
.ph::before {
  content: "";
  width: 34px; height: 26px;
  border: 2px solid #b9b2a6; border-radius: 4px;
  background:
    radial-gradient(circle at 50% 55%, #b9b2a6 0 4px, transparent 5px),
    linear-gradient(#b9b2a6, #b9b2a6) 8px 3px/8px 4px no-repeat;
  background-repeat: no-repeat;
}
.section--dark .ph { background-color: #232323; border-color: #3d3d3d; color: #6f6f6f; }
.section--dark .ph::before { border-color: #4a4a4a; }

/* ---- Números / stats ------------------------------------------------------- */
.stats { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { border-top: var(--belt) solid var(--red); padding-top: 1rem; }
.stat b { display: block; font-family: var(--font-display); font-size: var(--step-3); line-height: 1; }
.stat span { font-size: var(--step--1); text-transform: uppercase; letter-spacing: .1em; color: var(--charcoal); }
.section--dark .stat span { color: var(--paper-60); }

/* ---- Horários (tabela) ----------------------------------------------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
table.schedule { border-collapse: collapse; width: 100%; min-width: 640px; background: var(--white); }
.schedule th, .schedule td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); font-size: var(--step--1); }
.schedule thead th {
  background: var(--ink); color: var(--paper);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
  position: sticky; top: 0;
}
.schedule tbody tr:hover { background: #fbf4f4; }
.schedule td:first-child { font-family: var(--font-display); text-transform: uppercase; font-weight: 600; letter-spacing: .03em; }
.badge {
  display: inline-block; font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  padding: .15rem .5rem; border: 1px solid var(--line); border-radius: 999px; color: var(--charcoal);
}

/* ---- Grade de horários (por dia, com faixa etária colorida) ---------------- */
.legend { display: flex; flex-wrap: wrap; gap: 1.1rem 1.4rem; margin-bottom: 2rem; }
.age { display: inline-flex; align-items: center; gap: .5rem; font-size: var(--step--1); font-weight: 500; }
.age::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c, #999); flex: none; }

.days { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .days { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .days { grid-template-columns: repeat(3, 1fr); } }

.day-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.day-card > h3 {
  background: var(--ink); color: var(--paper);
  font-size: var(--step-1); letter-spacing: .04em;
  padding: .75rem 1.1rem; border-left: var(--belt) solid var(--red);
}
.slot { display: flex; gap: .9rem; padding: .8rem 1.1rem; border-top: 1px solid var(--line); }
.slot__time { font-family: var(--font-display); font-weight: 600; color: var(--red); min-width: 46px; font-size: 1.05rem; }
.slot__list { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; }
.cls { display: inline-flex; align-items: center; gap: .4rem; font-size: .92rem; line-height: 1.3; }
.cls::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c, #999); flex: none; }

/* ---- Linha do tempo (História) -------------------------------------------- */
.timeline { position: relative; display: grid; gap: 2.5rem; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; padding-left: 2.6rem; }
.tl-item::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); border: var(--belt) solid var(--red);
}
.tl-year { font-family: var(--font-display); font-size: var(--step-2); color: var(--red); line-height: 1; }
.tl-item h3 { font-size: var(--step-1); margin: .3rem 0 .4rem; }
.tl-media { margin-top: 1rem; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; }

/* ---- FAQ ------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 1.2rem 0; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  font-family: var(--font-display); text-transform: uppercase; font-weight: 600; font-size: var(--step-1);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 1.6rem; line-height: 1; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1.3rem; }

/* ---- Logos parceiros ------------------------------------------------------- */
.logos { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(.7rem, 2vw, 1.1rem); }
.logos a, .logos div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); flex: 1 1 150px; max-width: 230px; aspect-ratio: 3/2; display: grid; place-items: center; padding: 1.1rem; transition: background .2s var(--ease), transform .2s var(--ease); }
.logos a:hover { background: #fbf4f4; transform: translateY(-3px); }
.logos img { max-width: 86%; max-height: 68%; width: auto; height: auto; object-fit: contain; }

/* ---- Parceiros internos (cards com logo + botão) --------------------------- */
.partners { display: grid; gap: clamp(1rem, 3vw, 1.6rem); grid-template-columns: 1fr; }
@media (min-width: 640px) { .partners { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .partners { grid-template-columns: repeat(3, 1fr); } }
.partner { background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.partner__logo {
  aspect-ratio: 16/9; display: grid; place-items: center; gap: .4rem;
  background: #f4f2ee; border-bottom: 1px solid var(--line);
  color: #9a938a; font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .12em; font-weight: 600; font-size: .78rem; text-align: center; padding: 1rem;
}
.partner__logo img { max-height: 78%; max-width: 84%; width: auto; object-fit: contain; }
.partner__body { padding: 1.3rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.partner__body h3 { font-size: var(--step-1); }
.partner__body p { font-size: .95rem; color: var(--charcoal); margin: 0; }
.partner__body .btn { margin-top: auto; align-self: flex-start; }

/* ---- Comunicados ----------------------------------------------------------- */
.notice { display: flex; gap: 1.2rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.notice time { font-family: var(--font-display); color: var(--red); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; min-width: 88px; }
.notice h3 { font-size: var(--step-1); margin-bottom: .3rem; }

/* ---- WhatsApp flutuante ---------------------------------------------------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: .6rem;
  background: #1faf54; color: #fff;
  padding: .8rem 1.1rem; border-radius: 999px;
  font-family: var(--font-display); text-transform: uppercase; font-weight: 600; letter-spacing: .04em;
  box-shadow: 0 6px 20px rgba(0,0,0,.22);
  transition: transform .18s var(--ease);
}
.wa-float:hover { transform: scale(1.05); }
.wa-float svg { width: 22px; height: 22px; }
@media (max-width: 520px) { .wa-float span { display: none; } .wa-float { padding: .85rem; } }

/* ---- Rodapé ---------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--paper); padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; }
/* Conteúdo do rodapé ocupa toda a largura (não fica preso à coluna central de
   1180px). Em telas largas, distribui as colunas de ponta a ponta, com um
   respiro nas laterais — assim não "quebra" o design em monitores grandes. */
.site-footer > .wrap { max-width: none; }
.site-footer a { color: var(--paper-60); }
.site-footer a:hover { color: var(--paper); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-grid h4 { font-size: var(--step-0); margin-bottom: .9rem; color: var(--paper); letter-spacing: .1em; }
.footer-grid li { margin-bottom: .5rem; }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(250,250,248,.14);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: var(--step--1); color: var(--paper-60);
}
.social { display: flex; gap: .8rem; }
.social a { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(250,250,248,.25); border-radius: var(--radius); }
.social a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.social svg { width: 20px; height: 20px; }

/* ---- Utilitários ----------------------------------------------------------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--red); color: #fff; padding: .7rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.split { display: grid; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } .split--media-first > :first-child { order: -1; } }
.ratio-4-3 { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; }
.ratio-16-9 { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; }

/* ==========================================================================
   ANIMAÇÕES — suaves e à prova de falhas
   Princípio de segurança: o conteúdo SÓ é escondido quando a classe .js-anim
   está presente (adicionada por um script inline no <head>). Sem JS, nada
   fica escondido. E há duas redes de segurança para revelar tudo mesmo se o
   IntersectionObserver falhar: a classe .anim-ready (timeout no <head>) e um
   timeout dentro do main.js. Assim nenhuma seção fica presa em branco.
   ========================================================================== */

/* ---- Tela de load (loader) ------------------------------------------------- */
.loader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: var(--ink);
  /* Failsafe puro em CSS: some após ~1s mesmo se o JS não rodar. */
  animation: loaderOut .5s var(--ease) 1s forwards;
}
body.loaded .loader { animation: loaderOut .45s var(--ease) forwards; } /* JS: some assim que carrega */
.loader__box { display: grid; place-items: center; gap: 16px; }
.loader__cc { width: clamp(190px, 60vw, 260px); height: auto; }
.loader__bar { width: 120px; height: 4px; background: rgba(250,250,248,.16); border-radius: 2px; overflow: hidden; }
.loader__bar::after { content: ""; display: block; height: 100%; width: 0; background: var(--red); border-radius: 2px; animation: barFill .9s var(--ease) forwards; }
@keyframes barFill { to { width: 100%; } }
@keyframes loaderOut { to { opacity: 0; visibility: hidden; } }

/* ---- Entrada da página + reveal ao rolar (só com .js-anim) ----------------- */
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
.js-anim main { animation: pageIn .5s var(--ease) both; }

.js-anim [data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js-anim [data-reveal].is-revealed,          /* revelado pelo observer (main.js) */
.js-anim.anim-ready [data-reveal] {           /* rede de segurança do <head> */
  opacity: 1; transform: none;
}

/* Respeita quem prefere menos movimento: tudo instantâneo e visível. */
@media (prefers-reduced-motion: reduce) {
  .loader { animation: loaderOut .01s linear forwards; }
  .loader__bar::after { animation: none; width: 100%; }
  .js-anim main { animation: none; }
  .js-anim [data-reveal] { opacity: 1 !important; transform: none !important; transition: none; }
}
