/* Creation Portal Jawdrop — local candidate only */
:root {
  --cp-void: #010306;
  --cp-ivory: #fff7d9;
  --cp-gold: #f0c85a;
  --cp-gold-dim: #d6a935;
  --cp-muted: #9db4ca;
  --cp-font-serif: Georgia, "Times New Roman", serif;
  --cp-font-ui: Inter, ui-sans-serif, system-ui, sans-serif;
  --cp-accent: 214, 177, 82;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--cp-void);
  color: var(--cp-ivory);
  font-family: var(--cp-font-ui);
}

.cp-page {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

.cp-page[data-phase="void"] .cp-ui { opacity: 0; }
.cp-page[data-phase="light"] .cp-ui { opacity: 0.35; }
.cp-page[data-phase="ring"] .cp-ui,
.cp-page[data-phase="ready"] .cp-ui { opacity: 1; }

#cp-cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cp-film-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.045;
  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;
}

.cp-nebula-wash {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 42% at var(--cp-mx, 68%) var(--cp-my, 38%), rgba(72, 215, 202, 0.14), transparent 58%),
    radial-gradient(ellipse 40% 35% at calc(var(--cp-mx, 68%) - 12%) calc(var(--cp-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;
}

.cp-void-curtain {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #000;
  pointer-events: none;
  transition: opacity 1.8s ease;
}

.cp-page[data-phase="light"] .cp-void-curtain,
.cp-page[data-phase="ring"] .cp-void-curtain,
.cp-page[data-phase="ready"] .cp-void-curtain {
  opacity: 0;
}

.cp-light-pillar {
  position: fixed;
  top: -8%;
  left: 50%;
  z-index: 3;
  width: min(18vw, 220px);
  height: 105vh;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 8%, rgba(255, 252, 235, 0.95), transparent 22%),
    linear-gradient(180deg, rgba(255, 247, 217, 0.55), rgba(240, 200, 90, 0.12) 45%, transparent 100%);
  filter: blur(0.5px);
  transform: translateX(-50%) skewX(-3deg) scaleY(0);
  transform-origin: top center;
  opacity: 0;
  mix-blend-mode: screen;
}

.cp-page[data-phase="light"] .cp-light-pillar,
.cp-page[data-phase="ring"] .cp-light-pillar,
.cp-page[data-phase="ready"] .cp-light-pillar {
  animation: cpLightPillar 2.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cpLightPillar {
  0% { opacity: 0; transform: translateX(-50%) skewX(-3deg) scaleY(0); }
  35% { opacity: 0.85; transform: translateX(-50%) skewX(-3deg) scaleY(0.72); }
  100% { opacity: 0.42; transform: translateX(-50%) skewX(-3deg) scaleY(1); }
}

.cp-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.6rem;
  background: linear-gradient(180deg, rgba(1, 3, 6, 0.82), transparent);
}

.cp-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--cp-gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
}

.cp-brand-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cp-gold), transparent 70%);
  box-shadow: 0 0 16px rgba(240, 200, 90, 0.8);
}

.cp-header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  max-width: min(100%, 36rem);
}

