/* Teacher Sophia — identidade: azul sofisticado, bege, minimalista. */

@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/eb-garamond-400-600.woff2') format('woff2');
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/eb-garamond-italic-400-600.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/dm-sans-400-600.woff2') format('woff2');
}

:root {
  color-scheme: only light;

  --navy-900: #16263f;
  --navy-800: #1f3354;
  --navy-600: #3a5784;
  --navy-100: #e3e8f0;
  --beige-50: #fbf8f3;
  --beige-100: #f5efe6;
  --beige-200: #ece3d5;
  --beige-300: #dccfbb;
  --ink: #1b2536;
  --ink-muted: #5a6475;
  --error: #a23b32;
  --error-bg: #f8e9e6;
  --whatsapp: #1f6b4f;

  --font-display: 'EB Garamond', 'Iowan Old Style', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(22 38 63 / 0.04), 0 8px 28px rgb(22 38 63 / 0.07);
  --gutter: 20px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* A duração é zerada, mas o atraso é mantido: o aviso .form-fallback depende dele. */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--beige-100);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; }
a { color: var(--navy-800); text-underline-offset: 3px; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--navy-600);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--narrow { max-width: 620px; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy-800);
  color: #fff;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy-600);
  margin-bottom: 12px;
}

/* Barra superior */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(245 239 230 / 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgb(220 207 187 / 0.6);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy-900);
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--beige-100);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1;
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.topbar__link {
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 2px;
}
.topbar__link:hover { text-decoration: underline; }

/* Botões */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.button:active { transform: translateY(1px); }
.button--primary {
  background: var(--navy-800);
  color: var(--beige-50);
  box-shadow: 0 6px 18px rgb(31 51 84 / 0.22);
}
.button--primary:hover { background: var(--navy-900); }
.button--whatsapp {
  background: var(--whatsapp);
  color: #fff;
}
.button--whatsapp:hover { background: #185a42; }
.button--block { width: 100%; }
.button[disabled] { cursor: default; opacity: 0.85; }
.button.is-sending { cursor: progress; }

.button__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgb(255 255 255 / 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.is-sending .button__spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Hero */
.hero { padding: 48px 0 56px; }
.hero__grid { display: grid; gap: 40px; align-items: center; }
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 12vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--navy-900);
}
.hero__title em { font-style: italic; color: var(--navy-600); }
.hero__lead {
  margin-top: 20px;
  max-width: 34ch;
  font-size: 1.15rem;
  color: var(--ink-muted);
}
.hero__cta { margin-top: 32px; width: 100%; }
.hero__note {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-align: center;
}

.chat {
  margin: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--beige-50);
  border: 1px solid var(--beige-300);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.chat__bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.45;
}
.chat__bubble--in {
  align-self: flex-start;
  background: var(--beige-200);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}
.chat__bubble--out {
  align-self: flex-end;
  background: var(--navy-800);
  color: var(--beige-50);
  border-bottom-right-radius: 6px;
}

/* Seções */
.section { padding: 56px 0; }
.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 2.8rem);
  line-height: 1.1;
  color: var(--navy-900);
}

.section--audience {
  background: var(--navy-800);
  color: var(--beige-100);
}
.section--audience .eyebrow { color: var(--beige-300); }
.section--audience .section__title { color: var(--beige-50); }
.audience {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.audience li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-top: 1px solid rgb(245 239 230 / 0.16);
}
.audience li:last-child { border-bottom: 1px solid rgb(245 239 230 / 0.16); }
.audience li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border: 1.5px solid var(--beige-300);
  border-radius: 50%;
}

.benefits {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  counter-reset: benefit;
}
.benefit {
  counter-increment: benefit;
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 12px;
  padding: 22px 22px 22px 18px;
  background: var(--beige-50);
  border: 1px solid var(--beige-300);
  border-radius: var(--radius);
}
.benefit::before {
  content: counter(benefit, decimal-leading-zero);
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--navy-600);
}
.benefit__title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy-900);
}
.benefit p { margin-top: 4px; color: var(--ink-muted); font-size: 0.98rem; }

.section--tint { background: var(--beige-200); }

.formats {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.format {
  padding: 24px 22px;
  background: var(--beige-50);
  border: 1px solid var(--beige-300);
  border-radius: var(--radius);
}
.format__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.15;
  color: var(--navy-900);
}
.format p { margin-top: 8px; color: var(--ink-muted); }
.formats__note { margin-top: 20px; color: var(--ink-muted); font-size: 0.98rem; }

.about { display: grid; gap: 20px; }
.about__lead { font-size: 1.15rem; max-width: 46ch; }
.credentials {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}
.credentials li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-top: 1px solid var(--beige-300);
}
.credentials li:last-child { border-bottom: 1px solid var(--beige-300); }
.credentials li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border: 1.5px solid var(--navy-600);
  border-radius: 50%;
}
.steps {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: flex;
  gap: 16px;
  align-items: center;
}
.steps li::before {
  content: counter(step);
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--navy-800);
  color: var(--navy-800);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
}
.steps strong { color: var(--navy-900); font-weight: 600; }

