/* Instituto Ponta do Iceberg — design tokens
   Conceito: a página desce da superfície (gelo) às profundezas (abismo). */
:root {
  --abismo: #081C30;      /* fundo das profundezas, rodapé */
  --oceano: #11314E;      /* água funda, botões sólidos */
  --agua-clara: #2A6188;  /* água logo abaixo da linha */
  --gelo: #F2F7FA;        /* fundo claro principal */
  --gelo-fundo: #E3EEF5;  /* faixas alternadas */
  --glacial: #A8CBE0;     /* azul-gelo, acentos sobre escuro */
  --tinta: #1B2F40;       /* texto sobre claro */
  --tinta-suave: #4A6075; /* texto secundário sobre claro */
  --ambar: #8A5A14;       /* acento acadêmico sobre claro */
  --ambar-claro: #D9A441; /* acento acadêmico sobre escuro */
  --serif: "Spectral", "Iowan Old Style", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --faixa-larga: 68rem;
  --faixa-texto: 44rem;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--gelo);
  color: var(--tinta);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 1rem;
  text-wrap: balance;
}

p { margin: 0 0 1rem; }

a { color: var(--ambar); }

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

.faixa {
  max-width: var(--faixa-larga);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.pular {
  position: absolute;
  left: -200vw;
  top: 0;
  background: var(--oceano);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 50;
}
.pular:focus-visible { left: .5rem; top: .5rem; }

/* ---------- Botões ---------- */
.botao {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  padding: .72rem 1.4rem;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.botao-solido {
  background: var(--oceano);
  color: #fff;
}
.botao-solido:hover { background: var(--abismo); }
.botao-contorno {
  border: 1.5px solid var(--oceano);
  color: var(--oceano);
}
.botao-contorno:hover { background: rgba(17, 49, 78, .08); }
.botao-claro {
  background: var(--gelo);
  color: var(--abismo);
}
.botao-claro:hover { background: #fff; }

/* ---------- Cabeçalho ---------- */
.topo {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(242, 247, 250, .88);
  background: color-mix(in srgb, var(--gelo) 88%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.topo.rolado { border-bottom-color: rgba(27, 47, 64, .14); }

.topo-faixa {
  max-width: var(--faixa-larga);
  margin-inline: auto;
  padding: .85rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.marca {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--tinta);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .01em;
}
.marca-simbolo { width: 1.5rem; height: 1.5rem; color: var(--oceano); flex-shrink: 0; }

.navegacao {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-family: var(--sans);
  font-size: .92rem;
  font-weight: 500;
}
.navegacao a:not(.botao) {
  color: var(--tinta);
  text-decoration: none;
}
.navegacao a:not(.botao):hover { color: var(--ambar); }
.navegacao .botao { padding: .5rem 1rem; }

.menu-botao {
  display: none;
  align-items: center;
  gap: .5rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .92rem;
  color: var(--tinta);
  background: none;
  border: 1.5px solid rgba(27, 47, 64, .35);
  border-radius: 4px;
  padding: .45rem .85rem;
  cursor: pointer;
}
.menu-tracos {
  width: 1rem;
  height: 2px;
  background: currentColor;
  position: relative;
}
.menu-tracos::before, .menu-tracos::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1rem;
  height: 2px;
  background: currentColor;
}
.menu-tracos::before { top: -5px; }
.menu-tracos::after { top: 5px; }

/* ---------- Hero ---------- */
.hero { overflow: hidden; }

.hero-superficie {
  position: relative;
  background: linear-gradient(180deg, var(--gelo) 0%, #D3E5F1 100%);
}

.hero-conteudo {
  position: relative;
  z-index: 1;
  padding-block: clamp(3.5rem, 9vh, 7rem) clamp(3rem, 8vh, 5.5rem);
  max-width: min(var(--faixa-larga), 100%);
}
.hero-conteudo h1 {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  font-weight: 500;
  max-width: 13em;
  margin-bottom: 1.4rem;
}
.hero-chamada {
  font-size: clamp(1.1rem, 1.8vw, 1.25rem);
  max-width: 34em;
  color: var(--tinta-suave);
  margin-bottom: 2.2rem;
}
.hero-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
}

.hero-berg {
  position: absolute;
  bottom: 0;
  right: clamp(.5rem, 6vw, 6rem);
  width: clamp(180px, 28vw, 370px);
  height: auto;
  transform: translateY(60%); /* a linha d'água do desenho (40% da altura) encosta na divisa */
  z-index: 2;
  filter: drop-shadow(0 2px 14px rgba(8, 28, 48, .18));
}

.hero-profundeza {
  background: linear-gradient(180deg, var(--agua-clara) 0%, var(--oceano) 46%, var(--abismo) 100%);
  border-top: 1px solid rgba(242, 248, 252, .55);
  color: #D6E6F2;
}
.hero-profundeza .faixa {
  padding-block: clamp(3.5rem, 9vh, 6rem) clamp(4.5rem, 12vh, 8rem);
}
.hero-submerso {
  max-width: 36em;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  margin: 0;
}
.hero-submerso em {
  display: block;
  margin-top: 1.1rem;
  color: var(--glacial);
}

/* entrada única no carregamento */
@media (prefers-reduced-motion: no-preference) {
  .hero-conteudo, .hero-berg {
    animation: emergir .8s ease-out both;
  }
  .hero-berg { animation-delay: .15s; }
  @keyframes emergir {
    from { opacity: 0; translate: 0 14px; }
    to { opacity: 1; translate: 0 0; }
  }
  /* translate não interfere no transform do iceberg */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Seções ---------- */
.secao { padding-block: clamp(4rem, 10vh, 6.5rem); }
.secao-gelo { background: var(--gelo-fundo); }

.secao h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  margin-bottom: 1.6rem;
}

.secao-corpo { max-width: var(--faixa-texto); }
.secao-chamada {
  max-width: var(--faixa-texto);
  color: var(--tinta-suave);
  font-size: 1.1rem;
  margin-bottom: 2.6rem;
}

/* tradições atendidas */
.tradicoes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  padding: 0;
  margin: 1.6rem 0 1.8rem;
}
.tradicoes li {
  font-family: var(--sans);
  font-weight: 600;
  font-size: .92rem;
  color: #fff;
  border-radius: 999px;
  padding: .45rem 1.05rem;
}
/* cinco tradições, cinco matizes de mesma intensidade */
.tradicoes li:nth-child(1) { background: #96620B; } /* Católicos — dourado */
.tradicoes li:nth-child(2) { background: #9D3246; } /* Ortodoxos — vinho */
.tradicoes li:nth-child(3) { background: #2F7B4C; } /* Protestantes históricos — verde */
.tradicoes li:nth-child(4) { background: #6A4FA8; } /* Evangélicos — violeta */
.tradicoes li:nth-child(5) { background: #15718A; } /* Não denominacionais — petróleo */

/* método */
.metodo-grade {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}
.metodo-item {
  border-top: 2px solid var(--ambar);
  padding-top: 1.4rem;
}
.metodo-icone {
  width: 2rem;
  height: 2rem;
  color: var(--oceano);
  margin-bottom: .9rem;
}
.metodo-item h3 {
  font-size: 1.2rem;
  margin-bottom: .5rem;
}
.metodo-item p {
  color: var(--tinta-suave);
  font-size: .98rem;
  margin: 0;
}
.metodo-fecho {
  max-width: var(--faixa-texto);
  margin: 2.8rem 0 0;
  font-style: italic;
  font-size: 1.1rem;
}

/* ---------- Cursos: pranchas de catálogo de museu ---------- */
.cursos-grade {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 3vw, 2.2rem);
}
.curso {
  background: #fff;
  border: 1px solid rgba(27, 47, 64, .18);
  border-radius: 6px;
  padding: .9rem .9rem 1.6rem;
  display: flex;
  flex-direction: column;
}
.curso figure { margin: 0 0 1.2rem; }
.curso img {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border: 1px solid rgba(27, 47, 64, .12);
}
.curso figcaption {
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--tinta-suave);
  margin-top: .5rem;
}
.curso-corpo { padding-inline: .5rem; }
.curso h3 {
  font-size: 1.25rem;
  margin-bottom: .6rem;
}
.curso p {
  color: var(--tinta-suave);
  font-size: .98rem;
  margin: 0;
}
.cursos-nota {
  max-width: var(--faixa-texto);
  margin: 2.6rem 0 0;
  font-style: italic;
  font-size: 1.05rem;
}

/* ---------- Professores ---------- */
.professores-grade {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: 2.4rem;
}
.professor {
  display: flex;
  gap: 1.3rem;
  align-items: flex-start;
}
.professor-foto {
  width: 5.25rem;
  height: 5.25rem;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.professor h3 {
  font-size: 1.25rem;
  margin-bottom: .5rem;
}
.professor p {
  color: var(--tinta-suave);
  font-size: .98rem;
  margin: 0;
}

/* ---------- Profundezas: convite, contato e rodapé ---------- */
.profundezas {
  background: linear-gradient(180deg, var(--oceano) 0%, var(--abismo) 55%);
  color: #D6E6F2;
  padding-top: clamp(4.5rem, 11vh, 7rem);
}
.profundezas h2 {
  color: #fff;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
}
.profundezas-chamada {
  max-width: 38em;
  font-size: 1.1rem;
  margin-bottom: 2.2rem;
}
.profundezas a { color: var(--ambar-claro); }
.profundezas .botao-claro { color: var(--abismo); }

.contato { padding-top: clamp(3.5rem, 9vh, 5.5rem); }
.contato-titulo { font-size: 1.4rem; }
.contato-lista {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  margin: 1.8rem 0 0;
}
.contato-lista dt {
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 500;
  color: var(--glacial);
  margin-bottom: .3rem;
}
.contato-lista dd { margin: 0; font-size: 1.05rem; }
.contato-lista dd a { text-decoration-color: rgba(217, 164, 65, .5); }

.rodape {
  margin-top: clamp(3.5rem, 9vh, 5.5rem);
  border-top: 1px solid rgba(168, 203, 224, .22);
}
.rodape-faixa {
  padding-block: 1.8rem 2.2rem;
  font-size: .9rem;
  color: #9FB8CB;
}
.rodape-faixa p { margin: 0; }

/* ---------- Janela de convite ---------- */
.convite-dialogo {
  border: 0;
  border-radius: 10px;
  padding: 0;
  max-width: 27rem;
  width: calc(100vw - 2.5rem);
  background: #fff;
  color: var(--tinta);
  box-shadow: 0 24px 60px rgba(8, 28, 48, .35);
}
.convite-dialogo::backdrop {
  background: rgba(8, 28, 48, .55);
}
.convite-conteudo { padding: 2rem clamp(1.4rem, 5vw, 2rem) 1.8rem; }
.convite-dialogo h3 {
  font-size: 1.5rem;
  margin-bottom: .4rem;
}
.convite-sub {
  color: var(--tinta-suave);
  font-size: .98rem;
  margin-bottom: 1.4rem;
}
.campo {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .85rem;
  margin-bottom: 1rem;
}
.campo input,
.campo textarea {
  display: block;
  width: 100%;
  margin-top: .35rem;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  color: var(--tinta);
  background: var(--gelo);
  border: 1px solid rgba(27, 47, 64, .3);
  border-radius: 4px;
  padding: .6rem .75rem;
}
.campo textarea { resize: vertical; min-height: 5.5rem; }
.campo input:focus,
.campo textarea:focus {
  outline: 2px solid var(--oceano);
  outline-offset: 0;
  border-color: var(--oceano);
}
.convite-erro {
  font-family: var(--sans);
  font-size: .88rem;
  color: #A03030;
  margin: 0 0 1rem;
}
.convite-acoes {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.3rem;
}
.convite-nota {
  font-family: var(--sans);
  font-size: .8rem;
  color: var(--tinta-suave);
  margin: 1.1rem 0 0;
}
.convite-sucesso p { font-size: 1.05rem; margin-bottom: 1.3rem; }

@media (prefers-reduced-motion: no-preference) {
  .convite-dialogo[open] { animation: dialogoEntrar .22s ease-out; }
  .convite-dialogo[open]::backdrop { animation: backdropEntrar .22s ease-out; }
  @keyframes dialogoEntrar {
    from { opacity: 0; translate: 0 10px; }
    to { opacity: 1; translate: 0 0; }
  }
  @keyframes backdropEntrar {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* ---------- Responsivo ---------- */
@media (max-width: 920px) {
  .cursos-grade { grid-template-columns: 1fr 1fr; }
  .professores-grade { grid-template-columns: 1fr; }
  .metodo-grade { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 760px) {
  .navegacao {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
    background: var(--gelo);
    border-bottom: 1px solid rgba(27, 47, 64, .14);
    padding: .8rem clamp(1.25rem, 4vw, 2.5rem) 1.2rem;
  }
  .navegacao.aberta { display: flex; }
  .navegacao a:not(.botao) { padding: .55rem 0; width: 100%; }
  .navegacao .botao { margin-top: .6rem; }
  .menu-botao { display: flex; }
  .topo-faixa { position: relative; }

  .hero-berg {
    width: clamp(120px, 30vw, 170px);
    right: 4vw;
    filter: drop-shadow(0 2px 10px rgba(8, 28, 48, .15));
  }
  .hero-conteudo { padding-bottom: 4rem; }

  .cursos-grade { grid-template-columns: 1fr; }
  .contato-lista { grid-template-columns: 1fr; gap: 1.4rem; }
}
