/* ═══════════════════════════════════════════════════════════════════
   Aula gratuita de IA — folha de estilo
   Papel quente, tinta escura, um único acento de cor.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --paper:  #efeeea;
  --paper-2:#f6f5f2;
  --ink:    #1a1917;
  --muted:  #6b675f;
  --rule:   #dcdad3;
  --signal: #c74a22;      /* títulos, botões, foco */
  --signal-deep: #ab3a17; /* mesma cor em texto pequeno, com contraste AA */
  --ghost:  #b7b2a8;

  --shell: 1120px;
  --pad: clamp(20px, 5vw, 56px);

  --sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --display: "Bricolage Grotesque", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ─── Base ─────────────────────────────────────────────────────── */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .97rem + .18vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; }
p  { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 600; }

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

a { color: inherit; }

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 20;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: .875rem;
  text-decoration: none;
}
.skip:focus { left: 16px; }

/* Rótulo mono reutilizado em todas as seções */
.label,
.eyebrow,
.tag,
.facts dt {
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── Barra do topo ────────────────────────────────────────────── */

.topbar {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--rule);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.01em;
}

.wordmark__mark {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--signal);
}

.tag {
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 12px;
  background: var(--paper-2);
}

/* ─── Hero ─────────────────────────────────────────────────────── */

.hero { padding-block: clamp(48px, 8vw, 96px) 0; }

.eyebrow { margin-bottom: clamp(20px, 3vw, 32px); }

.hero__title {
  font-size: clamp(2.75rem, 8.4vw, 6.5rem);
  line-height: .96;
  letter-spacing: -.035em;
  font-variation-settings: "wdth" 96;
  margin-bottom: clamp(28px, 3.4vw, 44px);
  max-width: 15ch;
}

.predict { color: var(--signal); font-style: normal; }

/* Cursor piscando no fim do título */
.caret {
  display: inline-block;
  width: .07em;
  height: .78em;
  margin-left: .08em;
  vertical-align: baseline;
  background: var(--signal);
  opacity: 0;
}

.hero__grid {
  display: grid;
  gap: clamp(40px, 5vw, 64px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--rule);
  padding-bottom: clamp(72px, 10vw, 128px);
}

.hero__lede p {
  font-size: clamp(1.0625rem, 1rem + .4vw, 1.3125rem);
  line-height: 1.5;
  color: #3b3934;
  max-width: 46ch;
}

/* Dados da aula */
.facts { margin: clamp(28px, 4vw, 40px) 0 0; }

.facts__row {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 11px 0;
  border-top: 1px solid var(--rule);
}
.facts__row:last-child { border-bottom: 1px solid var(--rule); }

.facts dd { margin: 0; font-size: .9375rem; }

/* ─── Cartão de inscrição ──────────────────────────────────────── */

.card {
  background: var(--ink);
  color: var(--paper);
  border-radius: 14px;
  padding: clamp(26px, 3.4vw, 38px);
  align-self: start;
  box-shadow: 0 1px 2px rgba(26, 25, 23, .1), 0 18px 44px -24px rgba(26, 25, 23, .45);
  scroll-margin-top: 24px;
}

.card__title {
  font-size: clamp(1.5rem, 1.3rem + .8vw, 1.875rem);
  letter-spacing: -.02em;
  line-height: 1.12;
}

.card__sub {
  margin-top: 8px;
  color: #a8a49a;
  font-size: .9375rem;
  line-height: 1.5;
}
.card__sub strong { color: var(--paper); font-weight: 500; }

.card__fine {
  margin-top: 18px;
  color: #8d8980;
  font-size: .8125rem;
  line-height: 1.5;
}

.card__body--done { text-align: left; }
.card__body--done:focus { outline: none; }

.check {
  display: block;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--signal);
  position: relative;
}
.check::after {
  content: "";
  position: absolute;
  left: 12.5px;
  top: 8px;
  width: 8px;
  height: 14px;
  border: solid var(--paper);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ─── Formulário ───────────────────────────────────────────────── */

.form { margin-top: clamp(24px, 3vw, 32px); }

.field + .field { margin-top: 20px; }

.field label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #a8a49a;
}

