/* =====================================================================
   Programa Estudante de Educação Física — estilos
   Mobile-first. Fontes do sistema (sem CDN).
   Contraste: texto principal ≥ 7:1; acento lima só sobre preto.
   ===================================================================== */

:root {
  --black: #0d0d0d;
  --ink: #161616;
  --muted: #4a4a4a;        /* 8.9:1 sobre branco */
  --line: #d9d9d9;
  --bg: #ffffff;
  --bg-soft: #f3f3f1;
  --accent: #d7ff3c;       /* usado sobre preto (contraste ~17:1) */
  --danger: #b00020;
  --success: #1b6b2f;
  --focus: #0d0d0d;
  --radius: 4px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0 0 1rem; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.section--dark, .hero, .topbar, .footer { --focus: var(--accent); }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--accent); color: var(--black);
  padding: .75rem 1rem; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.container--narrow { max-width: 760px; }
.nowrap { white-space: nowrap; }

/* ---------- Topbar ---------- */
.topbar { background: var(--black); color: #fff; border-bottom: 1px solid #2a2a2a; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; }
.topbar__name { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }
.badge {
  display: inline-block; border: 1px solid var(--accent); color: var(--accent);
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .2rem .55rem; border-radius: 999px; white-space: nowrap;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .8rem 1.6rem; border: 2px solid transparent; border-radius: var(--radius);
  font: inherit; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, background-color .15s ease;
}
.btn--primary { background: var(--accent); color: var(--black); }
.btn--primary:hover { background: #fff; }
.btn--primary:active { transform: translateY(1px); }
.btn--lg { width: 100%; font-size: 1.05rem; min-height: 56px; }

/* ---------- Banner ---------- */
.hero { background: var(--black); color: #fff; padding: 2.25rem 0 2.75rem; overflow: hidden; }
.hero__grid { display: grid; gap: 2rem; }
.eyebrow {
  font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .75rem;
}
.hero__title {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2rem, 8.5vw, 3.6rem); letter-spacing: -.01em; margin-bottom: 1.25rem;
}
.hero__offer { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .75rem; }
.hero__pct {
  font-family: var(--font-display); font-weight: 900; color: var(--accent);
  font-size: clamp(4.5rem, 24vw, 8.5rem); line-height: .85; letter-spacing: -.03em;
}
.hero__off { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.2rem, 5vw, 1.8rem); }
.hero__lead { font-size: 1.08rem; color: #e6e6e6; max-width: 36rem; }
.hero__pilot { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: #fff; margin: 1.25rem 0 1.5rem; }
.icon-inline { width: 1.25rem; height: 1.25rem; flex: none; color: var(--accent); }

.logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.logos--hero { margin-top: 1.25rem; }

/* Placeholder de logo — trocar por <img> oficial (ver assets/img/LEIA-ME.md) */
.logo-ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: .5rem; border: 1.5px dashed #8a8a8a; border-radius: var(--radius);
  font-weight: 800; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #fff;
}
.logo-ph--lg { min-height: 96px; font-size: .95rem; background: #1c1c1c; }

/* Placeholder da imagem do banner */
.img-ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  aspect-ratio: 4 / 3; border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(215,255,60,.18), rgba(215,255,60,0) 60%),
    repeating-linear-gradient(45deg, #1f1f1f 0 14px, #262626 14px 28px);
  border: 1.5px dashed #8a8a8a; color: #cfcfcf; font-weight: 700; letter-spacing: .1em; font-size: .8rem;
}

/* ---------- Seções ---------- */
.section { padding: 3rem 0; }
.section--dark { background: var(--black); color: #fff; }
.section--form { background: var(--bg-soft); }
.section__title {
  font-family: var(--font-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(1.75rem, 6vw, 2.6rem); margin-bottom: 1.5rem;
}
.section__title::after { content: ""; display: block; width: 56px; height: 5px; margin-top: .6rem; background: var(--black); }
.section--dark .section__title::after { background: var(--accent); }
.section__lead { font-size: 1.08rem; color: #e6e6e6; margin-top: -.5rem; margin-bottom: 1.75rem; }
.section:focus { outline: none; }

/* Como funciona */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; background: #fff; }
.step__icon { width: 44px; height: 44px; color: var(--black); margin-bottom: .9rem; }
.step__title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.25rem; margin-bottom: .5rem; }
.step__num { color: var(--muted); }
.step p { margin: 0; color: var(--muted); }

/* Marcas */
.logos--brands { gap: .75rem; }

/* Formulário */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.form-hint { color: var(--muted); font-size: .92rem; }
.periodo { font-weight: 700; margin-top: -.5rem; }

.field { margin: 0 0 1.35rem; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend, .label { display: block; font-weight: 700; margin-bottom: .4rem; padding: 0; }
.field__help { font-size: .9rem; color: var(--muted); margin: 0 0 .6rem; }
.field > label + .field__help, .field input + .field__help { margin-top: .4rem; }
.field__error { color: var(--danger); font-size: .92rem; font-weight: 600; margin: .4rem 0 0; }
.field__error::before { content: "⚠ "; }

input[type="text"], input[type="email"], select {
  display: block; width: 100%; min-height: 50px; padding: .7rem .85rem;
  font: inherit; font-size: 1rem; /* ≥16px evita zoom automático no iPhone */
  color: var(--ink); background: #fff; border: 1.5px solid #767676; border-radius: var(--radius);
}
select {
  appearance: none; padding-right: 2.5rem; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 50%, calc(100% - .9rem) 50%;
  background-size: .35rem .35rem; background-repeat: no-repeat;
}
input:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--black); }
[aria-invalid="true"] { border-color: var(--danger) !important; }

/* Opções de curso (radio) */
.choices { display: grid; gap: .6rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label {
  display: flex; align-items: center; gap: .7rem; min-height: 50px; padding: .7rem .9rem;
  border: 1.5px solid #767676; border-radius: var(--radius); cursor: pointer; font-weight: 600;
}
.choice label::before {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--ink); background: #fff; box-shadow: inset 0 0 0 4px #fff;
}
.choice input:checked + label { border-color: var(--black); background: var(--bg-soft); }
.choice input:checked + label::before { background: var(--black); }
.choice input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
fieldset[aria-invalid="true"] .choice label { border-color: var(--danger); }

/* Upload */
.file__input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file__btn {
  display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 56px;
  padding: .8rem 1rem; border: 2px dashed var(--ink); border-radius: var(--radius);
  font-weight: 700; cursor: pointer; text-align: center; background: var(--bg-soft);
}
.file__btn svg { width: 22px; height: 22px; flex: none; }
.file__btn:hover { background: #e8e8e5; }
.file__input:focus-visible + .file__btn { outline: 3px solid var(--focus); outline-offset: 2px; }
.file__input[aria-invalid="true"] + .file__btn { border-color: var(--danger); }
.file__status { font-size: .92rem; color: var(--muted); margin: .5rem 0 0; word-break: break-word; }
.file__status--ok { color: var(--success); font-weight: 600; }

/* Caixa informativa + aceite */
.info-box { background: var(--bg-soft); border-left: 4px solid var(--black); padding: 1rem 1.1rem; margin-bottom: 1.25rem; font-size: .92rem; }
.info-box p { margin-bottom: .55rem; color: var(--muted); }
.info-box__title { font-size: 1rem; text-transform: uppercase; letter-spacing: .03em; margin-bottom: .6rem; }
.info-box__links { margin: .75rem 0 0 !important; color: var(--ink) !important; font-weight: 600; }
.info-box a, .panel a { color: var(--black); text-underline-offset: 3px; }

.field--check { display: grid; grid-template-columns: auto 1fr; gap: .2rem .75rem; align-items: start; }
.field--check input { width: 24px; height: 24px; margin: .1rem 0 0; accent-color: var(--black); cursor: pointer; }
.field--check label { font-weight: 600; cursor: pointer; margin: 0; }
.field--check .field__error { grid-column: 1 / -1; }

/* Antispam (Turnstile) */
.antispam__widget { min-height: 65px; }
.antispam .field__help { margin-top: .4rem; }

/* Faixa de ambiente de teste */
.faixa-teste {
  background: repeating-linear-gradient(45deg, #ffd400 0 16px, #ffe866 16px 32px);
  color: #000; text-align: center; font-weight: 800; letter-spacing: .04em;
  padding: .5rem 1rem; font-size: .85rem; text-transform: uppercase;
}

/* Botão de envio com estado de carregamento */
.btn--submit { width: 100%; gap: .6rem; }
.btn--submit:disabled { cursor: progress; opacity: .75; }
.btn--submit:disabled:hover { background: var(--accent); }
.spinner { display: none; width: 18px; height: 18px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: girar .8s linear infinite; }
.btn--submit[aria-busy="true"] .spinner { display: inline-block; }
@keyframes girar { to { transform: rotate(360deg); } }
.btn--dark { background: var(--black); color: #fff; }
.btn--dark:hover { background: #333; }
.section--form { --focus: var(--black); }

/* Alertas e painéis de estado */
.alert { border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1.25rem; font-weight: 600; }
.alert--error { background: #fdecee; color: #7a0016; border: 1.5px solid var(--danger); }
.alert:focus, .panel:focus { outline: none; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem 1.25rem; }
.panel--success { border-top: 6px solid var(--success); }
.panel--info { border-top: 6px solid var(--black); }
.panel__icon { width: 52px; height: 52px; color: var(--success); margin-bottom: .75rem; }
.panel__title { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: 1.5rem; margin-bottom: 1rem; }
.panel__note { background: var(--bg-soft); padding: .8rem 1rem; border-radius: var(--radius); margin: 1.25rem 0 0; }

/* Modais (regulamento / privacidade) */
.modal {
  width: min(680px, calc(100% - 2rem)); max-height: calc(100% - 2rem); padding: 0;
  border: 0; border-radius: var(--radius); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.modal[open] { display: flex; flex-direction: column; }
.modal::backdrop { background: rgba(0,0,0,.7); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.2rem; }
.modal__close { flex: none; width: 44px; height: 44px; border: 0; background: transparent; font-size: 1.8rem; line-height: 1; cursor: pointer; border-radius: var(--radius); }
.modal__close:hover { background: var(--bg-soft); }
.modal__body { padding: 1.25rem; overflow-y: auto; }
.modal__foot { padding: 1rem 1.25rem; border-top: 1px solid var(--line); text-align: right; }
.placeholder-juridico { background: #fff6d6; border: 1.5px dashed #8a6d00; padding: .75rem 1rem; font-weight: 700; color: #5c4900; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 1.1rem 2.5rem 1.1rem 0; font-weight: 700; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; font-weight: 400; line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-right: 2rem; }

/* Rodapé */
.footer { background: var(--black); color: #cfcfcf; padding: 2.5rem 0; font-size: .92rem; }
.footer__brand { color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.footer__links { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.footer a { color: #fff; text-underline-offset: 3px; }
.footer a:hover { color: var(--accent); }
.footer__small { font-size: .82rem; color: #a8a8a8; margin: 0; }

/* ---------- Telas maiores ---------- */
@media (min-width: 640px) {
  .btn--lg { width: auto; }
  .logo-ph { font-size: .85rem; min-height: 56px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .form-card, .panel { padding: 2rem; }
  .btn--submit { width: 100%; }
  .choices { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .hero { padding: 4rem 0; }
  .hero__grid { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 3rem; }
  .hero__media { aspect-ratio: 4 / 5; }
  .section { padding: 4.5rem 0; }
  .logo-ph--lg { min-height: 140px; font-size: 1.1rem; }
}
