/*
  Layout desktop = coordenadas exatas do Figma (frame de 1920 px).
  1 px do Figma = var(--u), que escala com a largura da página.
  Abaixo de 900 px o layout vira fluxo normal (mobile).
*/
:root {
  --ink: #3d3d3d;
  --muted: #828282;
  --line: rgba(0, 0, 0, .23);
  --surface: #fafafa;
  --border: #d8d8d8;
  --dark: #1a1a1a;
  --lh: 1.0246;
}

@font-face { font-family: "Inter Display"; src: url("assets/fonts/InterDisplay-Light.otf") format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("assets/fonts/InterDisplay-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("assets/fonts/InterDisplay-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("assets/fonts/InterDisplay-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("assets/fonts/InterDisplay-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

/* Alternativos do Figma (Inter Display) */
:root {
  /* ss02 (desambiguação) foi retirado: é ele que troca o 0 pelo zero cortado */
  --alt-full: "salt", "ss01", "ss03", "ss04", "cv01", "cv02", "cv03", "cv04", "cv05", "cv06", "cv11", "cv12", "cv13";
  --alt-head: "salt", "ss01", "cv11", "cv12", "cv13";
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "Inter Display", "Inter", system-ui, sans-serif;
  font-feature-settings: var(--alt-full);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul { margin: 0; }

.page { container-type: inline-size; --u: calc(100cqw / 1920); overflow: clip; }

/* Rodapé "cortina": o conteúdo passa por cima e revela o rodapé preso embaixo */
.page > header, .page > main { position: relative; z-index: 1; background: #fff; }
.footer { position: sticky; bottom: 0; z-index: 0; }
.footer > .container { transform-origin: 50% 100%; will-change: transform, opacity; }

/* Brilho sutil que segue o mouse nas letras de "Corpus meum" */
@property --spot { syntax: "<length>"; inherits: false; initial-value: 0px; }
.footer__wordmark {
  --mx: 50%; --my: 50%;
  transition: --spot .6s ease;
  cursor: default;
}
.footer__wordmark:hover { --spot: 260px; }

/* ---------- Base (desktop, coordenadas Figma) ---------- */
.sec { position: relative; width: 100%; }
.sec > *, .card > *, .prayer__card > *, .map > * { position: absolute; }

.h2 {
  font-weight: 500;
  font-size: calc(67 * var(--u));
  line-height: var(--lh);
  letter-spacing: -.04em;
  color: var(--ink);
  font-feature-settings: var(--alt-head);
}
button { font-feature-settings: inherit; }
.muted { color: var(--muted); font-weight: 300; font-size: calc(28 * var(--u)); line-height: var(--lh); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: calc(10 * var(--u));
  padding: calc(10 * var(--u));
  border-radius: calc(116 * var(--u));
  font-size: calc(21 * var(--u));
  font-weight: 400;
  line-height: var(--lh);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform .2s, background .2s;
}
.btn--light { background: #fff; color: #000; border-color: #fff; }
.btn--ghost { border-color: #fff; color: #fff; }
.btn--outline { border-color: rgba(0,0,0,.34); background: #fff; color: #000; }
.btn--dark { border-color: #000; background: #000; color: #fff; }

/* Hover: rótulo sobe e some; camada nova sobe de baixo (preta, ou branca no botão escuro) */
.btn { overflow: hidden; isolation: isolate; }
.btn__label, .btn__hover { display: inline-flex; align-items: center; justify-content: center; gap: inherit; transition: transform .3s, opacity .3s, border-radius .3s; }
.btn__hover {
  position: absolute; inset: 0; z-index: 1;
  background: #000; color: #fff; border-radius: inherit;
  transform: translateY(100%); opacity: 0;
}
.btn--dark .btn__hover { background: #fff; color: #000; }
.btn:hover .btn__label, .btn:focus-visible .btn__label { transform: translateY(-160%); opacity: 0; }
.btn:hover .btn__hover, .btn:focus-visible .btn__hover { transform: translateY(0); opacity: 1; border-radius: 0; }
/* Secundários (sem fill): efeito simples, só um fundo translúcido */
.btn--ghost .btn__hover { display: none; }
.btn--ghost:hover .btn__label, .btn--ghost:focus-visible .btn__label { transform: none; opacity: 1; }
.btn--ghost { transition: background-color .25s; }
.btn--ghost:hover, .btn--ghost:focus-visible { background: rgba(255,255,255,.15); }
.btn--dark:hover { border-color: rgba(0,0,0,.34); }
.btn--sm { gap: calc(6 * var(--u)); }
.btn svg { width: calc(18 * var(--u)); height: calc(16 * var(--u)); flex: none; }

/* Hero */
.hero {
  height: calc(940 * var(--u)); color: #fff;
  overflow: hidden; transform-origin: 50% 0;
  --shrink: .9; --round: 40px;
  transition: transform .9s cubic-bezier(.22,1,.36,1), border-radius .9s cubic-bezier(.22,1,.36,1);
  --dy: calc(40 * var(--u)); /* bloco de texto um pouco abaixo do centro */
}
.hero > :not(.hero__bg) { translate: 0 var(--dy); }
.hero.is-shrunk { transform: scale(var(--shrink)); border-radius: var(--round); }
/* ---------- Animações ---------- */
/* Zoom out suave da foto do topo ao abrir */
.hero__bg { animation: heroZoom 2.6s cubic-bezier(.22,1,.36,1) both; }
@keyframes heroZoom { from { transform: scale(1.15); } to { transform: scale(1); } }

/* Scroll reveal (a classe .is-in é posta pelo IntersectionObserver) */
.reveal { transition: opacity 1s cubic-bezier(.22,1,.36,1), transform 1s cubic-bezier(.22,1,.36,1), filter 1s cubic-bezier(.22,1,.36,1), clip-path 1.2s cubic-bezier(.22,1,.36,1); }
.reveal--blur:not(.is-in) { opacity: 0; transform: translateY(30px); filter: blur(10px); }
.reveal--fade:not(.is-in) { opacity: 0; transform: translateY(40px); }
/* Latim "falado": palavra por palavra, no ritmo da fala (atrasos em --d no HTML) */
.corpus__latin.reveal--spoken { background: none; color: inherit; }
.corpus__latin .w {
  display: inline-block;
  background-image: linear-gradient(180deg, #f3f3f3 8%, #a2a2a2 79%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.reveal--spoken.is-in .w {
  transition: opacity .7s ease-out, filter .7s ease-out, transform .7s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--d);
}
.reveal--spoken:not(.is-in) .w { opacity: 0; filter: blur(8px); transform: translateY(.12em) scale(.97); }
/* Esconder é instantâneo: só o aparecer anima (senão os atrasos embaralham a ordem) */
.reveal:not(.is-in), .reveal:not(.is-in) .w { transition: none !important; }
.reveal--rise { transition-duration: 1.4s; }
.reveal--rise:not(.is-in) { opacity: 0; transform: translateY(180px); }

@media (prefers-reduced-motion: reduce) {
  .hero { transition: none; }
  .hero__bg { animation: none; }
  .reveal, .reveal .w { transition: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
}
.hero__bg {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.59) -4%, rgba(0,0,0,0) 63%),
    url("assets/hero.png") center / cover no-repeat;
}
.hero__title {
  left: calc(320 * var(--u)); top: calc(181 * var(--u));
  font-weight: 500; font-size: calc(120 * var(--u)); line-height: var(--lh); letter-spacing: -.04em;
}
.hero__lead {
  left: calc(320 * var(--u)); top: calc(447 * var(--u)); width: calc(537 * var(--u));
  font-weight: 300; font-size: calc(38 * var(--u)); line-height: 1.13;
}
.hero__btn1 { left: calc(320 * var(--u)); top: calc(609 * var(--u)); width: calc(287 * var(--u)); height: calc(61 * var(--u)); }
.hero__btn2 { left: calc(626 * var(--u)); top: calc(609 * var(--u)); width: calc(315 * var(--u)); height: calc(61 * var(--u)); }

/* Milagres */
.miracles { height: calc(1043 * var(--u)); }
.miracles__title { left: calc(937 * var(--u)); top: calc(120 * var(--u)); width: calc(680 * var(--u)); }
.card {
  left: calc(381 * var(--u)); top: calc(192 * var(--u));
  width: calc(463 * var(--u)); height: calc(629 * var(--u));
  border-radius: calc(13 * var(--u)); overflow: hidden; background: #222;
}
/* Mídia do card: o hover dá zoom no container; cada foto tem seu próprio zoom out ao entrar */
.card__media { inset: 0; z-index: 0; overflow: hidden; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.card:hover .card__media { transform: scale(1.06); }
.card__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.14);
  transition: opacity 1.1s cubic-bezier(.4,0,.2,1), transform 2.4s cubic-bezier(.16,1,.3,1);
}
.card__img.is-current { opacity: 1; transform: scale(1); z-index: 1; }
.card__img.is-leaving { opacity: 0; transform: scale(1); transition: opacity 1.1s cubic-bezier(.4,0,.2,1) .15s; }
.card__title { transition: opacity .35s ease, filter .35s ease, transform .35s ease; }
.card__title.is-swapping { opacity: 0; filter: blur(6px); transform: translateY(6px); }
.prayer__img { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.prayer__card:hover .prayer__img { transform: scale(1.06); }
.card__shade { inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.8) 100%); }
.card__shade[hidden] { display: none; }
.card__title {
  left: calc(63 * var(--u)); top: calc(413 * var(--u)); width: calc(338 * var(--u));
  color: #fff; font-weight: 400; font-size: calc(38 * var(--u)); line-height: var(--lh);
}
.card__title span { color: #c5c5c5; }
.btn--sm { font-size: calc(21 * var(--u)); }
.card__btn1 { left: calc(63 * var(--u)); top: calc(512 * var(--u)); width: calc(163 * var(--u)); height: calc(54 * var(--u)); }
.card__btn2 { left: calc(238 * var(--u)); top: calc(512 * var(--u)); width: calc(153 * var(--u)); height: calc(54 * var(--u)); }

.progress {
  left: calc(381 * var(--u)); top: calc(845 * var(--u));
  width: calc(463 * var(--u)); height: calc(6 * var(--u)); min-height: 4px;
  border-radius: 999px; background: #ececec; overflow: hidden;
}
.progress__fill { height: 100%; background: var(--ink); border-radius: inherit; transform-origin: left; transform: scaleX(0); }

.list { left: calc(937 * var(--u)); top: calc(312 * var(--u)); width: calc(556 * var(--u)); list-style: none; padding: 0; }
.list li { position: relative; height: calc(97 * var(--u)); }
.list li:not(:last-child)::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(61 * var(--u));
  border-top: 1px solid var(--line);
}
.list button {
  display: block; padding: 0; background: none; border: 0; cursor: pointer; text-align: left; white-space: nowrap;
  font: inherit; font-weight: 300; font-size: calc(28 * var(--u)); line-height: var(--lh);
  color: var(--muted); transition: color .2s;
}
.list button:hover { color: var(--ink); }
.list button.is-active { color: var(--ink); -webkit-text-stroke: .02em currentColor; }

/* Orações */
.prayer { height: calc(571 * var(--u)); }
.prayer__card {
  left: calc(351 * var(--u)); top: 0; width: calc(1219 * var(--u)); height: calc(571 * var(--u));
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(13 * var(--u)); overflow: hidden;
}
.prayer__title { left: calc(105 * var(--u)); top: calc(172 * var(--u)); width: calc(441 * var(--u)); }
.prayer__btn { left: calc(105 * var(--u)); top: calc(345 * var(--u)); width: calc(287 * var(--u)); height: calc(61 * var(--u)); }
.prayer__img { left: calc(648 * var(--u)); top: 0; width: calc(576 * var(--u)); height: calc(574 * var(--u)); object-fit: cover; }

/* Hoc est enim */
.corpus { height: calc(1055 * var(--u)); }
.corpus__latin {
  left: calc(391 * var(--u)); top: calc(120 * var(--u)); width: calc(1140 * var(--u));
  text-align: center;
  font-weight: 600; font-size: calc(155 * var(--u)); line-height: .81; letter-spacing: -.065em;
  font-feature-settings: var(--alt-head);
  background: linear-gradient(180deg, #f3f3f3 8%, #a2a2a2 79%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .08em;
}
.corpus__pt { left: calc(1164 * var(--u)); top: calc(391 * var(--u)); color: var(--muted); font-weight: 300; font-size: calc(28 * var(--u)); line-height: var(--lh); white-space: nowrap; }
.corpus__img { left: calc(338 * var(--u)); top: calc(137 * var(--u)); width: calc(1089 * var(--u)); height: calc(918 * var(--u)); max-width: none; }

/* Igrejas */
.churches { height: calc(810 * var(--u)); background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.miracles__title { white-space: pre-wrap; }
.churches__title { left: calc(418 * var(--u)); top: calc(120 * var(--u)); width: calc(596 * var(--u)); }
.churches__sub { left: calc(1224 * var(--u)); top: calc(190 * var(--u)); width: calc(289 * var(--u)); text-align: right; }
.map { left: calc(389 * var(--u)); top: calc(316 * var(--u)); width: calc(1143 * var(--u)); height: calc(374 * var(--u)); overflow: hidden; }
.map > img { position: static; width: 100%; height: 100%; object-fit: cover; }
.map__btn {
  left: calc(981 * var(--u)); top: calc(16 * var(--u)); width: calc(143 * var(--u)); height: calc(38 * var(--u));
  display: inline-flex; align-items: center; justify-content: center; gap: calc(7 * var(--u));
  background: #fff; border: 1px solid #e7e7e7; border-radius: 999px;
  font-family: "Inter", sans-serif; font-feature-settings: normal;
  font-size: calc(14 * var(--u)); line-height: calc(20 * var(--u)); font-weight: 600; color: #1c1c1c;
}
.map__btn svg { width: calc(13 * var(--u)); height: auto; }

/* Footer (flex, mesmas medidas do Figma em 1920) */
.container { width: min(100% - 32px, 1280px); margin-inline: auto; }
.footer { background: var(--dark); color: #fff; padding: 140px 0 56px; }
.footer .btn { position: relative; padding: 19.5px 43px; font-size: 21px; }
.footer .btn__hover { background: #3d3d3d; }
.footer__top { display: flex; justify-content: space-between; gap: 64px; flex-wrap: wrap; }
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.footer__logo { font-weight: 500; font-size: clamp(40px, 3.5vw, 67px); line-height: var(--lh); letter-spacing: -.04em; }
.footer__desc { max-width: 380px; font-weight: 300; font-size: clamp(18px, 1.25vw, 24px); line-height: var(--lh); color: rgba(255,255,255,.6); }
.footer__links { display: flex; gap: 80px; flex-wrap: wrap; }
.footer__links div { display: flex; flex-direction: column; gap: 22px; }
.footer__links a { font-weight: 300; font-size: clamp(18px, 1.25vw, 24px); color: rgba(255,255,255,.85); }
.footer__links a:hover { color: #fff; }
.footer__h { font-size: 16px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.footer__wordmark {
  margin: 80px 0 40px;
  font-weight: 600; font-size: clamp(64px, 10.8vw, 208px); line-height: .81; letter-spacing: -.065em;
  background:
    radial-gradient(var(--spot) circle at var(--mx) var(--my), rgba(255,255,255,.32), rgba(255,255,255,0) 100%),
    linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.02));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap; padding-bottom: .08em;
  text-align: center;
}
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 40px; border-top: 1px solid rgba(255,255,255,.15); }
.footer__bottom, .footer__bottom a { font-weight: 300; font-size: 18px; color: rgba(255,255,255,.5); }
.footer__legal { display: flex; gap: 40px; }

/* ---------- Mobile (< 900 px): fluxo normal ---------- */
@media (max-width: 899px) {
  .page { --u: 1px; }
  .sec { height: auto !important; padding: 72px 16px; }
  .sec > *, .card > *:not(.card__media):not(.card__shade), .prayer__card > *, .map > .map__btn { position: static; width: auto !important; height: auto !important; }
  .h2 { font-size: 40px; }
  .muted { font-size: 18px; }
  .btn { font-size: 16px; padding: 16px 28px; position: relative !important; }

  .hero { --dy: 24px; --shrink: .94; --round: 24px; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; }
  .hero__bg {
    position: absolute !important;
    background:
      linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.65) 100%),
      url("assets/hero.png") 68% center / cover no-repeat;
  }
  .hero__title, .hero__lead, .hero__btn1, .hero__btn2 { position: relative !important; }
  .hero > *, .card > *, .prayer__card > *, .sec > * { left: auto; top: auto; }
  .hero > .hero__bg, .card > .card__media, .card > .card__shade { inset: 0; }
  .hero__title { font-size: 56px; }
  .hero__lead { font-size: 20px; margin-bottom: 16px; }

  .miracles { display: flex; flex-direction: column; gap: 40px; }
  .card { position: relative !important; width: 100% !important; max-width: 463px; aspect-ratio: 463 / 629; height: auto !important; order: 2; padding: 28px; display: flex; flex-wrap: wrap; align-content: flex-end; gap: 12px; }
  .card__media, .card__shade { position: absolute; }
  .progress { order: 3; width: 100% !important; max-width: 463px; height: 6px !important; margin-top: -24px; }
  .card__title, .card__btn1, .card__btn2 { position: relative !important; }
  .card__title { width: 100% !important; font-size: 28px; }
  .list li { height: auto; padding: 18px 0; border-bottom: 1px solid var(--line); }
  .list li::after { display: none; }
  .list button { font-size: 18px; white-space: normal; }

  .prayer__card { position: relative !important; width: 100% !important; height: auto !important; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; padding-top: 48px; border-radius: 13px; }
  .prayer__title, .prayer__btn { margin-left: 28px; }
  .prayer__img { width: 100% !important; height: 320px !important; }

  .corpus { text-align: center; padding-bottom: 0; }
  .corpus__latin { font-size: 64px; }
  .corpus__pt { font-size: 16px; margin-top: 12px; }
  .corpus__img { width: 100% !important; margin-top: -40px; }

  .churches { display: flex; flex-direction: column; gap: 16px; }
  .churches__sub { text-align: left; margin-bottom: 24px; }
  .map { position: relative !important; width: 100% !important; height: 260px !important; border-radius: 13px; }
  .map__btn { position: absolute !important; top: 12px; right: 12px; left: auto; padding: 8px 14px; font-size: 14px; gap: 6px; }

  .footer { padding-top: 88px; }
  .footer__links { gap: 40px; }
}
