/* Neo Sans W1G: Regular 400, Medium 500, Bold 700 (arquivos em public/fonts). Nenhum outro peso existe; evite 300/600/800. */
@font-face {
  font-family: 'Neo Sans W1G';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/neo-sans-400.woff2') format('woff2'), url('../fonts/neo-sans-400.woff') format('woff');
}
@font-face {
  font-family: 'Neo Sans W1G';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/neo-sans-500.woff2') format('woff2'), url('../fonts/neo-sans-500.woff') format('woff');
}
@font-face {
  font-family: 'Neo Sans W1G';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/neo-sans-700.woff2') format('woff2'), url('../fonts/neo-sans-700.woff') format('woff');
}

/*
  Sistema visual
  - Cores: azuis da marca Franquias Brasil + amarelo do logo como único acento (CTAs).
  - Raios: cards 16px, campos 10px, botões e chips em pílula.
  - z-index: header 20, menu mobile 30, banner de cookies 40, modal 50.
*/
:root {
  --navy: #0d2550;
  --blue: #2449d8;
  --blue-deep: #16307e;
  --teal: #0a6c9b;
  --sun: #ffc340;
  --sun-ink: #1d1a0f;

  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eaf0f8;
  --ink: #0d1d38;
  --muted: #4a5a75;
  --line: #d8e0ec;
  --link: #1f42c4;
  --hero-bg: linear-gradient(150deg, #16307e 0%, #2449d8 62%, #2f5be6 100%);
  --shadow: 0 1px 2px rgb(13 37 80 / .06), 0 12px 32px -12px rgb(13 37 80 / .18);

  --r-card: 16px;
  --r-field: 10px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);

  --f-body: 'Neo Sans W1G', Arial, Helvetica, sans-serif;
  --f-display: 'Neo Sans W1G', Arial, Helvetica, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08142a;
    --surface: #0f1f3b;
    --surface-2: #132848;
    --ink: #e9eef7;
    --muted: #a3b2cc;
    --line: #223a63;
    --link: #8fb0ff;
    --hero-bg: linear-gradient(150deg, #0b1b44 0%, #16307e 60%, #1f3fb0 100%);
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px -12px rgb(0 0 0 / .55);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; font-family: var(--f-display); font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-title { font-size: clamp(2rem, 4.2vw, 3.1rem); max-width: 22ch; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 60ch; margin-top: 14px; }
.eyebrow { font: 500 .8rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
@media (prefers-color-scheme: dark) { .eyebrow { color: #7fd0f5; } }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 0; cursor: pointer;
  font: 500 1rem/1 var(--f-body); text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-sun { background: var(--sun); color: var(--sun-ink); box-shadow: 0 6px 20px -8px rgb(255 195 64 / .8); }
.btn-sun:hover { background: #ffd56e; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-deep); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost-light { background: rgb(255 255 255 / .08); color: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .45); }
.btn-ghost-light:hover { background: rgb(255 255 255 / .16); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .95rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.link-arrow .icon { transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .85rem; font-weight: 500; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }

/* Campos */
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: .92rem; }
.field input, .field select {
  min-height: 48px; padding: 0 14px; border-radius: var(--r-field);
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
}
.field input::placeholder { color: var(--muted); opacity: .8; }
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgb(36 73 216 / .2); }
.field .hint { font-size: .82rem; color: var(--muted); }
.field input[aria-invalid='true'] { border-color: #c2341b; }
.field-error { color: #c2341b; font-size: .85rem; font-weight: 500; min-height: 1em; }
@media (prefers-color-scheme: dark) { .field-error { color: #ff9b85; } .field input[aria-invalid='true'] { border-color: #ff9b85; } }

/* Revelação ao rolar (ativada via JS; sem JS ou com movimento reduzido, fica estático) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* =====================================================================
   Componentes (cada bloco fica dentro da classe raiz do componente)
   ===================================================================== */

/* Layout base */
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--sun); color: var(--sun-ink); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
.staging { background: var(--sun); color: var(--sun-ink); text-align: center; font-weight: 500; font-size: .9rem; padding: 8px 16px; }
.staging a { color: inherit; }

/* Cabeçalho */
.site-header {
  position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff;
  .bar { display: flex; align-items: center; gap: 24px; height: 72px; }
  .brand { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
  .brand img:first-child { height: 44px; width: auto; }
  .partners { height: 18px; width: auto; }
  .sep { width: 1px; height: 28px; background: rgb(255 255 255 / .25); }
  .nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
  .nav ul { display: flex; gap: 18px; }
  .nav ul a { color: rgb(255 255 255 / .86); text-decoration: none; font-weight: 500; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .nav ul a:hover, .nav ul a[aria-current='page'] { color: #fff; border-color: var(--sun); }
  .menu-btn { display: none; margin-left: auto; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
  .i-close { display: none; }

  @media (max-width: 1340px) { .partners, .sep { display: none; } }
  @media (max-width: 1100px) {
    .menu-btn { display: inline-flex; }
    .nav {
      position: fixed; inset: 72px 0 0 0; z-index: 30; background: var(--navy);
      flex-direction: column; align-items: stretch; gap: 0; padding: 12px var(--gutter) 32px;
      visibility: hidden; opacity: 0; transform: translateY(-8px);
      transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
    }
    .nav ul { flex-direction: column; gap: 0; }
    .nav ul a { display: block; padding: 16px 0; font-size: 1.25rem; border-bottom: 1px solid rgb(255 255 255 / .12); }
    .nav .cta { margin-top: 24px; min-height: 52px; }
    &.is-open .nav { visibility: visible; opacity: 1; transform: none; }
    &.is-open .i-open { display: none; }
    &.is-open .i-close { display: inline; }
  }
}

/* Rodapé */
.site-footer {
  background: var(--navy); color: rgb(255 255 255 / .8); padding-top: 64px; font-size: .97rem;
  .grid { display: grid; grid-template-columns: 1.6fr 1.1fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
  .about p { margin: 18px 0 22px; max-width: 42ch; }
  .about img:first-child { height: 50px; width: auto; }
  .partners { height: 20px; width: auto; }
  h2 { font: 700 .82rem/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
  li + li { margin-top: 10px; }
  a, button { color: rgb(255 255 255 / .82); text-decoration: none; }
  a:hover, button:hover { color: #fff; text-decoration: underline; }
  .mail { display: inline-flex; gap: 8px; align-items: flex-start; overflow-wrap: anywhere; font-size: .92rem; }
  .legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 22px; border-top: 1px solid rgb(255 255 255 / .12); font-size: .88rem; }
  .links { display: flex; flex-wrap: wrap; gap: 20px; }
  button { background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit; }
  @media (max-width: 900px) { .grid { grid-template-columns: 1fr 1fr; } .about { grid-column: 1 / -1; } }
  @media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }
}

/* Banner de cookies */
.cookie {
  position: fixed; z-index: 40; left: 16px; right: 16px; bottom: 16px; margin-inline: auto; max-width: 760px;
  display: flex; align-items: center; gap: 20px; padding: 16px 20px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
  font-size: .95rem;
  &[hidden] { display: none; }
  .actions { display: flex; gap: 10px; flex-shrink: 0; }
  @media (max-width: 640px) { flex-direction: column; align-items: stretch; .actions > * { flex: 1; } }
}

/* Modal de lead */
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.lead-modal {
  width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0;
  border-radius: var(--r-card); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgb(5 15 40 / .5);
  &::backdrop { background: rgb(6 16 38 / .62); backdrop-filter: blur(3px); }
  &[open] { animation: pop .35s var(--ease); }
  @media (prefers-reduced-motion: reduce) { &[open] { animation: none; } }
  .lead-close-form { position: absolute; top: 10px; right: 10px; }
  .close { background: var(--surface-2); border: 0; border-radius: 999px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
  .lead-body { padding: 32px clamp(20px, 5vw, 36px) 28px; }
  .kicker { font-weight: 700; color: var(--teal); font-size: .9rem; min-height: 1.2em; padding-right: 40px; }
  h2 { font-size: 2rem; margin: 6px 40px 8px 0; }
  .sub { color: var(--muted); margin-bottom: 20px; }
  .lead-form { display: grid; gap: 12px; }
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
  .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .row-2[hidden] { display: none; }
  .perfil { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
  .perfil[hidden] { display: none; }
  .perfil legend { font-weight: 500; font-size: .92rem; padding: 0; margin-bottom: 2px; }
  .perfil-opts { display: grid; gap: 8px; }
  .perfil-opts label { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-field); cursor: pointer; }
  .perfil-opts label:has(:checked) { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 8%, var(--surface)); }
  .perfil-opts input { width: 18px; height: 18px; accent-color: var(--blue); flex-shrink: 0; margin: 0; }
  .perfil-opts span { display: grid; line-height: 1.3; }
  .perfil-opts small { color: var(--muted); font-size: .85rem; }
  .perfil-opts.opts-2 { grid-template-columns: 1fr 1fr; }
  .perfil-opts.opts-2 label { padding: 10px 12px; }
  .perfil-opts.opts-2 strong { font-weight: 500; font-size: .92rem; }
  @media (max-width: 420px) { .perfil-opts.opts-2 { grid-template-columns: 1fr; } }
  .opt { font-weight: 400; color: var(--muted); }
  .submit { width: 100%; margin-top: 4px; min-height: 52px; }
  .form-status { font-weight: 500; min-height: 1.2em; font-size: .92rem; }
  .privacy { font-size: .82rem; color: var(--muted); }
  @media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } }
}

/* Popup (Painel > Marketing > Popups): só a imagem, clicável */
.popup {
  width: fit-content; max-width: none; max-height: none; padding: 0; border: 0; overflow: hidden;
  border-radius: var(--r-card); background: transparent; box-shadow: 0 30px 80px -20px rgb(5 15 40 / .6);
  &::backdrop { background: rgb(6 16 38 / .62); backdrop-filter: blur(3px); }
  &[open] { animation: pop .35s var(--ease); }
  @media (prefers-reduced-motion: reduce) { &[open] { animation: none; } }
  .popup-close-form { position: absolute; top: 10px; right: 10px; z-index: 1; }
  .close { background: rgb(255 255 255 / .92); border: 0; border-radius: 999px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--navy); box-shadow: 0 2px 10px rgb(0 0 0 / .2); }
  .popup-img { display: block; }
  .popup-img:focus-visible { outline: 3px solid var(--sun); outline-offset: -3px; }
  /* Limites sem porcentagem: a janela fica exatamente do tamanho da imagem (largura ou altura, o que limitar primeiro) */
  .popup-img img { display: block; width: auto; height: auto; max-width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
}

/* Topo das páginas internas */
.page-hero {
  background: var(--hero-bg); color: #fff; position: relative; overflow: hidden;
  &::after { content: ''; position: absolute; right: -180px; top: -220px; width: 560px; height: 560px; border-radius: 50%; border: 70px solid rgb(255 255 255 / .05); pointer-events: none; }
  .inner { position: relative; z-index: 1; padding-block: clamp(48px, 7vw, 88px); }
  .trail { display: flex; gap: 8px; font-size: .9rem; margin-bottom: 18px; color: rgb(255 255 255 / .7); flex-wrap: wrap; }
  .trail a { color: rgb(255 255 255 / .85); text-decoration: none; }
  .trail a:hover { color: #fff; text-decoration: underline; }
  .inner > h1 { font-size: clamp(2.4rem, 5vw, 4rem); max-width: 20ch; }
  .inner > p { margin-top: 16px; font-size: 1.15rem; color: rgb(255 255 255 / .88); max-width: 58ch; }
  .nf-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
}

/* Card de turma */
.turma {
  display: grid; grid-template-columns: 76px 1fr; gap: 18px; padding: 20px; transition: border-color .2s, box-shadow .25s var(--ease), transform .25s var(--ease);
  &[hidden] { display: none; }
  &:hover { border-color: color-mix(in srgb, var(--blue) 40%, var(--line)); box-shadow: var(--shadow); }
  .date { display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: start; padding: 12px 0; border-radius: 12px; background: var(--navy); color: #fff; text-align: center; }
  .d { font: 700 2rem/1 var(--f-display); }
  .m { font-weight: 700; text-transform: uppercase; font-size: .8rem; letter-spacing: .1em; color: var(--sun); margin-top: 2px; }
  .plus { font-size: .7rem; margin-top: 6px; opacity: .8; }
  .curso { font-weight: 700; color: var(--teal); font-size: .9rem; }
  @media (prefers-color-scheme: dark) { .curso { color: #7fd0f5; } .date { background: var(--surface-2); } }
  h3 { font-size: 1.6rem; margin: 2px 0 10px; }
  .uf { color: var(--muted); font-weight: 500; font-size: 1.1rem; }
  .meta { display: grid; gap: 6px; color: var(--muted); font-size: .94rem; margin-bottom: 16px; }
  .meta li { display: flex; gap: 8px; align-items: flex-start; }
  .meta .icon { flex-shrink: 0; margin-top: 3px; }
}

/* Agenda com filtros */
.agenda {
  .filters { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 24px; align-items: start; }
  .regiao select { width: 100%; }
  fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
  legend { font-weight: 500; font-size: .92rem; margin-bottom: 6px; padding: 0; }
  .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
  .pick input { position: absolute; opacity: 0; pointer-events: none; }
  .pick span {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
    border: 1.5px solid var(--line); background: var(--surface); font-weight: 500; font-size: .94rem; transition: all .2s var(--ease);
  }
  .pick span:hover { border-color: var(--blue); }
  .pick input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
  .pick input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
  .count { margin: 28px 0 14px; font-weight: 500; color: var(--muted); min-height: 1.6em; }
  .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
  .empty { display: flex; gap: 18px; padding: 24px; align-items: flex-start; color: var(--ink); }
  .empty[hidden] { display: none; }
  .empty > .icon { flex-shrink: 0; color: var(--teal); }
  .empty h3 { font-size: 1.5rem; margin-bottom: 6px; }
  .empty p { color: var(--muted); max-width: 62ch; }
  .empty-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
  .rodada { margin-top: 12px; }
  @media (max-width: 760px) { .filters { grid-template-columns: 1fr; } .list { grid-template-columns: 1fr; } }
}

/* Estante de e-books */
@keyframes deslizar { to { transform: translateX(-50%); } }
.shelf-wrap {
  margin-top: 36px; overflow: hidden;
  .track { display: flex; }
  .shelf { display: flex; gap: 20px; list-style: none; margin: 0; padding: 8px 0 20px; }
  .shelf li { flex: 0 0 220px; }
  .book { display: grid; gap: 6px; text-decoration: none; color: var(--ink); }
  .book img { border-radius: 10px; box-shadow: var(--shadow); transition: transform .35s var(--ease), box-shadow .35s; margin-bottom: 10px; aspect-ratio: 724 / 1024; object-fit: cover; }
  .book:hover img { transform: translateY(-6px) rotate(-1deg); }
  .serie { font-size: .8rem; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .06em; }
  @media (prefers-color-scheme: dark) { .serie { color: #7fd0f5; } }
  .book strong { font: 700 1.25rem/1.15 var(--f-display); }
  .get { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--link); font-size: .94rem; margin-top: 2px; }

  /* Lista: alinhada à margem da página, quebra linha se precisar */
  &.lista .track { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
  &.lista .shelf { flex-wrap: wrap; }

  /* Slider: as duas cópias deslizam juntas; ao fim da primeira, recomeça sem emenda */
  &.slider .track { width: max-content; }
  &.slider .shelf { padding-right: 20px; }
  @media (prefers-reduced-motion: no-preference) {
    &.slider .track { animation: deslizar calc(var(--n) * 6s) linear infinite; }
    &.slider:hover .track, &.slider:focus-within .track { animation-play-state: paused; }
  }
  @media (prefers-reduced-motion: reduce) {
    &.slider .track { width: auto; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
    &.slider .shelf[aria-hidden='true'] { display: none; }
    &.slider .shelf { flex-wrap: wrap; }
  }
}
