/* Premium US-nonprofit layer — cinematic Squarespace energy */
:root {
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 78px;
}

/* —— Preloader —— */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a121c;
  color: #fff;
  display: grid;
  place-items: center;
  transition: opacity 0.7s var(--ease-expo), visibility 0.7s;
}

.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
}

.preloader img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  animation: prePulse 1.4s ease-in-out infinite;
}

.preloader-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.8;
}

.preloader-bar {
  width: 120px;
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 1.25rem auto 0;
  overflow: hidden;
}

.preloader-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
  animation: preLoad 1.1s var(--ease-expo) forwards;
}

@keyframes prePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: 0.85; }
}

@keyframes preLoad {
  to { width: 100%; }
}

body.is-loading {
  overflow: hidden;
}

/* —— Header hide / show —— */
.site-header.is-hidden {
  transform: translateY(-110%);
}

.site-header {
  transition: transform 0.45s var(--ease-expo), background 0.35s, box-shadow 0.35s !important;
}

.brand img {
  transition: transform 0.5s var(--ease-expo);
}

.brand:hover img {
  transform: rotate(-8deg) scale(1.06);
}

/* —— Mega hero —— */
.hero--pro {
  min-height: 100vh;
  min-height: 100dvh;
}

.hero--pro .hero-media::after {
  background:
    linear-gradient(180deg, rgba(8,14,22,0.35) 0%, rgba(8,14,22,0.25) 40%, rgba(8,14,22,0.72) 100%),
    radial-gradient(ellipse at 50% 60%, transparent 0%, rgba(8,14,22,0.35) 100%);
}

.hero--pro .hero-brand {
  font-size: clamp(0.78rem, 1.4vw, 0.92rem);
  letter-spacing: 0.28em;
  margin-bottom: 2rem;
}

.hero--pro h1 {
  font-size: clamp(3.4rem, 11vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.92;
}

.hero-line {
  overflow: hidden;
  display: block;
}

.hero-line > span,
.hero-line--link {
  display: inline-block;
  transform: translateY(110%);
  animation: lineUp 1.1s var(--ease-expo) forwards;
}

.hero-line:nth-child(1) > span { animation-delay: 0.55s; }
.hero-line--link { animation-delay: 0.75s; }

@keyframes lineUp {
  to { transform: translateY(0); }
}

.hero-line--link {
  border-bottom: 0.08em solid rgba(255,255,255,0.4);
  margin-top: 0.08em;
}

.hero--pro .scroll-cue {
  bottom: 2rem;
  letter-spacing: 0.28em;
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* —— Statement band —— */
.statement {
  padding: clamp(4rem, 10vw, 7.5rem) 0;
  background: #0a121c;
  color: #fff;
  text-align: center;
}

.statement p {
  margin: 0 auto;
  max-width: 22ch;
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.statement span {
  display: block;
  margin-top: 1.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* —— Bleed split — solid, balanced, always visible —— */
.bleed-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: min(90vh, 720px);
  background: var(--white);
  align-items: stretch;
}

.bleed-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3.5rem, 7vw, 6rem) clamp(1.75rem, 5vw, 4.5rem);
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

.bleed-copy h2 {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
  max-width: 16ch;
  letter-spacing: -0.03em;
  clip-path: none !important;
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.bleed-copy .btn-row {
  align-items: center;
  gap: 1.25rem;
}

.bleed-media {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  clip-path: none !important;
}

.bleed-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transform: none !important;
  transition: transform 1.2s var(--ease-expo);
}

.bleed-media.is-in img,
.bleed-split:hover .bleed-media img {
  transform: scale(1.03);
}

/* —— Infinite photo rail —— */
.photo-rail {
  background: #fff;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  overflow: hidden;
  border-block: 1px solid var(--line);
}

.photo-rail-track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  animation: railMove 45s linear infinite;
}

.photo-rail:hover .photo-rail-track {
  animation-play-state: paused;
}

.photo-rail-track figure {
  margin: 0;
  width: min(42vw, 380px);
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
}

.photo-rail-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-expo);
}

.photo-rail-track figure:hover img {
  transform: scale(1.06);
}

@keyframes railMove {
  to { transform: translateX(-50%); }
}

/* —— CTA cinematic —— */
.cta-banner--pro {
  min-height: 90vh;
  display: grid;
  align-items: center;
  padding: 0;
}

.cta-banner--pro .bg img {
  transform: scale(1.08);
  transition: transform 8s linear;
}

.cta-banner--pro.is-in .bg img {
  transform: scale(1);
}

.cta-banner--pro h2 {
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  line-height: 0.95;
}

