/* =========================================================
   LP Convenção Adium 2027 — DNAdium
   Layout base: Figma "LP-convenção2027-Adium" (1440px)
   ========================================================= */

:root {
  --red: #ff0032;
  --red-deep: #e6072e;
  --ink: #374a5b;
  --ink-2: #3b4a5c;
  --ink-hover: #26333f;
  --text: #232c36;
  --muted: #5d6670;
  --placeholder: #7b8188;
  --field-bg: #f8f8f8;
  --field-border: #cacaca;
  --error: #b8002a;

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* campos */
  --field-h: 67px;
  --field-px: 31px;
  --label-fs: 20px;
  --input-fs: 19px;
}

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

html { -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink-2);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; }

.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;
}

.wrap { width: min(100% - 40px, 981px); margin-inline: auto; }

/* =========================================================
   TOPO
   ========================================================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(72px, 59.6px + 3.43vw, 108px);
  background: var(--red);
}
.topbar__logo { width: clamp(128px, 107.6px + 5.24vw, 183px); height: auto; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 24.6px + 1.9vw, 52px) 20px clamp(40px, 37.4px + .67vw, 47px);
  text-align: center;
  background: linear-gradient(180deg, #e8e8e8 0%, #dddede 100%);
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: clamp(44px, 36.2px + 2vw, 65px);
  margin: 0;
  padding: 0 calc(clamp(22px, 18.3px + .95vw, 32px) - .11em) 0 clamp(22px, 18.3px + .95vw, 32px);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: clamp(15px, 11.66px + .857vw, 24px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---- Key visual: "Convenção 2027" + onda + logo DNAdium ---- */
.kv {
  --kv-w: min(995px, 88vw);
  --ed-fs: clamp(11px, 5.06px + 1.524vw, 27px);
  position: relative;
  width: var(--kv-w);
  margin: calc(var(--ed-fs) * 2.6 + 6px + clamp(26px, 8.2px + 4.57vw, 76px)) auto 0;
  font-size: inherit;
  font-weight: inherit;
}

.kv__logo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
}

.kv__wave {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: 100vw;
  max-width: none;
  height: auto;
  transform: translate(-50%, -53.6%);
  pointer-events: none;
  user-select: none;
}

.kv__edition {
  position: absolute;
  z-index: 1;
  left: 61.8%;
  bottom: calc(100% + 6px);
  font-size: var(--ed-fs);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: .42em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}
.kv__edition b { display: block; font-weight: 700; }

/* ---- Textos ---- */
.hero__tagline {
  margin: clamp(30px, 17.9px + 3.62vw, 70px) 0 0;
  padding-left: .26em; /* compensa o letter-spacing no centro */
  font-size: clamp(11px, 6.17px + 1.238vw, 24px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .26em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--ink);
}

.hero__headline {
  max-width: 19em;
  margin: clamp(22px, 13.1px + 2.29vw, 49px) auto 0;
  font-size: clamp(24px, 18.06px + 1.524vw, 40px);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}

.hero__text {
  max-width: 28em;
  margin: clamp(16px, 12.3px + .95vw, 26px) auto 0;
  font-size: clamp(17px, 13.66px + .857vw, 26px);
  font-weight: 400;
  line-height: 1.25;
  text-wrap: balance;
}
.hero__text strong { font-weight: 700; }

.hero__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: clamp(24px, 22.1px + .48vw, 29px) 0 0;
  font-size: clamp(16px, 14.51px + .381vw, 20px);
  font-weight: 700;
  line-height: 1.48;
  color: var(--red);
}
.hero__date-icon { flex: none; width: clamp(32px, 27.9px + 1.05vw, 43px); height: auto; }
.hero__date .sep { margin: 0 .4em; }

/* =========================================================
   INSCRIÇÃO
   ========================================================= */
.signup {
  position: relative;
  overflow: hidden;
  padding-top: clamp(36px, 35.3px + .19vw, 38px);
  color: #fff;
  background: linear-gradient(180deg, var(--red-deep) 0%, var(--red) 100%);
}

.signup__title {
  max-width: 869px;
  margin: 0 auto;
  font-size: clamp(22px, 18.29px + .952vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-wrap: pretty;
}

.form { margin-top: clamp(28px, 18px + 2.57vw, 55px); }

.form__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 8px;
}

.fw { min-width: 0; }
.fw--full,
.form__size-row { grid-column: 1 / -1; }

/* ---- Campo ---- */
.field {
  position: relative;
  height: var(--field-h);
  background: var(--field-bg);
  border: 1.3px solid var(--field-border);
  border-radius: 10.5px;
  cursor: text;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 28, 36, .45);
}
.field.is-invalid {
  border-color: var(--ink-hover);
  box-shadow: 0 0 0 2px var(--ink-hover);
}

