/* =========================================================
   Assembleia de Deus · Jardim Tarumã
   Direção: "Pórtico de Luz"
   Paleta tirada do próprio prédio: estuque marfim, verde-vitral,
   dourado do letreiro, violeta dos vitrais.
   ========================================================= */

:root {
  /* Núcleo — tirado da fachada */
  --paper: oklch(0.957 0.016 82);
  --paper-2: oklch(0.925 0.02 80);
  --line: oklch(0.86 0.018 80);
  --ink: oklch(0.27 0.022 165);
  --muted: oklch(0.47 0.022 168);

  --sanctuary: oklch(0.32 0.045 168);
  --sanctuary-deep: oklch(0.235 0.038 170);
  --green: oklch(0.48 0.06 168);

  --gold: oklch(0.73 0.105 82);
  --gold-lit: oklch(0.86 0.095 88);
  --gold-soft: oklch(0.9 0.055 85);
  --violet: oklch(0.47 0.052 312);

  --on-dark: oklch(0.94 0.018 82);
  --on-dark-soft: oklch(0.82 0.025 90);

  /* Aliases de compatibilidade (páginas de departamento) */
  --white: oklch(1 0 0);
  --bg: var(--paper);
  --surface: var(--paper-2);
  --primary: var(--green);
  --primary-deep: var(--sanctuary);
  --accent: var(--gold);
  --accent-soft: var(--gold-soft);
  --shadow: 0 28px 60px -34px oklch(0.2 0.03 168 / 0.55);

  --radius: 16px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;

  --pad-x: clamp(1.15rem, 5vw, 6rem);
  --maxw: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Tipografia utilitária ---------- */

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
}

.eyebrow-light {
  color: var(--gold);
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 0.7rem var(--pad-x);
  background: oklch(0.957 0.016 82 / 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand img {
  width: clamp(118px, 16vw, 168px);
  height: auto;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.header-nav a {
  position: relative;
  padding: 0.25rem 0;
  color: var(--ink);
  text-decoration: none;
}

.header-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--gold);
  transition: width 240ms ease;
}

.header-nav a:hover::after,
.header-nav a:focus-visible::after {
  width: 100%;
}

/* =========================================================
   BOTÕES
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 50px;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 200ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 200ms ease,
    background-color 200ms ease,
    color 200ms ease,
    border-color 200ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(180deg, var(--gold-lit), var(--gold));
  color: oklch(0.27 0.04 80);
  box-shadow: 0 14px 30px -16px oklch(0.5 0.1 82 / 0.8);
}

.btn-gold:hover {
  box-shadow: 0 20px 38px -16px oklch(0.5 0.1 82 / 0.95);
}

.btn-ghost {
  background: transparent;
  color: var(--on-dark);
  border-color: oklch(1 0 0 / 0.3);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-lit);
}

.btn-line {
  background: transparent;
  color: var(--on-dark);
  border-color: oklch(1 0 0 / 0.32);
}

.btn-line:hover {
  border-color: var(--gold);
  color: var(--gold-lit);
}

/* =========================================================
   HERO — O PÓRTICO
   ========================================================= */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.3rem;
  padding: clamp(2.6rem, 6vw, 5rem) var(--pad-x) clamp(3rem, 6vw, 5.5rem);
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -8%, oklch(0.4 0.05 172) 0%, transparent 55%),
    linear-gradient(180deg, var(--sanctuary) 0%, var(--sanctuary-deep) 100%);
  color: var(--on-dark);
}

.hero-aurora {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 90%;
  z-index: -1;
  background:
    radial-gradient(closest-side at 50% 38%, oklch(0.78 0.09 86 / 0.22), transparent 70%),
    radial-gradient(closest-side at 30% 20%, oklch(0.7 0.07 230 / 0.16), transparent 70%);
  filter: blur(8px);
  animation: aurora 14s ease-in-out infinite alternate;
}

.hero-eyebrow {
  animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-title {
  font-size: clamp(3.4rem, 12vw, 7.2rem);
  line-height: 0.9;
  color: var(--on-dark);
  animation: rise 760ms cubic-bezier(0.22, 1, 0.36, 1) 70ms both;
}

.hero-title span {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--gold-lit);
}

.hero-lead {
  max-width: 46ch;
  margin: 0;
  color: var(--on-dark-soft);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  text-wrap: pretty;
  animation: rise 800ms cubic-bezier(0.22, 1, 0.36, 1) 150ms both;
}

/* O pórtico em si */
.portal {
  position: relative;
  margin: clamp(0.6rem, 2vw, 1.4rem) 0 0.4rem;
  animation: portalReveal 1100ms cubic-bezier(0.22, 1, 0.36, 1) 220ms both;
}

