:root {
  --bg: #070d0a;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f4fff7;
  --muted: #9fb4a8;
  --green: #34d989;
  --gold: #d6a449;
  --dark-green: #0a1a12;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 16%, rgba(52, 217, 137, 0.2), transparent 28%),
    radial-gradient(circle at 82% 76%, rgba(214, 164, 73, 0.16), transparent 30%),
    linear-gradient(135deg, #050907, #0b1710 48%, #07110d);
}

a {
  color: inherit;
  text-decoration: none;
}

.proto-shell {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 620px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: clamp(18px, 3vw, 36px);
  overflow: hidden;
}

.proto-shell::before {
  content: "";
  position: absolute;
  inset: 10%;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle, black, transparent 72%);
}

.proto-header,
.proto-stage,
.result-panel {
  position: relative;
  z-index: 1;
}

.proto-header {
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.proto-menu {
  position: relative;
  z-index: 40;
}

.proto-menu summary {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  list-style: none;
  cursor: pointer;
  background:
    radial-gradient(circle at 30% 20%, rgba(52, 217, 137, 0.22), transparent 42%),
    rgba(7, 13, 10, 0.78);
  border: 1px solid rgba(214, 164, 73, 0.42);
  border-radius: 999px;
  box-shadow: 0 12px 38px rgba(52, 217, 137, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(14px);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.proto-menu summary:hover,
.proto-menu[open] summary {
  transform: translateY(-1px);
  border-color: rgba(52, 217, 137, 0.72);
  box-shadow: 0 16px 46px rgba(52, 217, 137, 0.23), 0 0 0 3px rgba(52, 217, 137, 0.08);
}

.proto-menu summary::-webkit-details-marker {
  display: none;
}

.proto-menu summary span,
.proto-menu summary span::before,
.proto-menu summary span::after {
  width: 14px;
  height: 2px;
  display: block;
  background: #f4fff7;
  border-radius: 999px;
}

.proto-menu summary span {
  position: relative;
}

.proto-menu summary span::before,
.proto-menu summary span::after {
  content: "";
  position: absolute;
  left: 0;
}

.proto-menu summary span::before {
  top: -5px;
}

.proto-menu summary span::after {
  top: 5px;
}

.proto-menu-panel {
  position: absolute;
  top: 46px;
  left: 0;
  z-index: 50;
  min-width: 210px;
  display: grid;
  gap: 2px;
  padding: 8px;
  background-color: #050907 !important;
  background-image: none !important;
  border: 1px solid rgba(214, 164, 73, 0.32);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(52, 217, 137, 0.08),
    0 28px 82px rgba(0, 0, 0, 0.72);
  opacity: 1;
  mix-blend-mode: normal;
  isolation: isolate;
  transform-origin: top left;
  animation: menuDrop 0.18s ease both;
}

.proto-menu-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #050907;
  border-radius: inherit;
}

.proto-menu-panel a {
  padding: 10px 11px;
  color: #f4fff7;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 800;
}

.proto-menu-panel a:hover {
  color: #06100b;
  background: linear-gradient(135deg, var(--green), var(--gold));
}

.proto-status {
  min-width: min(260px, 42vw);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
}

.proto-status span {
  grid-column: 2;
}

.back-step {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  color: rgba(244, 255, 247, 0.72);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
}

.back-step[hidden] {
  display: none;
}

.progress-track {
  grid-column: 2;
  position: relative;
  width: 100%;
  height: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.progress-track i {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  width: 0;
  display: block;
  background: linear-gradient(90deg, var(--green), var(--gold));
  border-radius: 999px;
  transition: width 0.32s ease;
}

.proto-stage {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(390px, 0.95fr);
  align-items: center;
  gap: clamp(18px, 4vw, 56px);
}

.proto-copy {
  max-width: 720px;
  min-height: 310px;
  display: grid;
  align-content: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4.9vw, 5.35rem);
  line-height: 1;
  letter-spacing: 0;
}

.proto-lead {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.45vw, 1.12rem);
  line-height: 1.56;
}

.proto-orbit {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
  perspective: 1200px;
  transform-style: preserve-3d;
  isolation: isolate;
}

.orbit-core {
  position: relative;
  isolation: isolate;
  width: min(46vw, 374px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,0.22), transparent 24%),
    radial-gradient(circle at 62% 70%, rgba(6, 16, 11, 0.42), transparent 36%),
    linear-gradient(135deg, rgba(52, 217, 137, 0.92), rgba(214, 164, 73, 0.85));
  color: #06100b;
  font-size: 1.86rem;
  font-weight: 900;
  box-shadow:
    0 40px 136px rgba(52, 217, 137, 0.28),
    inset -28px -34px 52px rgba(4, 12, 8, 0.22),
    inset 22px 20px 34px rgba(255, 255, 255, 0.18);
  background-size: 170% 170%;
  transform-style: preserve-3d;
  transition: transform 0.28s ease, border-radius 0.72s ease, background 0.72s ease, box-shadow 0.72s ease;
  will-change: transform, border-radius;
  animation: cosmicCore 6s ease-in-out infinite, plasmaDrift 13s ease-in-out infinite alternate;
}

