/* THE TRIAS · Dachportal Cosmic Universe V17 */
:root {
  color-scheme: dark;
  --space: #030717;
  --blue: #257afc;
  --magenta: #ee15be;
  --bright: #f6f7ff;
  --mute: #a6b4d8;
  --trias-accent-a: #ee15be;
  --trias-accent-b: #257afc;
  --trias-glow-a: rgba(238, 21, 190, 0.45);
  --trias-border: rgba(145, 185, 255, 0.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  min-width: 280px;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 49%, #08194a 0%, #050d2c 37%, #020613 73%, #02030b 100%);
  color: var(--bright);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

#space {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 76px 18px 24px;
  text-align: center;
}

.hero { max-width: 850px; margin: 0 auto; }
.kicker { font-size: 11px; font-weight: 650; letter-spacing: 0.27em; color: #eb9ce4; }
.kicker i { font-style: normal; color: #718dff; padding: 0 10px; }

h1 {
  font-size: clamp(39px, 7.3vw, 84px);
  line-height: 1;
  letter-spacing: 0.13em;
  font-weight: 750;
  margin: 15px 0 8px;
  text-shadow: 0 0 35px #415fff27;
}
h1 span { color: #f9edff; text-shadow: 0 0 35px #ee16be45; }
.claim { font-size: clamp(12px, 2vw, 18px); letter-spacing: 0.24em; color: #b8bffc; margin: 0 0 14px; }
.intro { font-size: clamp(12px, 1.5vw, 15px); color: #a5b8e0; line-height: 1.6; margin: 0 auto; }

.cosmos {
  width: min(92vw, 680px);
  aspect-ratio: 1;
  position: relative;
  margin: -6px auto -6px;
  isolation: isolate;
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
}

.orbit { position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; }
.orbit-one { inset: 13.1%; border: 1px solid rgba(94, 115, 199, 0.28); }
.orbit-two { inset: 18%; border: 1px solid rgba(229, 35, 198, 0.18); transform: rotate(-17deg); }
.orbit-three { inset: 8.2%; border: 1px dotted rgba(151, 180, 247, 0.13); }

.outer-energy {
  position: absolute;
  inset: 21.3%;
  border-radius: 50%;
  z-index: 1;
  animation: spinClockwise 36s linear infinite;
  pointer-events: none;
}

.energy-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 10deg, transparent 0 7%, #f61bc0 10%, #fd57d7 15%, transparent 19% 27%, #ad146b 31%, #fa1dc2 37%, transparent 42% 49%, #cf0eb4 55%, #ff64e2 63%, transparent 69% 80%, #f11a9f 86%, #fa46d9 94%, transparent 100%);
  -webkit-mask: radial-gradient(circle, transparent 0 77.7%, #000 79% 88%, transparent 89.4%);
  mask: radial-gradient(circle, transparent 0 77.7%, #000 79% 88%, transparent 89.4%);
  filter: drop-shadow(0 0 9px #ef26c0);
}

.energy-segments {
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  border: 2px solid rgba(245, 33, 191, 0.3);
  border-right-color: transparent;
  border-bottom-color: transparent;
  filter: drop-shadow(0 0 8px #fa37cd);
}

.inner-energy {
  position: absolute;
  inset: 27%;
  z-index: 2;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle at 45% 40%, #1f62dd 0%, #103688 29%, #07174d 65%, #020a28 100%);
  box-shadow: inset 0 0 38px #030821, 0 0 28px rgba(23, 93, 233, 0.2);
  border: 1px solid rgba(99, 184, 255, 0.48);
}

#galaxy {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  animation: spinCounterClockwise 38s linear infinite;
}

.nebula-wisps {
  position: absolute;
  inset: -20%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.45;
  background: repeating-conic-gradient(from 60deg, transparent 0deg 19deg, rgba(75, 170, 255, 0.04) 21deg 29deg, transparent 31deg 46deg);
  animation: spinCounterClockwise 24s linear infinite;
}

.core-spark {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(circle at 49% 49%, rgba(190, 227, 255, 0.1) 0, transparent 14%, transparent 100%);
}

.center-word {
  position: absolute;
  left: 30%;
  top: 45.8%;
  width: 40%;
  text-align: center;
  z-index: 3;
  pointer-events: none;
}

.center-word span {
  display: block;
  font-weight: 740;
  letter-spacing: 0.15em;
  font-size: clamp(16px, 3.5vw, 28px);
  color: #fff;
  text-shadow: 0 0 16px #7eb4ff, 0 0 28px #448efe;
}

.center-word small {
  display: block;
  margin-top: 7px;
  font-size: clamp(6px, 1.1vw, 10px);
  letter-spacing: 0.12em;
  color: #d5e5ff;
  text-shadow: 0 0 8px #307fff;
}

/* Strictly free-floating glowing SVG stars without background circles/plates */
.stellar {
  --star: #ff50cf;
  position: absolute;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 104px;
  min-height: 105px;
  transform: translate(-50%, -50%);
  background: none;
  border: 0;
  border-radius: 0;
  padding: 4px 0;
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.stellar:focus-visible { outline: 2px solid #d9edff; outline-offset: 7px; border-radius: 10px; }
.stellar .star-shape {
  width: clamp(52px, 9vw, 75px);
  height: clamp(52px, 9vw, 75px);
  display: block;
  overflow: visible;
  filter: drop-shadow(0 0 10px var(--star));
  animation: starBreathe 4.4s ease-in-out infinite;
  transform-origin: center center;
}
.stellar svg { pointer-events: none; }
.stellar[data-star=therift] { --star: #ffbd2a; }
.stellar[data-star=thefracture] { --star: #ff2b1a; }
.stellar[aria-pressed=true] .star-shape,
.stellar:hover .star-shape {
  filter: drop-shadow(0 0 16px var(--star)) drop-shadow(0 0 14px var(--star));
}
.stellar .stellar-label {
  font-size: clamp(9px, 1.45vw, 11.5px);
  font-weight: 750;
  letter-spacing: 0.12em;
  white-space: nowrap;
  line-height: 1.5;
  color: #eef4ff;
  text-shadow: 0 1px 6px #000, 0 0 9px #020820;
  padding-top: 3px;
}

.ambient-message {
  position: absolute;
  left: 30%;
  width: 40%;
  bottom: 19%;
  color: #91a5db;
  font-size: clamp(7px, 1.2vw, 10px);
  letter-spacing: 0.16em;
  pointer-events: none;
  z-index: 2;
}

/* Frameless typography readout below cosmos */
.readout {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 15px;
}
.readout-index { font-size: 10px; letter-spacing: 0.22em; color: #db7dd5; font-weight: 750; }
.readout h2 { margin: 10px 0 10px; font-size: clamp(18px, 2.9vw, 27px); letter-spacing: 0.085em; font-weight: 770; line-height: 1.35; }
.readout h2 em { font-style: normal; color: #b5c5f5; font-weight: 500; }
.readout p { max-width: 590px; margin: 0 auto; color: #b3c3e7; font-size: clamp(12px, 1.45vw, 14px); line-height: 1.65; }
.readout-status { margin: 10px 0 0; font-size: 10px; font-weight: 680; letter-spacing: 0.16em; color: #8faef9; }

.trias-command-orbs {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 18px 26px;
  margin: 22px auto 12px;
}

.trias-cmd-btn {
  background: none;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 96px;
  color: #e6eeff;
  cursor: pointer;
}

.trias-cmd-btn .cmd-disc {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: radial-gradient(circle at 35% 28%, rgba(36, 72, 195, 0.85), rgba(10, 14, 48, 0.92));
  border: 1.5px solid #ee15be;
  box-shadow: 0 0 22px rgba(238, 21, 190, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.trias-cmd-btn:hover .cmd-disc {
  transform: scale(1.08);
  box-shadow: 0 0 28px rgba(238, 21, 190, 0.65);
}

.trias-cmd-btn .cmd-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.35;
  text-transform: uppercase;
  color: #b7c8f3;
}

/* Music Dock */
.footer { margin: 18px auto 14px; }
.music-box { display: flex; flex-direction: column; align-items: center; margin-bottom: 12px; }
.music-overline { display: flex; align-items: center; gap: 8px; font-size: 9px; letter-spacing: 0.2em; color: #8e9ed0; margin-bottom: 10px; }
.sound-led { width: 7px; height: 7px; border-radius: 50%; background: #415278; }
.sound-led.on { background: #ff4fd8; box-shadow: 0 0 12px #ff4fd8; }
.music-controls {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 2.5vw, 30px);
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(5, 12, 38, 0.55);
  border: 1px solid rgba(135, 175, 255, 0.16);
}
.music-disc {
  border: 0;
  background: transparent;
  color: #aebcec;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 60px;
  padding: 0;
  cursor: pointer;
}
.music-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #162b70 0%, #080f33 80%);
  border: 1px solid rgba(135, 175, 255, 0.25);
  font-size: 18px;
  color: #f7dbff;
}
.music-disc.active .music-icon {
  border-color: #ff4fd8;
  box-shadow: 0 0 20px rgba(255, 28, 168, 0.7);
}
.greek-symbol { width: 22px; height: 22px; fill: currentColor; }
.disc-label { font-size: 8px; line-height: 1.3; letter-spacing: 0.08em; font-weight: 800; color: #8e9ed0; text-transform: uppercase; }
.footer p { font-size: 10px; color: #6476a6; margin: 12px 0 0; letter-spacing: 0.05em; }

.paused .outer-energy,
.paused #galaxy,
.paused .nebula-wisps,
.paused .star-shape { animation-play-state: paused !important; }

@keyframes spinClockwise { to { transform: rotate(360deg); } }
@keyframes spinCounterClockwise { to { transform: rotate(-360deg); } }
@keyframes starBreathe { 0%, 100% { transform: scale(0.92); } 50% { transform: scale(1.08); } }

@media (max-width: 520px) {
  .page { padding: 66px 7px 18px; }
  .kicker { font-size: 8px; letter-spacing: 0.14em; }
  h1 { font-size: clamp(34px, 10vw, 50px); }
  .cosmos { width: min(100%, 420px); margin: 4px auto; }
  .stellar { min-width: 90px; min-height: 82px; gap: 3px; }
  .stellar .star-shape { width: 52px; height: 52px; }
  .stellar .stellar-label { font-size: 9px; letter-spacing: 0.07em; }
  .music-controls { gap: 8px; padding: 6px 10px; }
  .music-disc { min-width: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .outer-energy, #galaxy, .nebula-wisps, .star-shape { animation: none !important; }
}
