/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --yellow: #f5a623;          /* amarelo principal (blob, botão, títulos) */
  --yellow-hero: #FDB81E;     /* fundo do hero / botão / rodapé */
  --yellow-soft: #fbe1a9;     /* headline clara sobre o hero */
  --cream: #f4efe7;           /* fundo da página */
  --cream-card: #f7f3ec;      /* card "você foi indicado" */
  --white: #ffffff;
  --ink: #3f3f3f;             /* texto escuro */
  --gray: #7a7d84;            /* texto secundário */
  --gray-soft: #9aa0a6;       /* placeholders / rótulos suaves */
  --input-bg: #efeeec;
  --shadow-card: 0 24px 60px rgba(60, 45, 10, 0.10);

  --font-title: 'Poppins', sans-serif;
  --font-body: 'Lato', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.page--loading {
  overflow: hidden;
}

/* ── Carregamento da indicação ─────────────────────────────────────────── */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  background: rgba(244, 239, 231, 0.94);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.page--loading .page-loader {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.page-loader__spinner {
  width: 3rem;
  height: 3rem;
  border: 4px solid var(--yellow-soft);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: page-spinner 0.8s linear infinite;
}

.page-loader__text {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 600;
}

@keyframes page-spinner {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .page-loader,
  .page-loader__spinner {
    animation: none;
    transition: none;
  }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 2;
  background: var(--yellow-hero);
  border-radius: 0 0 clamp(80px, 12vw, 160px) clamp(80px, 12vw, 160px);
  padding: clamp(2rem, 4vw, 3.25rem) clamp(1.5rem, 6vw, 5rem) 0;
  min-height: clamp(560px, 58vw, 720px);
  overflow: visible;
}

.hero__logo {
  display: block;
  width: clamp(210px, 26vw, 380px);
  height: auto;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}

.hero__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.hero__text {
  max-width: 58%;
}

.hero__headline {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--yellow-soft);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.hero__subtitle {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  color: var(--white);
  font-weight: 700;
  font-size: clamp(0.8rem, 1.1vw, 1rem);
  line-height: 1.7;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  max-width: 54ch;
}

.hero__woman {
  position: absolute;
  right: clamp(1rem, 12vw, 13rem);
  bottom: clamp(-30px, -3vw, 0px);
  height: clamp(400px, 52vw, 700px);
  width: auto;
  z-index: 3;
  pointer-events: none;
}

/* ── Você foi indicado ──────────────────────────────────────────────────── */
.referral {
  margin: clamp(-40px, -3vw, -20px) clamp(1rem, 4vw, 3rem) 0;
  position: relative;
  z-index: 1;
  border: 1.5px solid var(--yellow);
  border-radius: 999px;
  background: var(--cream-card);
}

.referral__card {
  padding: clamp(4rem, 7vw, 6.5rem) clamp(1.5rem, 4vw, 3rem) clamp(2.25rem, 4vw, 3.5rem);
  text-align: center;
}

.referral__label {
  font-family: var(--font-title);
  color: var(--yellow);
  font-weight: 600;
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.referral__name {
  font-family: var(--font-title);
  font-style: italic;
  font-weight: 700;
  color: var(--yellow);
  font-size: clamp(1.8rem, 3.4vw, 2.9rem);
  margin: clamp(0.5rem, 1vw, 0.85rem) 0 clamp(1rem, 1.6vw, 1.4rem);
}

.referral__store {
  color: var(--gray);
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  font-weight: 600;
  margin: calc(clamp(0.5rem, 1vw, 0.85rem) * -1) 0 clamp(1rem, 1.6vw, 1.4rem);
}

.referral__text {
  color: var(--gray);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.7;
  max-width: 56ch;
  margin: 0 auto;
}

/* Estado inválido — mantém o tema amarelo da página */
.referral__card--invalid .referral__name {
  font-style: normal;
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
}

/* ── Pré-cadastro + Formulário ──────────────────────────────────────────── */
.signup {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 5vw, 2.5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.signup__eyebrow {
  font-family: var(--font-title);
  color: var(--yellow);
  font-weight: 600;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  margin-bottom: clamp(0.75rem, 1.5vw, 1.25rem);
}

.signup__title {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--yellow);
  font-size: clamp(2rem, 4.4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.signup__lead {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  color: var(--gray);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.7;
  max-width: 42ch;
}

/* Card do formulário */
.form-card {
  background: var(--white);
  border-radius: clamp(24px, 3vw, 40px);
  box-shadow: var(--shadow-card);
  padding: clamp(1.75rem, 3.5vw, 3.5rem);
}

.form-card__title {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--yellow);
  font-size: clamp(1.5rem, 2.6vw, 2.15rem);
}

.form-card__hint {
  color: var(--gray);
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  margin-top: 0.35rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.field {
  margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}

.field label {
  display: block;
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--ink);
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  margin-bottom: 0.6rem;
}

.field__optional {
  font-weight: 400;
  color: var(--gray);
}

.field input {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid transparent;
  border-radius: 100px;
  padding: clamp(0.85rem, 1.4vw, 1.05rem) clamp(1.1rem, 1.8vw, 1.5rem);
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}

.field input::placeholder {
  color: var(--gray-soft);
}

.field input:focus {
  outline: none;
  background: var(--white);
  border-color: var(--yellow);
}

.field--invalid input {
  border-color: #c93c35;
}

.field--invalid input:focus {
  border-color: #c93c35;
}

.field__error {
  color: #b52f28;
  font-size: 0.85rem;
  line-height: 1.35;
  margin: 0.45rem 1.25rem 0;
}

.btn-primary {
  width: 100%;
  margin-top: clamp(0.75rem, 1.5vw, 1.25rem);
  padding: clamp(0.95rem, 1.6vw, 1.15rem);
  background: var(--yellow-hero);
  color: var(--ink);
  border: none;
  border-radius: 100px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  cursor: pointer;
  transition: background 0.2s, transform 0.05s;
}

.btn-primary:hover { background: #ecaa15; }
.btn-primary:active { transform: translateY(1px); }

.btn-primary:disabled {
  cursor: wait;
  opacity: 0.75;
}

.btn-primary__spinner {
  display: none;
  width: 1em;
  height: 1em;
  margin-left: 0.5rem;
  vertical-align: -0.125em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-spinner 0.7s linear infinite;
}

.btn-primary--loading .btn-primary__spinner {
  display: inline-block;
}

.form-card__feedback {
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 1rem 0 0;
  text-align: center;
}

.form-card__feedback--success { color: #287239; }
.form-card__feedback--error { color: #b52f28; }

@keyframes button-spinner {
  to { transform: rotate(360deg); }
}

/* ── Rodapé ─────────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: clamp(2rem, 5vw, 4rem) 1.5rem clamp(3rem, 6vw, 5rem);
}

.footer__logo {
  width: clamp(140px, 16vw, 200px);
  height: auto;
}

.footer-bar {
  background: var(--yellow-hero);
  border-radius: clamp(32px, 5vw, 64px) clamp(32px, 5vw, 64px) 0 0;
  text-align: center;
  padding: clamp(1.25rem, 2.5vw, 2rem) 1.5rem;
}

.footer-bar__text {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.9;
}

.footer-bar__brand {
  color: var(--white);
  font-family: var(--font-title);
  font-weight: 700;
}

/* ── Responsivo ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .signup {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .signup__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .form-card { text-align: left; }
}

@media (max-width: 970px) {
  .hero__woman {
    right: clamp(0px, 3vw, 2rem);
    height: clamp(440px, 62vw, 600px);
  }
}

@media (max-width: 640px) {
  .hero {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    min-height: auto;
    padding-bottom: clamp(120px, 40vw, 200px);
  }

  .hero__logo { margin-bottom: 2rem; }

  .hero__text {
    max-width: 62%;
    text-align: left;
  }

  .hero__headline { font-size: clamp(1.9rem, 8.5vw, 2.6rem); }

  .hero__subtitle {
    font-size: 0.72rem;
    max-width: 26ch;
  }

  .hero__woman {
    right: -1.5rem;
    bottom: 0;
    height: clamp(340px, 80vw, 460px);
  }

  .referral {
    margin-top: -30px;
    border-radius: 50px;
  }

  .referral__card { padding-top: clamp(3rem, 6vw, 4.5rem); }

  .field input,
  .btn-primary { border-radius: 16px; }
}

@media (max-width: 420px) {
  .hero__text { max-width: 70%; }
  .hero__woman { height: clamp(280px, 72vw, 350px); }
}
