/* =====================================================================
   Semana da Família 2026 · Paróquia São Francisco de Assis
   Uma exposição fotográfica editorial.
   ===================================================================== */

:root {
  --bg: #16110d;          /* espresso profundo */
  --bg-2: #1c1510;
  --panel: #211812;
  --ink: #ece3d3;         /* marfim quente */
  --muted: #a0907c;
  --faint: #8b7a66;
  --line: rgba(236, 227, 211, 0.13);
  --line-strong: rgba(236, 227, 211, 0.22);
  --gold: #c9a468;        /* luz de vela */
  --gold-dim: rgba(201, 164, 104, 0.35);

  --serif: "Fraunces", "Garamond", "Georgia", "Times New Roman", serif;
  --medieval: "Uncial Antiqua", "Palatino Linotype", "Book Antiqua", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;

  --gap: 16px;
  --auto-row: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--gold); color: #18130c; }

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

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

svg { display: block; }

:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 3px; }

/* ---------- barra de progresso ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: var(--line); pointer-events: none;
}
.progress span {
  display: block; width: 0; height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  transition: width 60ms linear;
}

/* ---------- cabeçalho ---------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  color: var(--ink);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-head.is-sunk {
  background: rgba(22, 17, 13, 0.85);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.site-head__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
}
.wordmark {
  display: flex; align-items: center; gap: 12px; line-height: 1.1;
  min-width: 0;
}
.wordmark__logo {
  width: 62px; height: 62px; flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 9px rgba(0, 0, 0, 0.32));
  transition: transform 0.35s var(--ease), filter 0.35s var(--ease);
}
.wordmark:hover .wordmark__logo {
  transform: rotate(-3deg) scale(1.06);
  filter: drop-shadow(0 5px 11px rgba(201, 164, 104, 0.24));
}
.wordmark__text { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.wordmark__kicker {
  font-size: 9px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
.wordmark__name { font-family: var(--serif); font-size: 21px; letter-spacing: 0.01em; }
.site-head__meta { display: flex; align-items: center; gap: 22px; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; }
.meta-index { color: var(--ink); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; transition: color 0.3s, border-color 0.3s; }
.meta-index:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  padding: 120px clamp(22px, 5vw, 64px) 64px;
  overflow: hidden;
}
.hero__backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 78% 12%, rgba(201, 164, 104, 0.07), transparent 52%),
    radial-gradient(130% 100% at 10% 100%, rgba(60, 35, 18, 0.32), transparent 60%),
    var(--bg);
}
.hero__backdrop::after {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(105deg, transparent 0 46px, rgba(236, 227, 211, 0.015) 46px 47px);
}

.hero__text { position: relative; max-width: 30ch; }

.eyebrow {
  font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--gold); font-weight: 500;
}
.hero__sub { margin-top: 22px; font-size: clamp(15px, 1.6vw, 19px); letter-spacing: 0.02em; }
.hero__lede { margin-top: 16px; color: var(--muted); font-size: clamp(13px, 1.25vw, 15px); line-height: 1.75; }

.hero__title {
  width: min(100%, 460px);
  font-family: var(--medieval);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 62px);
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin-top: 18px;
  text-shadow: 0 5px 28px rgba(0, 0, 0, 0.26);
}
.hero__title span,
.hero__title em { display: block; }
.hero__title em {
  margin-top: 0.1em;
  font-style: normal; color: var(--gold);
}
.hero__title-art {
  width: min(100%, 460px);
  margin: 10px 0 0;
  overflow: hidden;
  border: 1px solid rgba(201, 164, 104, 0.52);
  box-shadow: 0 18px 38px -24px rgba(0, 0, 0, 0.85);
}
.hero__title-art img {
  display: block;
  width: 100%;
  height: auto;
}

.hero__scroll {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: 40px;
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}
.hero__scroll:hover { color: var(--gold); }
.hero__scroll-line {
  width: 42px; height: 1px; background: var(--line-strong); position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ""; position: absolute; inset: 0;
  background: var(--gold);
  transform: translateX(-100%);
  animation: drip 3.2s var(--ease) infinite;
}
@keyframes drip { 0% { transform: translateX(-100%); } 55% { transform: translateX(0); } 100% { transform: translateX(100%); } }

/* visor vertical */
.viewport { position: relative; justify-self: center; width: min(34vw, 400px); }
.viewport__frame {
  position: relative; width: 100%;
  aspect-ratio: 464 / 832;
  background: #0d0a06;
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.75);
}
.viewport__video { width: 100%; height: 100%; border: 0; }

