/* ==========================================================================
   Bolsão Americano 2027 – Landing page
   Mobile-first. Breakpoints: 640px (tablet) e 960px (desktop).
   ========================================================================== */

:root {
  --yellow: #ffcc29;
  --purple: #6800b3;
  --purple-dark: #30014b;
  --purple-deep: #2c0046;
  --white: #fefefe;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 12px;
  --container: 1180px;
  --gutter: 20px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  line-height: 1.45;
  color: var(--purple-dark);
  background: var(--purple);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
a { color: inherit; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 950px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--yellow); color: var(--purple-dark); font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 12px 24px;
  border-radius: var(--radius);
  font: 800 1rem/1.15 var(--font);
  text-transform: uppercase; text-decoration: none; letter-spacing: .01em;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn--yellow {
  background: var(--yellow); color: var(--purple);
  border: 4px solid var(--purple-dark);
  box-shadow: 0 6px 0 rgba(48, 1, 75, .35);
}
.btn--purple { background: var(--purple); color: var(--white); border: 0; font-size: 1.35rem; }
.btn--white {
  background: var(--white); color: var(--purple);
  border: 4px solid var(--purple);
  font-size: 1.05rem;
}

/* ---------- Tags (rótulos de seção) ---------- */
.tag {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 8px;
  font-weight: 800; text-transform: uppercase; text-align: center; line-height: 1.15;
}
.tag--yellow { background: var(--yellow); color: var(--purple-dark); border: 4px solid var(--purple); }
.tag--dark   { background: var(--purple-deep); color: var(--white); border: 4px solid var(--purple); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--yellow);
  padding-top: 24px;
  isolation: isolate;
}
/* Curva roxa (mobile) */
.hero::before {
  content: "";
  position: absolute; z-index: -1;
  left: -30%; right: -30%; top: clamp(250px, 62vw, 420px); bottom: -10px;
  background: var(--purple);
  border-top: 18px solid var(--purple-dark);
  border-radius: 50% 50% 0 0 / 90px 90px 0 0;
  transform: rotate(-5deg);
  transform-origin: 50% 0;
}
.hero__grid {
  display: grid;
  grid-template-areas: "media" "content" "cta";
  justify-items: center;
  padding-bottom: 40px;
}
.hero__media { grid-area: media; width: min(75%, 420px); }
.hero__content { grid-area: content; text-align: center; color: var(--white); margin-top: -18%; position: relative; }
.hero__cta { grid-area: cta; margin-top: 26px; width: min(100%, 460px); font-size: clamp(.95rem, 3.6vw, 1.2rem); }

.hero__title img { width: min(100%, 560px); margin-inline: auto; }
.hero__lead { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 6px; }
.hero__year {
  display: flex; align-items: center; gap: 16px;
  font-size: clamp(1.6rem, 6.4vw, 2.6rem); font-weight: 500; line-height: 1.2;
}
.hero__year::before, .hero__year::after {
  content: ""; width: clamp(48px, 15vw, 120px); height: 2px; background: var(--yellow);
}
.hero__badge {
  display: inline-block;
  background: var(--yellow); color: var(--purple-dark);
  padding: 4px 22px; border-radius: 10px;
  font-size: clamp(1.45rem, 6.2vw, 2.4rem); font-weight: 800; text-transform: uppercase; line-height: 1.3;
}
.hero__line { font-size: clamp(1.6rem, 6.4vw, 2.6rem); font-weight: 500; line-height: 1.2; }
.hero__bolsa { width: min(100%, 540px); }
.hero__grades {
  font-size: clamp(1.05rem, 4.4vw, 1.75rem); font-weight: 800; text-transform: uppercase; line-height: 1.2;
}

/* ==========================================================================
   FORMULÁRIO
   ========================================================================== */