.field__label {
  position: absolute;
  z-index: 1;
  left: var(--field-px);
  top: 50%;
  max-width: calc(100% - var(--field-px) - 44px);
  overflow: hidden;
  font-size: var(--label-fs);
  font-weight: 300;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text);
  transform: translateY(-50%);
  pointer-events: none;
  transition: top .15s ease, font-size .15s ease, transform .15s ease, color .15s ease;
}
.field:focus-within .field__label,
.field.is-filled .field__label,
.field.is-static .field__label {
  top: 9px;
  transform: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.field__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 22px var(--field-px) 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  font-size: var(--input-fs);
  font-weight: 400;
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field__input::placeholder { color: transparent; opacity: 1; }
.field:focus-within .field__input::placeholder { color: var(--placeholder); }

/* ---- Select ---- */
.field--select { cursor: pointer; }
.field--select .field__input {
  padding-right: 52px;
  cursor: pointer;
  text-overflow: ellipsis;
}
.field--select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 20px;
  height: 12px;
  margin-top: -6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12'%3E%3Cpath d='M1.5 1.5l8.5 8.5 8.5-8.5' fill='none' stroke='%238c9299' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  pointer-events: none;
}
.field--select select option,
.field--select select optgroup { color: var(--text); }

/* ---- E-mail com domínio fixo ---- */
.email {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 22px var(--field-px) 0;
  font-size: var(--input-fs);
  color: var(--text);
}
.email__sizer {
  display: inline-grid;
  min-width: 1px;
  max-width: calc(100% - 7.4em);
}
.email__sizer::after {
  content: attr(data-value);
  grid-area: 1 / 1;
  padding-right: 1px;
  visibility: hidden;
  white-space: pre;
  font: inherit;
}
.email .field__input {
  position: static;
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  height: auto;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}
.field--email .field__input::placeholder { color: var(--placeholder); }
.email__domain { flex: none; white-space: nowrap; }

/* ---- Erros ---- */
.field__error {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 6px 0 0;
  padding: 6px 12px 6px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--error);
  background: #fff;
}
.field__error::before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--error);
}
.field__error:empty { display: none; }
.field__error.is-info { color: var(--ink-2); }
.field__error.is-info::before { content: "i"; background: var(--ink-2); }

/* ---- Linha do tamanho de camisa ---- */
.form__size-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.fw--size { flex: 1 1 100%; }

.btn-sizes {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px 0 24px;
  border: 0;
  border-radius: 32px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  background: var(--ink);
  cursor: pointer;
  transition: background-color .15s ease;
}
.btn-sizes:hover { background: var(--ink-hover); }
.btn-sizes__icon { flex: none; }

.form__hint {
  flex: 1 1 200px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #fff;
}

.form__status {
  width: fit-content;
  max-width: 100%;
  margin: 24px auto 0;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: var(--error);
  background: #fff;
}
.form__status:empty { display: none; }
.form__status.is-success { color: var(--ink-2); }

/* Campo isca (anti-robô): fora da tela */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Botão enviar ---- */
.btn-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 278px;
  height: 51px;
  margin: 40px auto 0;
  padding: 0 10px 0 23px;
  border: 0;
  border-radius: 29px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 20px rgba(80, 0, 15, .25);
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.btn-submit:hover { background: var(--ink-hover); }
.btn-submit:active { transform: translateY(1px); }
.btn-submit__icon { flex: none; color: #f7f7f9; }
.btn-submit__spinner {
  display: none;
  flex: none;
  width: 26px;
  height: 26px;
  margin-right: 3px;
  border: 3px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.form.is-loading .btn-submit { cursor: progress; opacity: .9; }
.form.is-loading .btn-submit__icon { display: none; }
.form.is-loading .btn-submit__spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* Foco visível em fundo vermelho */
.btn-sizes:focus-visible,
.btn-submit:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* ---- Faixa DNA ---- */
.dna {
  --dna-h: clamp(56px, 38.5px + 4.5vw, 102px);
  display: flex;
  justify-content: center;
  height: var(--dna-h);
  margin: clamp(36px, 28px + 2vw, 57px) 0 clamp(12px, 9.8px + .57vw, 18px);
  overflow: hidden;
}
.dna img {
  flex: none;
  width: auto;
  height: 100%;
  max-width: none;
}
.dna img + img { margin-left: calc(var(--dna-h) * -.373); }

/* =========================================================
   RODAPÉ
   ========================================================= */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(24px, 20.6px + .86vw, 33px) clamp(20px, -9.7px + 7.62vw, 100px);
  background: #fff;
}
.footer__logo { width: clamp(128px, 107.6px + 5.24vw, 183px); height: auto; }
.footer__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  text-underline-offset: 3px;
}
.footer__link:hover { text-decoration: underline; }
.footer__link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

/* =========================================================
   MODAIS
   ========================================================= */
.modal {
  width: min(100%, 1080px);
  max-width: 100vw;
  max-height: 100dvh;
  margin: auto;
  padding: 24px 20px;
  border: 0;
  overflow-y: auto;
  color: var(--ink-2);
  background: transparent;
}
.modal--thanks { width: min(100%, 780px); }
.modal[open] { animation: modal-in .22s ease-out; }
.modal::backdrop { background: rgba(20, 28, 36, .66); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
}

