/* ============================================================
   INDEX — Homepage showcase styles
============================================================ */

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 1.5rem 5rem;
  z-index: 2;
  text-align: center;
  overflow: hidden;
}

/* Realm art backgrounds */
.hero-realms {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-realm {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.9s var(--ease), transform 1.2s var(--ease);
  filter: saturate(1.05) contrast(1.02);
}

.hero-realm.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-realm-shade {
  position: absolute;
  inset: 0;
  /* Lighter wash so constellation lines + shooting stars stay visible over the art */
  background:
    radial-gradient(ellipse at 50% 38%, rgba(5, 6, 13, 0.15) 0%, rgba(5, 6, 13, 0.55) 55%, rgba(5, 6, 13, 0.82) 100%),
    linear-gradient(180deg, rgba(5, 6, 13, 0.4) 0%, transparent 40%, rgba(5, 6, 13, 0.78) 100%);
  z-index: 1;
}

/* Keep Stacked Chaos vivid as the permanent home backdrop */
.hero-realm[data-realm="chaos"] {
  filter: saturate(1.12) contrast(1.05) brightness(1.03);
  opacity: 1;
  transform: scale(1);
}

/* Realm picker UI */
.realm-picker {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fade-up 0.95s 0.75s var(--ease-out) forwards;
}

.realm-picker-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.realm-picker-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.realm-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10, 12, 24, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.realm-btn:hover {
  border-color: rgba(224, 192, 106, 0.35);
  color: var(--gold-lt);
  transform: translateY(-2px);
}

.realm-btn.is-active {
  border-color: rgba(224, 192, 106, 0.45);
  color: var(--white);
  background: rgba(224, 192, 106, 0.12);
  box-shadow: 0 0 24px rgba(224, 192, 106, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Primary wild realm gets a little extra swagger when active */
.realm-btn[data-realm="chaos"].is-active {
  border-color: rgba(255, 45, 155, 0.45);
  background: linear-gradient(135deg, rgba(224, 192, 106, 0.16), rgba(0, 240, 208, 0.1), rgba(255, 45, 155, 0.12));
  box-shadow: 0 0 28px rgba(155, 109, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Slightly richer landing hero over the maximalist art */
.hero-realm[data-realm="chaos"].is-active {
  filter: saturate(1.12) contrast(1.05) brightness(1.02);
}

.realm-btn-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.realm-shuffle {
  margin-top: 0.15rem;
  background: none;
  border: none;
  color: var(--teal);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s;
}

.realm-shuffle:hover {
  opacity: 1;
  transform: scale(1.05);
}

.hero-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(224, 192, 106, 0.12);
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.hero-orbit.o1 {
  width: min(90vw, 720px);
  height: min(90vw, 720px);
  animation: spin-slow 60s linear infinite;
  border-color: rgba(224, 192, 106, 0.1);
  border-style: dashed;
}

.hero-orbit.o2 {
  width: min(70vw, 520px);
  height: min(70vw, 520px);
  animation: spin-slow 40s linear infinite reverse;
  border-color: rgba(0, 240, 208, 0.1);
}

.hero-orbit.o3 {
  width: min(50vw, 340px);
  height: min(50vw, 340px);
  animation: spin-slow 28s linear infinite;
  border-color: rgba(155, 109, 255, 0.12);
}

.orbit-node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 16px currentColor;
}

.o1 .orbit-node { background: var(--gold); color: var(--gold); }
.o2 .orbit-node { background: var(--teal); color: var(--teal); top: auto; bottom: 10%; left: 8%; }
.o3 .orbit-node { background: var(--violet); color: var(--violet); top: 20%; left: auto; right: 0; }

.hero-inner {
  max-width: 900px;
  position: relative;
  z-index: 3;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-lt);
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fade-up 0.9s 0.15s var(--ease-out) forwards;
}

.hero-badge .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero h1 {
  opacity: 0;
  animation: fade-up 0.95s 0.3s var(--ease-out) forwards;
  margin-bottom: 1.35rem;
}

/* ── Manifesto headline — "where wild ideas become real apps" ── */
.hero-manifesto {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2em;
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  position: relative;
  padding: 0.35em 0.15em 0.5em;
  filter: drop-shadow(0 8px 40px rgba(0, 0, 0, 0.55));
}

.hero-manifesto::before {
  content: '';
  position: absolute;
  inset: -8% -6%;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(224, 192, 106, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse at 50% 70%, rgba(0, 240, 208, 0.08) 0%, transparent 60%);
  z-index: -1;
  pointer-events: none;
}

.hero-line-1 {
  display: block;
  color: #fff;
  text-shadow:
    0 0 40px rgba(255, 255, 255, 0.18),
    0 2px 24px rgba(0, 0, 0, 0.7),
    0 0 80px rgba(224, 192, 106, 0.15);
  font-weight: 900;
}

.hero-line-2 {
  display: block;
  font-weight: 900;
  font-size: 1.05em;
  line-height: 1.05;
  filter: drop-shadow(0 0 28px rgba(0, 240, 208, 0.35));
  position: relative;
}

/* Shimmer underline under the gradient line */
.hero-line-2::after {
  content: '';
  display: block;
  width: min(72%, 420px);
  height: 3px;
  margin: 0.35em auto 0;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold) 20%,
    var(--teal) 50%,
    var(--violet-lt) 80%,
    transparent
  );
  background-size: 200% 100%;
  animation: gradient-flow 4s ease-in-out infinite;
  box-shadow: 0 0 18px rgba(0, 240, 208, 0.45);
}

/* Soft pulsing glow ring behind manifesto */
.hero-manifesto::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 55%;
  width: min(90vw, 640px);
  height: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(0, 240, 208, 0.14) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  animation: manifesto-glow 4.5s ease-in-out infinite;
}

