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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--noite);
  color: var(--giz);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
  font-weight: 800;
  font-stretch: 122%;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h2 {
  font-size: var(--text-2xl);
}

h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  font-stretch: 110%;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--incandescente);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--giz);
  color: var(--noite);
  border-radius: var(--r-control);
}

.skip:focus {
  top: 1rem;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 650;
  font-stretch: 108%;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms, box-shadow 160ms;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--brasa);
  color: var(--on-brasa);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 10px 30px -10px rgb(255 91 31 / 0.7);
}

.btn--primary:hover {
  background: var(--brasa-forte);
}

.btn--ghost {
  background: var(--lavagem);
  color: var(--giz);
  box-shadow: inset 0 0 0 1px var(--aco-claro);
}

.btn--ghost:hover {
  background: var(--lavagem-forte);
}

.btn--small {
  min-height: 42px;
  padding: 0 1.1rem;
  font-size: var(--text-sm);
}

.btn--wide {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Barra do topo */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  background: var(--veu);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}

.wordmark {
  font-weight: 900;
  font-stretch: 125%;
  font-size: 1.375rem;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .wordmark__tail {
    display: none;
  }
}

.topbar__nav {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
  margin-right: 1.25rem;
  font-size: var(--text-sm);
  color: var(--nevoa);
}

.topbar__nav a {
  text-decoration: none;
  transition: color 160ms;
}

.topbar__nav a:hover {
  color: var(--giz);
}

/* A porta de quem já comprou: ao lado da ação principal, sem disputar com ela */
.topbar__aluno svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* No celular vira só o ícone, do tamanho do botão de tema */
@media (max-width: 520px) {
  .topbar__aluno {
    flex: none;
    width: 42px;
    padding: 0;
  }

  .topbar__aluno span {
    display: none;
  }
}

/* Estrutura comum das seções */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section) var(--gutter) 0;
}

.section__head {
  display: grid;
  gap: 1rem;
  max-width: 44rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section__head p {
  color: var(--nevoa);
  font-size: var(--text-lg);
  line-height: 1.5;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 2rem;
  max-width: var(--max);
  margin: var(--section) auto 0;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--aco);
  color: var(--nevoa);
  font-size: var(--text-sm);
}

.footer__brand {
  color: var(--giz);
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.04em;
}

.footer nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

@media (max-width: 720px) {
  .topbar__nav {
    display: none;
  }

  .topbar .theme-toggle {
    margin-left: auto;
  }

  .footer nav {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
