/* One Voice One Worship — split-screen gateway */

:root {
  --navy-950: #0A1628;
  --navy-deep: #071224;
  --indigo: #121A33;
  --gold-600: #D4AF37;
  --gold-500: #C89B3C;
  --gold-400: #E8C766;
  --gold-200: #F3DFA2;
  --ivory: #F7F3EA;
  --ivory-dim: rgba(247, 243, 234, 0.74);
  --ivory-muted: #C9C2B2;
  --line: rgba(212, 175, 55, 0.45);
  --font-display: "Playfair Display", "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --ease: ease;
}

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

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--navy-deep);
  color: var(--ivory);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow: hidden;
}

a { color: var(--gold-400); text-decoration: none; }
a:hover { color: var(--gold-200); }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  background: var(--gold-600);
  color: var(--navy-deep);
  padding: 0.6rem 1rem;
  border-radius: 0.4rem;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Floating top-center brand mark */
.brand-mark {
  position: fixed;
  top: 1.15rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  background: rgba(7, 18, 36, 0.72);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  color: var(--ivory);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand-mark:hover { color: var(--ivory); border-color: var(--gold-400); }
.brand-mark .emblem {
  width: 1.7rem;
  height: 1.7rem;
}

/* Split layout — locked side-by-side on all but the narrowest phones.
   The previous 768px stack breakpoint was too wide: tablets, laptops with
   a side panel, and split browser windows would fall into a vertical stack. */
.split-screen {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
}

.panel {
  position: relative;
  flex: 0 0 auto;
  width: 50%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: width 0.5s ease, flex-basis 0.5s ease;
  isolation: isolate;
  cursor: pointer;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  box-shadow: inset 0 0 0 0 transparent;
  transition: box-shadow 0.5s ease;
}
.panel.is-active::before,
.panel:hover::before,
.panel:focus-visible::before {
  box-shadow: inset 0 0 90px rgba(212, 175, 55, 0.1);
}
.panel:focus-visible {
  z-index: 5;
}
.panel a,
.panel button {
  cursor: pointer;
  position: relative;
  z-index: 6;
}

.left-panel { background: var(--navy-deep); flex-basis: 50%; }
.right-panel { background: var(--indigo); flex-basis: 50%; }

.split-screen.is-left .left-panel,
.split-screen.is-right .right-panel {
  width: 75%;
  flex: 0 0 75%;
}

.split-screen.is-left .right-panel,
.split-screen.is-right .left-panel {
  width: 25%;
  flex: 0 0 25%;
}

@media (min-width: 641px) {
  .split-screen {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }
  .panel {
    height: 100%;
  }
}

/* Gold hairline that travels with the split */
.left-panel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(212, 175, 55, 0.15) 8%,
    var(--gold-600) 50%,
    rgba(212, 175, 55, 0.15) 92%,
    transparent 100%
  );
  z-index: 4;
  pointer-events: none;
  opacity: 0.9;
}

.panel-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.panel-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 0.7s ease, filter 0.5s ease;
  filter: saturate(0.95);
}

.left-panel .panel-bg img { object-position: center 40%; }
.right-panel .panel-bg img { object-position: center 30%; }

.panel.is-active .panel-bg img {
  transform: scale(1.07);
  filter: saturate(1.05);
}

.split-screen.is-left .right-panel .panel-bg img,
.split-screen.is-right .left-panel .panel-bg img {
  filter: brightness(0.55) saturate(0.8);
}

.panel-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, background 0.5s ease;
}

.left-panel .panel-overlay {
  background:
    linear-gradient(180deg, rgba(7, 18, 36, 0.42) 0%, rgba(10, 22, 40, 0.58) 42%, rgba(7, 18, 36, 0.9) 100%),
    linear-gradient(90deg, rgba(7, 18, 36, 0.55), rgba(212, 175, 55, 0.1) 70%, rgba(10, 22, 40, 0.4));
}

.right-panel .panel-overlay {
  background:
    radial-gradient(ellipse at 72% 28%, rgba(212, 175, 55, 0.32), transparent 52%),
    radial-gradient(ellipse at 24% 82%, rgba(200, 155, 60, 0.2), transparent 48%),
    linear-gradient(180deg, rgba(18, 26, 51, 0.5) 0%, rgba(18, 26, 51, 0.7) 48%, rgba(10, 14, 28, 0.94) 100%);
}

.split-screen.is-left .right-panel .panel-overlay,
.split-screen.is-right .left-panel .panel-overlay {
  background:
    linear-gradient(180deg, rgba(7, 18, 36, 0.7) 0%, rgba(7, 18, 36, 0.86) 100%);
}