.field input {
  width: 100%;
  padding: 11px 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(239, 238, 234, .26);
  color: var(--paper);
  font: inherit;
  border-radius: 0;
  transition: border-color .18s var(--ease);
}
.field input::placeholder { color: #8d8980; }
.field input:hover { border-bottom-color: rgba(239, 238, 234, .5); }

.field input:focus {
  outline: none;
  border-bottom-color: var(--signal);
  box-shadow: 0 1px 0 0 var(--signal);
}
.field input:focus-visible { outline: none; }

.field input[aria-invalid="true"] { border-bottom-color: #e8916f; }

.field__error {
  margin-top: 7px;
  font-size: .8125rem;
  color: #e8916f;
}

/* ─── Botões ───────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 28px;
  padding: 14px 24px;
  background: var(--signal);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.005em;
  cursor: pointer;
  transition: background-color .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { background: var(--signal-deep); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .62; cursor: default; transform: none; }

.btn--ghost {
  width: auto;
  margin-top: 0;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  padding-inline: 30px;
}
.btn--ghost:hover { background: var(--signal); color: #fff; }

/* ─── Seções ───────────────────────────────────────────────────── */

.section {
  padding-block: clamp(60px, 7.5vw, 104px);
  border-top: 1px solid var(--rule);
}

.label { display: block; margin-bottom: clamp(28px, 4vw, 44px); }

.learn { display: grid; gap: clamp(32px, 4vw, 48px); }

.learn__item h3 {
  font-size: clamp(1.25rem, 1.1rem + .7vw, 1.5rem);
  letter-spacing: -.02em;
  line-height: 1.2;
  margin-bottom: 12px;
  text-wrap: balance;
}

.learn__item p { color: var(--muted); max-width: 42ch; }

/* Para quem é / não é */
.fit { display: grid; gap: clamp(40px, 5vw, 72px); }

.list li {
  position: relative;
  padding-left: 30px;
  padding-block: 12px;
  border-top: 1px solid var(--rule);
  max-width: 44ch;
}
.list li::before {
  position: absolute;
  left: 0;
  top: 12px;
  font-family: var(--mono);
  font-size: .9375rem;
  line-height: 1.6;
}
.list--yes li::before { content: "+"; color: var(--signal-deep); }
.list--no li::before  { content: "–"; color: var(--muted); }
.list--no li { color: var(--muted); }

/* Bio */
.bio { max-width: 52ch; }
.bio__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  letter-spacing: -.02em;
  margin-bottom: 12px;
}
.bio__text {
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + .35vw, 1.1875rem);
  line-height: 1.55;
}
.bio__text em { color: var(--ink); font-style: italic; }

/* FAQ */
.faq { max-width: 62ch; border-top: 1px solid var(--rule); }

.faq__item { border-bottom: 1px solid var(--rule); }

.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 32px 18px 0;
  position: relative;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -.01em;
}
.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s var(--ease);
}
.faq__item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }

.faq__item p { padding: 0 32px 22px 0; color: var(--muted); }

/* ─── Chamada final ────────────────────────────────────────────── */

.closer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(56px, 7vw, 88px);
}

.closer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.closer__text {
  font-family: var(--display);
  font-size: clamp(1.375rem, 1.1rem + 1.4vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.15;
  max-width: 20ch;
  text-wrap: balance;
}

/* ─── Rodapé ───────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--rule);
  padding-block: 28px;
  font-size: .8125rem;
  color: var(--muted);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
}

/* ═══ Telas maiores ═══════════════════════════════════════════════ */

@media (min-width: 720px) {
  .learn { grid-template-columns: repeat(3, 1fr); }
  .fit   { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 940px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 400px);
    align-items: start;
  }
  .hero__lede { padding-right: clamp(24px, 4vw, 64px); }
}

/* ═══ Animação ════════════════════════════════════════════════════ */

/* Título em tokens: cada pedaço entra por conta própria */
.w {
  display: inline-block;
  opacity: 0;
  transform: translateY(.16em);
}
.is-revealing .w {
  animation: token .5s var(--ease) forwards;
  animation-delay: calc(var(--i) * 55ms);
}
.predict .w { color: var(--ghost); }
.is-revealing .predict .w {
  animation: token .5s var(--ease) forwards, commit .45s var(--ease) forwards;
  animation-delay: calc(var(--i) * 55ms), calc(var(--i) * 55ms + 260ms);
}

@keyframes token {
  to { opacity: 1; transform: none; }
}
@keyframes commit {
  from { color: var(--ghost); }
  to   { color: var(--signal); }
}

.is-revealing .caret { animation: blink .9s steps(1) 3 forwards; }
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Entrada suave das seções ao rolar */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

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

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .w { opacity: 1; transform: none; }
  .predict .w { color: var(--signal); }
  .caret { display: none; }
  .reveal { opacity: 1; transform: none; }
}