.signup {
  background: var(--yellow) url("../img/textura-amarela.webp") center / cover no-repeat;
  padding: 40px 0 72px;
  scroll-margin-top: 0;
}
.signup__title img { width: min(100%, 640px); margin: 0 auto 20px; }

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  align-items: end;
}
.form__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form__field--full, .form__field--serie { grid-column: 1 / -1; }
.form label { font-weight: 600; font-size: .95rem; color: var(--purple-dark); }
.form input, .form select {
  width: 100%; height: 50px; padding: 0 14px;
  border: 2px solid transparent; border-radius: 10px;
  background: #fff; color: var(--purple-dark);
  font: 500 1rem var(--font);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%236800b3' stroke-width='2.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  padding-right: 42px;
}
.form select:invalid { color: #7b6a86; }
.form input:focus, .form select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(104, 0, 179, .2); }
.form input:user-invalid, .form select:user-invalid { border-color: #c4002f; }
.form__submit { grid-column: 1 / -1; justify-self: end; min-width: 160px; height: 50px; }
.form__field--consent { gap: 8px; }
.form__consent {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border: 2px solid rgba(104, 0, 179, .2);
  border-radius: 12px;
  background: rgba(254, 254, 254, .72);
  color: var(--purple-dark);
  cursor: pointer;
}
.form__consent input[type="checkbox"] {
  width: 20px; height: 20px; margin: 2px 0 0;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  transition: none;
  accent-color: var(--purple);
}
.form__consent input[type="checkbox"]:focus {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
  box-shadow: none;
}
.form__consent input[type="checkbox"]:invalid {
  border: 0;
  box-shadow: none;
}
.form__feedback {
  min-height: 1.2em;
  margin-left: 4px;
  color: #c4002f;
  font-size: .9rem;
  font-weight: 600;
}
.form__hp { position: absolute; left: -9999px; }

/* ==========================================================================
   ÁREA ROXA (provas, cards, por que estudar)
   ========================================================================== */
.purple-area {
  background: var(--purple) url("../img/textura-roxa.webp") center top / 100% auto repeat-y;
  color: var(--white);
  padding-bottom: 90px;
}

/* Provas */
.exams__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  max-width: 1000px;
}
.exam { display: flex; flex-direction: column; align-items: center; }
.exam .tag {
  width: 100%;
  margin-top: -24px;
  font-size: clamp(1rem, 3.6vw, 1.75rem);
  padding-block: 6px;
}
.exam img { width: 100%; max-width: 440px; margin-top: 16px; }

/* Cards de informação */
.info { padding-top: 64px; }
.info__grid { display: grid; gap: 64px; justify-items: center; }
.card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 1.2em;
  width: min(100%, 400px);
  padding: 72px 28px 40px;
  background: var(--white); color: var(--purple-dark);
  border-radius: 44px;
  text-align: center; font-size: 1.1rem; line-height: 1.4;
}
.card strong { font-weight: 800; }
.card__tag {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  width: 78%; font-size: 1.3rem; padding-block: 6px;
}
.card__dates { list-style: none; padding: 0; display: grid; gap: 1.2em; }
.card__cta { margin-top: auto; font-size: clamp(1.1rem, 4.6vw, 1.3rem); line-height: 1.2; padding: 12px 20px; width: 100%; max-width: 300px; }

/* Por que estudar */
.why { padding-top: 90px; text-align: center; }
.why__head { display: flex; align-items: center; gap: 0; }
.why__tag {
  margin-inline: auto;
  font-size: clamp(1.05rem, 4vw, 1.6rem); padding: 6px 28px;
  border: 0; border-radius: 6px;
}
.why__lead { margin-top: 18px; font-weight: 800; font-size: clamp(1.15rem, 3.9vw, 1.65rem); line-height: 1.3; }
.why__text { margin-top: 6px; font-size: clamp(.95rem, 3.2vw, 1.3rem); max-width: 60ch; margin-inline: auto; }

.why__grid { display: grid; gap: 40px; margin-top: 44px; justify-items: center; }
.campus {
  width: min(100%, 560px);
  padding: 18px 18px 30px;
  background: var(--purple-dark);
  border-radius: 34px;
}
.campus img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 24px; }
.campus figcaption { margin-top: 26px; padding-inline: 12px; font-size: clamp(1rem, 3.4vw, 1.2rem); line-height: 1.4; }
.campus strong { color: var(--yellow); font-weight: 800; }

/* ==========================================================================
   UNIDADES
   ========================================================================== */
