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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }

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

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }

a { color: inherit; }

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

[id] { scroll-margin-top: var(--nav-height-scrolled); }

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 40px; height: 40px; }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--action);
  color: var(--on-action);
  font-family: var(--font-ui);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--margin-mobile);
}

/* ---------- Tipografia ---------- */
.hat {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: var(--space-4);
}

.heading {
  font-family: var(--font-heading);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
  text-wrap: balance;
}
.heading--lg { font-size: 32px; }

.lead {
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-muted);
  margin-top: var(--space-4);
}

.prose { font-size: 18px; line-height: 1.6; }
.prose p + p { margin-top: var(--space-5); }

.title {
  font-family: var(--font-heading);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--link);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 250ms var(--ease-out-expo);
}
.link:hover { background-size: 100% 2px; }

/* ---------- Botão (bundle.css do design system) ---------- */
.ind-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--touch-target);
  padding: var(--space-3) var(--space-7);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--action);
  color: var(--on-action);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease-out, transform 200ms ease-out;
}
.ind-btn:hover { background: var(--action-hover); transform: scale(1.02); }
.ind-btn:active { background: var(--action-active); transform: scale(0.98); }
.ind-btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* ---------- Navegação ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-height);
  transition: height 300ms ease-out, background-color 300ms ease-out, box-shadow 300ms ease-out;
}
.nav.is-scrolled {
  height: var(--nav-height-scrolled);
  background: color-mix(in srgb, var(--green-950) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav__brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target);
}
.nav__menu { display: flex; gap: var(--space-8); }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  transition: color 200ms ease-out;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 250ms var(--ease-out-expo);
}
.nav__link:hover, .nav__link.is-active { color: var(--link); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }

.nav__toggle {
  display: none;
  width: var(--touch-target);
  height: var(--touch-target);
  align-items: center;
  justify-content: center;
  margin-right: calc(var(--space-3) * -1);
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav__toggle .icon { width: 24px; height: 24px; }
.nav__toggle .icon--close { display: none; }
.nav__toggle[aria-expanded="true"] .icon--open { display: none; }
.nav__toggle[aria-expanded="true"] .icon--close { display: block; }

@media (max-width: 767px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: var(--space-2) var(--margin-mobile) var(--space-6);
    background: var(--green-950);
    box-shadow: 0 1px 0 var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 250ms ease-out, transform 250ms var(--ease-out-expo), visibility 0s 250ms;
  }
  .nav.is-open { background: var(--green-950); }
  .nav.is-open .nav__menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 250ms ease-out, transform 250ms var(--ease-out-expo);
  }
  .nav__link { font-size: 18px; min-height: 52px; }
  .nav__link::after { bottom: 12px; right: auto; width: 2em; }
}

/* ---------- Seções ---------- */
.section {
  background: var(--surface);
  color: var(--ink);
  padding: var(--space-16) 0;
}
.section--raised { background: var(--surface-raised); }
.section__head { max-width: 720px; margin-bottom: var(--space-12); }

