/* Natal Solidário · Morada Verde */

:root {
  --green-ink: #0c241c;
  --green-deep: #143529;
  --leaf: #3d8f6e;
  --gold: #c9a24a;
  --gold-soft: #e4c878;
  --paper: #f6faf7;
  --ink: #12201a;
  --muted: rgba(18, 32, 26, 0.68);
  --white: #ffffff;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Sora", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-booting {
  overflow: hidden;
}

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

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

/* ——— Intro veil (brief cinematic lift) ——— */

.intro-veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(61, 143, 110, 0.18), transparent 62%),
    linear-gradient(180deg, #0c241c 0%, #143529 55%, #0c241c 100%);
  opacity: 1;
  transform: scale(1);
  transition: opacity 1.05s var(--ease-out), transform 1.2s var(--ease-out);
}

body.is-ready .intro-veil {
  opacity: 0;
  transform: scale(1.04);
}

body.is-ready .intro-veil {
  visibility: hidden;
  transition:
    opacity 1.05s var(--ease-out),
    transform 1.2s var(--ease-out),
    visibility 0s linear 1.1s;
}

/* ——— Hero ——— */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  color: var(--white);
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  will-change: transform;
}

.hero__media picture,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__media img {
  object-fit: cover;
  object-position: center 35%;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.2s var(--ease-out), transform 3.6s var(--ease-out);
}

.hero__media img.is-active,
.hero__media picture:has(img.is-active) {
  z-index: 1;
}

body.is-ready .hero__media img.is-active {
  opacity: 1;
  transform: scale(1);
  animation: hero-kenburns 12s var(--ease-out) forwards;
}

@keyframes hero-kenburns {
  from {
    transform: scale(1.1) translate3d(0, 1.5%, 0);
  }
  to {
    transform: scale(1.02) translate3d(0, -1.5%, 0);
  }
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      rgba(12, 36, 28, 0.25) 0%,
      rgba(12, 36, 28, 0.15) 35%,
      rgba(12, 36, 28, 0.72) 72%,
      rgba(12, 36, 28, 0.92) 100%
    ),
    radial-gradient(
      ellipse 80% 55% at 70% 20%,
      rgba(61, 143, 110, 0.22),
      transparent 60%
    );
  opacity: 0;
  transition: opacity 1.2s var(--ease-out) 0.2s;
}

body.is-ready .hero__veil {
  opacity: 1;
}

.hero__content {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4.5rem, 12vh, 6rem) 0 clamp(2.5rem, 6vh, 3.5rem);
}

/* Staged hero reveal: brand → headline → lead → CTA → date */
.stage {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.95s var(--ease-out), transform 0.95s var(--ease-out);
}

body.is-ready .stage[data-stage="1"] {
  transition-delay: 0.45s;
  opacity: 1;
  transform: translateY(0);
}
body.is-ready .stage[data-stage="2"] {
  transition-delay: 0.72s;
  opacity: 1;
  transform: translateY(0);
}
body.is-ready .stage[data-stage="3"] {
  transition-delay: 0.95s;
  opacity: 1;
  transform: translateY(0);
}
body.is-ready .stage[data-stage="4"] {
  transition-delay: 1.15s;
  opacity: 1;
  transform: translateY(0);
}
body.is-ready .stage[data-stage="5"] {
  transition-delay: 1.32s;
  opacity: 1;
  transform: translateY(0);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 1.35rem;
}

.brand__event {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.35rem, 9vw, 5.2rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  font-optical-sizing: auto;
}

.brand__place {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.85rem, 2.4vw, 1.15rem);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-top: 0.55rem;
}

.hero__headline {
  position: relative;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.25rem, 4.2vw, 2.05rem);
  line-height: 1.28;
  max-width: 20ch;
  margin-bottom: 0.85rem;
  min-height: 3.6em;
}

.hero__line {
  position: absolute;
  inset: 0 auto auto 0;
  max-width: 20ch;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(2px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out),
    filter 0.9s var(--ease-out);
  pointer-events: none;
}

.hero__line.is-active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  position: relative;
  pointer-events: auto;
}

.hero__lead {
  font-size: clamp(0.95rem, 2.6vw, 1.05rem);
  font-weight: 300;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 1.75rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.45rem;
  border-radius: 999px;
  transition: transform 0.25s var(--ease-out), background 0.25s ease,
    color 0.25s ease, box-shadow 0.25s ease;
}

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

