/*
 * Site institucional público do Ipojucão - CSS próprio, sem framework.
 * Tokens copiados LITERALMENTE do modelo aprovado pelo proprietário
 * (docs/design/referencia-modelo/tokens-modelo-v18.css - D-90), os mesmos
 * da SPA interna (web/) e do portal do tutor (web-portal/).
 * Fonte Inter embarcada localmente (site/fonts/ - nunca CDN externa, LGPD).
 * Mobile-first: base para telas pequenas, media queries ampliam.
 */

/* ===== Fonte Inter (local) ===== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  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;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  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;
}

/* ===== Tokens do modelo (D-90) ===== */
:root {
  --ipo-blue: #0093ce;
  --ipo-blue-600: #007aad;
  --ipo-blue-700: #00658f;
  --ipo-blue-100: #e0f2fb;
  --ipo-blue-50: #f0f9fd;
  --ipo-green: #009e4d;
  --ipo-green-600: #007f3d;
  --ipo-green-100: #dcf1e5;
  --ipo-orange: #f58220;
  --ipo-orange-600: #d86c0f;
  --ipo-orange-100: #fde6d2;
  --ipo-yellow: #ffd400;
  --ipo-yellow-100: #fff6cc;
  --ipo-magenta: #e30685;
  --ipo-magenta-100: #fbd3e7;
  --ipo-purple: #665aa6;
  --ipo-purple-100: #e0dded;
  --ipo-coral: #f28c91;
  --ipo-coral-100: #fbdddf;
  --ipo-bg: #f4f6f8;
  --ipo-card: #ffffff;
  --ipo-ink: #263238;
  --ipo-ink-2: #4a5760;
  --ipo-ink-3: #7a8892;
  --ipo-line: #e3e8ec;
  --ipo-line-2: #cfd6dc;

  --color-bg: var(--ipo-bg);
  --color-surface: var(--ipo-card);
  --color-fg: var(--ipo-ink);
  --color-fg-muted: var(--ipo-ink-2);
  --color-fg-subtle: var(--ipo-ink-3);
  --color-border: var(--ipo-line);
  --color-primary: var(--ipo-blue);
  --color-primary-hover: var(--ipo-blue-600);
  --color-on-primary: #ffffff;
  --color-success: var(--ipo-green);
  --color-danger: #e53935;
  --color-danger-tint: #fde1e0;

  --shadow-sm: 0 2px 6px rgba(38, 50, 56, 0.08);
  --shadow-md: 0 6px 18px rgba(38, 50, 56, 0.1);
  --shadow-pop: 0 8px 24px rgba(0, 147, 206, 0.28);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;

  --fs-display: 44px;
  --lh-display: 1.05;
  --fs-h1: 32px;
  --lh-h1: 1.15;
  --fs-h2: 24px;
  --lh-h2: 1.2;
  --fs-h3: 20px;
  --lh-h3: 1.25;
  --fs-body: 16px;
  --lh-body: 1.5;
  --fs-small: 14px;
  --lh-small: 1.45;
  --fs-caption: 12px;
  --lh-caption: 1.4;
  --fs-overline: 11px;
  --lh-overline: 1.3;
  --tr-overline: 0.08em;
}

/* ===== Base ===== */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-fg);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3 {
  margin: 0 0 var(--s-4);
  font-weight: 700;
  letter-spacing: -0.014em;
  text-wrap: balance;
}
h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  font-weight: 800;
}
h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
}
h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
}
p {
  margin: 0 0 var(--s-4);
  text-wrap: pretty;
}
a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}
img {
  max-width: 100%;
  height: auto;
}
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--s-5);
}
.overline {
  display: block;
  font-size: var(--fs-overline);
  line-height: var(--lh-overline);
  letter-spacing: var(--tr-overline);
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-primary-hover);
  margin-bottom: var(--s-2);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Botões ===== */
.botao {
  display: inline-block;
  padding: var(--s-3) var(--s-6);
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-body);
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.botao:hover {
  text-decoration: none;
}
.botao-primario {
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-pop);
}
.botao-primario:hover {
  background: var(--color-primary-hover);
  color: var(--color-on-primary);
}
.botao-whatsapp {
  background: var(--ipo-green);
  color: var(--color-on-primary);
  box-shadow: var(--shadow-sm);
}
.botao-whatsapp:hover {
  background: var(--ipo-green-600);
  color: var(--color-on-primary);
}
.botao-contorno {
  background: var(--color-surface);
  color: var(--ipo-blue-700);
  border-color: var(--color-primary);
}
.botao-contorno:hover {
  background: var(--ipo-blue-50);
  color: var(--ipo-blue-700);
}

/* ===== Cabeçalho ===== */
.cabecalho {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.cabecalho-conteudo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding-top: var(--s-3);
  padding-bottom: var(--s-3);
}
.cabecalho-logo img {
  display: block;
  width: 132px;
  height: 47px;
}
.cabecalho-nav {
  display: none;
  gap: var(--s-5);
}
.cabecalho-nav a {
  color: var(--color-fg-muted);
  font-weight: 600;
  font-size: var(--fs-small);
}
.cabecalho-nav a:hover {
  color: var(--color-primary-hover);
}
.cabecalho .botao {
  padding: var(--s-2) var(--s-4);
  font-size: var(--fs-small);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(180deg, var(--ipo-blue-50) 0%, var(--ipo-bg) 100%);
  padding: var(--s-10) 0 var(--s-12);
  text-align: center;
}
.hero-logo {
  width: min(320px, 72vw);
  height: auto;
  margin-bottom: var(--s-6);
}
.hero p {
  max-width: 560px;
  margin: 0 auto var(--s-6);
  color: var(--color-fg-muted);
  font-size: 18px;
}
.hero-acoes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
}

