/* Escola Conecta OSC — IA na Prática para OSCs
   Tipografia: Source Serif 4 (títulos) + Inter (texto e interface). */

:root {
  --navy: #16408c;
  --navy-deep: #0c2a5e;
  --ink: #14213d;
  --ink-soft: #4a5875;
  --muted: #6b7793;
  --green: #3f8f45;
  --green-bright: #52bb4e;
  --green-pale: #edf6ec;
  --paper: #faf8f4;
  --paper-deep: #f3efe8;
  --line: #e0dbd2;
  --line-strong: #cdc6ba;
  --white: #ffffff;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; margin: 0; }

.container { width: min(1120px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }

.skip-link {
  position: fixed; left: 16px; top: -100px; z-index: 200;
  padding: 12px 18px; border-radius: 6px;
  background: var(--navy-deep); color: var(--white); font-weight: 600;
}
.skip-link:focus { top: 14px; }

a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--green-bright);
  outline-offset: 3px;
}

/* ---------- Faixa de aviso ---------- */
.announcement {
  background: var(--navy-deep); color: #d6e2f5;
  font-size: 13px; text-align: center; padding: 9px var(--gutter);
}
.announcement strong { color: var(--white); font-weight: 600; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-text { display: grid; }
.brand-text strong { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--navy-deep); letter-spacing: 0; }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.site-nav a { color: var(--ink-soft); }
.site-nav a:hover { color: var(--navy); }
.nav-toggle { display: none; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border: 1px solid transparent; border-radius: 4px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.button-primary { background: var(--navy); color: var(--white); }
.button-primary:hover { background: var(--navy-deep); }
.button-outline { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.button-outline:hover { border-color: var(--navy); color: var(--navy); }
.button-light { background: var(--white); color: var(--navy-deep); }
.button-light:hover { background: var(--paper-deep); }
.button-ghost-light { border-color: rgba(255, 255, 255, 0.4); color: var(--white); background: transparent; }
.button-ghost-light:hover { background: rgba(255, 255, 255, 0.1); }
.button-small { min-height: 42px; padding: 0 18px; font-size: 14px; }
.button-full { width: 100%; }

/* ---------- Estrutura de seção ---------- */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-tight { padding-block: clamp(44px, 6vw, 68px); }
.section-paper { background: var(--paper); }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

.kicker {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--green);
}
.kicker-light { color: #9fd89b; }
.section-title { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.15; margin-top: 12px; max-width: 22ch; color: var(--navy-deep); }
.section-lead { color: var(--ink-soft); font-size: 17px; max-width: 62ch; margin: 16px 0 0; }

/* ---------- Hero ---------- */
.hero { background: var(--navy-deep); color: var(--white); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px);
  align-items: center; padding-block: clamp(48px, 7vw, 84px);
}
.hero h1 {
  font-size: clamp(36px, 5vw, 58px); line-height: 1.08; font-weight: 600;
  margin: 18px 0 20px; max-width: 15ch;
}
.hero h1 em { font-style: italic; color: #9fd89b; }
.hero-lead { color: #c6d5ec; font-size: 18px; line-height: 1.65; max-width: 52ch; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { color: #92a7c8; font-size: 13px; margin: 14px 0 0; max-width: 46ch; }

.hero-facts {
  display: grid; grid-template-columns: repeat(4, auto); gap: clamp(20px, 4vw, 44px);
  justify-content: start; margin-top: 36px; padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.hero-facts div { display: grid; gap: 2px; }
.hero-facts b { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--white); }
.hero-facts span { font-size: 12px; color: #9db2d2; letter-spacing: 0.02em; }

.hero-media { position: relative; }
.hero-media img { width: 100%; height: 100%; max-height: 480px; object-fit: cover; border-radius: 3px; }
.hero-media figcaption { margin-top: 10px; font-size: 12px; color: #92a7c8; }
.media-fallback {
  display: none; overflow: hidden; border-radius: 3px; background: var(--navy-deep);
}
.media-fallback strong { display: block; font-family: var(--serif); font-size: 22px; margin-bottom: 8px; }
.media-fallback span { color: #a9bcd8; font-size: 14px; }
.hero-media.is-empty img { display: none; }
.hero-media.is-empty .media-fallback { display: block; }

/* ---------- Problema (compacto) ---------- */
.problem-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); margin-top: 40px; }
.problem-row h3 { font-size: 19px; color: var(--navy-deep); margin-bottom: 6px; }
.problem-row p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.problem-row > div { border-top: 2px solid var(--navy); padding-top: 16px; }

/* ---------- Entregáveis (lista tipográfica) ---------- */
.deliverables { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(32px, 5vw, 72px); margin-top: 44px; }
.deliverable { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 22px 0; border-top: 1px solid var(--line); }
.deliverable b {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  color: var(--line-strong); line-height: 1.2;
}
.deliverable h3 { font-size: 18px; color: var(--navy-deep); }
.deliverable p { margin: 4px 0 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- Método ---------- */
.method-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.check-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 28px; color: var(--ink-soft); font-size: 15px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 14px; height: 8px;
  border-left: 2px solid var(--green-bright); border-bottom: 2px solid var(--green-bright);
  transform: rotate(-45deg);
}
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.steps li {
  display: grid; grid-template-columns: 52px 1fr; gap: 18px;
  padding: 20px 0; border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps b { font-family: var(--serif); font-size: 20px; color: var(--green); }
.steps strong { display: block; font-size: 17px; color: var(--navy-deep); font-family: var(--serif); font-weight: 600; }
.steps span { color: var(--ink-soft); font-size: 15px; }

/* ---------- Programa ---------- */
.program-grid { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.program-aside { position: sticky; top: 96px; }
.program-fact { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.program-fact strong { display: block; font-family: var(--serif); font-size: 24px; color: var(--navy-deep); }
.program-fact span { font-size: 14px; color: var(--muted); }

.module { border-top: 1px solid var(--line); }
.module:last-of-type { border-bottom: 1px solid var(--line); }
.module summary {
  display: grid; grid-template-columns: 44px 1fr 24px; align-items: center; gap: 12px;
  padding: 20px 0; cursor: pointer; list-style: none;
}
.module summary::-webkit-details-marker { display: none; }
.module summary b { font-family: var(--serif); font-size: 18px; color: var(--line-strong); }
.module summary strong { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--navy-deep); }
.module summary i { font-style: normal; font-size: 20px; color: var(--navy); text-align: center; line-height: 1; }
.module[open] summary i { transform: rotate(45deg); }
.module summary:hover strong { color: var(--navy); }
.module-body { padding: 0 0 24px 56px; max-width: 68ch; }
.module-body p { margin: 0 0 10px; color: var(--ink-soft); font-size: 15px; }
.module-body p b { color: var(--ink); font-weight: 600; }
.module-out { border-left: 2px solid var(--green-bright); padding: 4px 0 4px 16px; margin-top: 14px; }
.module-out span { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); font-weight: 600; }
.module-out strong { font-size: 15px; color: var(--navy-deep); font-weight: 600; }

/* ---------- Professor ---------- */
.teacher-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.teacher-photo { position: relative; }
.teacher-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.teacher-photo .media-fallback {
  /* Único bloco substituto que ainda é texto: precisa do respiro que a regra base
     perdeu quando os outros dois passaram a receber a ilustração. */
  padding: 36px 30px; aspect-ratio: 4 / 5; align-content: center;
  border: 1px solid var(--line); background: var(--paper-deep); color: var(--ink-soft);
}
.teacher-photo .media-fallback strong { color: var(--navy-deep); }
.teacher-photo .media-fallback span { color: var(--muted); }
.teacher-photo.is-empty img { display: none; }
.teacher-photo.is-empty .media-fallback { display: block; }
.teacher-grid blockquote {
  margin: 26px 0 0; padding-left: 20px; border-left: 2px solid var(--green-bright);
  font-family: var(--serif); font-size: 19px; font-style: italic; color: var(--navy-deep);
}

/* ---------- Uso responsável ---------- */
.safety { background: var(--navy-deep); color: var(--white); }
.safety .section-title { color: var(--white); }
.safety-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); margin-top: 40px; }
.safety-grid > div { border-top: 1px solid rgba(255, 255, 255, 0.24); padding-top: 18px; }
.safety-grid strong { display: block; font-family: var(--serif); font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.safety-grid span { color: #b9caE4; font-size: 15px; }

/* ---------- Público ---------- */
.audience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
.audience-grid h2 { font-size: 24px; color: var(--navy-deep); margin-top: 10px; }
.plain-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.plain-list li { position: relative; padding-left: 28px; color: var(--muted); font-size: 15px; }
.plain-list li::before { content: "\00d7"; position: absolute; left: 4px; top: -1px; color: var(--line-strong); font-size: 18px; }

/* ---------- Estrutura / local ---------- */
.venue-media img { width: 100%; max-height: 420px; object-fit: cover; }
.venue-media.is-empty img { display: none; }
.venue-media.is-empty .media-fallback { display: block; }
.venue-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); margin-top: 40px; }
.venue-details > div { border-top: 2px solid var(--navy); padding-top: 16px; }
.venue-details span { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.venue-details strong { display: block; font-size: 16px; color: var(--navy-deep); font-weight: 600; line-height: 1.5; }
.venue-details a { display: inline-block; margin-top: 8px; color: var(--navy); font-size: 14px; font-weight: 600; border-bottom: 1px solid currentColor; }
.venue-details small { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }

/* ---------- Investimento ---------- */
.investment-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.included { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 0; }
.included li { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; }
.included li:last-child { border-bottom: 1px solid var(--line); }
.included b { color: var(--navy-deep); font-weight: 600; }
.included span { color: var(--ink-soft); }

.price-card { border: 1px solid var(--line); border-radius: 4px; padding: clamp(26px, 4vw, 38px); background: var(--white); }
.price-badge {
  display: inline-block; padding: 5px 12px; border-radius: 3px; background: var(--green-pale);
  color: var(--green); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.price { display: flex; align-items: baseline; gap: 6px; margin: 18px 0 4px; color: var(--navy-deep); }
.price sup { font-family: var(--serif); font-size: 22px; }
.price strong { font-family: var(--serif); font-size: 60px; font-weight: 600; line-height: 1; }
.price small { font-size: 14px; color: var(--muted); font-family: var(--sans); }
.price-card > p { color: var(--ink-soft); font-size: 15px; margin: 14px 0 22px; }
.price-terms { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 9px; font-size: 13px; color: var(--muted); }

/* ---------- Formulário ---------- */
.enroll { background: var(--paper); }
.enroll-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 4px; padding: clamp(24px, 4vw, 36px); }
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 14px; font-weight: 600; color: var(--navy-deep); }
.field label span { color: var(--muted); font-weight: 400; }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 3px;
  font-family: var(--sans); font-size: 15px; color: var(--ink); background: var(--white);
}
.field input:hover, .field select:hover { border-color: var(--navy); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
fieldset legend { font-size: 14px; font-weight: 600; color: var(--navy-deep); padding: 0; margin-bottom: 10px; }
.radio-list { display: grid; gap: 8px; }
.radio-option {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: 3px; cursor: pointer; font-size: 15px;
}
.radio-option:hover { border-color: var(--navy); }
.radio-option input { accent-color: var(--navy); width: 18px; height: 18px; }
.radio-option:has(input:checked) { border-color: var(--navy); background: #f4f7fd; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.consent input { accent-color: var(--navy); width: 18px; height: 18px; margin-top: 2px; flex: none; }
.form-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; text-align: center; }
.form-alt { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: 14px; color: var(--muted); }
.form-alt a { color: var(--navy); font-weight: 600; border-bottom: 1px solid currentColor; }
.form-status { margin: 0 0 16px; padding: 14px 16px; border-radius: 3px; font-size: 14px; display: none; }
.form-status.is-error { display: block; background: #fdecec; color: #97231f; border: 1px solid #f2c7c5; }
.form-success { display: none; text-align: center; padding: 20px 0; }
.form-success h3 { font-size: 24px; color: var(--navy-deep); margin-bottom: 10px; }
.form-success p { color: var(--ink-soft); font-size: 15px; margin: 0 0 20px; }
.is-sent .form-success { display: block; }
.is-sent form { display: none; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-of-type { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: grid; grid-template-columns: 1fr 24px; align-items: center; gap: 12px;
  padding: 18px 0; cursor: pointer; list-style: none;
  font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--navy-deep);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { font-style: normal; font-size: 20px; color: var(--navy); text-align: center; }
.faq-item[open] summary i { transform: rotate(45deg); }
.faq-item p { margin: 0 0 20px; color: var(--ink-soft); font-size: 15px; max-width: 68ch; }

/* ---------- Rodapé ---------- */
.footer { background: var(--navy-deep); color: #b9caE4; padding-block: 56px 28px; font-size: 14px; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.footer strong { display: block; color: var(--white); font-family: var(--serif); font-size: 16px; margin-bottom: 8px; }
.footer a:hover { color: var(--white); }
.footer-brand small { display: block; margin-top: 6px; color: #8ba3c7; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px; color: #8ba3c7;
}
.footer-bottom div { display: flex; gap: 20px; }

/* ---------- Botão flutuante ---------- */
.floating {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 20px; border-radius: 999px;
  background: var(--navy); color: var(--white);
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(12, 42, 94, 0.28);
}
.floating:hover { background: var(--navy-deep); }

/* ---------- Responsivo ---------- */
@media (max-width: 940px) {
  .hero-grid, .method-grid, .program-grid, .teacher-grid,
  .investment-grid, .enroll-grid, .faq-grid, .audience-grid { grid-template-columns: 1fr; }
  .program-aside { position: static; }
  .deliverables { grid-template-columns: 1fr; }
  .hero-media img { max-height: 260px; }
  .teacher-photo img { aspect-ratio: 3 / 2; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 4px;
    background: var(--white); cursor: pointer;
  }
  .nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
  .nav-toggle span::before, .nav-toggle span::after {
    content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink);
  }
  .nav-toggle span::before { top: -6px; }
  .nav-toggle span::after { top: 6px; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px; display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.button) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .site-nav .button { margin-top: 16px; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
  .problem-row, .safety-grid, .venue-details { grid-template-columns: 1fr; gap: 24px; }
  .hero-facts { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .included li { grid-template-columns: 1fr; gap: 2px; }
  .footer-bottom { flex-direction: column; }
  .floating { padding: 12px 16px; font-size: 13px; }
}

@media print {
  .site-header, .floating, .enroll, .announcement { display: none; }
}


/* ---------- Ilustração da sala ----------
   Ocupa o lugar da foto enquanto ela não existe. É desenho, não fotografia:
   não afirma ser a sala do Instituto. Assim que assets/sala.jpg entrar, o
   navegador carrega a foto e esta ilustração deixa de aparecer. */
.ilustra { display: block; width: 100%; height: 100%; }
.hero-media .media-fallback .ilustra { aspect-ratio: 4 / 3; }
.venue-media .media-fallback .ilustra { aspect-ratio: 21 / 9; max-height: 420px; }

@keyframes brilho-tela { 0%, 100% { opacity: .12; } 50% { opacity: .42; } }
@keyframes cresce-barra { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
@keyframes pisca { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.ilustra .brilho { animation: brilho-tela 3.4s ease-in-out infinite; }
.ilustra .barra { transform-box: fill-box; transform-origin: bottom; animation: cresce-barra 2.8s ease-in-out infinite; }
.ilustra .cursor { animation: pisca 1.1s steps(1) infinite; }

@media (prefers-reduced-motion: reduce) {
  .ilustra .brilho, .ilustra .barra, .ilustra .cursor { animation: none; }
}