/* ---------- 1. Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-height) + var(--space-8)) 0 var(--space-16);
  background:
    radial-gradient(60% 50% at 75% 45%, color-mix(in srgb, var(--green-800) 45%, transparent), transparent 70%),
    var(--surface);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  gap: var(--space-12);
  align-items: center;
}
.hero__title {
  font-family: var(--font-heading);
  font-size: 48px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.hero__promise {
  margin-top: var(--space-6);
  max-width: 34ch;
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink);
}
.hero__author {
  margin-top: var(--space-6);
  font-size: 16px;
  color: var(--ink-muted);
}
.hero__author strong { color: var(--ink); font-weight: 600; }
.hero__cta { margin-top: var(--space-8); }
.hero__cta .ind-btn { white-space: normal; }
.hero__note {
  margin-top: var(--space-3);
  font-size: 14px;
  color: var(--ink-muted);
}

.hero__book {
  display: flex;
  justify-content: center;
  perspective: 1200px;
}
.book {
  width: min(72vw, 320px);
  transform: rotateY(-14deg) rotateX(3deg);
  transform-style: preserve-3d;
  transition: transform 600ms var(--ease-out-expo);
  animation: float 4s ease-in-out infinite alternate;
}
.book:hover { transform: rotateY(-6deg) rotateX(2deg) scale(1.02); }
.book__cover {
  width: 100%;
  border-radius: 3px 6px 6px 3px;
  box-shadow:
    inset 4px 0 8px rgba(0, 0, 0, .25),
    -18px 30px 50px rgba(0, 0, 0, .45),
    -4px 8px 14px rgba(0, 0, 0, .3);
}
@keyframes float {
  from { translate: 0 -6px; }
  to { translate: 0 6px; }
}

/* ---------- 2. Spoiler ---------- */
.excerpt {
  display: grid;
  gap: var(--space-8);
}
.excerpt__body {
  position: relative;
  padding-top: var(--space-12);
}
.excerpt__body::before {
  content: "“";
  position: absolute;
  top: -12px;
  left: -4px;
  font-family: var(--font-heading);
  font-size: 120px;
  line-height: 1;
  font-weight: 800;
  color: var(--action);
}
.excerpt blockquote {
  font-size: 20px;
  line-height: 1.6;
}
.excerpt blockquote p + p { margin-top: var(--space-5); }
.excerpt mark {
  background: none;
  color: var(--action);
  font-weight: 600;
}
.excerpt figcaption {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--ink-muted);
}

/* ---------- 3. Problema ---------- */
.split {
  display: grid;
  gap: var(--space-8);
}
.pull {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 2px solid var(--link);
  font-family: var(--font-heading);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
  color: var(--link);
  max-width: 18ch;
}

/* ---------- 4. Apostas ---------- */
.bets {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--gutter);
  counter-reset: bet;
}
.bet {
  display: flex;
  flex-direction: column;
  padding: var(--space-8) var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-raised);
}
.bet__num {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  color: var(--action);
}
.bet__title {
  margin-top: var(--space-6);
  font-family: var(--font-heading);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
}
.bet__claim {
  margin-top: var(--space-4);
  font-size: 18px;
  line-height: 1.5;
}
.bet__consequence {
  margin-top: auto;
  padding-top: var(--space-6);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-muted);
}
.bet__consequence::before {
  content: "Consequência";
  display: block;
  margin: 0 0 var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--link);
}

/* ---------- 5. Autor ---------- */
.author {
  display: grid;
  gap: var(--space-12);
  align-items: center;
}
.author__chair {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}
.chair {
  position: relative;
  width: min(64vw, 300px);
  aspect-ratio: 760 / 1013;
  transform-style: preserve-3d;
  transform: rotateY(180deg);
  transition: transform 1.6s var(--ease-soft);
}
.chair::after {
  content: "";
  position: absolute;
  left: 12%; right: 12%; bottom: -4%;
  height: 8%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .45), transparent);
  transform: translateZ(-1px);
}
.chair__face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .35));
}
.chair__face--back { transform: rotateY(180deg); }
.is-revealed .chair { transform: rotateY(0deg); }

.author__text .prose { max-width: 62ch; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column-reverse; gap: var(--space-1); }
.stat dt { font-size: 14px; color: var(--ink-muted); }
.stat dd {
  font-family: var(--font-heading);
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--action);
}
.stat dd.stat__names { font-size: 24px; padding-top: 4px; }

/* ---------- 6. Dúvidas ---------- */
.faq {
  display: grid;
  gap: var(--gutter);
}
.faq__item {
  padding: var(--space-8) var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-raised);
  box-shadow: var(--shadow-xs);
}
.faq__q {
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
}
.faq__a {
  margin-top: var(--space-4);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ---------- 7–9. Oferta, formulário, privacidade ---------- */
.signup {
  background:
    radial-gradient(50% 60% at 85% 30%, color-mix(in srgb, var(--green-800) 40%, transparent), transparent 70%),
    var(--surface);
}
.signup__grid {
  display: grid;
  gap: var(--space-12);
  align-items: start;
}
.perks {
  list-style: none;
  padding: 0;
  margin-top: var(--space-8);
  display: grid;
  gap: var(--space-5);
}
.perks li {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  font-size: 18px;
  line-height: 1.45;
}
.perks .icon {
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: var(--radius-full);
  background: var(--surface-raised);
  color: var(--action);
  stroke-width: 2.5;
}
.perks__highlight {
  padding: var(--space-5);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--surface-raised);
}
.perks__highlight strong { color: var(--action); font-weight: 700; }
.perks__highlight .icon { background: var(--action); color: var(--on-action); }

