/* WO CoolerThanAstra 20260526 — exceed cinematic reference without copying trade dress.
   Layer: visual-polish → cooler-than-astra. Ministry gold/azure, compact hub preserved. */

:root {
  --ca-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --ca-ui: Inter, ui-sans-serif, system-ui, sans-serif;
  --ca-gold-hot: #f5d56b;
  --ca-azure: #76d4ff;
  --ca-teal: #5eead4;
  --ca-vignette: radial-gradient(ellipse 88% 78% at 50% 46%, transparent 42%, rgba(1, 3, 6, 0.72) 100%);
  --ca-glass: linear-gradient(145deg, rgba(12, 18, 28, 0.92), rgba(4, 8, 14, 0.62));
  --ca-ease-cine: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Shared cinematic frame ── */
.cp-page::after,
.rv-page::after,
.mn-page::after,
.sn-page::after,
.bl-council-home::after,
.rmo-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: var(--ca-vignette);
  opacity: 0.92;
}

.cp-film-grain,
.rv-film-grain,
.mn-film-grain,
.sn-film-grain,
.bl-film-grain {
  opacity: 0.065 !important;
  animation: caGrainDrift 14s steps(6) infinite;
}

@keyframes caGrainDrift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-1%, 0.5%); }
  50% { transform: translate(0.5%, -0.5%); }
  75% { transform: translate(-0.5%, 1%); }
}

.cp-nebula-wash,
.rv-nebula-wash,
.mn-nebula-wash {
  background:
    radial-gradient(ellipse 58% 44% at var(--cp-mx, var(--rv-mx, var(--mn-mx, 68%))) var(--cp-my, var(--rv-my, var(--mn-my, 38%))), rgba(94, 234, 212, 0.16), transparent 58%),
    radial-gradient(ellipse 42% 36% at calc(var(--cp-mx, var(--rv-mx, var(--mn-mx, 68%))) - 14%) calc(var(--cp-my, var(--rv-my, var(--mn-my, 38%))) + 10%), rgba(118, 212, 255, 0.14), transparent 54%),
    radial-gradient(ellipse 72% 48% at 50% 100%, rgba(245, 213, 107, 0.1), transparent 58%),
    radial-gradient(ellipse 35% 28% at 12% 18%, rgba(240, 200, 90, 0.08), transparent 52%) !important;
}

.cp-light-pillar,
.rv-light-shaft,
.mn-light-pillar {
  filter: blur(0.35px) saturate(1.12);
}

.cp-page[data-phase="ready"] .cp-light-pillar,
.rv-page[data-phase="ready"] .rv-light-shaft,
.rv-page[data-phase="core"] .rv-light-shaft,
.mn-page[data-phase="ready"] .mn-light-pillar {
  opacity: 0.52 !important;
}

/* ── Display typography — beats generic sans hero ── */
.cp-headline,
.mn-headline,
.rv-headline {
  font-family: var(--ca-display) !important;
  font-size: clamp(2.65rem, 5.4vw, 4.65rem) !important;
  letter-spacing: -0.025em;
  line-height: 0.98 !important;
}