.portal::before {
  content: "";
  position: absolute;
  inset: -14px;
  z-index: -1;
  border: 1px solid oklch(0.78 0.09 86 / 0.5);
  border-radius: 50% 50% 22px 22px / 30% 30% 6px 6px;
  animation: fadeIn 900ms ease 900ms both;
}

.portal-frame {
  position: relative;
  width: min(540px, 88vw);
  aspect-ratio: 1 / 1.12;
  overflow: hidden;
  border-radius: 50% 50% 18px 18px / 28% 28% 5% 5%;
  box-shadow:
    0 0 0 1.5px var(--gold),
    0 50px 90px -40px oklch(0.12 0.03 168 / 0.85);
}

.portal-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  animation: kenburns 26s ease-in-out infinite alternate;
}

.portal-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 38%,
    oklch(1 0 0 / 0.28) 50%,
    transparent 62%
  );
  transform: translateX(-130%);
  animation: sheen 7.5s ease-in-out 1.4s infinite;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0.4rem;
  animation: rise 820ms cubic-bezier(0.22, 1, 0.36, 1) 320ms both;
}

/* =========================================================
   FAIXAS GENÉRICAS
   ========================================================= */

.access,
.agenda,
.visit {
  padding: clamp(3rem, 6vw, 5.5rem) var(--pad-x);
  max-width: var(--maxw);
  margin-inline: auto;
}

.band-head {
  margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
}

.band-head h2 {
  margin-top: 0.5rem;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.02;
}

.band-sub {
  margin: 0.6rem 0 0;
  max-width: 50ch;
  color: var(--muted);
  font-size: 1.02rem;
}

/* =========================================================
   ACESSOS — três janelas em arco
   ========================================================= */

.window-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.6rem);
}

.window {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: clamp(1.5rem, 2.4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 150px 150px var(--radius) var(--radius);
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 280ms ease,
    border-color 280ms ease;
}

.window-glow {
  position: absolute;
  inset: -40% 0 auto 0;
  height: 70%;
  z-index: -1;
  background: radial-gradient(closest-side at 50% 0%, oklch(0.85 0.09 86 / 0.55), transparent 72%);
  opacity: 0;
  transition: opacity 320ms ease;
}

.window:hover,
.window:focus-visible {
  transform: translateY(-7px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

.window:hover .window-glow,
.window:focus-visible .window-glow {
  opacity: 1;
}

.window-icon {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--sanctuary);
  color: var(--gold-lit);
  transition: background-color 280ms ease, color 280ms ease, transform 280ms ease;
}

.window-icon svg {
  width: 28px;
  height: 28px;
}

.window:hover .window-icon,
.window:focus-visible .window-icon {
  background: var(--gold);
  color: oklch(0.27 0.04 80);
  transform: translateY(-2px);
}

.window-label {
  margin-top: 1.4rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.6vw, 2.15rem);
  font-weight: 500;
  line-height: 1;
  color: var(--sanctuary);
}

.window-copy {
  margin-top: 0.7rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.98rem;
  text-wrap: pretty;
}

.window-go {
  margin-top: auto;
  padding-top: 1.4rem;
  text-align: center;
  color: var(--green);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: color 240ms ease, letter-spacing 240ms ease;
}

.window:hover .window-go,
.window:focus-visible .window-go {
  color: var(--gold);
  letter-spacing: 0.06em;
}

/* =========================================================
   AGENDA — semana
   ========================================================= */

.week {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

.day {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.5rem 1.4rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}

.day::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--gold);
  opacity: 0.6;
}

.day-name {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.day-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.1;
  color: var(--sanctuary);
}

.day-time {
  margin-top: 0.3rem;
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}

.day-time span {
  font-size: 1.1rem;
  color: var(--muted);
}

.day-feature {
  background: linear-gradient(165deg, var(--sanctuary) 0%, var(--sanctuary-deep) 100%);
  border-color: transparent;
}

.day-feature::before {
  opacity: 1;
}

.day-feature .day-name {
  color: var(--gold-lit);
}

.day-feature .day-title,
.day-feature .day-time {
  color: var(--on-dark);
}

.day-feature .day-time span {
  color: var(--gold-soft);
}

/* =========================================================
   VISITA
   ========================================================= */

.visit-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  padding: clamp(1.8rem, 3.5vw, 2.8rem);
  border-radius: clamp(20px, 3vw, 28px);
  background:
    radial-gradient(120% 140% at 100% 0%, oklch(0.4 0.05 172) 0%, transparent 55%),
    linear-gradient(180deg, var(--sanctuary) 0%, var(--sanctuary-deep) 100%);
  color: var(--on-dark);
}

.visit-text h2 {
  margin-top: 0.5rem;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: var(--on-dark);
}

.visit-place {
  margin: 0.5rem 0 0;
  color: var(--on-dark-soft);
  font-size: 1.05rem;
}