@keyframes manifesto-glow {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

.hero .lede {
  max-width: 620px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  animation: fade-up 0.95s 0.45s var(--ease-out) forwards;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fade-up 0.95s 0.6s var(--ease-out) forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fade-up 1s 1.1s var(--ease-out) forwards;
  z-index: 3;
}

.hero-scroll span {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-line {
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* MISSION STRIP */
.mission-strip {
  position: relative;
  z-index: 2;
  margin: 0 1.5rem;
}

.mission-strip-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  text-align: center;
  background: rgba(224, 192, 106, 0.05);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(224, 192, 106, 0.2);
  border-radius: var(--radius-xl);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.mission-strip-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
}

.mission-strip-number {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.mission-strip-number span {
  color: var(--teal);
  text-shadow: 0 0 30px var(--teal-glow);
}

.mission-strip-text {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 300;
  color: var(--text-mid);
  margin-bottom: 1.5rem;
}

.mission-strip-text strong {
  color: var(--white);
  font-weight: 600;
}

.strip-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* PATHWAYS */
.pathway-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.pathway-card {
  padding: 2rem 1.65rem;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.pathway-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  border-radius: 16px;
  margin-bottom: 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.pathway-card.vault .pathway-icon {
  background: rgba(0, 240, 208, 0.08);
  border-color: rgba(0, 240, 208, 0.22);
  box-shadow: 0 0 24px rgba(0, 240, 208, 0.1);
}

.pathway-card.lab .pathway-icon {
  background: rgba(224, 192, 106, 0.08);
  border-color: rgba(224, 192, 106, 0.22);
  box-shadow: 0 0 24px rgba(224, 192, 106, 0.1);
}

.pathway-card.compound .pathway-icon {
  background: rgba(155, 109, 255, 0.08);
  border-color: rgba(155, 109, 255, 0.22);
  box-shadow: 0 0 24px rgba(155, 109, 255, 0.1);
}

.pathway-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.pathway-card.vault .pathway-label { color: var(--teal); }
.pathway-card.lab .pathway-label { color: var(--gold-lt); }
.pathway-card.compound .pathway-label { color: var(--violet-lt); }

.pathway-name {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.85rem;
  line-height: 1.25;
}

.pathway-desc {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.7;
  flex: 1;
}

.pathway-cta {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: gap 0.25s var(--ease);
}

.pathway-card.vault .pathway-cta { color: var(--teal); }
.pathway-card.lab .pathway-cta { color: var(--gold-lt); }
.pathway-card.compound .pathway-cta { color: var(--violet-lt); }
.pathway-cta:hover { gap: 0.7rem; }

/* ABOUT STRIP */
.about-strip {
  position: relative;
  z-index: 2;
  padding: 1rem 1.5rem 5rem;
}

.about-strip-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  padding: 2.75rem 2rem;
}

.about-strip-text {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 0.65rem;
}

.about-strip-text strong {
  color: var(--white);
  font-weight: 600;
}

.about-strip-sig {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 300;
  font-style: italic;
  color: var(--gold-lt);
  margin-top: 1.5rem;
}

.about-strip-sig a {
  color: var(--gold-lt);
  text-decoration: none;
  border-bottom: 1px solid rgba(224, 192, 106, 0.3);
  transition: border-color 0.2s;
}

.about-strip-sig a:hover {
  border-color: var(--gold-lt);
}

/* FEATURED APPS */
.apps-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.15rem;
}

.app-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.app-card .badge {
  align-self: flex-start;
  margin-bottom: 0.9rem;
}

.app-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.65rem;
}

.app-card.mission-app .app-name {
  color: var(--teal);
}

.app-desc {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex: 1;
}

.app-link {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gold-lt);
  transition: color 0.2s, gap 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.app-link.teal { color: var(--teal); }
.app-link:hover { color: var(--white); gap: 0.55rem; }

/* IDENTITY / LOVES */
.loves-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.love-card {
  padding: 1.5rem 1.25rem;
  text-align: center;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.love-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 12px rgba(224, 192, 106, 0.3));
}

