/* Portal site system — inner pages matching Creation Portal jawdrop */

:root {
  --ps-void: #010306;
  --ps-gold: #f0c85a;
  --ps-gold-dim: #d6a935;
  --ps-ivory: #fff7d9;
  --ps-muted: #9db4ca;
  --ps-teal: #48d7ca;
  --ps-font-serif: Georgia, "Times New Roman", serif;
}

body.dancz-portal-site {
  background: var(--ps-void) !important;
  color: var(--ps-ivory);
}

body.dancz-portal-site .site-content,
body.dancz-portal-site #content {
  position: relative;
  z-index: 2;
  background: transparent !important;
}

body.dancz-portal-site .ast-container {
  max-width: none;
  padding-inline: 0;
}

body.dancz-portal-site .content-area.primary > .site-main {
  width: 100%;
  max-width: none;
  padding: 0;
}

body.dancz-portal-site .entry-content {
  position: relative;
  z-index: 2;
}

.ps-cosmos-lite {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ps-nebula-wash {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 42% at var(--ps-mx, 68%) var(--ps-my, 38%), rgba(72, 215, 202, 0.14), transparent 58%),
    radial-gradient(ellipse 40% 35% at calc(var(--ps-mx, 68%) - 12%) calc(var(--ps-my, 38%) + 8%), rgba(118, 168, 255, 0.1), transparent 52%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(214, 169, 53, 0.06), transparent 55%);
  transition: background 0.12s linear;
}

.ps-film-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.ps-route {
  position: relative;
  z-index: 2;
}

.ps-route-hero {
  position: relative;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
}

.ps-route-hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  width: min(60vw, 520px);
  height: 120%;
  background: radial-gradient(circle, rgba(240, 200, 90, 0.12), transparent 68%);
  transform: translateX(-50%);
  pointer-events: none;
}

.ps-route-kicker {
  color: var(--ps-gold);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  margin: 0 0 0.65rem;
  position: relative;
  text-transform: uppercase;
}

.ps-route-title {
  font-family: var(--ps-font-serif);
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
  max-width: 16ch;
  position: relative;
  text-shadow: 0 0 40px rgba(240, 200, 90, 0.12);
}

.ps-route-lede {
  color: var(--ps-muted);
  font-size: clamp(0.92rem, 1.4vw, 1.05rem);
  line-height: 1.55;
  margin: 0.85rem 0 0;
  max-width: 52ch;
  position: relative;
}

.ps-route-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
  position: relative;
}

.ps-btn {
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.65rem 1.05rem;
  text-decoration: none;
  text-transform: uppercase;
}

.ps-btn-primary {
  background: linear-gradient(135deg, #f5d56b, #c8942a);
  color: #1a1204;
}

.ps-btn-ghost {
  border: 1px solid rgba(255, 247, 217, 0.18);
  color: var(--ps-ivory);
}

.ps-route-body {
  padding: 0 clamp(1rem, 3vw, 2rem) clamp(5rem, 8vw, 7rem);
}

.ps-route-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.65rem 1rem;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 12, 0.92));
  border-top: 1px solid rgba(240, 200, 90, 0.12);
}

.ps-route-dock-link {
  border: 1px solid rgba(255, 247, 217, 0.12);
  border-radius: 999px;
  color: var(--ps-muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.45rem 0.75rem;
  text-decoration: none;
  text-transform: uppercase;
}

.ps-route-dock-link.is-active,
.ps-route-dock-link:hover {
  border-color: rgba(240, 200, 90, 0.45);
  color: var(--ps-gold);
}

/* Elevate existing dm-* sections inside portal shell */
body.dancz-portal-site .ps-route-body .dm-mission-prod,
body.dancz-portal-site .ps-route-body .dm-mission-covenant,
body.dancz-portal-site .ps-route-body .dm-mission-river,
body.dancz-portal-site .ps-route-body section[class*="dm-"],
body.dancz-portal-site .ps-route-body .dm-card,
body.dancz-portal-site .ps-route-body .dm-form-shell {
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 247, 217, 0.08);
  border-radius: 16px;
  margin-bottom: 1rem;
}

body.ps-tone-plain .ps-route-hero-glow,
body.ps-tone-plain .ps-nebula-wash {
  opacity: 0.45;
}

body.ps-tone-study .ps-route-title {
  max-width: 22ch;
}

body.ps-tone-study .ps-route-hero {
  padding-bottom: 1rem;
}

@media (max-width: 720px) {
  .ps-route-dock {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ps-cosmos-lite { display: none; }
}
