/* ===== Tessat — Painel de Vestibulares 2026/2027 ===== */

/* ---------- fontes oficiais Tessat ---------- */

@font-face {
  font-family: "Anek Latin";
  src: url("assets/fonts/AnekLatin-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("assets/fonts/InterTight-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("assets/fonts/InterTight-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("assets/fonts/InterTight-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #121617;
  --bg-raised: #181e20;
  --bg-card: #1b2224;
  --purple: #9472e9;
  --purple-soft: rgba(148, 114, 233, 0.16);
  --yellow: #fde090;
  --yellow-soft: rgba(253, 224, 144, 0.16);
  --text: #eaeff1;
  --text-muted: rgba(234, 239, 241, 0.62);
  --text-faint: rgba(234, 239, 241, 0.38);
  --border: rgba(234, 239, 241, 0.1);
  --border-soft: rgba(234, 239, 241, 0.06);
  --font-display: "Anek Latin", "Inter Tight", sans-serif;
  --font-body: "Inter Tight", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* altura real do cabeçalho fixo — recalculada em JS */
  --topbar-h: 4.6rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--purple); color: #fff; }

/* label pequeno em caixa alta — substitui a antiga fonte mono */
.label-type {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- atmosphere ---------- */

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 998;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.55) 120%);
}

/* ---------- topbar ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem clamp(1.25rem, 5vw, 3.5rem);
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(18, 22, 23, 0.8), transparent);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
/* ao sair do hero o cabeçalho fica opaco, senão a barra de filtros
   que passa por baixo dele fica visível através do gradiente */
.topbar.is-scrolled {
  background: rgba(18, 22, 23, 0.95);
  border-bottom-color: var(--border-soft);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.3s var(--ease);
}
.brand:hover { opacity: 0.75; }

.brand-logo {
  height: 2.3rem;
  width: auto;
  display: block;
}

.cta-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(18, 22, 23, 0.4);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.cta-top:hover { border-color: var(--purple); background: var(--purple-soft); }
.cta-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 8px var(--yellow);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-field { position: absolute; inset: 0; z-index: 0; }

/* vídeo institucional em loop, sem áudio, bem atenuado */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* opacidade baixa + scrim escuro = texto sempre em destaque.
     Vale também para o poster, que aparece quando o vídeo não carrega. */
  opacity: 0.3;
  filter: grayscale(0.35) contrast(1.05);
  animation: heroSettle 2.4s var(--ease) both;
}
@keyframes heroSettle {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 0.3; transform: scale(1); }
}

/* camada escura que garante o destaque do texto sobre o vídeo */
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(18, 22, 23, 0.82), transparent 75%),
    linear-gradient(to bottom, rgba(18, 22, 23, 0.92) 0%, rgba(18, 22, 23, 0.6) 35%, rgba(18, 22, 23, 0.75) 70%, var(--bg) 100%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: drift 18s ease-in-out infinite alternate;
}
.hero-glow--purple {
  width: 46vw; height: 46vw;
  background: var(--purple);
  top: -12%; left: -10%;
}
.hero-glow--yellow {
  width: 32vw; height: 32vw;
  background: var(--yellow);
  bottom: -10%; right: -8%;
  opacity: 0.18;
  animation-delay: -6s;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(4%, 6%) scale(1.08); }
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 0 0 1.5rem;
  animation: fadeUp 0.9s var(--ease) both;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.7rem, 8.5vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
  animation: fadeUp 0.9s 0.1s var(--ease) both;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--purple), var(--yellow) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 34rem;
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 3rem;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.6);
  animation: fadeUp 0.9s 0.2s var(--ease) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* next event card */

.next-event {
  width: min(100%, 40rem);
  background: linear-gradient(160deg, rgba(24, 30, 32, 0.92), rgba(27, 34, 36, 0.92));
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 1.4rem;
  padding: 1.6rem 1.8rem;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  animation: fadeUp 0.9s 0.3s var(--ease) both;
}

.next-event-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 0.9rem;
}

.next-event-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  text-align: left;
}

.next-event-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.3rem;
}

.next-event-detail {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.countdown {
  display: flex;
  gap: 0.7rem;
}
.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.4rem;
  padding: 0.5rem 0.3rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-soft);
  border-radius: 0.7rem;
}
.countdown-unit span {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.countdown-unit small {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 0.15rem;
}

.scroll-cue {
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-faint);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeUp 0.9s 0.5s var(--ease) both;
}
.scroll-cue-line {
  width: 1px; height: 2.4rem;
  background: linear-gradient(to bottom, var(--purple), transparent);
  animation: pulseLine 2s ease-in-out infinite;
}
@keyframes pulseLine {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.15); }
}

/* ---------- filter bar ---------- */