.viewport__corner {
  position: absolute; width: 26px; height: 26px; pointer-events: none;
  opacity: 0.9;
}
.viewport__corner--tl { top: -7px; left: -7px; border-top: 1.5px solid var(--gold); border-left: 1.5px solid var(--gold); }
.viewport__corner--tr { top: -7px; right: -7px; border-top: 1.5px solid var(--gold); border-right: 1.5px solid var(--gold); }
.viewport__corner--bl { bottom: -7px; left: -7px; border-bottom: 1.5px solid var(--gold); border-left: 1.5px solid var(--gold); }
.viewport__corner--br { bottom: -7px; right: -7px; border-bottom: 1.5px solid var(--gold); border-right: 1.5px solid var(--gold); }

.viewport__caption {
  position: absolute; left: 0; width: 100%;
  bottom: -34px;
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--muted);
}
.viewport__mark { color: var(--gold); }
.viewport__dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
  animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }

/* ---------- TOC / índices ---------- */
.toc {
  padding: clamp(70px, 10vw, 140px) clamp(22px, 5vw, 64px) clamp(30px, 5vw, 70px);
  border-top: 1px solid var(--line);
}
.toc__head { max-width: 560px; margin-bottom: clamp(34px, 5vw, 60px); }
.toc__title {
  font-family: var(--serif); font-weight: 320; font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.05; margin-top: 14px;
}
.toc__title em { font-style: italic; color: var(--gold); }
.toc__lede { margin-top: 16px; color: var(--muted); font-size: clamp(13px, 1.3vw, 15px); max-width: 46ch; }

.toc__list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 48px; }
.toc-row {
  display: flex; align-items: baseline; gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.3s, padding-left 0.35s var(--ease);
}
.toc:hover .toc-row { border-color: var(--line-strong); }
.toc-row:hover { padding-left: 10px; border-color: var(--gold) !important; }
.toc-row__num { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 15px; width: 18px; }
.toc-row__name { font-family: var(--serif); font-size: 21px; font-weight: 360; }
.toc-row__date { margin-left: auto; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

/* ---------- capítulos-dia ---------- */
.chapter { padding: clamp(56px, 8vw, 110px) clamp(22px, 5vw, 64px); }
.chapter:nth-of-type(even) { background: var(--bg-2); }
.chapter__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 18px 24px;
  margin-bottom: clamp(26px, 4vw, 48px);
}
.chapter__num {
  font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--gold);
  border-right: 1px solid var(--line-strong); padding-right: 22px; line-height: 1;
}
.chapter__name { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 44px); font-weight: 330; line-height: 1; }
.chapter__date { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.chapter__count { margin-left: auto; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.chapter__intro {
  max-width: 66ch;
  margin: calc(-1 * clamp(6px, 1vw, 12px)) 0 clamp(30px, 4vw, 48px);
  padding-left: 20px;
  border-left: 2px solid var(--gold);
  color: var(--muted);
  font-size: clamp(15px, 1.45vw, 18px);
  line-height: 1.75;
}
.chapter__intro strong { color: var(--text); font-weight: 500; }

/* ---------- grade editorial ---------- */
.ed-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: var(--auto-row);
  grid-auto-flow: dense;
  column-gap: var(--gap);
  row-gap: var(--gap);
}

/* ---------- tile ---------- */
.tile, .tile__link { display: block; }
.tile { position: relative; overflow: hidden; background: var(--panel); cursor: zoom-in; }
.tile img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease), filter 0.8s;
  will-change: transform;
}
.tile:hover img { transform: scale(1.045); }
.tile--lead { box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.8); }

.tile__veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(10, 7, 4, 0.62));
  opacity: 0; transition: opacity 0.5s;
}
.tile__meta {
  position: absolute; left: 16px; right: 16px; bottom: 14px;
  display: flex; align-items: center; gap: 10px;
  pointer-events: none;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: #f2ead9;
}
.tile__meta-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.tile:hover .tile__veil { opacity: 1; }
.tile:hover .tile__meta { opacity: 1; transform: translateY(0); }

@media (hover: none) {
  .tile__veil, .tile__meta { opacity: 0; }
}