.cp-header-nav a {
  border: 1px solid rgba(255, 247, 217, 0.12);
  border-radius: 999px;
  color: var(--cp-muted);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.42rem 0.68rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cp-header-nav a:hover,
.cp-header-nav a:focus-visible {
  border-color: rgba(var(--cp-accent), 0.45);
  color: var(--cp-gold);
  outline: none;
}

.cp-header-nav a.is-active {
  border-color: rgba(var(--cp-accent), 0.55);
  box-shadow: 0 0 18px rgba(240, 200, 90, 0.14);
  color: var(--cp-gold);
}

.cp-ui {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(280px, 34vw) 1fr minmax(260px, 28vw);
  align-items: center;
  gap: 1rem;
  height: 100%;
  padding: 5.5rem 2rem 4.5rem;
  pointer-events: none;
  transition: opacity 1.2s ease;
}

.cp-ui > * { pointer-events: auto; }

.cp-proclamation {
  align-self: center;
  max-width: 22rem;
  opacity: 0;
  transform: translateY(24px);
}

.cp-page[data-phase="ring"] .cp-proclamation,
.cp-page[data-phase="ready"] .cp-proclamation {
  animation: cpFadeUp 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.cp-kicker {
  color: var(--cp-gold);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

.cp-headline {
  font-family: var(--cp-font-serif);
  font-size: clamp(2.4rem, 4.8vw, 4.2rem);
  font-weight: 400;
  line-height: 1.02;
  margin: 0;
  text-shadow: 0 0 48px rgba(240, 200, 90, 0.15);
}

.cp-headline span {
  display: block;
  color: var(--cp-ivory);
}

.cp-headline em {
  color: var(--cp-gold);
  font-style: italic;
  font-weight: 400;
}

.cp-lede {
  color: var(--cp-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 1rem 0 0;
  max-width: 34ch;
}

.cp-honesty-note {
  color: rgba(232, 224, 208, 0.58);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1.45;
  margin: 0.75rem 0 0;
  max-width: 42ch;
}

.cp-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.35rem;
}

.cp-cta {
  appearance: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.72rem 1.15rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cp-cta-primary {
  background: linear-gradient(135deg, #f5d56b, #c8942a);
  border: none;
  box-shadow: 0 8px 32px rgba(214, 169, 53, 0.35);
  color: #1a1204;
}

.cp-cta-ghost {
  background: rgba(255, 247, 217, 0.04);
  border: 1px solid rgba(255, 247, 217, 0.18);
  color: var(--cp-ivory);
}

.cp-cta:hover { transform: translateY(-2px); }

.cp-cta:focus-visible {
  outline: 2px solid rgba(240, 200, 90, 0.75);
  outline-offset: 3px;
}

.cp-portal-stage {
  position: relative;
  justify-self: center;
  width: min(58vw, 680px);
  aspect-ratio: 1;
  opacity: 0;
  transform: scale(0.88);
}

.cp-page[data-phase="ring"] .cp-portal-stage,
.cp-page[data-phase="ready"] .cp-portal-stage {
  animation: cpPortalReveal 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

@keyframes cpPortalReveal {
  to { opacity: 1; transform: scale(1); }
}

@keyframes cpFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.cp-orbit-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.cp-orbit-svg ellipse {
  fill: none;
  stroke-width: 1;
  transform-origin: 50% 50%;
}

.cp-orbit-a {
  stroke: rgba(240, 200, 90, 0.28);
  animation: cpOrbitSpin 48s linear infinite;
}

.cp-orbit-b {
  stroke: rgba(72, 215, 202, 0.18);
  animation: cpOrbitSpin 72s linear infinite reverse;
}

.cp-orbit-c {
  stroke: rgba(118, 168, 255, 0.12);
  animation: cpOrbitSpin 96s linear infinite;
}

@keyframes cpOrbitSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cp-orbit-group {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.cp-dave-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(120px, 14vw, 168px);
  height: clamp(120px, 14vw, 168px);
  border: 1.5px solid rgba(240, 200, 90, 0.55);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 32%, rgba(72, 215, 202, 0.32), rgba(2, 8, 18, 0.94) 58%);
  box-shadow:
    0 0 60px rgba(72, 215, 202, 0.28),
    0 0 120px rgba(240, 200, 90, 0.12),
    inset 0 0 40px rgba(240, 200, 90, 0.1);
  color: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transform: translate(-50%, -50%);
  animation: cpDaveBreath 5s ease-in-out infinite;
}

@keyframes cpDaveBreath {
  0%, 100% { box-shadow: 0 0 48px rgba(72, 215, 202, 0.22), 0 0 90px rgba(240, 200, 90, 0.08), inset 0 0 36px rgba(240, 200, 90, 0.08); }
  50% { box-shadow: 0 0 72px rgba(72, 215, 202, 0.38), 0 0 140px rgba(240, 200, 90, 0.16), inset 0 0 48px rgba(240, 200, 90, 0.14); }
}

.cp-dave-kicker {
  color: rgba(157, 180, 202, 0.88);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cp-dave-name {
  color: var(--cp-gold);
  font-family: var(--cp-font-serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1;
  margin: 0.15rem 0;
  text-shadow: 0 0 32px rgba(240, 200, 90, 0.4);
}

.cp-dave-sub {
  color: rgba(157, 180, 202, 0.78);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cp-node {
  --node-accent: 214, 177, 82;
  position: absolute;
  z-index: 6;
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  width: 5rem;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transform: translate(-50%, -50%) scale(0);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.25s ease;
}

.cp-page[data-phase="ring"] .cp-node,
.cp-page[data-phase="ready"] .cp-node {
  transform: translate(-50%, -50%) scale(1);
}

.cp-node-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 1.5px solid rgba(var(--node-accent), 0.55);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(var(--node-accent), 0.38), rgba(3, 8, 16, 0.88) 62%);
  box-shadow:
    inset 0 0 24px rgba(var(--node-accent), 0.16),
    0 0 32px rgba(var(--node-accent), 0.22),
    0 12px 40px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.cp-node-icon::before {
  position: absolute;
  inset: -14px;
  border: 1px solid rgba(var(--node-accent), 0.2);
  border-radius: inherit;
  content: "";
  animation: cpNodePulse 4.2s ease-in-out infinite;
  animation-delay: var(--node-delay, 0s);
}

@keyframes cpNodePulse {
  0%, 100% { opacity: 0.35; transform: scale(0.92); }
  50% { opacity: 0.85; transform: scale(1.06); }
}

.cp-node-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: rgba(255, 247, 217, 0.92);
  fill: none;
  stroke-width: 1.8;
}

.cp-node-label {
  color: rgba(237, 244, 255, 0.9);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
  text-transform: uppercase;
}

.cp-node.active .cp-node-icon,
.cp-node:hover .cp-node-icon,
.cp-node:focus-visible .cp-node-icon {
  box-shadow:
    inset 0 0 32px rgba(var(--node-accent), 0.28),
    0 0 52px rgba(var(--node-accent), 0.42),
    0 16px 48px rgba(0, 0, 0, 0.5);
  transform: scale(1.12);
}

.cp-beam {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--beam-accent, 214, 177, 82), 0.65), transparent);
  opacity: 0;
  transform-origin: left center;
  transition: opacity 0.3s ease, width 0.35s ease, transform 0.35s ease;
}

.cp-beam.visible { opacity: 0.55; }

.cp-steward {
  align-self: center;
  max-width: 22rem;
  padding: 1.35rem 1.25rem;
  border: 1px solid rgba(255, 247, 217, 0.12);
  border-radius: 18px;
  backdrop-filter: blur(14px);
  background: linear-gradient(145deg, rgba(8, 14, 24, 0.72), rgba(4, 8, 14, 0.42));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateX(20px);
}

.cp-page[data-phase="ready"] .cp-steward {
  animation: cpFadeRight 1s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

@keyframes cpFadeRight {
  to { opacity: 1; transform: translateX(0); }
}

.cp-steward-kicker {
  color: var(--cp-gold-dim);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
}

.cp-steward-title {
  font-family: var(--cp-font-serif);
  font-size: 1.85rem;
  margin: 0 0 0.65rem;
}

.cp-steward-copy {
  color: var(--cp-muted);
  font-size: 0.86rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}

.cp-steward-meta {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.cp-steward-meta div {
  border-left: 2px solid rgba(var(--cp-accent), 0.45);
  padding-left: 0.65rem;
}

.cp-steward-meta strong {
  display: block;
  color: var(--cp-gold);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cp-steward-meta span {
  color: rgba(157, 180, 202, 0.82);
  font-size: 0.72rem;
}

.cp-steward-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cp-scale-fact {
  position: fixed;
  bottom: 4.5rem;
  left: 2rem;
  z-index: 25;
  opacity: 0;
}

.cp-page[data-phase="ready"] .cp-scale-fact {
  animation: cpFadeUp 0.8s ease 1.2s forwards;
}

.cp-scale-count {
  display: block;
  color: var(--cp-gold);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.cp-scale-label {
  color: var(--cp-muted);
  display: block;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin-top: 0.2rem;
  text-transform: uppercase;
}

.cp-stats-rail {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  padding: 0.85rem 1.5rem;
  border-top: 1px solid rgba(255, 247, 217, 0.08);
  background: linear-gradient(180deg, transparent, rgba(2, 6, 12, 0.88));
  opacity: 0;
}

.cp-page[data-phase="ready"] .cp-stats-rail {
  animation: cpFadeUp 0.8s ease 1.4s forwards;
}

.cp-stat {
  text-align: center;
}

.cp-stat strong {
  color: var(--cp-gold);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.cp-stat span {
  color: rgba(157, 180, 202, 0.72);
  display: block;
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-top: 0.15rem;
  text-transform: uppercase;
}

.cp-rift {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255, 247, 217, 0.35), transparent 42%);
  opacity: 0;
  mix-blend-mode: screen;
}

.cp-rift.flash {
  animation: cpRift 0.55s ease-out forwards;
}

@keyframes cpRift {
  0% { opacity: 0; transform: scale(0.6); }
  30% { opacity: 0.75; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.15); }
}

.cp-preview-badge {
  position: fixed;
  bottom: 5.2rem;
  right: 1.5rem;
  z-index: 26;
  color: rgba(157, 180, 202, 0.55);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

@media (max-width: 1100px) {
  .cp-ui {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    justify-items: center;
    overflow-y: auto;
    padding-top: 4.5rem;
    padding-bottom: 7rem;
    pointer-events: auto;
  }

  .cp-header {
    align-items: flex-start;
    gap: 0.75rem;
  }

  .cp-header-nav {
    justify-content: center;
    max-width: none;
    width: 100%;
  }

  .cp-proclamation { max-width: 34rem; text-align: center; }
  .cp-lede { max-width: none; }
  .cp-cta-row { justify-content: center; }
  .cp-portal-stage { width: min(92vw, 420px); }
  .cp-steward { max-width: 34rem; width: 100%; }
  .cp-scale-fact { left: 50%; transform: translateX(-50%); text-align: center; }
  .cp-stats-rail { grid-template-columns: repeat(3, 1fr); row-gap: 0.5rem; }
}

@media (max-width: 640px) {
  .cp-header { padding: 0.85rem 1rem; }
  .cp-header-nav a { font-size: 0.52rem; padding: 0.38rem 0.58rem; }
  .cp-node { width: 4.25rem; }
  .cp-node-icon { width: 3rem; height: 3rem; }
  .cp-node-label { font-size: 0.5rem; letter-spacing: 0.12em; }
  .cp-stats-rail { padding-inline: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cp-void-curtain { opacity: 0 !important; }
  .cp-ui, .cp-proclamation, .cp-portal-stage, .cp-steward, .cp-scale-fact, .cp-stats-rail { opacity: 1 !important; transform: none !important; }
  .cp-node { transform: translate(-50%, -50%) scale(1) !important; }
}
