:root {
  color-scheme: dark;
  --bg: #020303;
  --graphite: #0a0d10;
  --panel: rgba(14, 18, 22, 0.68);
  --line: rgba(173, 197, 218, 0.16);
  --line-hot: rgba(118, 235, 255, 0.52);
  --text: #eef7ff;
  --muted: #a7b3c0;
  --soft: #66727f;
  --cyan: #8bdcff;
  --blue: #7fa8ff;
  --green: #8cffcf;
  --amber: #f0b35f;
  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow: 0 36px 120px rgba(0, 0, 0, 0.62);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 58%, rgba(240, 179, 95, 0.16), transparent 22rem),
    radial-gradient(circle at 78% 18%, rgba(75, 142, 255, 0.16), transparent 32rem),
    radial-gradient(circle at 18% 8%, rgba(139, 220, 255, 0.12), transparent 28rem),
    linear-gradient(145deg, #020303 0%, #070a0d 40%, #020303 100%);
  overflow-x: hidden;
}

button, textarea { font: inherit; }

.shell {
  position: relative;
  width: min(1160px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) clamp(16px, 4vw, 44px) 44px;
  isolation: isolate;
}

.ambient, .grid-glow, .horizon-glow, .floor-reflection { position: fixed; inset: auto; pointer-events: none; z-index: -1; }

.ambient {
  width: 32rem;
  height: 32rem;
  border-radius: 999px;
  filter: blur(38px);
  opacity: 0.52;
  animation: drift 14s ease-in-out infinite alternate;
}

.ambient-one { top: 5%; left: -18rem; background: rgba(72, 154, 255, 0.18); }
.ambient-two { right: -16rem; bottom: 8%; background: rgba(240, 179, 95, 0.16); animation-delay: -5s; }

.horizon-glow {
  left: 50%;
  bottom: 12%;
  width: min(980px, 88vw);
  height: 240px;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at center, rgba(240, 179, 95, 0.18), transparent 64%),
    linear-gradient(90deg, transparent, rgba(139, 220, 255, 0.14), transparent);
  filter: blur(18px);
}

.floor-reflection {
  left: 50%;
  bottom: -14vh;
  width: min(1060px, 92vw);
  height: 38vh;
  transform: translateX(-50%) perspective(620px) rotateX(62deg);
  background:
    linear-gradient(90deg, transparent, rgba(240,179,95,.12), transparent),
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 96px);
  border-radius: 50%;
  opacity: .58;
}

.grid-glow {
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.026) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black, transparent 72%);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(26px, 8vh, 74px);
}

.brand-mark, .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(238, 247, 255, 0.88);
  letter-spacing: 0.02em;
}

.brand-mark { font-weight: 750; }

.brand-glyph {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(240, 179, 95, 0.46);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 50%, rgba(240,179,95,.9) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(240,179,95,.22), rgba(139,220,255,.08));
  box-shadow: 0 0 28px rgba(240, 179, 95, 0.24);
}

.status-pill {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  color: var(--muted);
}

.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
}

.view { display: none; animation: reveal 520ms ease both; }
.view.active { display: grid; }

.hero {
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
  gap: clamp(18px, 4vw, 34px);
  align-items: center;
}

.glass-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.105), rgba(255,255,255,0.025)),
    linear-gradient(180deg, rgba(240,179,95,0.04), transparent 48%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.14), inset 0 -1px 0 rgba(240,179,95,0.06);
  backdrop-filter: blur(24px);
}

.hero-copy { padding: clamp(24px, 5vw, 46px); }

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; line-height: 0.98; letter-spacing: -0.06em; }
h1 { max-width: 740px; font-size: clamp(3.1rem, 8.2vw, 7.2rem); }
h2 { font-size: clamp(2.1rem, 6vw, 4.6rem); }

.intro {
  max-width: 650px;
  margin: 22px 0 30px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.65;
}

.signal-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(240, 179, 95, 0.18);
  border-radius: 24px;
  background: rgba(1, 5, 8, 0.55);
}

.signal-form label { color: rgba(238,247,255,0.82); font-size: 0.92rem; }

textarea {
  min-height: 126px;
  resize: vertical;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 16px;
  color: var(--text);
  background: rgba(2, 8, 18, 0.72);
  outline: none;
  line-height: 1.5;
}

textarea:focus { border-color: var(--line-hot); box-shadow: 0 0 0 4px rgba(117,232,255,0.08); }

.form-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.microcopy { color: var(--soft); font-size: 0.78rem; }

button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  color: #031016;
  background: linear-gradient(135deg, var(--amber), var(--cyan));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(240, 179, 95, 0.18);
}

button:focus-visible { outline: 3px solid rgba(255,255,255,0.48); outline-offset: 3px; }
.ghost-button { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--line); box-shadow: none; }

.living-stage {
  position: relative;
  min-height: 580px;
  perspective: 960px;
}

