/* Página de acesso da prévia (D33). Autônoma (não depende do bundle do app), mas com o mesmo sistema visual do
   acesso do app: identidade D42 (marinho + índigo da marca, fundo lavanda neutro), Geist auto-hospedada em
   /brand/fonts/ (CSP: tudo na mesma origem). Contraste (WCAG 2.x, conferido numericamente): --ink 19,5:1 ·
   --ink-2 11,6:1 · --ink-3 6,9:1 (5,8:1 sobre --accent-soft) · texto branco sobre --accent 7,9:1 ·
   --line-strong 4,05:1. Painel escuro: texto #f5f5ff 17,9:1, apoio #d6d5ec 13,5:1, rodapé #a3a2c4 7,9:1. */
:root {
  --bg: #f4f4fb;
  --surface: #ffffff;
  --ink: #06062f;
  --ink-2: #33355c;
  --ink-3: #55577d;
  --line: #e1e1ee;
  --line-strong: #7a7c9b;
  --accent: #4225e7;
  --accent-strong: #2f19b5;
  --accent-soft: #ecebfe;
  --accent-ink: #ffffff;
  --danger: #9f3a33;
  --danger-soft: #fbe9e7;
  --danger-line: #ecc3be;
  --danger-ink: #6b241f;
  --radius-lg: 20px;
  --radius-sm: 10px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: 'Geist Variable', 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'Geist Mono Variable', 'Geist Mono', ui-monospace, Consolas, monospace;

  color-scheme: light;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

/* Celular: coluna única (formulário primeiro na leitura visual compacta da marca). */
.gate {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
}

.gate-brand {
  position: relative;
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 28px 16px 24px;
  overflow: hidden;
  isolation: isolate;
  color: #f5f5ff;
  background:
    radial-gradient(120% 70% at 100% 0%, rgb(146 116 254 / 22%), transparent 60%),
    linear-gradient(180deg, rgb(66 37 231 / 30%), transparent 60%),
    linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px) 0 0 / 28px 28px,
    #0b0b1e;
}

/* Arco articular decorativo (eco da marca). */
.gate-brand::after {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  z-index: -1;
  width: 300px;
  height: 300px;
  border: 1.5px dashed rgb(146 116 254 / 30%);
  border-radius: 50%;
  pointer-events: none;
}

.gate-lockup {
  display: grid;
  gap: 10px;
}

.gate-logo {
  display: block;
  width: auto;
  height: 44px;
}

/* Slogan oficial (D42): caixa-alta espaçada, peso leve, nunca sobre o degradê da marca. */
.gate-slogan {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 450;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c9c8ea;
}

.gate-claim {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.gate-facts {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgb(255 255 255 / 10%);
}

.gate-facts li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  font-size: 0.9rem;
  color: #d6d5ec;
}

.gate-facts strong {
  display: block;
  color: #f5f5ff;
  font-weight: 600;
}

.gate-fact-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgb(255 255 255 / 6%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%), inset 0 1px 0 rgb(255 255 255 / 8%);
  color: #b3adff;
}

.gate-foot {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #a3a2c4;
}

.gate-panel {
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 28px 16px 40px;
}

.gate-card {
  width: 100%;
  max-width: 400px;
}

.gate-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.8125rem;
  font-weight: 600;
}

.gate-title {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.gate-lead,
.gate-note {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.gate-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.8125rem;
}

.gate-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.gate-field {
  display: grid;
  gap: 6px;
}

.gate-field label {
  font-weight: 560;
  font-size: 0.875rem;
}

.gate-field input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  font: inherit;
  font-size: 1rem; /* evita zoom automático no iOS */
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 2px rgb(6 6 47 / 5%);
}

.gate-field input:hover {
  border-color: var(--ink-3);
}

.gate-field input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}

.gate-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}

.gate-field input[aria-invalid='true'] {
  border-color: var(--danger);
}

.gate-error {
  margin: 0;
  padding: 10px 12px;
  color: var(--danger-ink);
  background: var(--danger-soft);
  border: 1px solid var(--danger-line);
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.45;
}

.gate-error[hidden] {
  display: none;
}

.gate-submit {
  min-height: 48px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%), 0 1px 2px rgb(66 37 231 / 24%);
  cursor: pointer;
}

.gate-submit:hover {
  background: var(--accent-strong);
}

.gate-submit[aria-busy='true'] {
  cursor: progress;
  opacity: 0.8;
}

@media (min-width: 880px) {
  .gate {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }

  .gate-brand {
    align-content: center;
    gap: 28px;
    padding: 48px clamp(32px, 5vw, 72px);
  }

  .gate-facts {
    display: grid;
  }

  .gate-panel {
    align-content: center;
    padding: 48px clamp(32px, 5vw, 72px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .gate-submit,
  .gate-field input {
    transition:
      background-color 0.28s var(--ease-out),
      border-color 0.28s var(--ease-out),
      box-shadow 0.28s var(--ease-out),
      transform 0.16s var(--ease-out);
  }

  .gate-submit:active {
    transform: scale(0.98);
  }

  .gate-card,
  .gate-facts li {
    animation: gate-rise 0.6s var(--ease-out) both;
  }

  .gate-facts li:nth-child(2) {
    animation-delay: 0.08s;
  }

  .gate-facts li:nth-child(3) {
    animation-delay: 0.16s;
  }
}

@keyframes gate-rise {
  from {
    transform: translateY(10px);
  }

  to {
    transform: none;
  }
}
