:root {
  --bg-0: #070b12;
  --bg-1: #0b121c;
  --bg-2: #101925;
  --cyan: #2ec9e0;
  --cyan-hot: #7adff0;
  --blue: #3d7dd6;
  --text: #eef2f8;
  --muted: #8b97ad;
  --line: rgba(255, 255, 255, 0.09);
  --glass: rgba(10, 16, 26, 0.62);
  --font-display: "Syne", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-display);
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  /* One composition: cool rim light + deep ink — no stacked neon blobs */
  background:
    radial-gradient(90% 45% at 50% -8%, rgba(46, 110, 150, 0.22), transparent 55%),
    radial-gradient(50% 40% at 85% 70%, rgba(20, 60, 90, 0.18), transparent 70%),
    linear-gradient(180deg, #080d16 0%, #070b12 55%, #05080e 100%);
}

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

/* Hex weave — echoes the logo mark, very quiet */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='48' viewBox='0 0 84 48'%3E%3Cpath fill='none' stroke='%232ec9e0' stroke-opacity='0.07' stroke-width='1' d='M21 0l21 12v24L21 48 0 36V12zM63 0l21 12v24L63 48 42 36V12z'/%3E%3C/svg%3E");
  background-size: 84px 48px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 72%, transparent 100%);
}

.bg-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.bg-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 70% at 50% 40%, transparent 40%, rgba(3, 5, 10, 0.72) 100%);
}

.stage {
  position: relative;
  z-index: 3;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.85rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: rise 0.8s ease both;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.logo-mark {
  width: 2.6rem;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.35));
}

.logo-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.status-chip {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(10px);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.pulse {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  align-items: end;
  padding: 0.35rem 0 0;
  min-height: 0;
}

.hero-copy {
  animation: rise 0.9s 0.1s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan-hot);
  letter-spacing: 0.04em;
}

.brand {
  position: relative;
  margin: 0;
  font-size: clamp(3.2rem, 9vw, 6.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
  color: var(--text);
}

.brand-glitch {
  position: absolute;
  inset: 0;
  color: var(--cyan);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.brand.is-glitching .brand-glitch {
  animation: glitch 0.35s steps(2) 2;
}

@keyframes glitch {
  0% { opacity: 0.7; transform: translate(2px, -1px); clip-path: inset(0 0 60% 0); }
  40% { opacity: 0.85; transform: translate(-3px, 1px); clip-path: inset(40% 0 10% 0); color: var(--blue); }
  100% { opacity: 0; transform: none; }
}

.tagline {
  margin: 1.1rem 0 0.35rem;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  color: #d7e2ff;
}

.tagline .grad {
  color: #b8fbff;
  background: none;
  -webkit-text-fill-color: #b8fbff;
  filter: brightness(1.15);
  text-shadow: 0 0 20px rgba(184, 251, 255, 0.65);
}

.heart {
  color: #ef4444;
  font-style: normal;
  letter-spacing: 0;
}

.lede {
  margin: 0 0 1rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 600;
}

.notify {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
  max-width: 28rem;
  position: relative;
}

.notify input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(6, 12, 28, 0.7);
  color: var(--text);
  border-radius: 0.85rem;
  padding: 0.95rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.notify input:focus {
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.notify button {
  border: 0;
  border-radius: 0.85rem;
  padding: 0 1.15rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #04101c;
  cursor: pointer;
  background: linear-gradient(120deg, #06b6d4, #2563eb 70%);
  background-size: 180% 100%;
  transition: transform 0.2s ease, background-position 0.4s ease, filter 0.2s ease;
}

.notify button:hover {
  transform: translateY(-1px) scale(1.02);
  background-position: 100% 0;
  filter: brightness(1.08);
}

.notify button:active {
  transform: scale(0.98);
}

.form-msg {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
  min-height: 1.2em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan-hot);
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  animation: rise 1s 0.2s ease both;
  min-height: 0;
}

.orbit {
  position: relative;
  width: min(280px, 64vw);
  height: min(280px, 64vw);
  display: grid;
  place-items: center;
}

.ring {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px solid rgba(34, 211, 238, 0.2);
  animation: spin 18s linear infinite;
}

.ring-b {
  inset: 0%;
  border-color: rgba(59, 130, 246, 0.2);
  animation-duration: 28s;
  animation-direction: reverse;
}

.ring-c {
  inset: 18%;
  border-style: dashed;
  border-color: rgba(6, 182, 212, 0.28);
  animation-duration: 12s;
}

.ring::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px var(--cyan);
}

.ring-b::before { background: var(--blue); box-shadow: 0 0 12px var(--blue); }
.ring-c::before { background: #06b6d4; box-shadow: 0 0 12px #06b6d4; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.robot-stage {
  position: relative;
  z-index: 2;
  width: min(280px, 68vw);
  height: min(280px, 68vw);
  border-radius: 50%;
  overflow: hidden;
  filter: drop-shadow(0 18px 40px rgba(34, 211, 238, 0.28));
  background:
    radial-gradient(circle at 50% 40%, rgba(34, 211, 238, 0.12), transparent 60%),
    rgba(4, 10, 24, 0.35);
  border: 1px solid rgba(34, 211, 238, 0.12);
}

.robot-stage.is-ready {
  background: transparent;
  border-color: transparent;
  overflow: visible;
}

.robot-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  touch-action: none;
  cursor: grab;
}

.robot-canvas:active {
  cursor: grabbing;
}

.robot-fallback {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}

.robot-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.65rem;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--cyan-hot);
  text-transform: uppercase;
}