.signup__card {
  padding: var(--space-8) var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-3xl);
  background: var(--surface-raised);
}
.form { display: grid; gap: var(--space-5); }
.field { display: grid; gap: var(--space-2); }
.field label {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
}
.field input {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1.4 var(--font-body);
  transition: border-color 150ms ease-out, box-shadow 200ms ease-out;
}
.field input:hover { border-color: var(--green-600); }
.field input:focus { outline: none; border-color: var(--focus-ring); box-shadow: 0 0 0 2px var(--surface-raised), 0 0 0 4px var(--focus-ring); }
.field input[aria-invalid="true"] { border-color: var(--error); animation: shake 300ms ease-out; }
.field__error { font-size: 14px; color: var(--error); }
.field__error::before { content: "! "; font-weight: 700; }
@keyframes shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__submit { width: 100%; margin-top: var(--space-2); }
.form__status { font-size: 14px; color: var(--ink-muted); min-height: 0; }
.form__status:empty { display: none; }
.form__status.is-error { color: var(--error); }

.form__success { display: grid; gap: var(--space-3); justify-items: start; outline: none; }
.form__success .icon { color: var(--success); }
.form__success p { font-size: 18px; line-height: 1.5; color: var(--ink-muted); }

.privacy {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* ---------- Rodapé ---------- */
.footer {
  padding: var(--space-12) 0 var(--space-8);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer__inner {
  display: grid;
  gap: var(--space-8);
}
.footer__brand {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
}
.footer__meta { margin-top: var(--space-2); color: var(--ink-muted); }
.footer__contact .hat { margin-bottom: var(--space-2); }
.footer__contact .link { font-size: 18px; min-height: var(--touch-target); }
.footer__legal { font-size: 14px; color: var(--ink-muted); }

/* ---------- Reveals por scroll ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 700ms var(--ease-out-expo), transform 700ms var(--ease-out-expo);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal="slide"] { transform: translateX(-40px); }
.js [data-reveal].is-revealed { opacity: 1; transform: none; }

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
  .container { padding: 0 var(--margin-tablet); }
  .section { padding: var(--space-28) 0; }
  .heading { font-size: 32px; }
  .heading--lg { font-size: 40px; }
  .hero { padding: calc(var(--nav-height) + var(--space-12)) 0 var(--space-28); }
  .hero__title { font-size: 72px; }
  .hero__promise { font-size: 24px; }
  .book { width: 340px; }
  .excerpt blockquote { font-size: 24px; }
  .bets { grid-template-columns: repeat(2, 1fr); }
  .bet:last-child { grid-column: 1 / -1; }
  .faq { grid-template-columns: repeat(2, 1fr); }
  .signup__card { padding: var(--space-12) var(--space-8); }
  .footer__inner { grid-template-columns: 1fr auto; align-items: end; }
  .footer__legal { grid-column: 1 / -1; padding-top: var(--space-6); border-top: 1px solid var(--border); }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  .container { padding: 0 var(--margin-desktop); }
  .hero { min-height: 100svh; display: flex; align-items: center; }
  .hero__grid { grid-template-columns: 7fr 5fr; gap: var(--gutter); }
  .hero__title { font-size: 80px; }
  .book { width: 420px; }

  .excerpt { grid-template-columns: 4fr 8fr; gap: var(--space-16); align-items: start; }
  .excerpt__head { position: sticky; top: calc(var(--nav-height-scrolled) + var(--space-8)); }

  .split { grid-template-columns: 5fr 7fr; gap: var(--space-16); }
  .heading--lg { font-size: 48px; font-weight: 700; }

  .bets { grid-template-columns: repeat(3, 1fr); }
  .bet:last-child { grid-column: auto; }

  .author { grid-template-columns: 5fr 7fr; gap: var(--space-16); }
  .chair { width: 380px; }

  .signup__grid { grid-template-columns: 6fr 5fr; gap: var(--space-16); }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .chair { transform: none; }
  .ind-btn:hover, .ind-btn:active, .book:hover { transform: none; }
}
