/* Fly-through hero test (Nov 17, 2026). Inset card with a thin white frame, all four corners rounded. */

/* Header floats over the card, turns solid black once you scroll */
.site-header--over { position: fixed; top: 10px; left: 10px; right: 10px; background: transparent; border-radius: 22px; transition: background-color 0.35s ease, top 0.35s ease, left 0.35s ease, right 0.35s ease, border-radius 0.35s ease; }
.site-header--over.is-scrolled { top: 0; left: 0; right: 0; border-radius: 0; background: var(--color-dark); }
.site-header--over .site-header__inner { min-height: 80px; }
@media (max-width: 999px) { .site-header--over .site-nav { border-radius: 0 0 16px 16px; } }

/* The frame and the card */
.fly-frame { padding: 10px; background: var(--color-bg); }
.fly { position: relative; isolation: isolate; height: calc(100svh - 20px); min-height: 600px; max-height: 1000px; border-radius: 22px; overflow: hidden; background: var(--color-dark); color: var(--color-on-dark); }

/* Stage: slides stacked, perspective so halves can fly toward the camera */
.fly__stage { position: absolute; inset: 0; z-index: -2; perspective: 900px; perspective-origin: 50% 30%; overflow: hidden; }
.fly__slide { position: absolute; inset: 0; visibility: hidden; transform-style: preserve-3d; }
.fly__slide.is-active { visibility: visible; z-index: 2; }
.fly__slide.is-next { visibility: visible; z-index: 1; }
.fly__half { position: absolute; inset: 0; will-change: transform, filter, opacity; backface-visibility: hidden; }
/* Each half is the full photo, cut with a straight inset that overlaps 2px so no seam shows until they fly apart */
.fly__half--l { clip-path: inset(0 calc(50% - 2px) 0 0); }
.fly__half--r { clip-path: inset(0 0 0 calc(50% - 2px)); }
.fly__half img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }

/* Shade keeps white type readable on any photo */
.fly__shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--color-dark) 55%, transparent) 0%, transparent 28%),
    linear-gradient(0deg, color-mix(in srgb, var(--color-dark) 88%, transparent) 0%, color-mix(in srgb, var(--color-dark) 35%, transparent) 55%, color-mix(in srgb, var(--color-dark) 25%, transparent) 100%); }

/* Words: intro and church name share one spot */
.fly__content { position: absolute; left: 0; right: 0; bottom: 0; margin-inline: auto; padding-bottom: clamp(2rem, 5vw, 4rem); display: grid; gap: var(--space-4); }
.fly__words { display: grid; align-items: end; }
.fly__intro, .fly__name { grid-area: 1 / 1; margin: 0; font-weight: 800; text-transform: uppercase; letter-spacing: -0.03em; line-height: 0.9; }
.fly__intro { font-size: clamp(3.5rem, 1.5rem + 9vw, 10.5rem); }
.fly__name { font-size: clamp(2.75rem, 1.2rem + 6vw, 7.25rem); max-width: 15ch; }
.fly__intro span, .fly__name span { display: inline-block; }
.fly__intro .hl { padding: 0 0.1em; }
.fly__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.fly__dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; position: absolute; right: var(--gutter); bottom: clamp(2rem, 5vw, 4rem); }
.fly__dots li { width: 28px; height: 3px; background: color-mix(in srgb, var(--color-on-dark) 35%, transparent); overflow: hidden; position: relative; }
.fly__dots li.is-on::after { content: ""; position: absolute; inset: 0; background: var(--color-on-dark); transform-origin: left; animation: dot-fill var(--hold, 4200ms) linear forwards; }
@keyframes dot-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 479px) {
  .fly-frame { padding: 8px; }
  .site-header--over { top: 8px; left: 8px; right: 8px; }
  .fly { height: calc(100svh - 16px); border-radius: 18px; }
  .fly__actions .btn { flex: 1 1 100%; }
  .fly__dots { position: static; }
}

/* Before the script runs, or with reduced motion: show the name, hide the intro */
.fly__intro { opacity: 0; }
.fly.is-ready .fly__intro { opacity: 1; }
.fly.is-ready .fly__name span { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .fly .fly__intro { display: none; }
  .fly .fly__name span { opacity: 1 !important; }
  .fly__dots { display: none; }
}
.fly.hero::before { display: none; }

/* Purple highlight sweeps in behind the word (the word itself stays put) */
.fly .hl { position: relative; z-index: 0; background: none; }
.fly .hl::before { content: ""; position: absolute; inset: 0.04em 0; z-index: -1; background: var(--color-accent); transform: scaleX(0); transform-origin: left center; transition: transform 0.75s cubic-bezier(.7,0,.2,1); }
.fly .hl.is-lit::before { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .fly .hl::before { transform: scaleX(1); transition: none; } }

/* Softer corners on the small boxes so they match the buttons */
.video__play, .tile__label { border-radius: 10px; }
.fly-frame .btn, .site-header .btn { border-radius: var(--radius-button); }