/* Formulário */
.section--form { padding-bottom: 72px; outline: none; }
.card {
  padding: 32px 22px;
  background: var(--beige-50);
  border: 1px solid var(--beige-300);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.card__lead { margin-top: 10px; color: var(--ink-muted); }

.form { margin-top: 28px; display: grid; gap: 22px; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field__label {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-900);
}
.field__hint { font-weight: 400; color: var(--ink-muted); }
.field__input {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  font: inherit;
  font-size: 1.0625rem; /* ≥16px evita zoom automático no iOS */
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--beige-300);
  border-radius: var(--radius-sm);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field__input::placeholder { color: #687182; opacity: 1; }
.field__input:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 4px rgb(58 87 132 / 0.15);
}
.field__input[aria-invalid='true'] { border-color: var(--error); }
.field__help { margin-top: 6px; font-size: 0.85rem; color: var(--ink-muted); }
.field__error {
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--error);
}

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  background: #fff;
  border: 1.5px solid var(--beige-300);
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.choice input:checked + span {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--beige-50);
}
.choice input:focus-visible + span {
  outline: 3px solid var(--navy-600);
  outline-offset: 2px;
}
.choices[aria-invalid='true'] .choice span { border-color: var(--error); }
@media (hover: hover) {
  .choice input:not(:checked) + span:hover { border-color: var(--navy-600); }
}

.consent {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
}
.consent__box {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--navy-800);
}
.consent__label { font-size: 0.9rem; line-height: 1.5; color: var(--ink-muted); }
.consent .field__error { grid-column: 2; margin-top: 0; }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.alert--error {
  background: var(--error-bg);
  color: #7d2a23;
  border: 1px solid #e7c3bd;
}
.alert a { color: inherit; font-weight: 600; }
.alert p + p { margin-top: 8px; }

/* Aviso de segurança: fica invisível e só aparece se, depois de 6 segundos, o JavaScript
   ainda não tiver marcado a página com a classe "js" (falha de rede ou navegador sem JavaScript). */
.form-fallback {
  max-height: 0;
  margin-top: 0;
  padding-block: 0;
  border-width: 0;
  overflow: hidden;
  opacity: 0;
  animation: fallback-reveal 0.3s 6s forwards;
}
@keyframes fallback-reveal {
  to {
    max-height: 12em;
    margin-top: 20px;
    padding-block: 14px;
    border-width: 1px;
    opacity: 1;
  }
}
.js .form-fallback { display: none; }

/* Confirmação */
.card--success { text-align: center; }
.card--success .section__title { outline: none; }
.success__icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--navy-100);
  color: var(--navy-800);
}
.whatsapp { margin-top: 28px; display: grid; gap: 14px; }
.whatsapp__note, .whatsapp__tip { font-size: 0.9rem; color: var(--ink-muted); }
.whatsapp__tip {
  padding: 12px 14px;
  background: var(--beige-100);
  border-radius: var(--radius-sm);
}

/* Rodapé */
.footer {
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--beige-300);
  font-size: 0.9rem;
  color: var(--ink-muted);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: baseline;
  justify-content: space-between;
}
.footer__social {
  list-style: none;
  margin: 0 auto 0 0;
  padding: 0;
  display: flex;
  gap: 18px;
}
.footer__brand { font-family: var(--font-display); font-size: 1.15rem; color: var(--navy-900); }

/* Botão fixo no celular, visível entre o topo e o formulário */
.sticky-cta {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.sticky-cta.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* Página não encontrada */
.notfound {
  min-height: 70vh;
  display: grid;
  place-content: center;
  justify-items: start;
  gap: 16px;
  padding-block: 64px;
}
.notfound .button { margin-top: 12px; }

/* Página de privacidade */
.prose { padding: 48px 0 72px; }
.prose h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 3rem);
  line-height: 1.1;
  color: var(--navy-900);
}
.prose h2 {
  margin-top: 36px;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--navy-900);
}
.prose p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose .todo {
  padding: 2px 6px;
  background: #fff3cd;
  border-radius: 4px;
  color: #6b4e00;
  font-weight: 600;
}

/* Telas maiores */
@media (min-width: 560px) {
  :root { --gutter: 32px; }
  .hero__cta { width: auto; }
  .hero__note { text-align: left; }
  .card { padding: 44px 40px; }
  .sticky-cta { display: none; }
  .audience { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .formats { grid-template-columns: 1fr 1fr; }
  .format { padding: 32px 30px; }
  .audience li:nth-last-child(2) { border-bottom: 1px solid rgb(245 239 230 / 0.16); }
}

@media (min-width: 900px) {
  .hero { padding: 88px 0 96px; }
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: 64px; }
  .section { padding: 88px 0; }
  .benefits { grid-template-columns: repeat(6, 1fr); }
  .benefit { grid-column: span 2; }
  .benefit:nth-child(4) { grid-column: 2 / span 2; }
  .audience { grid-template-columns: repeat(3, 1fr); }
  .audience li:nth-last-child(3) { border-bottom: 1px solid rgb(245 239 230 / 0.16); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .about { grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
}