.modal__box {
  position: relative;
  padding: clamp(28px, 26.1px + .48vw, 34px) clamp(18px, 12.4px + 1.43vw, 33px) clamp(24px, 22.1px + .48vw, 29px);
  border: 1px solid var(--field-border);
  border-radius: 22px;
  background: #fff;
}

.modal__close {
  position: absolute;
  top: -15px;
  right: -13px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--ink-2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
  cursor: pointer;
  transition: background-color .15s ease;
}
.modal__close:hover { background: var(--ink-hover); }
.modal__close:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ---- Tabela de medidas ---- */
.sizes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.sizes__tag {
  width: fit-content;
  margin: 0 auto 12px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ink-2);
}
.sizes__unit { display: none; }
.sizes__scroll { overflow-x: auto; border-radius: 4px; }
.sizes__scroll:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sizes__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: center;
  color: var(--ink-2);
}
.sizes__table th,
.sizes__table td {
  padding: 9px 6px;
  border-top: 1px solid var(--ink-2);
}
.sizes__table tbody tr:last-child > * { border-bottom: 1px solid var(--ink-2); }
.sizes__table thead th {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  text-transform: uppercase;
  vertical-align: bottom;
  -webkit-hyphens: none;
  hyphens: none;
}
.sizes__table tbody th { font-weight: 700; }
.sizes__table td { font-weight: 300; white-space: nowrap; }
.sizes__table tbody tr:hover > * { background: #f3f4f5; }

/* ---- Obrigado ---- */
.modal--thanks .modal__box {
  padding: clamp(40px, 34.4px + 1.43vw, 54px) clamp(22px, 7.5px + 3.71vw, 61px) clamp(36px, 30.4px + 1.43vw, 50px);
  border: 3px solid var(--red);
  border-radius: 33px;
  text-align: center;
}
.thanks__title {
  max-width: 19em;
  margin: 0 auto 18px;
  font-size: clamp(22px, 18.29px + .952vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
  color: var(--red);
}
.thanks__text {
  max-width: 30em;
  margin: 0 auto;
  font-size: clamp(16px, 14.51px + .381vw, 20px);
  line-height: 1.3;
  color: #1b1f24;
}
.thanks__text + .thanks__text { margin-top: .6em; }
.thanks__text strong { font-weight: 700; }

/* =========================================================
   RESPONSIVO
   ========================================================= */

/* Desktop / tablet largo: grid de 2 colunas como no Figma */
@media (min-width: 900px) {
  .form__grid { grid-template-columns: 403fr 571fr; }
  .form__size-row { align-items: flex-start; column-gap: 9px; }
  .fw--size { flex: 0 0 50.15%; }
  .btn-sizes { margin-top: 13.5px; }
  .form__hint { margin: 17px 0 0 4px; flex-basis: 180px; }
  .sizes { grid-template-columns: 1.28fr 1fr; gap: 36px; }
}

/* Telas muito largas: onda não passa de 1920px e some nas bordas */
@media (min-width: 1921px) {
  .kv__wave {
    width: 1920px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  }
}

/* Celular */
@media (max-width: 640px) {
  :root {
    --field-h: 58px;
    --field-px: 16px;
    --label-fs: 16px;
    --input-fs: 16px; /* evita zoom automático no iOS */
  }

  .kv__wave { width: 230vw; }
  .kv__edition { letter-spacing: .34em; }

  .hero__tagline { letter-spacing: .14em; padding-left: .14em; }
  .hero__text { line-height: 1.35; }

  .hero__date { display: block; line-height: 1.45; }
  .hero__date-icon { display: inline-block; vertical-align: -8px; margin-right: 6px; }
  .hero__date .sep { display: none; }
  .hero__date-place,
  .hero__date-city { display: block; }
  .hero__date-place { margin-top: 2px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
  .hero__date-city { font-weight: 400; color: var(--ink-2); }

  .field:focus-within .field__label,
  .field.is-filled .field__label,
  .field.is-static .field__label { top: 8px; font-size: 11px; }
  .field__input,
  .email { padding-top: 20px; }

  .btn-sizes { width: 100%; justify-content: center; height: 44px; }
  .form__hint { flex-basis: 100%; text-align: center; }

  .btn-submit { width: 100%; min-width: 0; height: 54px; }

  .footer { flex-direction: column; gap: 12px; }

  .modal { padding: 22px 10px; }
  .modal__close { top: -14px; right: -6px; width: 44px; height: 44px; }
  .modal--sizes .modal__box { padding-inline: 12px; }
  .sizes__unit {
    display: block;
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    color: var(--muted);
  }
  .sizes__table { font-size: 14px; }
  .sizes__table th,
  .sizes__table td { padding: 8px 3px; }
  .sizes__table thead th { font-size: 9.5px; letter-spacing: 0; -webkit-hyphens: manual; hyphens: manual; }
  .sizes__table .u { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
