/* ====================================================================
   DESIGN · Mentoria online DDA - 6M · Mira, 24/09/2026
   Identidade herdada da página de links (links.desafiodoator.com.br):
   mesmos tokens, mesma coluna, mesmo botão dourado. Fontes LOCAIS
   (cópia das do Presence, OFL em fonts/OFL.txt): sem CDN.
   ==================================================================== */

/* ── Cormorant Garamond · itálico 500 — título/citação ─────────────── */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: local('Cormorant Garamond Medium Italic'),
       local('CormorantGaramond-MediumItalic'),
       url('fonts/cormorant-garamond-italic-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: local('Cormorant Garamond Medium Italic'),
       local('CormorantGaramond-MediumItalic'),
       url('fonts/cormorant-garamond-italic-500-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Cormorant Garamond · romano 600 — WORDMARK do banner ──────────── */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local('Cormorant Garamond SemiBold'),
       local('CormorantGaramond-SemiBold'),
       url('fonts/cormorant-garamond-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local('Cormorant Garamond SemiBold'),
       local('CormorantGaramond-SemiBold'),
       url('fonts/cormorant-garamond-600-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Inter · variável 400–700 — corpo, rótulos, botão ──────────────
   Um ficheiro cobre 400/500/600/700: o eixo `wght` é contínuo. Quatro
   estáticos custariam ~4 pedidos e ~120 KB; o variável custa 47 KB. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: local('Inter'),
       local('Inter Variable'),
       url('fonts/inter-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: local('Inter'),
       local('Inter Variable'),
       url('fonts/inter-variable-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* =====================================================================
   TOKENS — cópia literal da página de links (+ os do formulário)
   ===================================================================== */
:root {
  --color-bg: #0A0A0A;
  --color-bg-soft: #141414;
  --color-bg-card: #1A1A1A;
  --color-text: #F5F1E8;
  --color-text-muted: #A8A29A;          /* 7,82:1 sobre #0A0A0A · 6,9:1 sobre #1A1A1A */
  --color-accent: #C9A961;              /* 8,80:1 sobre #0A0A0A */
  --color-accent-deep: #B59551;
  --color-accent-hover: #D9BB73;
  --color-accent-soft: rgba(201, 169, 97, 0.12);
  --color-border: rgba(245, 241, 232, 0.08);
  --color-border-strong: rgba(201, 169, 97, 0.35);
  --color-field-border: rgba(245, 241, 232, 0.30);   /* borda de campo ≥ 3:1 (WCAG 1.4.11) */
  --color-error: #F4A09A;               /* 9,3:1 sobre #0A0A0A */
  --focus-ring: 0 0 0 3px rgba(201, 169, 97, 0.45);

  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --fs-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.85rem);
  --fs-sm: clamp(0.875rem, 0.8rem + 0.4vw, 1rem);
  --fs-base: 1rem;
  --fs-md: clamp(1.05rem, 0.95rem + 0.5vw, 1.2rem);
  --fs-lg: clamp(1.25rem, 1rem + 1vw, 1.5rem);
  --fs-xl: clamp(2rem, 1.6rem + 2vw, 2.75rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem;

  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 8px 32px rgba(201, 169, 97, 0.25);

  /* Mesma coluna da página de links (480px). Sem sobrenome desde 24/09,
     o formulário é coluna única e não precisa de largura extra. */
  --col: 480px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--color-bg); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background-image: radial-gradient(120% 45% at 50% 0%,
    rgba(201, 169, 97, 0.10) 0%, rgba(201, 169, 97, 0.03) 38%, rgba(10, 10, 10, 0) 72%);
  background-repeat: no-repeat;
}

a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 0.18em; }
@media (hover: hover) { a:hover { color: var(--color-accent-hover); } }

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: var(--radius-sm); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 20;
  background: var(--color-accent); color: #0A0A0A;
  padding: var(--space-3) var(--space-6); font-weight: 700; font-size: var(--fs-sm);
  border-radius: 0 0 var(--radius-md) 0; text-decoration: none;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ── Selo de prévia: só existe com ENDPOINT vazio (inserido pelo JS) ── */
.previa {
  position: sticky; top: 0; z-index: 15;
  margin: 0; padding: var(--space-2) var(--space-4);
  background: #F5D76E; color: #0A0A0A;            /* 14:1 */
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; text-align: center;
  border-bottom: 2px solid #0A0A0A;
}

/* =====================================================================
   ESTRUTURA
   ===================================================================== */
.wrap {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding: calc(var(--space-8) + env(safe-area-inset-top)) var(--space-5) var(--space-10);
}
@media (min-width: 720px) { .wrap { padding-top: var(--space-10); } }

/* ── Banner: só tipografia + a foto de perfil da página de links ───── */
.head { text-align: center; }

.brand {
  display: block; width: 64px; height: 64px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: var(--color-accent-soft);
  object-fit: cover;
}

.wordmark {
  margin: 0;
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--color-accent);
}
.descritor {
  margin: var(--space-1) 0 0;
  font-size: var(--fs-sm); color: var(--color-text-muted);
  text-wrap: balance;
}
.rule { width: 48px; height: 1px; background: var(--color-accent); border: 0; margin: var(--space-5) auto; }

.titulo {
  margin: 0;
  font-family: var(--font-heading); font-weight: 600;
  font-size: var(--fs-xl); line-height: 1.08; letter-spacing: -0.01em;
  color: var(--color-text);
  text-wrap: balance;
}
.sub {
  margin: var(--space-3) auto 0; max-width: 40ch;
  font-size: var(--fs-md); line-height: 1.5; color: var(--color-text-muted);
  text-wrap: balance;
}

/* =====================================================================
   FORMULÁRIO
   ===================================================================== */
.form { margin-top: var(--space-8); }
.grid { display: grid; gap: var(--space-5); }

.campo { min-width: 0; }

.label, .legend {
  display: block;
  margin: 0 0 var(--space-2);
  font-size: var(--fs-sm); font-weight: 600; line-height: 1.35;
  color: var(--color-text);
}

.input {
  display: block; width: 100%; min-height: 52px;
  padding: var(--space-3) var(--space-4);
  font: inherit; font-size: 1rem;             /* 16px: o iOS não dá zoom no foco */
  color: var(--color-text);
  background: var(--color-bg-card);
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius-md);
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input::placeholder { color: #8A857E; }
.input:focus { outline: none; border-color: var(--color-accent); box-shadow: var(--focus-ring); }

.hint { margin: var(--space-2) 0 0; font-size: var(--fs-xs); color: var(--color-text-muted); }

/* ── Perguntas em radio: frases inteiras, alvo grande ─────────────── */
.fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.legend { padding: 0; font-size: var(--fs-base); margin-bottom: var(--space-3); }

.opcoes { display: grid; gap: var(--space-2); }

.opcao {
  display: flex; align-items: flex-start; gap: var(--space-3);
  min-height: 52px;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm); line-height: 1.45; color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.opcao > span { padding-top: 1px; }
@media (hover: hover) { .opcao:hover { border-color: var(--color-border-strong); background: #1F1C17; } }
.opcao:has(input:checked) { border-color: var(--color-accent); background: #221E15; }
.opcao:has(input:focus-visible) { border-color: var(--color-accent); box-shadow: var(--focus-ring); }

.radio, .check {
  -webkit-appearance: none; appearance: none;
  flex: 0 0 auto; margin: 2px 0 0;
  width: 20px; height: 20px;
  border: 2px solid var(--color-text-muted);
  background: transparent;
  display: grid; place-content: center;
  cursor: pointer;
}
.radio { border-radius: 50%; }
.radio::before {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: var(--color-accent); transform: scale(0);
  transition: transform 0.15s ease;
}
.radio:checked { border-color: var(--color-accent); }
.radio:checked::before { transform: scale(1); }
.radio:focus-visible, .check:focus-visible { outline: none; }

/* ── Erros: borda + texto (nunca só cor) ──────────────────────────── */
.msg-erro {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-xs); font-weight: 600; color: var(--color-error);
}
.msg-erro::before { content: '! '; font-weight: 700; }
.msg-erro[hidden] { display: none; }
.campo-erro .input,
.campo-erro .opcao { border-color: var(--color-error); }

/* ── LGPD ─────────────────────────────────────────────────────────── */
.lgpd {
  display: flex; gap: var(--space-3); align-items: flex-start;
  margin-top: var(--space-6);
  padding: var(--space-3) 0;
  min-height: 44px;
  font-size: var(--fs-xs); line-height: 1.55; color: var(--color-text-muted);
  cursor: pointer;
}
.check { width: 22px; height: 22px; border-radius: var(--radius-sm); margin-top: 0; }
.check::before {
  content: ''; width: 11px; height: 6px;
  border: solid #0A0A0A; border-width: 0 0 2.5px 2.5px;
  transform: rotate(-45deg) scale(0); margin-top: -3px;
  transition: transform 0.15s ease;
}
.check:checked { background: var(--color-accent); border-color: var(--color-accent); }
.check:checked::before { transform: rotate(-45deg) scale(1); }
.lgpd:has(.check:focus-visible) .check { box-shadow: var(--focus-ring); }
.lgpd.campo-erro .check { border-color: var(--color-error); }

.erro-geral {
  margin: var(--space-3) 0 0; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-error); border-radius: var(--radius-md);
  font-size: var(--fs-sm); font-weight: 600; color: var(--color-error);
  background: rgba(244, 160, 154, 0.06);
}
.erro-geral[hidden] { display: none; }

/* ── Botão — o mesmo dourado do .link--primary da página de links ─── */
.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 60px; margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  font: inherit; font-size: var(--fs-base); font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.25; text-align: center;
  text-decoration: none;
  color: #0A0A0A;                                   /* 7,9:1 sobre #B59551 */
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent-deep) 100%);
  border: 1px solid transparent; border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
@media (hover: hover) {
  .btn:not(:disabled):hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), var(--shadow-gold); filter: brightness(1.05); }
}
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid #0A0A0A; outline-offset: 2px; box-shadow: 0 0 0 5px var(--color-accent-hover); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; box-shadow: none; }

.nojs {
  margin: var(--space-3) 0 0; font-size: var(--fs-sm); text-align: center; color: var(--color-error);
}

/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Tela de sucesso ──────────────────────────────────────────────── */
.sucesso { display: none; margin-top: var(--space-8); text-align: center; }
.sucesso__titulo {
  margin: 0; font-family: var(--font-heading); font-weight: 600;
  font-size: var(--fs-xl); line-height: 1.1; color: var(--color-text);
}
.sucesso__corpo { margin: var(--space-3) auto 0; max-width: 36ch; font-size: var(--fs-md); color: var(--color-text-muted); }
.sucesso .btn { margin-top: var(--space-6); }
body.enviado .form { display: none; }
body.enviado .sucesso { display: block; }

/* =====================================================================
   RODAPÉ — igual ao da página de links, + termos e privacidade
   ===================================================================== */
.foot {
  flex-shrink: 0; width: 100%; max-width: var(--col); margin: 0 auto;
  padding: var(--space-8) var(--space-5) calc(var(--space-8) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border);
  text-align: center;
}
.foot p { margin: 0; font-size: var(--fs-xs); line-height: 1.6; color: var(--color-text-muted); }
.foot p + p { margin-top: var(--space-2); }
.foot a { color: var(--color-text-muted); display: inline-block; padding: var(--space-2) var(--space-1); }
@media (hover: hover) { .foot a:hover { color: var(--color-accent); } }

/* =====================================================================
   MICROINTERAÇÕES — só entrada e resposta ao toque
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  .head, .form, .foot { animation: rise 0.5s ease-out both; }
  .form { animation-delay: 0.12s; }
  .foot { animation-delay: 0.2s; }
  body.enviado .sucesso { animation: rise 0.45s ease-out both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (max-width: 380px) {
  .wrap { padding-left: var(--space-4); padding-right: var(--space-4); }
  .btn { letter-spacing: 0.03em; }
}

/* Sucesso: o título do formulário sai junto com ele (dois títulos empilhados competiam). */
body.enviado .titulo, body.enviado .sub { display: none; }
body.enviado .sucesso { margin-top: 0; }
