:root {
  --phx-ice: #dce6ff;
  --phx-blue: #91aee8;
  --phx-violet: #b09bd8;
  --phx-warm: #d8bd8f;
  --phx-panel: rgba(22, 24, 31, .82);
  --phx-pointer-x: 68vw;
  --phx-pointer-y: 16vh;
}

body {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(900px 620px at var(--phx-pointer-x) var(--phx-pointer-y), rgba(113, 137, 193, .105), transparent 68%),
    linear-gradient(180deg, #0e1015 0%, #111318 48%, #0d0f13 100%);
  font-size: 17px;
}

body::before {
  position: fixed;
  z-index: -3;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .012) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, #000 0, transparent 74%);
}

.phx-atmosphere {
  position: fixed;
  z-index: -2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.phx-aurora {
  position: absolute;
  top: -36%;
  left: 24%;
  width: 86vw;
  height: 84vw;
  border-radius: 50%;
  opacity: .42;
  filter: blur(100px);
  background: conic-gradient(from 210deg, transparent 0 28%, rgba(89, 110, 161, .24), transparent 47%, rgba(127, 91, 145, .12), transparent 71%);
  animation: phx-aurora-drift 32s ease-in-out infinite alternate;
}

.phx-orbit {
  position: absolute;
  border: 1px solid rgba(194, 208, 238, .065);
  border-radius: 50%;
}

.orbit-a {
  top: 4vh;
  right: -18vw;
  width: 62vw;
  height: 62vw;
  animation: phx-orbit 42s linear infinite;
}

.orbit-b {
  top: 17vh;
  right: -7vw;
  width: 38vw;
  height: 38vw;
  border-style: dashed;
  opacity: .7;
  animation: phx-orbit 58s linear infinite reverse;
}

.phx-orbit::after {
  position: absolute;
  top: 17%;
  left: 5.5%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  background: var(--phx-ice);
  box-shadow: 0 0 24px rgba(194, 213, 255, .8);
}

.phx-horizon {
  position: absolute;
  top: 560px;
  right: -9vw;
  width: 58vw;
  height: 20vw;
  border-radius: 50%;
  opacity: .38;
  filter: blur(1px);
  background: radial-gradient(ellipse at 50% 0, rgba(131, 151, 198, .28), rgba(21, 24, 34, .48) 35%, transparent 68%);
  transform: rotate(-8deg);
}

.topbar {
  top: 18px;
  height: 72px;
  max-width: 1240px;
  padding: 0 18px 0 20px;
  border: 1px solid rgba(226, 234, 255, .1);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(21, 23, 29, .88), rgba(12, 14, 19, .72));
  box-shadow: 0 18px 65px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(22px) saturate(1.2);
}

.public-sigil {
  overflow: hidden;
  border-color: rgba(184, 202, 240, .26);
  background: radial-gradient(circle at 50% 18%, rgba(181, 205, 255, .13), transparent 48%);
  box-shadow: inset 0 0 22px rgba(124, 151, 211, .08);
}

.public-sigil::before {
  position: absolute;
  inset: -20% 49%;
  content: "";
  background: linear-gradient(transparent, rgba(208, 223, 255, .85), transparent);
  transform: rotate(38deg);
  animation: phx-sigil-scan 7s ease-in-out infinite;
}

.topbar nav > a {
  position: relative;
  padding: 8px 0;
}

.topbar nav > a:not(.top-login)::after {
  position: absolute;
  right: 50%;
  bottom: 2px;
  left: 50%;
  height: 1px;
  content: "";
  background: var(--phx-ice);
  transition: right .35s var(--ease), left .35s var(--ease);
}

.topbar nav > a:hover::after { right: 0; left: 0; }
.topbar .top-login { border-radius: 999px; background: rgba(255, 255, 255, .025); }

.hero {
  position: relative;
  min-height: max(760px, 100vh);
  padding-top: 150px;
}