.filter-bar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 1.1rem 1rem;
  background: rgba(18, 22, 23, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.filter-track {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}
.filter-track::-webkit-scrollbar { display: none; }

.filter-chip {
  flex: none;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.filter-chip:hover { border-color: var(--purple); color: var(--text); }
.filter-chip.is-active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
  font-weight: 700;
}

/* ---------- timeline ---------- */

.timeline-section {
  position: relative;
  max-width: 64rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}

.timeline-spine {
  position: absolute;
  left: 1.6rem;
  top: 5rem;
  bottom: 6rem;
  width: 2px;
  background: var(--border);
  z-index: 0;
}
.timeline-spine-fill {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--yellow), var(--purple));
  box-shadow: 0 0 12px var(--purple);
  transition: height 0.15s linear;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 3.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.node {
  position: relative;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.node.is-visible { opacity: 1; transform: translateY(0); }
.node[hidden] { display: none; }

.node-dot {
  position: absolute;
  left: -3.6rem;
  top: 1.7rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--text-faint);
  z-index: 1;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.node[data-status="inscricoes"] .node-dot { border-color: var(--yellow); box-shadow: 0 0 10px var(--yellow); }
.node[data-status="breve"] .node-dot { border-color: rgba(253, 224, 144, 0.55); }
.node[data-status="prova"] .node-dot { border-color: var(--purple); box-shadow: 0 0 10px var(--purple); }
.node[data-status="aguardando"] .node-dot { border-color: rgba(148,114,233,.5); }
.node[data-status="concluido"] .node-dot { border-color: rgba(234,239,241,.3); }
.node[data-status="confirmar"] .node-dot { border-color: var(--text-faint); }

.node-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  padding: 1.4rem 1.5rem;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.node-card:hover { border-color: rgba(234,239,241,.22); }
.node.is-open .node-card { border-color: var(--purple); background: var(--bg-raised); }

.node-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.node-title-group { display: flex; flex-direction: column; gap: 0.35rem; }

.node-tag {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.node-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

.node-next {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0;
}

.status-badge {
  flex: none;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.node[data-status="inscricoes"] .status-badge { background: var(--yellow-soft); color: var(--yellow); }
.node[data-status="breve"] .status-badge { background: rgba(253, 224, 144, 0.09); color: rgba(253, 224, 144, 0.85); }
.node[data-status="prova"] .status-badge { background: var(--purple-soft); color: var(--purple); }
.node[data-status="aguardando"] .status-badge { background: rgba(148,114,233,.08); color: var(--text-muted); }
.node[data-status="concluido"] .status-badge { background: rgba(234,239,241,.08); color: var(--text-muted); }
.node[data-status="confirmar"] .status-badge { background: rgba(234,239,241,.06); color: var(--text-faint); }

.node-chevron {
  margin-top: 0.9rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.node-chevron svg { transition: transform 0.3s var(--ease); }
.node.is-open .node-chevron svg { transform: rotate(180deg); }

.node-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}
.node.is-open .node-detail { grid-template-rows: 1fr; }
/* wrapper de recorte: sem ele, margem e padding do conteúdo "vazam"
   e o card fechado fica com uma sobra de altura */
.node-detail-clip {
  overflow: hidden;
  min-height: 0;
}

.node-detail-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  min-height: 0;
  padding-top: 1.3rem;
  margin-top: 1.3rem;
  border-top: 1px solid var(--border-soft);
}
@media (max-width: 640px) {
  .node-detail-inner { grid-template-columns: 1fr; }
}

.detail-block dt {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.35rem;
}
.detail-block dd {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.45;
}

.node-obs {
  grid-column: 1 / -1;
  font-size: 0.79rem;
  color: var(--yellow);
  background: var(--yellow-soft);
  border-radius: 0.6rem;
  padding: 0.6rem 0.8rem;
  line-height: 1.45;
  margin: 0;
}

.node-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.node-link, .node-cta {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.81rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.25s var(--ease);
}
.node-link {
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.node-link:hover { color: var(--text); border-color: rgba(234,239,241,.3); }
.node-cta {
  color: #121617;
  background: var(--yellow);
}
.node-cta:hover { filter: brightness(1.08); }

.timeline-empty {
  margin: 0;
  padding: 3rem 0 1rem 3.6rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.timeline-empty[hidden] { display: none; }
.timeline-empty-reset {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--yellow);
  background: var(--yellow-soft);
  border: none;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: filter 0.25s var(--ease);
}
.timeline-empty-reset:hover { filter: brightness(1.15); }

/* ---------- closing / CTA ---------- */

.closing {
  position: relative;
  text-align: center;
  padding: 7rem 1.5rem 8rem;
  background: radial-gradient(ellipse at 50% 0%, var(--purple-soft), transparent 65%);
}
.closing-eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 0 0 1rem;
}
.closing-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 40rem;
  margin: 0 auto 0.9rem;
}
.closing-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 auto 2.5rem;
}
.cta-big {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  color: #121617;
  background: linear-gradient(100deg, var(--yellow), #fff3cf);
  padding: 1rem 2.1rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 20px 40px -14px rgba(253, 224, 144, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.cta-big:hover { transform: translateY(-2px); box-shadow: 0 26px 50px -14px rgba(253, 224, 144, 0.45); }

/* ---------- footer ---------- */

.site-footer {
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  border-top: 1px solid var(--border-soft);
}
.footer-logo {
  height: 1.9rem;
  width: auto;
  opacity: 0.35;
  margin-bottom: 1.4rem;
}
.site-footer p {
  max-width: 34rem;
  margin: 0 auto 0.8rem;
  font-size: 0.79rem;
  line-height: 1.6;
  color: var(--text-faint);
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--text-muted) !important;
}

/* ---------- whatsapp float ---------- */

.whatsapp-float {
  position: fixed;
  bottom: 1.6rem;
  right: 1.6rem;
  z-index: 90;
  width: 3.4rem;
  height: 3.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25d366;
  color: #121617;
  box-shadow: 0 12px 30px -10px rgba(37, 211, 102, 0.6);
  transition: transform 0.3s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.08); }

@media (max-width: 640px) {
  .brand-logo { height: 1.9rem; }
  /* o texto completo não cabe ao lado da logo em telas estreitas */
  .cta-top-tail { display: none; }
  .cta-top { font-size: 0.78rem; padding: 0.5rem 0.9rem; }
  .next-event { padding: 1.3rem 1.2rem; }
  .countdown { gap: 0.45rem; width: 100%; }
  .countdown-unit { flex: 1; min-width: 0; }
}

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