.orbit-core::before,
.orbit-core::after {
  content: "";
  position: absolute;
  inset: -18%;
  border: 1px solid rgba(244, 255, 247, 0.18);
  border-radius: 50%;
  pointer-events: none;
  transform-style: preserve-3d;
}

.orbit-core::before {
  transform: rotateX(68deg) rotateZ(18deg);
  animation: ringOne 7s linear infinite;
}

.orbit-core::after {
  inset: -27%;
  border-color: rgba(214, 164, 73, 0.2);
  transform: rotateY(64deg) rotateZ(-24deg);
  animation: ringTwo 9s linear infinite reverse;
}

.orbit-core::before {
  z-index: 2;
}

.orbit-core::after {
  z-index: 2;
}

.orbit-core span {
  position: relative;
  z-index: 3;
  text-shadow: 0 1px 16px rgba(255, 255, 255, 0.28);
}

.orbit-core span::before {
  content: "";
  position: absolute;
  width: 190%;
  aspect-ratio: 1;
  left: 50%;
  top: 50%;
  z-index: -1;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.42), transparent 9%),
    conic-gradient(from 90deg, transparent, rgba(244, 255, 247, 0.22), transparent 45%, rgba(52, 217, 137, 0.2), transparent 72%);
  border-radius: 45%;
  opacity: 0.42;
  transform: translate(-50%, -50%);
  animation: innerPlasma 8s linear infinite;
}

.choice-zone {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.choice-zone[hidden] {
  display: none !important;
}

.choice-card {
  position: absolute;
  width: min(310px, 42%);
  min-height: 116px;
  padding: 18px;
  color: var(--text);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.028)),
    rgba(7, 13, 10, 0.42);
  border: 1px solid rgba(244, 255, 247, 0.16);
  border-radius: 18px;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  will-change: transform;
}

.choice-card[data-choice="a"] {
  left: 0;
  top: 53%;
  transform: translateY(-50%) rotate(-2deg);
  animation: satelliteA 5.8s ease-in-out infinite;
}

.choice-card[data-choice="b"] {
  right: 0;
  top: 53%;
  transform: translateY(-50%) rotate(2deg);
  animation: satelliteB 6.2s ease-in-out infinite;
}

.choice-card:hover {
  background: var(--panel-strong);
  border-color: rgba(52, 217, 137, 0.48);
  box-shadow: 0 24px 88px rgba(52, 217, 137, 0.18);
}

.choice-card:hover,
.choice-card:focus-visible {
  animation-play-state: paused;
}

.choice-card[data-choice="a"]:hover,
.choice-card[data-choice="a"]:focus-visible {
  transform: translateY(calc(-50% - 7px)) rotate(-3deg) scale(1.025);
}

.choice-card[data-choice="b"]:hover,
.choice-card[data-choice="b"]:focus-visible {
  transform: translateY(calc(-50% - 7px)) rotate(3deg) scale(1.025);
}

.is-transitioning .orbit-core {
  animation:
    orbitMorph 0.72s cubic-bezier(.22, 1, .36, 1),
    cosmicCore 6s ease-in-out infinite 0.72s,
    plasmaDrift 13s ease-in-out infinite alternate 0.72s;
}

.is-transitioning .choice-card {
  animation-play-state: paused;
}

.selected-a .choice-card[data-choice="a"] {
  animation: absorbA 0.48s ease forwards;
}

.selected-b .choice-card[data-choice="b"] {
  animation: absorbB 0.48s ease forwards;
}

.selected-a .choice-card[data-choice="b"],
.selected-b .choice-card[data-choice="a"] {
  opacity: 0.42;
}

.choice-card span,
.choice-card small {
  display: block;
}

.choice-card span {
  font: inherit;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 900;
}

.choice-card small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.result-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  min-height: 156px;
  padding: 22px;
  background: rgba(7, 13, 10, 0.78);
  border: 1px solid rgba(52, 217, 137, 0.3);
  border-radius: 16px;
  backdrop-filter: blur(18px);
}

.result-close {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #ff6b6b;
  background: rgba(255, 44, 44, 0.08);
  border: 1px solid rgba(255, 87, 87, 0.34);
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.result-panel[hidden] {
  display: none;
}

.result-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 3vw, 2.4rem);
}

.result-panel p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-cta,
.secondary-cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 10px;
  font: inherit;
  font-weight: 900;
}

.primary-cta {
  color: #06100b;
  background: linear-gradient(135deg, var(--green), var(--gold));
}