/* wants o foco visível no tile */
.tile:focus-visible img { transform: scale(1.045); }

/* ---------- encerramento ---------- */
.closing {
  border-top: 1px solid var(--line);
  padding: clamp(80px, 12vw, 170px) clamp(22px, 5vw, 64px) 0;
  text-align: center;
}
.closing__inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.closing__ornament {
  width: 64px; height: 1px; background: var(--gold);
  position: relative; margin-bottom: 30px;
}
.closing__ornament::before, .closing__ornament::after {
  content: ""; position: absolute; top: -3px; width: 7px; height: 7px; border: 1px solid var(--gold);
  transform: rotate(45deg);
}
.closing__ornament::before { left: -16px; }
.closing__ornament::after { right: -16px; }
.closing__title {
  font-family: var(--serif); font-weight: 320; font-size: clamp(30px, 4.6vw, 60px);
  line-height: 1.08;
}
.closing__title em { font-style: italic; color: var(--gold); }
.closing__text { margin-top: 26px; color: var(--muted); font-size: clamp(13px, 1.3vw, 15.5px); line-height: 1.8; max-width: 52ch; }
.closing__drive { margin-top: 34px; font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); }
.closing__top { margin-top: 46px; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-strong); padding-bottom: 4px; transition: color 0.3s, border-color 0.3s; }
.closing__top:hover { color: var(--gold); border-color: var(--gold); }

.site-foot {
  margin-top: clamp(60px, 9vw, 120px);
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  padding: 26px clamp(22px, 5vw, 64px);
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint);
}

/* ================= LIGHTBOX ================= */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s var(--ease);
  color: var(--ink);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__backdrop {
  position: absolute; inset: 0;
  background: rgba(14, 10, 7, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.lightbox__stage { position: relative; z-index: 1; display: grid; place-items: center; width: 100%; height: 100%; padding: 40px clamp(40px, 10vw, 120px) 90px; }
.lightbox__figure { display: grid; place-items: center; max-width: 100%; max-height: 100%; }
.lightbox__figure img {
  max-width: min(92vw, 1500px);
  max-height: 76vh;
  object-fit: contain;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
  animation: lbIn 0.45s var(--ease);
}
.lightbox.is-prev .lightbox__figure img { animation: lbInPrev 0.45s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: scale(0.965); } to { opacity: 1; transform: scale(1); } }
@keyframes lbInPrev { from { opacity: 0; transform: scale(0.965) translateX(10px); } to { opacity: 1; transform: scale(1); } }

.lightbox__btn {
  z-index: 2;
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.lightbox__btn:hover { border-color: var(--gold); color: var(--gold); background: rgba(201, 164, 104, 0.08); }

.lightbox__close { position: absolute; top: 22px; right: 22px; }
.lightbox__prev { position: absolute; left: clamp(10px, 3vw, 34px); top: 50%; transform: translateY(-50%); }
.lightbox__next { position: absolute; right: clamp(10px, 3vw, 34px); top: 50%; transform: translateY(-50%); }

.lightbox__ui {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 20px;
  padding: 18px clamp(22px, 4vw, 48px) 22px;
}
.lightbox__counter { font-size: 11px; letter-spacing: 0.18em; color: var(--gold); font-variant-numeric: tabular-nums; }
.lightbox__caption {
  font-family: var(--serif); font-style: italic;
  color: var(--muted); font-size: 15px; text-align: center; flex: 1;
}
.lightbox__tools { display: flex; gap: 10px; }
.lightbox__tool { width: 40px; height: 40px; }

.lightbox__progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--line);
}
.lightbox__progress span {
  display: block; height: 100%; width: 0;
  background: var(--gold);
}

/* ================= REVEAL ================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 130ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* tiles surgem durante o scroll */
.tile { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.tile.is-in { opacity: 1; transform: none; }

/* ================= RESPONSIVO ================= */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 56px; padding-top: 130px; align-content: start; }
  .hero__text { max-width: none; }
  .hero__title { font-size: clamp(32px, 6.5vw, 54px); }
  .viewport { width: min(300px, 62vw); }
}

@media (max-width: 820px) {
  :root { --gap: 12px; }
  .hero__title { font-size: clamp(30px, 8.5vw, 46px); }
  .wordmark__logo { width: 52px; height: 52px; }
  .wordmark__kicker { font-size: 8px; letter-spacing: 0.21em; }
  .wordmark__name { font-size: 17px; }
  .viewport__caption { bottom: -30px; }
}