.cp-headline em,
.mn-headline em,
.rv-headline em {
  background: linear-gradient(118deg, var(--ca-gold-hot) 0%, #e8b84a 42%, var(--ca-azure) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 28px rgba(240, 200, 90, 0.28));
}

.cp-kicker,
.mn-kicker,
.rv-kicker {
  font-family: var(--ca-ui);
  letter-spacing: 0.32em;
}

.cp-lede,
.mn-lede,
.rv-lede {
  font-size: clamp(0.94rem, 1.1vw, 1.02rem);
  line-height: 1.62;
  max-width: 36ch;
}

/* ── Orbital motion polish ── */
.cp-orbit-svg,
.mn-orbit-svg,
.rv-orbit-svg {
  animation: caOrbitDrift 48s linear infinite;
  transform-origin: center;
}

.cp-orbit-a, .mn-orbit-a, .rv-orbit-a { animation: caOrbitPulse 6s ease-in-out infinite; }
.cp-orbit-b, .mn-orbit-b, .rv-orbit-b { animation: caOrbitPulse 7.5s ease-in-out infinite 0.8s; }
.cp-orbit-c, .mn-orbit-c, .rv-orbit-c { animation: caOrbitPulse 5.5s ease-in-out infinite 1.4s; }

@keyframes caOrbitDrift {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes caOrbitPulse {
  0%, 100% { opacity: 0.42; stroke-width: 1; }
  50% { opacity: 0.78; stroke-width: 1.35; }
}

.cp-portal-stage,
.mn-portal-stage,
.rv-core-stage {
  perspective: 1200px;
  transform-style: preserve-3d;
}

.cp-node,
.mn-node,
.rv-orbit-node {
  transition: transform 0.28s var(--ca-ease-cine), box-shadow 0.28s ease, border-color 0.22s ease;
}

.cp-node:hover,
.cp-node.active,
.mn-node:hover,
.mn-node.active,
.rv-node:hover,
.rv-node.active {
  transform: translate(-50%, -50%) scale(1.12) !important;
  box-shadow:
    0 0 0 1px rgba(var(--node-accent, 240, 200, 90), 0.55),
    0 0 32px rgba(var(--node-accent, 240, 200, 90), 0.35),
    0 12px 40px rgba(0, 0, 0, 0.45) !important;
}

.cp-dave-core,
.mn-gospel-core,
.rv-avatar-core {
  box-shadow:
    0 0 0 2px rgba(240, 200, 90, 0.28),
    0 0 48px rgba(118, 212, 255, 0.22),
    0 24px 64px rgba(0, 0, 0, 0.48);
}

/* ── Glass steward / console depth ── */
.cp-steward,
.mn-steward,
.rv-console {
  border: 1px solid rgba(255, 247, 217, 0.16) !important;
  background: var(--ca-glass) !important;
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 247, 217, 0.08),
    0 0 40px rgba(240, 200, 90, 0.06);
  transition: transform 0.32s var(--ca-ease-cine), box-shadow 0.32s ease;
}

.cp-page[data-phase="ready"] .cp-steward,
.mn-page[data-phase="ready"] .mn-steward,
.rv-page[data-phase="ready"] .rv-console {
  animation: caPanelReveal 1s var(--ca-ease-cine) 0.45s both;
}

@keyframes caPanelReveal {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── RuachDavid boot terminal — beats static HUD ── */
.rv-boot {
  z-index: 25;
}

.rv-boot-line {
  opacity: 0;
  transform: translateY(8px);
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.14em;
}

.rv-page[data-phase="boot"] .rv-boot-line,
.rv-page.is-boot-stagger .rv-boot-line {
  animation: caBootLine 0.55s var(--ca-ease-cine) forwards;
}

.rv-page.is-boot-stagger .rv-boot-line:nth-child(1) { animation-delay: 0.15s; }
.rv-page.is-boot-stagger .rv-boot-line:nth-child(2) { animation-delay: 0.45s; }
.rv-page.is-boot-stagger .rv-boot-line:nth-child(3) { animation-delay: 0.75s; }
.rv-page.is-boot-stagger .rv-boot-line:nth-child(4) { animation-delay: 1.05s; }

@keyframes caBootLine {
  to { opacity: 1; transform: translateY(0); }
}

.rv-scripture,
.mn-scripture {
  font-family: var(--ca-display);
  font-size: 0.98rem;
  font-style: italic;
  opacity: 0.88;
}

/* ── Stats rail shimmer ── */
.cp-stats-rail,
.mn-stats-rail,
.rv-dock {
  background: linear-gradient(90deg, rgba(4, 8, 14, 0.88), rgba(8, 14, 22, 0.72), rgba(4, 8, 14, 0.88));
  border-top: 1px solid rgba(240, 200, 90, 0.12);
}

.cp-stat strong,
.mn-stat strong {
  font-family: var(--ca-display);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cp-scale-fact,
.mn-scale-fact,
.rv-stream-fact {
  animation: caFactPulse 4.2s ease-in-out infinite;
}

@keyframes caFactPulse {
  0%, 100% { opacity: 0.82; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

/* ── RuachDavid AI — sleek dark product (distinct from Launch Core) ── */
.rai-wrap {
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(16, 163, 127, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 20%, rgba(118, 212, 255, 0.06), transparent 50%),
    #212121;
}

.rai-chat-app {
  background: transparent !important;
}

.rai-chat-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(23, 23, 23, 0.82);
  backdrop-filter: blur(16px) saturate(1.1);
}

.rai-turn {
  animation: caTurnIn 0.45s var(--ca-ease-cine) both;
}

.rai-turn:nth-child(2) { animation-delay: 0.12s; }

@keyframes caTurnIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.rai-composer-zone {
  background: linear-gradient(180deg, transparent, rgba(23, 23, 23, 0.92) 24%);
}

.rai-composer {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(47, 47, 47, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.rai-composer:focus-within {
  border-color: rgba(16, 163, 127, 0.45);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.12), 0 12px 40px rgba(0, 0, 0, 0.4);
}

.rai-model-btn {
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.rai-model-btn:hover {
  transform: translateY(-1px);
}

.rai-sidebar-nav a {
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.rai-sidebar-nav a:hover {
  transform: translateX(2px);
}

.rai-triad-link.is-active {
  box-shadow: inset 0 0 0 1px rgba(16, 163, 127, 0.42), 0 0 20px rgba(16, 163, 127, 0.08);
}

/* ── Mobile hero impact ── */
@media (max-width: 720px) {
  .cp-headline,
  .mn-headline,
  .rv-headline {
    font-size: clamp(2.35rem, 11vw, 3.15rem) !important;
  }

  .cp-portal-stage,
  .mn-portal-stage {
    width: min(92vw, 420px) !important;
    margin-top: -0.5rem;
  }

  .rv-core-stage {
    width: min(88vw, 380px) !important;
    margin-inline: auto;
  }

  .cp-ui,
  .mn-ui,
  .rv-ui {
    padding-top: 4.8rem !important;
    padding-bottom: 5rem !important;
  }

  .cp-proclamation,
  .mn-proclamation,
  .rv-proclamation {
    text-align: center;
    max-width: none;
  }

  .cp-cta-row,
  .mn-cta-row,
  .rv-cta-row {
    justify-content: center;
  }

  .cp-steward,
  .mn-steward,
  .rv-console {
    max-width: min(100%, 22rem);
    margin-inline: auto;
  }

  .rai-chat-header {
    padding: 0.55rem 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cp-orbit-svg,
  .mn-orbit-svg,
  .rv-orbit-svg,
  .cp-film-grain,
  .rv-film-grain,
  .mn-film-grain,
  .cp-scale-fact,
  .mn-scale-fact,
  .rv-stream-fact,
  .rai-turn {
    animation: none !important;
  }

  .rv-boot-line {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Wave 20.10 — shared compact hub (home + mission; ministry lane does not load portal CSS) */
.cp-door-strip,
.mn-door-strip {
  margin-top: 1.15rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(240, 200, 90, 0.22);
  position: relative;
}

.cp-door-strip-kicker,
.mn-door-strip-kicker {
  margin: 0 0 0.35rem;
  color: #f0c85a;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cp-door-strip-note,
.mn-door-strip-note {
  margin: 0 0 0.65rem;
  color: rgba(200, 214, 220, 0.82);
  font-size: 0.72rem;
  line-height: 1.45;
  max-width: 20rem;
}

.cp-door-strip-grid,
.mn-door-strip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-door-card,
.mn-door-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(240, 200, 90, 0.2);
  border-radius: 0.45rem;
  background: rgba(4, 10, 14, 0.55);
  color: #fff7d9;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.22s var(--ca-ease-cine);
}

.cp-door-card-label,
.mn-door-card-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cp-door-card-state,
.mn-door-card-state {
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: rgba(157, 180, 202, 0.88);
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .cp-door-strip-note,
  .mn-door-strip-note {
    max-width: none;
    text-align: center;
  }

  .cp-door-strip-grid,
  .mn-door-strip-grid {
    max-width: 22rem;
    width: 100%;
  }
}

/* Wave 20.10 — home + mission compact hub visual wow (cooler-than-Astra layer) */

.cp-door-strip::before,
.mn-door-strip::before {
  content: "";
  position: absolute;
  inset: -0.35rem -0.5rem auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 213, 107, 0.55), rgba(118, 212, 255, 0.45), transparent);
  opacity: 0.85;
}

.cp-door-card,
.mn-door-card {
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(240, 200, 90, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.28);
}

.cp-door-card::after,
.mn-door-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 40%, rgba(118, 212, 255, 0.12) 50%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.55s var(--ca-ease-cine);
  pointer-events: none;
}

.cp-door-card:hover::after,
.cp-door-card:focus-visible::after,
.mn-door-card:hover::after,
.mn-door-card:focus-visible::after {
  transform: translateX(120%);
}

.cp-door-card:hover,
.cp-door-card:focus-visible,
.mn-door-card:hover,
.mn-door-card:focus-visible {
  border-color: rgba(118, 212, 255, 0.42) !important;
  box-shadow:
    0 0 0 1px rgba(118, 212, 255, 0.28),
    0 0 28px rgba(94, 234, 212, 0.18),
    0 12px 32px rgba(0, 0, 0, 0.42) !important;
  transform: translateY(-2px);
}

.cp-page[data-phase="ready"] .cp-headline,
.mn-page[data-phase="ready"] .mn-headline {
  filter: drop-shadow(0 0 42px rgba(240, 200, 90, 0.12));
}

.cp-rift.flash,
.mn-rift.flash {
  box-shadow:
    0 0 80px rgba(118, 212, 255, 0.35),
    0 0 120px rgba(245, 213, 107, 0.22);
}

.cp-gospel-core,
.cp-dave-core,
.mn-gospel-core {
  animation: caCorePulse 5.5s ease-in-out infinite;
}

@keyframes caCorePulse {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(240, 200, 90, 0.28),
      0 0 48px rgba(118, 212, 255, 0.22),
      0 24px 64px rgba(0, 0, 0, 0.48);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(118, 212, 255, 0.38),
      0 0 64px rgba(94, 234, 212, 0.28),
      0 28px 72px rgba(0, 0, 0, 0.52);
  }
}

@media (max-width: 720px) {
  .cp-door-strip-grid,
  .mn-door-strip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem;
  }

  .cp-door-card,
  .mn-door-card {
    min-height: 3.1rem;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cp-gospel-core,
  .cp-dave-core,
  .mn-gospel-core,
  .cp-door-card::after,
  .mn-door-card::after {
    animation: none !important;
    transition: none !important;
  }
}