.cta-banner--pro .cta-sub {
  font-size: clamp(2.4rem, 6vw, 4.5rem) !important;
  font-weight: 600;
  opacity: 0.92;
}

/* —— Pillars pro —— */
.pillars--pro {
  min-height: 85vh;
}

.pillars--pro .pillar {
  min-height: 85vh;
  padding: 3rem 2rem;
  transition: flex 0.55s var(--ease-expo);
}

@media (min-width: 901px) {
  .pillars--pro {
    display: flex;
  }

  .pillars--pro .pillar {
    flex: 1;
    min-height: 85vh;
  }

  .pillars--pro .pillar:hover {
    flex: 1.45;
  }

  .pillars--pro .pillar p {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    transition: max-height 0.55s var(--ease-expo), opacity 0.4s, margin 0.4s;
  }

  .pillars--pro .pillar:hover p {
    max-height: 10rem;
    opacity: 0.92;
    margin-top: 0.75rem;
  }
}

.pillar-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 0.75rem;
}

/* —— Gallery mosaic upgrade —— */
.gallery-grid--pro {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 140px;
  gap: 0.5rem;
  width: min(100% - 1.25rem, 1400px);
  margin-inline: auto;
}

.gallery-grid--pro a {
  aspect-ratio: auto;
  grid-column: span 3;
  grid-row: span 2;
}

.gallery-grid--pro a:nth-child(1) {
  grid-column: span 6;
  grid-row: span 4;
}

.gallery-grid--pro a:nth-child(2) {
  grid-column: span 3;
  grid-row: span 2;
}

.gallery-grid--pro a:nth-child(5) {
  grid-column: span 4;
  grid-row: span 2;
}

.gallery-grid--pro a:nth-child(6) {
  grid-column: span 5;
  grid-row: span 2;
}

.gallery-grid--pro a::after {
  content: "View";
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  display: grid;
  place-items: center;
  background: rgba(10, 18, 28, 0.45);
  opacity: 0;
  transition: opacity 0.35s;
}

.gallery-grid--pro a:hover::after {
  opacity: 1;
}

/* —— Trust ribbon —— */
.trust-ribbon {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2.5rem;
  padding: 1.75rem 1.5rem;
  background: #fff;
  border-block: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.trust-ribbon strong {
  color: var(--ink);
  font-weight: 800;
}

/* —— Floating glass donate —— */
.fab-donate {
  border-radius: 999px !important;
  backdrop-filter: blur(10px);
  padding: 1rem 1.4rem !important;
  letter-spacing: 0.16em !important;
  box-shadow: 0 16px 40px rgba(10, 18, 28, 0.28) !important;
}

/* —— Footer pro touch —— */
.footer-cta {
  min-height: 50vh;
  display: grid;
  align-items: center;
}

.footer-cta-copy h2 {
  font-size: clamp(3rem, 8vw, 6rem) !important;
  max-width: none !important;
}

/* —— Reveal variants —— */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.9s var(--ease-expo), transform 0.9s var(--ease-expo);
}

.reveal-left.visible {
  opacity: 1;
  transform: none;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.9s var(--ease-expo), transform 0.9s var(--ease-expo);
}

.reveal-scale.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .bleed-split {
    min-height: 0;
  }

  .pillars--pro,
  .pillars--pro .pillar {
    min-height: 0;
  }

  .pillars--pro .pillar {
    min-height: 380px;
  }

  .pillars--pro .pillar p {
    max-height: none !important;
    opacity: 0.92 !important;
    margin-top: 0.75rem !important;
    overflow: visible;
  }

  .gallery-grid--pro {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 120px;
  }

  .gallery-grid--pro a,
  .gallery-grid--pro a:nth-child(1),
  .gallery-grid--pro a:nth-child(2),
  .gallery-grid--pro a:nth-child(5),
  .gallery-grid--pro a:nth-child(6) {
    grid-column: span 1;
    grid-row: span 2;
  }

  .gallery-grid--pro a:nth-child(1) {
    grid-column: span 2;
    grid-row: span 3;
  }

  .cta-banner--pro {
    min-height: 70vh;
    padding: 4rem 0;
  }

  .hero--pro h1 {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .preloader,
  .hero-line > span,
  .hero-line--link,
  .photo-rail-track,
  .bleed-media,
  .bleed-media img {
    animation: none !important;
    transition: none !important;
  }

  .hero-line > span,
  .hero-line--link,
  .bleed-media {
    transform: none;
    clip-path: none;
    opacity: 1;
  }

  .preloader { display: none; }
  body.is-loading { overflow: auto; }
}