@media (max-width: 700px) {
  .ed-grid { display: block; }
  .tile, .tile--lead, .tile img { position: relative; }
  .tile { margin-bottom: var(--gap); }
  .tile img { position: absolute; inset: 0; }
  .chapter__count { display: none; }
  .viewport { width: min(288px, 74vw); }
  .lightbox__caption { display: none; }
  .lightbox__ui { justify-content: space-between; }
  .site-foot { flex-direction: column; align-items: center; text-align: center; gap: 6px; }
}

/* ================= MOVIMENTO REDUZIDO ================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .tile { opacity: 1; transform: none; }
}


/* ---------- acervo de eventos ---------- */
.archive { padding: clamp(70px, 10vw, 130px) clamp(22px, 5vw, 64px); background: var(--panel); border-top: 1px solid var(--line); }
.archive__head { max-width: 560px; }
.archive__head h2 { margin-top: 14px; font-family: var(--serif); font-weight: 320; font-size: clamp(30px, 4.4vw, 54px); line-height: 1.05; }
.archive__head h2 em { color: var(--gold); }
.archive__head p:last-child { margin-top: 16px; color: var(--muted); }
.event-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; list-style: none; margin-top: clamp(30px, 5vw, 54px); }
.event-card { display: grid; grid-template-columns: auto 1fr; gap: 3px 16px; align-items: baseline; padding: 20px; border: 1px solid var(--line-strong); background: rgba(22,17,13,.3); transition: transform .35s var(--ease), border-color .35s, background .35s; }
.event-card:hover, .event-card:focus-visible, .event-card.is-current { border-color: var(--gold); background: rgba(201,164,104,.08); transform: translateY(-3px); }
.event-card__year { grid-row: span 2; font-family: var(--serif); color: var(--gold); font-size: 24px; font-style: italic; }
.event-card__title { font-family: var(--serif); font-size: 22px; }
.event-card__meta { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }


/* ---------- galeria simples de álbum ---------- */
.is-simple-album .reveal { opacity: 1; transform: none; transition: none; }
.is-simple-album .hero { min-height: min(52vh, 560px); grid-template-columns: 1fr; padding-bottom: 72px; }
.is-simple-album .hero__text { max-width: 680px; }
.is-simple-album .hero__sub { color: var(--muted); }
.simple-gallery { columns: 3 240px; column-gap: var(--gap); padding: clamp(48px, 7vw, 96px) clamp(22px, 5vw, 64px); background: var(--bg-2); }
.simple-gallery__item { display: block; break-inside: avoid; margin: 0 0 var(--gap); border: 1px solid transparent; background: var(--panel); }
.simple-gallery__item:hover, .simple-gallery__item:focus-visible { border-color: var(--gold); }
.simple-gallery__item img { width: 100%; height: auto; transition: none; }
@media (max-width: 700px) { .is-simple-album .hero { min-height: 360px; padding-top: 120px; } .simple-gallery { columns: 2 150px; } }


.lightbox__delete, .simple-gallery__delete { border-radius: 0; width: auto; padding: 0 12px; color: #e8b3a7; border-color: rgba(232,179,167,.42); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.lightbox__delete:hover, .simple-gallery__delete:hover { color: #fff1ec; border-color: #e8b3a7; background: rgba(232,179,167,.12); }
.simple-gallery__cell { position: relative; break-inside: avoid; margin: 0 0 var(--gap); }
.simple-gallery__cell .simple-gallery__item { margin: 0; }
.simple-gallery__delete { position: absolute; right: 8px; top: 8px; height: 32px; background: rgba(22,17,13,.82); }


/* ---------- página do acervo ---------- */
.archive-page-main { min-height: 100vh; padding-top: 92px; }
.archive--standalone { min-height: calc(100vh - 92px); display: grid; align-content: center; }
.archive--standalone .archive__head h1 { margin-top: 14px; font-family: var(--serif); font-weight: 320; font-size: clamp(34px, 5vw, 66px); line-height: 1.04; }
.archive--standalone .archive__head h1 em { color: var(--gold); font-style: italic; }


/* ---------- respeito ao atributo hidden ---------- */
[hidden] { display: none !important; }