.love-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.love-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* CTA BAND */
.cta-band {
  position: relative;
  z-index: 2;
  padding: 2rem 1.5rem 6rem;
}

.cta-band-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
  text-align: center;
}

.cta-band-inner .display {
  margin-bottom: 0.85rem;
}

.cta-band-inner .lede {
  margin-bottom: 1.75rem;
}

/* RESPONSIVE */
@media (max-width: 960px) {
  .pathway-grid { grid-template-columns: 1fr; }
  .loves-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 7rem 1.25rem 4rem; }
}

@media (max-width: 600px) {
  .loves-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .strip-actions { flex-direction: column; align-items: center; }
  .apps-header { flex-direction: column; align-items: flex-start; }
}


/* ============================================================
   VISION STRIP (fun tone)
============================================================ */
.vision-strip {
  background: rgba(224, 192, 106, 0.05) !important;
  border-color: rgba(224, 192, 106, 0.2) !important;
}

.vision-strip::before {
  background: linear-gradient(90deg, transparent, var(--gold), var(--teal), transparent) !important;
}

.vision-strip .mission-strip-number {
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  line-height: 1.35;
}

.vision-strip .mission-strip-number span {
  color: var(--gold-lt);
  text-shadow: 0 0 24px var(--gold-glow);
}

/* ============================================================
   SORTING CONSTELLATION
============================================================ */
.sorting-section {
  padding-top: 3rem;
}

.sorting-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  transition: box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}

.sorting-shell[data-house="forgehand"] {
  border-color: rgba(224, 192, 106, 0.35);
  box-shadow: 0 0 40px rgba(224, 192, 106, 0.12), var(--shadow-glass);
}

.sorting-shell[data-house="vaultwarden"] {
  border-color: rgba(0, 240, 208, 0.35);
  box-shadow: 0 0 40px rgba(0, 240, 208, 0.12), var(--shadow-glass);
}

.sorting-shell[data-house="starcrafter"] {
  border-color: rgba(155, 109, 255, 0.35);
  box-shadow: 0 0 40px rgba(155, 109, 255, 0.12), var(--shadow-glass);
}

.sorting-shell[data-house="nightweaver"] {
  border-color: rgba(255, 45, 155, 0.35);
  box-shadow: 0 0 40px rgba(255, 45, 155, 0.12), var(--shadow-glass);
}