.panel-content {
  position: relative;
  z-index: 2;
  width: min(100% - 3rem, 36rem);
  padding: 5.5rem 0 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Official logos — centerpiece on each panel */
.panel-logo {
  position: relative;
  margin: 0 auto 1.15rem;
  overflow: hidden;
  border-radius: 1.15rem;
  border: 1px solid rgba(232, 199, 102, 0.45);
  background: #071224;
  box-shadow:
    0 0 0 1px rgba(212, 175, 55, 0.1),
    0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 44px rgba(212, 175, 55, 0.2);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  transform-origin: center center;
}
.panel-logo--festival { width: min(88%, 24rem); }
.panel-logo--academy { width: min(64%, 14.25rem); }
.panel-logo img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}
.panel-logo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 52px 18px rgba(7, 18, 36, 0.42);
  background: radial-gradient(ellipse at center, transparent 48%, rgba(7, 18, 36, 0.28) 100%);
}
.panel.is-active .panel-logo {
  transform: scale(1.06);
  box-shadow:
    0 0 0 1px rgba(232, 199, 102, 0.28),
    0 18px 48px rgba(0, 0, 0, 0.5),
    0 0 56px rgba(212, 175, 55, 0.32);
}
.split-screen.is-left .right-panel .panel-logo,
.split-screen.is-right .left-panel .panel-logo {
  transform: scale(0.84);
  width: min(86%, 11rem);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--gold-400);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.panel h2 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.55rem, 3.2vw, 3.05rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 16ch;
  overflow-wrap: break-word;
  hyphens: manual;
  transition: transform 0.5s ease, font-size 0.5s ease;
  transform-origin: center center;
}

.panel.is-active h2 { transform: scale(1.06); }

.split-screen.is-left .right-panel h2,
.split-screen.is-right .left-panel h2 {
  transform: scale(0.92);
  font-size: clamp(1.15rem, 2.6vw, 2.1rem);
  max-width: 12ch;
}

.subtitle {
  margin: 0;
  max-width: 22rem;
  font-size: clamp(0.98rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--ivory-dim);
  transition: opacity 0.45s ease, max-height 0.45s ease, margin 0.45s ease;
}

.split-screen.is-left .right-panel .subtitle,
.split-screen.is-right .left-panel .subtitle {
  opacity: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}

.panel-reveal {
  width: 100%;
  margin-top: 1.6rem;
  opacity: 0;
  transform: translateY(18px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease, max-height 0.5s ease, margin 0.45s ease;
}

.panel.is-active .panel-reveal {
  opacity: 1;
  transform: none;
  max-height: 22rem;
  overflow: visible;
  pointer-events: auto;
}

.panel-reveal .desc {
  margin: 0 0 1.35rem;
  color: var(--ivory-dim);
  font-size: 1.02rem;
  line-height: 1.65;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-gold {
  background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
  color: var(--navy-deep);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.22);
}
.btn-gold:hover {
  background: var(--gold-200);
  color: var(--navy-deep);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.15rem;
  margin-top: 1.35rem;
}

.quick-links a {
  color: var(--ivory);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.quick-links a:hover,
.quick-links a:focus-visible {
  color: var(--gold-200);
  border-color: rgba(232, 199, 102, 0.45);
  background: rgba(10, 22, 40, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .panel,
  .panel h2,
  .panel-logo,
  .panel-bg img,
  .panel-reveal,
  .subtitle,
  .btn { transition: none; }
  .panel.is-active h2,
  .panel.is-active .panel-logo,
  .split-screen.is-left .right-panel h2,
  .split-screen.is-right .left-panel h2,
  .split-screen.is-left .right-panel .panel-logo,
  .split-screen.is-right .left-panel .panel-logo,
  .panel.is-active .panel-bg img { transform: none; }
}

/* Mobile: stacked, all content visible, no hover required */
@media (max-width: 640px) {
  body { overflow: auto; }

  .brand-mark {
    top: 0.75rem;
    width: 2.6rem;
    height: 2.6rem;
  }

  .split-screen {
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .panel,
  .left-panel,
  .right-panel,
  .split-screen.is-left .left-panel,
  .split-screen.is-right .right-panel,
  .split-screen.is-left .right-panel,
  .split-screen.is-right .left-panel {
    flex: 0 0 auto !important;
    width: 100% !important;
    flex-basis: 100% !important;
    height: auto;
    min-height: 50dvh;
    align-items: stretch;
  }

  .left-panel::after {
    top: auto;
    right: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent 0%,
      rgba(212, 175, 55, 0.2) 12%,
      var(--gold-600) 50%,
      rgba(212, 175, 55, 0.2) 88%,
      transparent 100%
    );
  }

  .panel-bg img,
  .panel.is-active .panel-bg img,
  .split-screen.is-left .right-panel .panel-bg img,
  .split-screen.is-right .left-panel .panel-bg img {
    transform: none;
    filter: none;
  }

  .panel-content {
    width: min(100% - 2.4rem, 36rem);
    padding: 5.25rem 0 3.25rem;
    margin: auto;
  }

  .panel-logo,
  .panel-logo--festival,
  .panel-logo--academy,
  .panel.is-active .panel-logo,
  .split-screen.is-left .right-panel .panel-logo,
  .split-screen.is-right .left-panel .panel-logo {
    transform: none;
    width: min(86%, 22rem);
    margin-bottom: 1.1rem;
  }
  .panel-logo--academy {
    width: min(62%, 14rem);
  }

  .panel h2,
  .panel.is-active h2,
  .split-screen.is-left .right-panel h2,
  .split-screen.is-right .left-panel h2 {
    transform: none;
    font-size: clamp(1.7rem, 7.5vw, 2.6rem);
    max-width: 16ch;
  }

  .subtitle,
  .split-screen.is-left .right-panel .subtitle,
  .split-screen.is-right .left-panel .subtitle {
    opacity: 1;
    max-height: none;
    margin: 0;
    overflow: visible;
    pointer-events: auto;
  }

  .panel-reveal,
  .panel.is-active .panel-reveal {
    opacity: 1;
    transform: none;
    max-height: none;
    overflow: visible;
    pointer-events: auto;
    margin-top: 1.5rem;
  }
}
