/* =========================================================
   Lojas Dufins × Maratona de Joinville — Landing de cadastro
   Tokens extraídos do tema Shopify de lojasdufins.com.br
   ========================================================= */
:root {
  /* Marca Dufins */
  --navy: #003456;        /* logo, faixa de avisos, rodapé */
  --navy-900: #00203a;
  --green: #33bb33;       /* botões e preços (accent do tema) */
  --green-700: #2a9e2a;
  --link: #3650b5;
  --text: #121212;
  --text-muted: rgba(18, 18, 18, 0.65);
  --bg: #ffffff;
  --surface: #f4f6f8;
  --border: rgba(18, 18, 18, 0.14);
  --error: #d93025;

  /* Cor do evento (texto da data na logo da Maratona) */
  --lime: #d9ee8c;

  /* Formas — mesmos raios do tema */
  --radius-btn: 6px;
  --radius-input: 6px;
  --radius-card: 12px;
  --shadow-card: 0 10px 30px rgba(0, 32, 58, 0.18);

  --font: "Red Hat Display", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
/* Enquanto os textos do painel carregam (máx. ~1,5 s), evita piscar o texto antigo */
.carregando [data-c] { visibility: hidden; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Faixa de avisos ---------- */
.topbar {
  background: var(--navy);
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 10px 0;
}
.topbar__track {
  display: inline-flex;
  animation: marquee 28s linear infinite;
}
.topbar__track span { padding: 0 14px; }
.topbar__track span::after { content: "•"; margin-left: 28px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Header ---------- */
.header {
  display: flex;
  justify-content: center;
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
}
.header__logo img { width: 150px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(217, 238, 140, 0.12), transparent 60%),
    repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, 0.035) 46px 48px),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%);
  padding: 28px 16px 48px;
}
.hero__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 32px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero__event { width: min(100%, 330px); margin: 0 0 18px -4px; }
@media (min-width: 900px) { .hero__event { width: 460px; margin-bottom: 24px; } }
.hero__title {
  margin: 0 0 12px;
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.hero__title .destaque { color: var(--lime); }
.hero__lead {
  margin: 0;
  max-width: 34em;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Card / Formulário ---------- */
.card {
  background: #fff;
  color: var(--text);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px 22px;
}
.card__title { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.2; }
.card__sub { margin: 4px 0 20px; color: var(--text-muted); font-size: 15px; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}
.field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px; /* evita zoom automático no iOS */
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder { color: rgba(18, 18, 18, 0.4); }
.field input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 52, 86, 0.15);
}
.field.is-invalid input { border-color: var(--error); }
.field.is-invalid input:focus { box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.15); }
.field__error, .form-error {
  margin: 6px 0 0;
  min-height: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--error);
}
.field__error:empty, .form-error:empty { display: none; }

.form-aviso {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff6e0;
  border: 1.5px solid #f3d08a;
  color: #6b4500;
  font-size: 14px;
  font-weight: 600;
}

.legal {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 24px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background-color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

.btn--primary {
  width: 100%;
  margin-top: 6px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 6px 16px rgba(51, 187, 51, 0.35);
}
.btn--primary:hover { background: var(--green-700); }
.btn--primary[disabled] { cursor: progress; opacity: .85; }

.btn__spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.is-loading .btn__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn--outline {
  color: var(--navy);
  background: transparent;
  border: 2px solid var(--navy);
}
.btn--outline:hover { background: var(--navy); color: #fff; }

.btn--whatsapp {
  width: 100%;
  padding: 0 14px;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--green);
  box-shadow: 0 8px 22px rgba(51, 187, 51, 0.4);
  animation: pulse 2.2s ease-in-out infinite;
}
.btn--whatsapp:hover { background: var(--green-700); }
.btn__icon { width: 24px; height: 24px; flex: none; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(51, 187, 51, 0.4), 0 0 0 0 rgba(51, 187, 51, 0.45); }
  50%      { box-shadow: 0 8px 22px rgba(51, 187, 51, 0.4), 0 0 0 12px rgba(51, 187, 51, 0); }
}

/* ---------- Como participar ---------- */
.steps {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 16px 64px;
  text-align: center;
}
.section-title {
  margin: 0 0 28px;
  font-size: clamp(24px, 4vw, 30px);
  font-weight: 400;          /* títulos do tema: maiúsculas, peso regular */
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.steps__list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 16px;
}
.step {
  position: relative;
  padding: 28px 20px 22px;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: 0 4px 24px rgba(18, 18, 18, 0.08);
  text-align: left;
}
.step__num {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
}
.step h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.step p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* ---------- Etapa 2: Falta pouco ---------- */
.done {
  min-height: calc(100vh - 160px);
  color: #fff;
  background:
    radial-gradient(700px 360px at 50% 0%, rgba(51, 187, 51, 0.18), transparent 60%),
    repeating-linear-gradient(115deg, transparent 0 46px, rgba(255, 255, 255, 0.035) 46px 48px),
    linear-gradient(170deg, var(--navy) 0%, var(--navy-900) 100%);
  padding: 28px 16px 56px;
  animation: fade-up .45s ease-out both;
}
.done__inner { max-width: 520px; margin: 0 auto; text-align: center; }