.constellation-stage {
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(155, 109, 255, 0.08), transparent 55%),
    radial-gradient(ellipse at 30% 40%, rgba(224, 192, 106, 0.06), transparent 50%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.constellation-svg {
  width: min(100%, 560px);
  height: auto;
  opacity: 0.9;
}

.cstar {
  fill: #f0d88a;
  opacity: 0.75;
  animation: star-twinkle 3s ease-in-out infinite;
}

.cstar:nth-child(2n) { fill: #00f0d0; animation-duration: 2.4s; }
.cstar:nth-child(3n) { fill: #c4a8ff; animation-duration: 3.6s; }

.cstar.sorted {
  animation: star-burst 0.6s var(--ease) forwards;
}

@keyframes star-twinkle {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes star-burst {
  0% { r: 3; opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 1; }
}

.hat-float {
  position: absolute;
  font-size: 2.75rem;
  filter: drop-shadow(0 0 18px rgba(224, 192, 106, 0.45));
  animation: float-y 4s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.35s var(--ease), filter 0.35s;
  user-select: none;
  z-index: 2;
}

.hat-float:hover {
  transform: scale(1.12) translateY(-4px);
  filter: drop-shadow(0 0 28px rgba(224, 192, 106, 0.7));
}

.hat-float.hat-thinking {
  animation: hat-shake 0.7s var(--ease);
}

.hat-float.hat-active {
  filter: drop-shadow(0 0 24px rgba(0, 240, 208, 0.5));
}

.hat-float.hat-sorted {
  animation: hat-celebrate 0.8s var(--ease);
  filter: drop-shadow(0 0 32px rgba(224, 192, 106, 0.8));
}

@keyframes hat-shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-12deg) scale(1.05); }
  50% { transform: rotate(10deg) scale(1.08); }
  75% { transform: rotate(-6deg); }
}

@keyframes hat-celebrate {
  0% { transform: scale(1) translateY(0); }
  40% { transform: scale(1.25) translateY(-16px); }
  100% { transform: scale(1.1) translateY(-4px); }
}

.sorting-panel {
  padding: 2rem 1.75rem 2.25rem;
  text-align: center;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sort-state {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: none;
  flex-direction: column;
  align-items: center;
  animation: fade-up 0.45s var(--ease-out);
}

.sort-state.active {
  display: flex;
}

.sort-hat-voice {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 300;
  font-style: italic;
  color: var(--gold-lt);
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 460px;
}

.sort-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.sort-sub {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--text-mid);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.sort-progress {
  width: 100%;
  margin-bottom: 1.25rem;
}

.sort-progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.sort-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  border-radius: 99px;
  transition: width 0.4s var(--ease);
  box-shadow: 0 0 12px var(--teal-glow);
}

.sort-progress-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.sort-choices {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  transition: opacity 0.2s;
}

.sort-choice {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.95rem 1.15rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  animation: fade-up 0.4s var(--ease-out) both;
  backdrop-filter: blur(8px);
}

.sort-choice:hover {
  border-color: rgba(224, 192, 106, 0.4);
  background: rgba(224, 192, 106, 0.08);
  transform: translateX(4px);
  box-shadow: 0 0 20px rgba(224, 192, 106, 0.1);
  color: var(--white);
}

.sort-choice:active {
  transform: scale(0.98);
}

.sort-result-badge {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 20px var(--gold-glow));
  animation: hat-celebrate 0.8s var(--ease);
}

.sort-result-tagline {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  font-style: italic;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.sort-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.sort-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  animation: spark-fly 0.9s var(--ease-out) forwards;
  box-shadow: 0 0 8px currentColor;
  z-index: 5;
}

@keyframes spark-fly {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(0.2); }
}

@media (max-width: 600px) {
  .constellation-stage { height: 160px; }
  .hat-float { font-size: 2.2rem; }
  .sorting-panel { padding: 1.5rem 1.15rem 1.75rem; min-height: 260px; }
  .sort-choice { font-size: 0.85rem; padding: 0.85rem 1rem; }
}