.units {
  position: relative;
  background: var(--yellow) url("../img/textura-amarela.webp") center / cover no-repeat;
  padding: 0 0 56px;
  text-align: center;
}
.units__tag {
  position: relative; top: -32px;
  display: block; width: min(86%, 440px); margin-inline: auto;
  font-size: clamp(1.7rem, 6vw, 2.25rem); padding-block: 8px;
}
.units__grid { display: grid; gap: 32px; margin-top: 8px; }
.unit { font-style: normal; }
.unit__name { font-weight: 800; font-size: clamp(1.2rem, 4.6vw, 1.6rem); }
.unit__phones { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; margin-top: 4px; }
.unit a { text-decoration: none; }
.unit a:hover { text-decoration: underline; }
.unit__phones, .unit__addr { font-size: clamp(1rem, 3.9vw, 1.3rem); }
.unit__phones a { display: inline-flex; align-items: center; gap: 4px; }
.unit svg { width: 1em; height: 1em; flex: none; }
.unit__addr svg { display: inline-block; vertical-align: -.12em; margin-right: 4px; }
.unit__addr { margin-top: 4px; }

/* ==========================================================================
   RODAPÉ
   ========================================================================== */
.footer { background: var(--purple-dark); }
.footer__links {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  max-width: 1000px; padding-block: 56px;
}
.footer__links .btn { font-size: clamp(.62rem, 2.9vw, 1.6rem); padding-inline: 4px; min-height: 48px; border-width: 3px; }
.footer__note {
  background: var(--purple); color: var(--white);
  padding: 18px var(--gutter);
  text-align: center; font-size: clamp(.68rem, 2.4vw, .95rem); font-weight: 600;
}

/* ==========================================================================
   TABLET ≥ 640px
   ========================================================================== */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .units__grid { gap: 40px; }
  .why__head::before, .why__head::after { content: ""; flex: 1; height: 3px; background: var(--yellow); }
  .why__tag { margin-inline: 0; }
}

/* ==========================================================================
   DESKTOP ≥ 960px
   ========================================================================== */
@media (min-width: 960px) {
  /* Hero: duas colunas, fundo original com a curva amarela à esquerda */
  .hero {
    background: var(--purple) url("../img/hero-bg.webp") left center / cover no-repeat;
    padding-top: 36px;
  }
  .hero::before { display: none; }
  .hero__grid {
    grid-template-columns: 1fr 1.15fr;
    grid-template-areas: "media content" "cta content";
    align-items: center;
    padding-bottom: 64px;
    column-gap: 24px;
  }
  .hero__media { width: 100%; max-width: 440px; }
  .hero__cta { align-self: start; margin-top: -40px; width: min(100%, 460px); position: relative; z-index: 1; }
  .hero__content { margin-top: 0; padding-block: 24px; }

  /* Formulário: WhatsApp/E-mail lado a lado; série + unidade + botão na mesma linha */
  .signup { padding: 48px 0 96px; }
  .form { grid-template-columns: repeat(12, 1fr); column-gap: 28px; row-gap: 18px; }
  .form__field { grid-column: span 6; }
  .form__field--full { grid-column: 1 / -1; }
  .form__field--serie { grid-column: 1 / span 5; }
  .form__field--unit { grid-column: 6 / span 4; }
  .form__submit { grid-column: 10 / -1; justify-self: stretch; }
  .form label { font-size: 1.05rem; }

  .exams__grid { gap: 100px; }
  .exam .tag { margin-top: -30px; }

  .info { padding-top: 90px; }
  .info__grid { grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
  .card { width: 100%; font-size: 1.05rem; padding-inline: 32px; min-height: 560px; }

  .why { padding-top: 110px; }
  .why__grid { grid-template-columns: 1fr 1fr; gap: 64px; max-width: 1040px; margin-inline: auto; }
  .campus { width: 100%; }

  .units__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .unit__phones, .unit__addr { font-size: 1.15rem; }
  .footer__links .btn { border-width: 4px; min-height: 56px; }
  .units { padding-bottom: 70px; }
  .units__tag { top: -36px; }
  .footer__links { gap: 40px; padding-block: 70px; }
}

/* ==========================================================================
   PÁGINA DE OBRIGADO
   ========================================================================== */
.thanks { min-height: 100vh; display: grid; place-items: center; padding-block: 48px; color: var(--white); }
.thanks__box { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; max-width: 640px; }
.thanks__box img { width: min(100%, 460px); }
.thanks h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 800; }
.thanks p { font-size: 1.1rem; }