.secondary-cta {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.pulse-a .orbit-core {
  box-shadow: 0 30px 110px rgba(52, 217, 137, 0.38);
}

.pulse-b .orbit-core {
  box-shadow: 0 30px 110px rgba(214, 164, 73, 0.34);
}

.hover-a .orbit-core {
  animation-play-state: paused;
  transform: rotateX(8deg) rotateY(16deg) scale(1.055);
  box-shadow:
    0 42px 150px rgba(52, 217, 137, 0.34),
    inset -28px -34px 52px rgba(4, 12, 8, 0.22),
    inset 22px 20px 34px rgba(255, 255, 255, 0.18);
}

.hover-b .orbit-core {
  animation-play-state: paused;
  transform: rotateX(8deg) rotateY(-16deg) scale(1.055);
  box-shadow:
    0 42px 150px rgba(214, 164, 73, 0.34),
    inset -28px -34px 52px rgba(4, 12, 8, 0.22),
    inset 22px 20px 34px rgba(255, 255, 255, 0.18);
}

.is-result .proto-stage {
  opacity: 0.78;
}

.is-result .result-panel {
  align-self: end;
}

.is-result .proto-stage,
.is-result .proto-header {
  filter: blur(5px);
}

.proto-shell[data-step="1"] .orbit-core {
  border-radius: 34% 66% 42% 58% / 55% 38% 62% 45%;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,0.24), transparent 23%),
    radial-gradient(circle at 68% 70%, rgba(6, 16, 11, 0.42), transparent 34%),
    linear-gradient(150deg, rgba(52, 217, 137, 0.95), rgba(83, 156, 240, 0.72), rgba(214, 164, 73, 0.78));
}

.proto-shell[data-step="2"] .orbit-core {
  border-radius: 24% 76% 31% 69% / 64% 28% 72% 36%;
  background:
    radial-gradient(circle at 38% 22%, rgba(255,255,255,0.24), transparent 24%),
    radial-gradient(circle at 76% 66%, rgba(6, 16, 11, 0.4), transparent 34%),
    linear-gradient(135deg, rgba(214, 164, 73, 0.92), rgba(52, 217, 137, 0.84), rgba(82, 210, 255, 0.58));
}

.proto-shell[data-step="3"] .orbit-core {
  border-radius: 42% 58% 50% 50% / 35% 42% 58% 65%;
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,0.27), transparent 22%),
    conic-gradient(from 80deg, rgba(52, 217, 137, 0.95), rgba(214, 164, 73, 0.9), rgba(82, 210, 255, 0.72), rgba(52, 217, 137, 0.95));
}

@keyframes cosmicCore {
  0%, 100% { transform: rotateX(0deg) rotateY(0deg) scale(1); }
  50% { transform: rotateX(8deg) rotateY(-12deg) scale(1.045); }
}

@keyframes plasmaDrift {
  0% { background-position: 0% 35%; }
  100% { background-position: 100% 65%; }
}

@keyframes innerPlasma {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.08); }
  100% { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
}

@keyframes ringOne {
  to { transform: rotateX(68deg) rotateZ(378deg); }
}

@keyframes ringTwo {
  to { transform: rotateY(64deg) rotateZ(336deg); }
}

@keyframes menuDrop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes satelliteA {
  0%, 100% { transform: translateY(-50%) translate3d(0, 0, 0) rotate(-2deg); }
  50% { transform: translateY(-50%) translate3d(10px, -12px, 0) rotate(-3deg); }
}

@keyframes satelliteB {
  0%, 100% { transform: translateY(-50%) translate3d(0, 0, 0) rotate(2deg); }
  50% { transform: translateY(-50%) translate3d(-10px, 12px, 0) rotate(3deg); }
}

@keyframes absorbA {
  0% { opacity: 1; transform: translateY(-50%) rotate(-2deg) scale(1); }
  70% { opacity: 0.72; transform: translate(42%, -50%) rotate(0deg) scale(0.82); }
  100% { opacity: 0; transform: translate(58%, -50%) rotate(0deg) scale(0.64); }
}

@keyframes absorbB {
  0% { opacity: 1; transform: translateY(-50%) rotate(2deg) scale(1); }
  70% { opacity: 0.72; transform: translate(-42%, -50%) rotate(0deg) scale(0.82); }
  100% { opacity: 0; transform: translate(-58%, -50%) rotate(0deg) scale(0.64); }
}

@keyframes satelliteMobileA {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1.5deg); }
  50% { transform: translate3d(8px, -8px, 0) rotate(-2.5deg); }
}

@keyframes satelliteMobileB {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(1.5deg); }
  50% { transform: translate3d(-8px, 8px, 0) rotate(2.5deg); }
}