/* ===== Seções ===== */
.secao {
  padding: var(--s-12) 0;
}
.secao-alternada {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.secao-cabeca {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--s-8);
}
.secao-cabeca p {
  color: var(--color-fg-muted);
}

/* ===== Cards de serviço ===== */
.grade-servicos {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
.card-servico {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: var(--s-6);
}
.secao-alternada .card-servico {
  background: var(--ipo-bg);
  box-shadow: none;
}
.card-servico .icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  font-size: 24px;
  margin-bottom: var(--s-3);
}
.icone-azul {
  background: var(--ipo-blue-100);
}
.icone-verde {
  background: var(--ipo-green-100);
}
.icone-laranja {
  background: var(--ipo-orange-100);
}
.icone-roxo {
  background: var(--ipo-purple-100);
}
.card-servico p {
  margin: 0;
  color: var(--color-fg-muted);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}

/* ===== Como funciona ===== */
.passos {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: passo;
}
.passos li {
  counter-increment: passo;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  padding: var(--s-5) var(--s-5) var(--s-5) var(--s-16);
  position: relative;
}
.passos li::before {
  content: counter(passo);
  position: absolute;
  left: var(--s-5);
  top: var(--s-5);
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.passos h3 {
  margin-bottom: var(--s-1);
  font-size: var(--fs-body);
}
.passos p {
  margin: 0;
  color: var(--color-fg-muted);
  font-size: var(--fs-small);
}

/* ===== Horários ===== */
.horarios-cartao {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: var(--s-6);
  max-width: 560px;
  margin: 0 auto;
}
.horarios-grupo + .horarios-grupo {
  margin-top: var(--s-6);
  padding-top: var(--s-6);
  border-top: 1px dashed var(--color-border);
}
.horarios-grupo h3 {
  font-size: var(--fs-body);
  margin-bottom: var(--s-3);
}
.horarios-lista {
  margin: 0;
  display: grid;
  gap: var(--s-2);
}
.horarios-lista div {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  font-size: var(--fs-small);
}
.horarios-lista dt {
  color: var(--color-fg-muted);
}
.horarios-lista dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.horarios-lista dd.fechado {
  color: var(--color-danger);
}
.horarios-aviso {
  margin: 0;
  color: var(--color-fg-muted);
  font-size: var(--fs-small);
  text-align: center;
}
.horarios-nota {
  margin: var(--s-4) auto 0;
  max-width: 560px;
  text-align: center;
  color: var(--color-fg-subtle);
  font-size: var(--fs-caption);
}

/* ===== Contato ===== */
.contato-cartao {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: var(--s-6);
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.contato-endereco {
  font-style: normal;
  color: var(--color-fg-muted);
  margin-bottom: var(--s-5);
}
.contato-acoes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
}

/* ===== CTA final ===== */
.cta-final {
  background: var(--ipo-blue-700);
  color: #ffffff;
  text-align: center;
  padding: var(--s-12) 0;
}
.cta-final h2 {
  color: #ffffff;
}
.cta-final p {
  color: var(--ipo-blue-100);
  max-width: 520px;
  margin: 0 auto var(--s-6);
}
.cta-final .botao-primario {
  background: var(--ipo-yellow);
  color: var(--ipo-ink);
  box-shadow: var(--shadow-md);
}
.cta-final .botao-primario:hover {
  background: #e0bc00;
  color: var(--ipo-ink);
}

/* ===== Rodapé ===== */
.rodape {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--s-8) 0;
  text-align: center;
  color: var(--color-fg-subtle);
  font-size: var(--fs-small);
}
.rodape nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-5);
  margin-bottom: var(--s-4);
}
.rodape p {
  margin: 0;
}

/* ===== Página de erro / privacidade ===== */
.pagina-simples {
  min-height: 60vh;
  display: flex;
  align-items: center;
}
.pagina-simples .conteudo {
  max-width: 640px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--s-8);
  text-align: center;
}
.aviso-revisao {
  background: var(--ipo-yellow-100);
  border: 1px solid var(--ipo-yellow);
  border-radius: var(--r-sm);
  padding: var(--s-4);
  font-size: var(--fs-small);
  color: var(--color-fg-muted);
  text-align: left;
}

/* ===== Tablet e desktop (mobile-first) ===== */
@media (min-width: 720px) {
  .cabecalho-nav {
    display: flex;
  }
  .hero h1 {
    font-size: var(--fs-display);
    line-height: var(--lh-display);
    letter-spacing: -0.02em;
  }
  .hero-acoes,
  .contato-acoes {
    flex-direction: row;
    justify-content: center;
  }
  .grade-servicos {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-5);
  }
  .passos {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1080px) {
  .grade-servicos {
    grid-template-columns: repeat(4, 1fr);
  }
  .passos {
    grid-template-columns: repeat(4, 1fr);
  }
  .passos li {
    padding: var(--s-16) var(--s-5) var(--s-5);
  }
}