.progress { margin-bottom: 22px; }
.progress__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}
.progress__bar span {
  display: block;
  height: 100%;
  width: 66%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--lime));
  animation: grow 1s ease-out both;
}
.progress__bar--full span { width: 100%; animation-name: grow-full; }
@keyframes grow-full { from { width: 66%; } }
.progress__label {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
@keyframes grow { from { width: 33%; } }

.done__title {
  margin: 0 0 12px;
  font-size: clamp(32px, 8vw, 46px);
  font-weight: 900;
  line-height: 1.05;
}
.done__title:focus { outline: none; }
.done__lead { margin: 0 0 20px; font-size: 17px; color: rgba(255, 255, 255, 0.88); }
.done__lead strong { color: var(--lime); }

.checklist {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
  text-align: left;
}
.checklist__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 700;
}
.checklist__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-weight: 800;
}
.checklist__icon svg { width: 18px; height: 18px; }
.is-done { color: rgba(255, 255, 255, 0.75); }
.is-done .checklist__icon { background: var(--green); color: #fff; }
.is-pending { border-color: var(--lime); background: rgba(217, 238, 140, 0.1); }
.is-pending .checklist__icon { background: var(--lime); color: var(--navy); }

.done__note { margin: 16px 0 36px; font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.done__note a { color: var(--lime); font-weight: 700; }

/* ---------- Ingresso da rodada (Etapa 3) ---------- */
.ticket {
  position: relative;
  color: var(--text);
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  text-align: left;
  padding-bottom: 20px; /* respiro entre o aviso e a borda do ingresso (padding não "vaza" como margin) */
  animation: pop .5s .15s cubic-bezier(.2, 1.4, .4, 1) both;
}
.ticket__top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}
.ticket__bottom {
  position: relative;
  padding: 16px 20px 16px;
  border-top: 2px dashed rgba(18, 18, 18, 0.18);
  text-align: center;
}
/* "picotes" laterais do ingresso */
.ticket__bottom::before, .ticket__bottom::after {
  content: "";
  position: absolute;
  top: -13px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--navy-900);
}
.ticket__bottom::before { left: -12px; }
.ticket__bottom::after { right: -12px; }

.ticket__label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ticket__name { margin: 2px 0 0; font-size: 20px; font-weight: 800; line-height: 1.2; }
.ticket__code {
  margin: 4px 0 6px;
  font-size: clamp(34px, 11vw, 44px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.ticket__when { margin: 0; font-size: 13px; font-weight: 700; color: var(--green-700); }

.ticket__rules {
  margin: 0 20px;
  padding: 18px 18px 16px;
  border-radius: 10px;
  background: #f4f9e1;               /* lima bem claro, mantém contraste com o texto */
  border: 1.5px solid #c9e06a;
}
.ticket__rules-title { margin: 0 0 14px; font-size: 14px; font-weight: 800; line-height: 1.3; color: var(--navy); }
.ticket__rules ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticket__rules li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}
.ticket__rules li span { margin-top: -1px; }
.ticket__rules li span {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.ticket__rules-warn {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #dbe9a6;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--error);
}
.ticket + .done__note { margin-top: 24px; }

.wheel {
  position: relative;
  flex: none;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 3px solid var(--navy);
  background: conic-gradient(
    var(--navy) 0 45deg, #fff 45deg 90deg, var(--green) 90deg 135deg, #fff 135deg 180deg,
    var(--navy) 180deg 225deg, #fff 225deg 270deg, var(--lime) 270deg 315deg, #fff 315deg 360deg);
  animation: spin 6s linear infinite;
}
.wheel::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 14px; height: 14px;
  margin: -7px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid #fff;
}
@keyframes pop { from { opacity: 0; transform: scale(.9); } }

/* ---------- Prêmios ---------- */
.prizes {
  padding: 56px 16px 64px;
  background: var(--surface);
  text-align: center;
}
.prizes__list {
  list-style: none;
  max-width: 1120px;
  margin: 0 auto 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.prize {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 14px;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: 0 4px 24px rgba(18, 18, 18, 0.08);
  font-weight: 800;
}
.prize img { width: 100%; max-width: 160px; aspect-ratio: 1; object-fit: contain; }
.prize__name { margin: 0; font-size: 16px; line-height: 1.25; }
.prizes__note { margin: 0; font-size: 13px; color: var(--text-muted); }
.done__event { width: min(100%, 300px); margin: 0 auto; opacity: .9; }

@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Rodapé ---------- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 16px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  text-align: center;
}
.footer img { width: 120px; }
.footer p { margin: 0; }
.footer a { color: #fff; }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .header__logo img { width: 170px; }
  .hero { padding: 72px 24px 88px; }
  .hero__inner { grid-template-columns: 1.1fr 0.9fr; gap: 64px; }
  .card { padding: 36px 32px; }
  .steps__list { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .btn--outline { min-width: 280px; }
  .done { padding-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