.btn--primary {
  background: var(--gold);
  color: var(--green-ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.btn--primary:hover {
  background: var(--gold-soft);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.75);
}

.hero__date {
  margin-top: 1.6rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

/* ——— Scroll presence ——— */

.reveal-item {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.95s var(--ease-out), transform 0.95s var(--ease-out);
}

.reveal-section.is-inview .reveal-item {
  opacity: 1;
  transform: translateY(0);
}

.reveal-section.is-inview .reveal-item:nth-child(2) {
  transition-delay: 0.12s;
}

.cinema.reveal-item .cinema__frame {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal-section.is-inview .cinema.reveal-item .cinema__frame {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.reveal-section.is-inview .cinema__frame--a {
  transition-delay: 0.08s;
}
.reveal-section.is-inview .cinema__frame--b {
  transition-delay: 0.18s;
}
.reveal-section.is-inview .cinema__frame--c {
  transition-delay: 0.26s;
}
.reveal-section.is-inview .cinema__frame--d {
  transition-delay: 0.34s;
}

/* ——— Moments / cinematic gallery ——— */

.moments {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  background:
    radial-gradient(ellipse 70% 60% at 8% 0%, rgba(61, 143, 110, 0.1), transparent 55%),
    linear-gradient(180deg, #e8f1ec 0%, var(--paper) 40%, var(--paper) 100%);
}

.moments__head {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 1.75rem;
}

.moments__head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  letter-spacing: -0.02em;
  color: var(--green-ink);
}

.moments__head p {
  margin-top: 0.55rem;
  color: var(--muted);
  max-width: 38ch;
  font-size: clamp(0.95rem, 2.4vw, 1.05rem);
  font-weight: 300;
}

.cinema {
  width: min(1180px, calc(100% - 1.25rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr 0.9fr 1fr;
  grid-template-rows: minmax(220px, 34vh) minmax(200px, 30vh);
  gap: 0.65rem;
  min-height: min(68vh, 640px);
}

.cinema__frame {
  position: relative;
  overflow: hidden;
  background: var(--green-deep);
  border-radius: 2px;
}

.cinema__frame picture,
.cinema__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cinema__frame img {
  object-fit: cover;
  opacity: 0;
  transform: scale(1.07);
  transition: opacity 1.15s var(--ease-out), transform 3.6s var(--ease-out);
}

.cinema__frame img.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.cinema__frame picture:has(img.is-active) {
  z-index: 1;
}

.cinema__frame--a {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.cinema__frame--b {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}

.cinema__frame--c {
  grid-column: 3 / 4;
  grid-row: 1 / 2;
}

.cinema__frame--d {
  grid-column: 2 / 4;
  grid-row: 2 / 3;
}

/* ——— Feature band ——— */

.feature {
  position: relative;
  min-height: min(68vh, 580px);
  display: grid;
  place-items: end start;
  color: var(--white);
  isolation: isolate;
  margin-top: 0.65rem;
}

.feature__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.feature__media picture,
.feature__media img {
  width: 100%;
  height: 100%;
}

.feature__media img {
  object-fit: cover;
  object-position: center 25%;
  transform: scale(1.06);
  transition: transform 1.4s var(--ease-out);
}

.feature.is-inview .feature__media img {
  transform: scale(1);
}

.feature__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    rgba(12, 36, 28, 0.88) 0%,
    rgba(12, 36, 28, 0.55) 45%,
    rgba(12, 36, 28, 0.2) 100%
  );
}

.feature__copy {
  width: min(560px, calc(100% - 2rem));
  margin: 0 0 3rem max(1rem, calc((100% - 1180px) / 2 + 1rem));
}

.feature__copy h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.45rem, 4.2vw, 2.35rem);
  line-height: 1.25;
  max-width: 16ch;
}

.feature__copy p {
  margin-top: 0.85rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.8);
  max-width: 32ch;
  font-size: clamp(0.95rem, 2.4vw, 1.05rem);
}

/* ——— Donate / PIX ——— */

.donate {
  padding: clamp(3.5rem, 9vw, 6.5rem) 1rem;
  background:
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(201, 162, 74, 0.14), transparent 50%),
    linear-gradient(165deg, var(--green-ink) 0%, var(--green-deep) 48%, #1a4334 100%);
  color: var(--white);
}

.donate__inner {
  width: min(960px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.75rem, 5vw, 3.5rem);
  align-items: center;
}

.donate__copy h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.85rem, 5vw, 2.85rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.donate__copy > p {
  margin-top: 0.9rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.78);
  max-width: 34ch;
  font-size: clamp(0.95rem, 2.4vw, 1.05rem);
}

.pix-key {
  margin-top: 1.75rem;
  display: grid;
  gap: 0.65rem;
}

.pix-key__label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.pix-key__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: stretch;
}