.robot-loader span {
  width: 2rem;
  height: 2rem;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid rgba(34, 211, 238, 0.25);
  border-top-color: var(--cyan);
  animation: spin 0.8s linear infinite;
}

.robot-loader p {
  margin: 0;
}

.launch-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.15rem 0;
  animation: rise 1s 0.2s ease both;
}

.launch-note {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.countdown {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  font-family: var(--font-mono);
}

.countdown .unit {
  min-width: 3.4rem;
  text-align: center;
  padding: 0.55rem 0.4rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgba(8, 14, 30, 0.55);
  backdrop-filter: blur(8px);
}

.countdown .unit span {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.04em;
}

.countdown .unit small {
  color: var(--muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.countdown .sep {
  padding-bottom: 1.15rem;
  color: var(--cyan);
  opacity: 0.7;
  animation: blink 1.2s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Interactive terminal */
.term-section {
  animation: rise 1s 0.28s ease both;
}

.terminal {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: rgba(4, 10, 18, 0.78);
  backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.terminal .t-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px dashed rgba(34, 211, 238, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.terminal .t-mark {
  width: 1.35rem;
  height: auto;
  opacity: 0.9;
}

.terminal .t-title {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.terminal .t-body {
  padding: 1rem 1.15rem 1.25rem;
  line-height: 1.85;
  color: #9aa8c7;
  min-height: 200px;
  max-height: 300px;
  overflow-y: auto;
  cursor: text;
}

.t-body::-webkit-scrollbar { width: 6px; }
.t-body::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.25);
  border-radius: 999px;
}

.t-input-line {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.t-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font: inherit;
  line-height: inherit;
  caret-color: var(--cyan);
}

.t-hint { color: var(--muted); font-size: 0.8rem; opacity: 0.85; }
.t-body .p { color: var(--cyan); }
.t-body .ok { color: #4ade80; }
.t-body .hl { color: #e8f4ff; }
.t-body .c-web { color: #60a5fa; }
.t-body .c-cyber { color: #f87171; }
.t-body .c-data { color: #4ade80; }
.t-body .c-ai { color: #f472b6; }
.t-body .c-mobile { color: #93c5fd; }
.t-body .c-cloud { color: #2dd4bf; }

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.foot p { margin: 0; }

.hint-keys kbd {
  font-family: var(--font-mono);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 0.35rem;
  padding: 0.1rem 0.35rem;
  color: var(--cyan-hot);
  background: rgba(255, 255, 255, 0.04);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%) translateY(20px);
  z-index: 20;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(6, 12, 24, 0.92);
  color: var(--cyan-hot);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.mobile-break { display: none; }

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    min-height: auto;
  }

  .hero-visual {
    order: -1;
    min-height: 260px;
  }

  .logo-word {
    font-size: 1.05rem;
  }

  .mobile-break { display: inline; }
}

@media (max-width: 560px) {
  .stage {
    width: calc(100% - 1.25rem);
  }

  .notify {
    grid-template-columns: 1fr;
  }

  .notify button {
    justify-content: center;
    padding: 0.9rem 1rem;
  }

  .countdown .unit {
    min-width: 2.8rem;
  }

  .countdown .unit span {
    font-size: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .bg-mesh,
  .bg-grain {
    display: none;
  }
}