.perspective-rig {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.floating-panel {
  position: absolute;
  padding: 18px;
  min-height: 154px;
  transform-style: preserve-3d;
  animation: floatPanel 5.6s ease-in-out infinite;
}

.floating-panel span {
  display: block;
  margin-bottom: 12px;
  color: var(--amber);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.floating-panel strong {
  display: block;
  max-width: 260px;
  color: rgba(238,247,255,.95);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.16;
}

.floating-panel small { display: block; margin-top: 12px; color: var(--muted); }

.panel-left {
  top: 16%;
  left: 0;
  width: min(260px, 48%);
  transform: rotateY(18deg) rotateX(2deg) translateZ(18px);
}

.panel-core {
  top: 30%;
  left: 25%;
  right: 11%;
  min-height: 245px;
  transform: translateZ(60px);
  animation-delay: -1.8s;
}

.panel-right {
  top: 9%;
  right: 0;
  width: min(286px, 50%);
  transform: rotateY(-16deg) rotateX(2deg) translateZ(34px);
  animation-delay: -3.2s;
}

.signal-beam {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,220,255,.7), rgba(240,179,95,.55), transparent);
  filter: drop-shadow(0 0 10px rgba(139,220,255,.42));
  opacity: .74;
  transform-origin: left center;
  animation: beamPulse 2.8s ease-in-out infinite;
}

.beam-one { top: 39%; left: 18%; width: 52%; transform: rotate(7deg); }
.beam-two { top: 56%; left: 35%; width: 46%; transform: rotate(-12deg); animation-delay: -1.2s; }

.core-node {
  position: relative;
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  margin: 8px auto 24px;
  border: 1px solid rgba(240,179,95,0.36);
  border-radius: 999px;
  color: var(--text);
  background: radial-gradient(circle, rgba(240,179,95,0.24), rgba(17,23,31,0.86));
  box-shadow: 0 0 62px rgba(240,179,95,0.18), 0 0 34px rgba(139,220,255,0.12);
  font-weight: 850;
  letter-spacing: 0.12em;
}

.micro-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }

.micro-flow i {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  color: rgba(238,247,255,.72);
  background: rgba(1, 5, 9, .38);
  font-size: .68rem;
  font-style: normal;
  animation: breathe 3.8s ease-in-out infinite;
}

.stage-base {
  position: absolute;
  left: 50%;
  bottom: 5%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%) rotateX(58deg);
  min-width: 260px;
  padding: 17px 24px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: rgba(238,247,255,.75);
  background: rgba(2, 6, 9, .68);
  box-shadow: 0 34px 90px rgba(0,0,0,.5);
}

.stage-base span {
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), var(--cyan));
  box-shadow: 0 0 14px rgba(240,179,95,.4);
}

.processing { min-height: 70vh; place-items: center; }
.processing-card { width: min(760px, 100%); padding: clamp(24px, 5vw, 46px); }
.processing-orb {
  width: 118px;
  height: 118px;
  margin: 26px auto 10px;
  border: 1px solid rgba(240,179,95,.28);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(240,179,95,.24), transparent 52%),
    conic-gradient(from 0deg, transparent, rgba(139,220,255,.72), transparent, rgba(240,179,95,.62), transparent);
  filter: drop-shadow(0 0 28px rgba(139,220,255,.22));
  animation: spin 4.8s linear infinite;
}
.progress-rail { display: grid; gap: 10px; margin-top: 28px; }
.progress-rail span {
  padding: 12px 14px;
  border: 1px solid rgba(117,232,255,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.045);
  color: var(--muted);
  animation: scan 1.45s ease-in-out infinite;
}
.progress-rail span:nth-child(2n) { animation-delay: .12s; }
.progress-rail span:nth-child(3n) { animation-delay: .24s; }

.result { gap: 18px; }
.result-header { display: flex; justify-content: space-between; align-items: end; gap: 18px; padding: clamp(22px, 4vw, 36px); }
.result-header h2 { max-width: 720px; }
.result-stage { position: relative; perspective: 960px; }
.result-thread {
  position: absolute;
  inset: 8% 12%;
  border: 1px solid rgba(240,179,95,.12);
  border-radius: 34px;
  transform: rotateX(58deg) translateY(60px);
  pointer-events: none;
}
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.result-card { padding: 22px; border-radius: var(--radius-md); transform: translateZ(0); animation: reveal 520ms ease both; }
.result-card.wide { grid-column: 1 / -1; }
.result-card span { display: block; margin-bottom: 12px; color: var(--amber); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.result-card p, .result-card li { color: rgba(238,247,255,.82); line-height: 1.62; }
.result-card ul { margin: 0; padding-left: 18px; }
.accent-card { border-color: rgba(127,168,255,0.32); }
.action-card { border-color: rgba(140,255,207,0.32); }

@media (max-width: 820px) {
  .topbar { align-items: flex-start; flex-direction: column; margin-bottom: 24px; }
  .hero { grid-template-columns: 1fr; }
  .living-stage { min-height: 420px; order: -1; }
  .panel-left { top: 4%; left: 3%; width: 46%; }
  .panel-core { top: 28%; left: 7%; right: 7%; min-height: 220px; }
  .panel-right { top: 7%; right: 3%; width: 46%; }
  .floating-panel { padding: 14px; }
  .floating-panel strong { font-size: .95rem; }
  .stage-base { bottom: 1%; min-width: 220px; }
  .core-node { width: 108px; height: 108px; }
  h1 { font-size: clamp(3.05rem, 17vw, 4.9rem); }
  .form-row, .result-header { align-items: stretch; flex-direction: column; }
  button { width: 100%; }
  .result-grid { grid-template-columns: 1fr; }
  .micro-flow { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(48px, -32px, 0) scale(1.08); } }
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { opacity: .58; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
@keyframes scan { 0%, 100% { border-color: rgba(117,232,255,.12); color: var(--soft); } 50% { border-color: rgba(117,232,255,.55); color: var(--text); } }
@keyframes floatPanel { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes beamPulse { 0%, 100% { opacity: .25; } 50% { opacity: .92; } }