.hero::after {
  position: absolute;
  z-index: -1;
  top: 22%;
  right: -11%;
  width: min(630px, 50vw);
  aspect-ratio: 1;
  border: 1px solid rgba(180, 199, 235, .08);
  border-radius: 50%;
  content: "";
  background:
    radial-gradient(circle at 37% 30%, rgba(220, 230, 255, .12), transparent 10%),
    radial-gradient(circle at 45% 42%, rgba(106, 126, 171, .2), rgba(22, 25, 34, .82) 45%, #0d0f14 72%);
  box-shadow: inset -80px -30px 130px rgba(0, 0, 0, .76), 0 0 120px rgba(93, 115, 163, .1), 0 0 0 32px rgba(173, 191, 231, .015);
  animation: phx-planet-breathe 11s ease-in-out infinite alternate;
}

.hero-copy { position: relative; z-index: 2; }
.hero .eyebrow { color: #aebbd5; }
.hero h1 {
  max-width: 850px;
  font-size: clamp(58px, 7.1vw, 106px);
  line-height: .98;
  text-wrap: balance;
  text-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}
.hero h1 em {
  color: transparent;
  background: linear-gradient(112deg, #edf2ff 8%, #a8b9de 48%, #ceb8da 88%);
  background-clip: text;
  -webkit-background-clip: text;
}
.hero-lead { max-width: 650px; font-size: 17px; }

.hero-live {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-top: 27px;
  padding: 9px 13px;
  border: 1px solid rgba(167, 196, 182, .16);
  border-radius: 999px;
  background: rgba(135, 175, 156, .035);
  color: #c7d6cf;
  font-size: 11px;
}
.hero-live i { width: 6px; height: 6px; border-radius: 50%; background: #9ac1ae; box-shadow: 0 0 14px rgba(154, 193, 174, .8); animation: phx-live 2.5s ease-in-out infinite; }
.hero-live span { font-weight: 500; }
.hero-live small { padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .1); color: #858d9e; font-size: 10px; }
.hero-actions .button { min-height: 52px; padding-inline: 24px; }

.hero-status {
  z-index: 1;
  min-height: 430px;
  padding-left: 56px;
  border-left-color: rgba(202, 214, 241, .15);
}
.hero-status::before { box-shadow: 0 0 28px rgba(186, 207, 255, .8); }
.hero-status > strong { position: relative; z-index: 1; }
.hero-status strong > span { color: rgba(207, 218, 244, .82); text-shadow: 0 0 54px rgba(135, 161, 218, .18); }
.hero-emblem { position: absolute; top: 30px; left: -54px; width: 108px; height: 108px; display: grid; place-items: center; }
.hero-emblem i { position: absolute; inset: 0; border: 1px solid rgba(190, 208, 247, .11); border-radius: 50%; animation: phx-orbit 16s linear infinite; }
.hero-emblem i:nth-child(2) { inset: 12px; border-style: dashed; animation-duration: 25s; animation-direction: reverse; }
.hero-emblem i:nth-child(3) { inset: 27px; border-color: rgba(190, 208, 247, .22); animation-duration: 9s; }
.hero-emblem b { font-size: 18px; font-weight: 400; color: #cfd9ed; }

.community-section,
.senate-section,
.scope-section,
.path-section,
.application-section,
.faq-section {
  position: relative;
}

.cinematic-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .85s var(--ease), transform .85s var(--ease);
}
.cinematic-reveal.is-visible { opacity: 1; transform: none; }

.community-values article,
.scope-card,
.path-grid article {
  border-color: rgba(222, 232, 255, .1);
  transition: transform .42s var(--ease), border-color .35s ease, background .35s ease, box-shadow .42s var(--ease);
}
.community-values article:hover,
.scope-card:hover,
.path-grid article:hover {
  transform: translateY(-5px);
  border-color: rgba(184, 205, 247, .25);
}

.senate-section {
  overflow: hidden;
  border-color: rgba(214, 225, 252, .13);
  background:
    radial-gradient(circle at 5% 5%, rgba(135, 157, 207, .14), transparent 34%),
    linear-gradient(118deg, rgba(28, 31, 40, .96), rgba(18, 20, 27, .94));
  box-shadow: 0 32px 100px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .025);
}
.senate-section::after {
  position: absolute;
  right: -110px;
  bottom: -170px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(196, 211, 244, .08);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 42px rgba(196, 211, 244, .015), 0 0 0 93px rgba(196, 211, 244, .008);
}

.route-choice,
.review-panel,
.form-shell,
.status-card,
.decision-card,
.account-gate,
.loading-card {
  border-color: rgba(218, 228, 251, .12);
  background: linear-gradient(145deg, rgba(29, 32, 41, .9), rgba(18, 20, 27, .94));
  box-shadow: 0 34px 110px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .025);
  backdrop-filter: blur(16px);
}

.route-grid > button {
  overflow: hidden;
  min-height: 390px;
  border-color: rgba(214, 226, 252, .1);
  background: linear-gradient(150deg, rgba(40, 44, 56, .78), rgba(24, 27, 35, .9));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}
.route-grid > button::before {
  position: absolute;
  right: -90px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(201, 217, 250, .09);
  border-radius: 50%;
  content: "";
  transition: transform .6s var(--ease), border-color .4s ease;
}
.route-grid > button::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  content: "";
  opacity: 0;
  background: linear-gradient(90deg, transparent, var(--phx-blue), transparent);
  transform: translateX(-60%);
  transition: opacity .3s, transform .7s var(--ease);
}
.route-grid > button:hover { background: linear-gradient(150deg, rgba(49, 55, 70, .86), rgba(26, 29, 38, .96)); box-shadow: 0 28px 65px rgba(0, 0, 0, .24); }
.route-grid > button:hover::before { transform: scale(1.12) translate(-8px, -6px); border-color: rgba(201, 217, 250, .18); }
.route-grid > button:hover::after { opacity: 1; transform: translateX(0); }
.route-grid > button:nth-child(2) { background: radial-gradient(circle at 100% 100%, rgba(126, 97, 143, .13), transparent 39%), linear-gradient(150deg, rgba(40, 44, 56, .78), rgba(24, 27, 35, .9)); }
.route-grid h3 { font-size: 27px; }
.route-grid p, .route-grid li { font-size: 14px; }

.form-rail { background: radial-gradient(circle at 0 0, rgba(130, 153, 207, .11), transparent 36%), rgba(20, 22, 29, .94); }
.step-nav button { position: relative; overflow: hidden; }
.step-nav button::after { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; content: ""; opacity: 0; background: #b7c8ee; transition: opacity .25s; }
.step-nav button[data-state=active]::after { opacity: 1; }
.form-progress i { background: linear-gradient(90deg, #92a9d8, #d3c1dc, #d5dff5); box-shadow: 0 0 15px rgba(165, 188, 235, .28); }

.question-option,
.field input,
.field textarea,
.character-row input {
  transition: border-color .25s, background .25s, box-shadow .25s, transform .25s;
}
.question-option:hover { transform: translateX(3px); border-color: rgba(177, 198, 242, .23); }
.field input:focus,
.field textarea:focus,
.character-row input:focus { border-color: rgba(166, 190, 239, .55); box-shadow: 0 0 0 4px rgba(132, 161, 219, .07), 0 14px 34px rgba(0, 0, 0, .16); }

.loading-card { position: relative; overflow: hidden; }
.loading-card::after { position: absolute; right: 10%; bottom: -85px; left: 10%; height: 100px; border-radius: 50%; content: ""; background: rgba(122, 150, 212, .12); filter: blur(45px); animation: phx-loading-glow 3.5s ease-in-out infinite alternate; }
.loader { width: 38px; height: 38px; border-color: rgba(178, 200, 244, .12); border-top-color: #b8cdf6; box-shadow: 0 0 28px rgba(145, 177, 237, .14); }

.toast { border-color: rgba(178, 200, 244, .25); background: rgba(30, 35, 48, .92); backdrop-filter: blur(18px); }

@keyframes phx-aurora-drift {
  0% { transform: translate3d(-5%, -2%, 0) rotate(-8deg) scale(.92); }
  100% { transform: translate3d(7%, 5%, 0) rotate(12deg) scale(1.08); }
}
@keyframes phx-orbit { to { transform: rotate(360deg); } }
@keyframes phx-sigil-scan {
  0%, 18% { transform: translateY(-40px) rotate(38deg); opacity: 0; }
  43%, 55% { opacity: .75; }
  78%, 100% { transform: translateY(42px) rotate(38deg); opacity: 0; }
}
@keyframes phx-planet-breathe {
  from { transform: translate3d(0, 7px, 0) scale(.985); filter: brightness(.88); }
  to { transform: translate3d(0, -7px, 0) scale(1.015); filter: brightness(1.08); }
}
@keyframes phx-live { 50% { opacity: .45; transform: scale(.78); } }
@keyframes phx-loading-glow { to { transform: translateY(-16px) scaleX(1.1); opacity: .6; } }

@media (max-width: 1100px) {
  .topbar { width: calc(100% - 36px); }
  .hero::after { right: -24%; width: 64vw; }
  .hero-emblem { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .topbar { top: 9px; width: calc(100% - 18px); height: 66px; padding-inline: 12px; border-radius: 15px; }
  .hero { padding-top: 92px; }
  .hero::after { top: 13%; right: -65%; width: 125vw; opacity: .48; }
  .hero h1 { font-size: clamp(50px, 15vw, 72px); }
  .hero-lead { font-size: 16px; line-height: 1.75; }
  .hero-live { align-items: flex-start; flex-wrap: wrap; border-radius: 14px; }
  .hero-live small { width: 100%; padding: 7px 0 0 16px; border: 0; }
  .phx-horizon { top: 420px; right: -32vw; width: 105vw; height: 38vw; }
  .orbit-a { right: -62vw; width: 125vw; height: 125vw; }
  .orbit-b { display: none; }
  .route-grid > button { min-height: 0; }
  .route-grid h3 { font-size: 24px; }
  .community-intro p, .senate-copy p, .scope-card p, .path-grid p { font-size: 14px; }
  .cinematic-reveal { transform: translateY(18px); }
}

@media (prefers-reduced-motion: reduce) {
  .phx-aurora,
  .phx-orbit,
  .public-sigil::before,
  .hero::after,
  .hero-emblem i,
  .hero-live i,
  .loading-card::after { animation: none; }
  .cinematic-reveal { opacity: 1; transform: none; transition: none; }
  .community-values article,
  .scope-card,
  .path-grid article,
  .route-grid > button { transition: none; }
}