@keyframes absorbMobileA {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(-1.5deg) scale(1); }
  100% { opacity: 0; transform: translate3d(24vw, 94px, 0) rotate(0deg) scale(0.62); }
}

@keyframes absorbMobileB {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(1.5deg) scale(1); }
  100% { opacity: 0; transform: translate3d(-24vw, -94px, 0) rotate(0deg) scale(0.62); }
}

@keyframes orbitMorph {
  0% {
    transform: rotateX(0deg) rotateY(0deg) scale(1);
    filter: saturate(1);
  }
  34% {
    transform: rotateX(18deg) rotateY(-24deg) scale(1.1);
    filter: saturate(1.45) hue-rotate(14deg);
  }
  62% {
    transform: rotateX(-8deg) rotateY(18deg) scale(0.98);
  }
  100% {
    transform: rotateX(0deg) rotateY(0deg) scale(1);
    filter: saturate(1);
  }
}

@media (max-width: 920px) {
  .proto-shell {
    min-height: 100dvh;
    gap: 12px;
  }

  .proto-stage {
    grid-template-columns: minmax(0, 0.88fr) minmax(260px, 1fr);
    gap: 14px;
  }

  .proto-orbit {
    min-height: 270px;
  }

  .orbit-core {
    width: min(34vw, 210px);
    font-size: 1.08rem;
  }

}

@media (max-width: 680px) {
  body {
    overflow: hidden;
  }

  .proto-shell {
    gap: 10px;
    padding: 12px;
    min-height: 100dvh;
  }

  .proto-stage {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 8px;
  }

  .proto-copy {
    max-width: none;
    min-height: 188px;
    align-content: start;
  }

  .proto-header {
    align-items: flex-start;
    gap: 10px;
  }

  .proto-menu-panel {
    position: fixed;
    top: 58px;
    left: 12px;
    z-index: 100;
    width: min(260px, calc(100vw - 24px));
    background-color: #050907 !important;
  }

  .proto-status {
    min-width: 180px;
    gap: 8px;
  }

  .eyebrow {
    margin-bottom: 8px;
    font-size: 0.68rem;
  }

  h1 {
    font-size: clamp(1.58rem, 8.6vw, 2.55rem);
    line-height: 1;
    min-height: 92px;
    display: flex;
    align-items: flex-end;
  }

  .proto-lead {
    margin-top: 10px;
    font-size: 0.86rem;
    line-height: 1.42;
    min-height: 62px;
  }

  .proto-orbit {
    min-height: 330px;
    display: grid;
    order: 2;
    margin-top: 2px;
  }

  .orbit-core {
    width: min(46vw, 164px);
    font-size: 0.95rem;
  }

  .orbit-core::before {
    inset: -13%;
  }

  .orbit-core::after {
    inset: -20%;
  }

  .choice-zone {
    inset: 0;
  }

  .choice-card {
    width: min(248px, 76vw);
    min-height: 76px;
    padding: 12px;
    border-radius: 14px;
  }

  .choice-card[data-choice="a"] {
    top: 4px;
    left: 0;
    transform: rotate(-1.5deg);
    animation: satelliteMobileA 5.8s ease-in-out infinite;
  }

  .choice-card[data-choice="b"] {
    top: auto;
    right: 0;
    bottom: 4px;
    transform: rotate(1.5deg);
    animation: satelliteMobileB 6.2s ease-in-out infinite;
  }

  .choice-card[data-choice="a"]:hover,
  .choice-card[data-choice="b"]:hover {
    transform: translateY(-3px) scale(1.015);
  }

  .selected-a .choice-card[data-choice="a"] {
    animation: absorbMobileA 0.48s ease forwards;
  }

  .selected-b .choice-card[data-choice="b"] {
    animation: absorbMobileB 0.48s ease forwards;
  }

  .choice-card span {
    font-size: 0.98rem;
  }

  .choice-card small {
    margin-top: 5px;
    font-size: 0.78rem;
    line-height: 1.3;
  }

  .result-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 6;
    width: min(92vw, 390px);
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
    padding: 20px 16px 16px;
    overflow: visible;
    transform: translate(-50%, -50%);
    background: rgba(7, 13, 10, 0.86);
    box-shadow: 0 28px 95px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(24px);
  }

  .result-panel h2 {
    margin-bottom: 8px;
    font-size: clamp(1.12rem, 5vw, 1.42rem);
    line-height: 1.08;
  }

  .result-panel p {
    font-size: 0.82rem;
    line-height: 1.36;
  }

  .is-result .proto-stage {
    opacity: 0.34;
    filter: blur(10px);
  }

  .is-result .proto-header {
    opacity: 0.5;
    filter: blur(8px);
  }

  .result-actions {
    justify-content: stretch;
  }

  .primary-cta,
  .secondary-cta {
    width: 100%;
  }
}