.visit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.6rem, 3vw, 2.2rem) var(--pad-x);
  background: var(--sanctuary-deep);
  color: var(--on-dark-soft);
  border-top: 1px solid oklch(1 0 0 / 0.08);
}

.foot-brand {
  display: grid;
  gap: 0.15rem;
}

.foot-brand strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--on-dark);
}

.foot-links {
  display: flex;
  gap: 1.4rem;
}

.foot-links a {
  color: var(--on-dark-soft);
  font-weight: 700;
  text-decoration: none;
  transition: color 200ms ease;
}

.foot-links a:hover {
  color: var(--gold-lit);
}

/* =========================================================
   PÁGINAS DE DEPARTAMENTO
   ========================================================= */

.dept {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100svh - 72px);
  padding: clamp(2.6rem, 7vw, 5.5rem) var(--pad-x);
  overflow: hidden;
  background:
    radial-gradient(110% 80% at 12% 0%, oklch(0.4 0.05 172) 0%, transparent 55%),
    linear-gradient(180deg, var(--sanctuary) 0%, var(--sanctuary-deep) 100%);
  color: var(--on-dark);
}

.dept-aurora {
  position: absolute;
  inset: -20% auto auto -10%;
  width: 70%;
  height: 80%;
  z-index: -1;
  background: radial-gradient(closest-side at 30% 30%, oklch(0.78 0.09 86 / 0.18), transparent 70%);
  filter: blur(8px);
  animation: aurora 14s ease-in-out infinite alternate;
}

.dept-icon {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 1.6rem;
  border-radius: 50% 50% 14px 14px / 60% 60% 14px 14px;
  background: oklch(1 0 0 / 0.07);
  border: 1px solid oklch(0.78 0.09 86 / 0.4);
  color: var(--gold-lit);
  animation: rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dept-icon svg {
  width: 34px;
  height: 34px;
}

.dept h1 {
  max-width: 15ch;
  margin-bottom: 1rem;
  font-size: clamp(2.7rem, 8vw, 5rem);
  line-height: 0.96;
  color: var(--on-dark);
  animation: rise 760ms cubic-bezier(0.22, 1, 0.36, 1) 70ms both;
}

.dept h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-lit);
}

.dept-lead {
  max-width: 52ch;
  margin: 0;
  color: var(--on-dark-soft);
  font-size: clamp(1.02rem, 1.7vw, 1.18rem);
  text-wrap: pretty;
  animation: rise 800ms cubic-bezier(0.22, 1, 0.36, 1) 150ms both;
}

.dept-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid oklch(0.78 0.09 86 / 0.4);
  border-radius: 999px;
  color: var(--gold-lit);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  animation: rise 820ms cubic-bezier(0.22, 1, 0.36, 1) 240ms both;
}

.dept-chip svg {
  width: 15px;
  height: 15px;
}

.dept-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 2.4rem;
  color: var(--on-dark-soft);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 200ms ease, gap 200ms ease;
  animation: rise 840ms cubic-bezier(0.22, 1, 0.36, 1) 320ms both;
}

.dept-back:hover {
  color: var(--gold-lit);
  gap: 0.75rem;
}

/* =========================================================
   REVELAÇÃO AO ROLAR
   ========================================================= */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 720ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

.window-grid [data-reveal]:nth-child(2) {
  transition-delay: 90ms;
}

.window-grid [data-reveal]:nth-child(3) {
  transition-delay: 180ms;
}

.week [data-reveal]:nth-child(2) {
  transition-delay: 90ms;
}

.week [data-reveal]:nth-child(3) {
  transition-delay: 180ms;
}

/* =========================================================
   KEYFRAMES
   ========================================================= */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes portalReveal {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.965);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes sheen {
  0% {
    transform: translateX(-130%);
  }
  18%,
  100% {
    transform: translateX(230%);
  }
}

@keyframes kenburns {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.09);
  }
}

@keyframes aurora {
  from {
    transform: translateY(0) scale(1);
    opacity: 0.85;
  }
  to {
    transform: translateY(-12px) scale(1.06);
    opacity: 1;
  }
}

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 880px) {
  .window-grid,
  .week {
    grid-template-columns: 1fr;
  }

  .window {
    min-height: auto;
    border-radius: 120px 120px var(--radius) var(--radius);
  }

  .visit-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .visit-actions {
    width: 100%;
  }

  .visit-actions .btn {
    flex: 1;
  }
}

@media (max-width: 560px) {
  .header-nav {
    gap: 1rem;
    font-size: 0.84rem;
  }

  .hero-cta .btn {
    flex: 1;
  }
}

/* =========================================================
   MOVIMENTO REDUZIDO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .portal-sheen,
  .hero-aurora {
    display: none;
  }
}