.pix-key__value {
  flex: 1 1 200px;
  font-family: var(--font-body);
  font-size: clamp(0.82rem, 2.4vw, 0.98rem);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--white);
  padding: 0.9rem 1rem;
  border-radius: 12px;
  word-break: break-all;
}

.btn--copy {
  background: var(--gold);
  color: var(--green-ink);
  border-radius: 12px;
  padding-inline: 1.2rem;
  min-height: 48px;
}

.btn--copy:hover {
  background: var(--gold-soft);
}

.btn--copy.is-copied {
  background: #145239;
  color: #ffffff;
}

.pix-key__hint {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}

.donate__qr {
  justify-self: center;
  background: var(--white);
  border-radius: 20px;
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  text-align: center;
  max-width: min(300px, 86vw);
  width: 100%;
}

.donate.is-inview .donate__qr {
  transition-delay: 0.15s;
}

.donate__qr img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.donate__qr figcaption {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ——— Footer ——— */

.site-footer {
  padding: 1.5rem 1rem 2rem;
  background: var(--green-ink);
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  font-size: 0.82rem;
}

.site-footer strong {
  color: var(--gold-soft);
  font-weight: 500;
}

/* ——— Responsive ——— */

@media (max-width: 860px) {
  .cinema {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(210px, 32vw) minmax(180px, 28vw) minmax(200px, 36vw);
    min-height: 0;
    gap: 0.5rem;
  }

  .cinema__frame--a {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
  }

  .cinema__frame--b {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }

  .cinema__frame--c {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
  }

  .cinema__frame--d {
    grid-column: 1 / 3;
    grid-row: 3 / 4;
  }

  .donate__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .donate__copy > p {
    margin-inline: auto;
  }

  .pix-key__row {
    justify-content: center;
  }

  .donate__qr {
    max-width: min(260px, 72vw);
  }

  .feature__veil {
    background: linear-gradient(
      180deg,
      rgba(12, 36, 28, 0.3) 0%,
      rgba(12, 36, 28, 0.88) 100%
    );
  }

  .feature__copy {
    margin: 0 1rem 2.25rem;
  }

  .hero__cta {
    width: 100%;
  }

  .hero__cta .btn {
    flex: 1 1 auto;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .hero__content {
    padding-bottom: 2.25rem;
  }

  .hero__headline {
    min-height: 4.2em;
    max-width: 22ch;
  }

  .hero__line {
    max-width: 22ch;
  }

  .brand__place {
    letter-spacing: 0.2em;
  }

  .cinema {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 0.45rem;
  }

  .cinema__frame--a,
  .cinema__frame--b,
  .cinema__frame--c,
  .cinema__frame--d {
    grid-column: 1;
    grid-row: auto;
    min-height: 42vw;
    aspect-ratio: 5 / 4;
  }

  .cinema__frame--a {
    aspect-ratio: 4 / 5;
    min-height: 58vw;
  }

  .btn {
    padding: 0.9rem 1.2rem;
    font-size: 0.9rem;
  }

  .pix-key__row {
    flex-direction: column;
  }

  .btn--copy {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .intro-veil {
    display: none;
  }

  body.is-booting {
    overflow: auto;
  }

  .hero__media img,
  .cinema__frame img,
  .feature__media img {
    transform: none !important;
    opacity: 1 !important;
  }

  .stage,
  .reveal-item,
  .cinema__frame {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero__line {
    position: relative;
    opacity: 0;
    filter: none;
  }

  .hero__line.is-active {
    opacity: 1;
  }
}

/* Hero secondary CTA: desktop QR vs mobile copy */
.hero__cta-mobile {
  display: none;
}

@media (max-width: 520px) {
  .hero__cta-desktop {
    display: none;
  }

  .hero__cta-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Foto do topo não invade a próxima seção */
.hero {
  overflow: clip;
}
.moments {
  position: relative;
  z-index: 1;
}

@media (max-width: 520px) {
  .pix-key__value {
    flex: 0 0 auto;
    text-align: center;
    padding: 1rem;
  }
}
