:root {
  --bg-deep: #090b24;
  --bg-surface: #16203f;
  --ink-main: #f5f9ff;
  --ink-muted: #d5e1ff;
  --accent-a: #ff7a18;
  --accent-b: #00d6c7;
  --accent-c: #f94bb3;
  --accent-d: #6eff6a;
  --card-glass: rgba(255, 255, 255, 0.1);
  --card-border: rgba(255, 255, 255, 0.26);
  --shadow: 0 20px 50px rgba(2, 10, 20, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink-main);
  background: radial-gradient(circle at 15% 14%, #2248a6 0%, transparent 42%),
    radial-gradient(circle at 88% 12%, #0d7378 0%, transparent 40%),
    radial-gradient(circle at 64% 86%, #7a2a8f 0%, transparent 45%),
    linear-gradient(130deg, var(--bg-deep) 0%, #130e30 42%, #0a1f3e 100%);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
}

.cursor-glow {
  position: fixed;
  width: 220px;
  height: 220px;
  left: 0;
  top: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, rgba(255, 115, 0, 0.32) 0%, rgba(249, 75, 179, 0.15) 34%, transparent 72%);
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 260ms ease;
  opacity: 0.7;
}

.color-ribbon {
  position: fixed;
  inset: -30% -10% auto -10%;
  height: 280px;
  z-index: -3;
  background: conic-gradient(from 20deg at 45% 50%, #ff7a18, #f94bb3, #1e90ff, #00d6c7, #6eff6a, #ff7a18);
  filter: blur(70px) saturate(1.2);
  opacity: 0.55;
  animation: ribbonSpin 26s linear infinite;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(65px);
  z-index: -2;
  opacity: 0.65;
}

.orb-one {
  width: 420px;
  height: 420px;
  left: -130px;
  top: 25%;
  background: #ff9f43;
  animation: driftA 12s ease-in-out infinite;
}

.orb-two {
  width: 380px;
  height: 380px;
  right: -120px;
  top: 10%;
  background: #00d6c7;
  animation: driftB 14s ease-in-out infinite;
}

.orb-three {
  width: 320px;
  height: 320px;
  left: 35%;
  bottom: -110px;
  background: #f94bb3;
  animation: driftC 15s ease-in-out infinite;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 50% 35%, black 20%, transparent 78%);
  pointer-events: none;
}

.site-header,
.hero,
.feature-band,
.site-footer {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 0.2rem;
}

.brand {
  text-decoration: none;
  color: var(--ink-main);
  font-family: "Sora", sans-serif;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  text-shadow: 0 0 14px rgba(255, 122, 24, 0.38);
}

nav {
  display: flex;
  gap: 1.15rem;
}

nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 200ms ease;
}

nav a:hover {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(0, 214, 199, 0.8);
}

.hero {
  padding: 2.4rem 0 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  color: var(--accent-b);
  text-transform: uppercase;
  font-size: 0.83rem;
  letter-spacing: 0.18em;
  margin-bottom: 0.8rem;
}

h1 {
  font-family: "Sora", sans-serif;
  font-size: clamp(2rem, 5.8vw, 4.9rem);
  line-height: 1.03;
  max-width: 12ch;
  margin: 0;
  background: linear-gradient(120deg, #ffffff 0%, #93ffe6 24%, #ffd284 54%, #ff9edb 78%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 58ch;
  color: var(--ink-muted);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  margin-top: 1.1rem;
}

.three-stage {
  width: min(1100px, 98vw);
  height: clamp(380px, 60vw, 580px);
  margin-top: 1.3rem;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
}

.three-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.three-loading,
.three-error {
  margin: 0;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(4, 12, 32, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #d8eeff;
  font-size: 0.9rem;
}

.three-stage.is-ready .three-loading {
  display: none;
}

.three-hint {
  margin-top: 0.65rem;
  color: #bde8ff;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.twin-console {
  width: min(900px, 92vw);
  margin-top: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(150deg, rgba(17, 35, 77, 0.82), rgba(16, 25, 63, 0.7));
  box-shadow: 0 18px 44px rgba(8, 8, 30, 0.5), inset 0 0 30px rgba(0, 214, 199, 0.14);
  padding: 0.95rem;
}

.console-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.console-top h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  color: #0e2f20;
  background: linear-gradient(120deg, #6eff6a, #abff8f);
  font-weight: 700;
}

.chat-log {
  margin-top: 0.75rem;
  min-height: 96px;
  max-height: 220px;
  overflow: auto;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border-radius: 12px;
  background: rgba(6, 10, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.chat-msg {
  margin: 0;
  max-width: 90%;
  padding: 0.5rem 0.72rem;
  border-radius: 10px;
  text-align: left;
  font-size: 0.9rem;
}

.chat-msg.user {
  align-self: flex-end;
  color: #0d2735;
  background: linear-gradient(120deg, #8afdf3, #9dbdff);
}

.chat-msg.bot {
  align-self: flex-start;
  color: #dff1ff;
  background: linear-gradient(130deg, rgba(55, 95, 205, 0.45), rgba(219, 70, 195, 0.3));
}

.chat-msg a {
  color: #b4ffb1;
}

.chat-form {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.5rem;
}

.chat-form input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.68rem 0.9rem;
  background: rgba(4, 8, 24, 0.66);
  color: #ecf6ff;
  font-family: "Space Grotesk", sans-serif;
}

.chat-form input::placeholder {
  color: #a4bdd9;
}

.quick-prompts {
  margin-top: 0.62rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.prompt-chip {
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: linear-gradient(130deg, rgba(0, 214, 199, 0.16), rgba(249, 75, 179, 0.2));
  color: #ddf9ff;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  padding: 0.36rem 0.64rem;
  cursor: pointer;
}

.hero-cta {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-top: 1.8rem;
  justify-content: center;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.76rem 1.3rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.96rem;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #081d22;
  background: linear-gradient(140deg, #6eff6a, #00d6c7 40%, #4ec0ff 100%);
  box-shadow: 0 14px 30px rgba(28, 220, 210, 0.43);
}

.btn-secondary {
  color: var(--ink-main);
  background: linear-gradient(130deg, rgba(249, 75, 179, 0.16), rgba(255, 122, 24, 0.14));
  border: 1px solid rgba(255, 210, 132, 0.45);
}

.stats {
  margin-top: 2.3rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card,
.feature {
  background: var(--card-glass);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(6px);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.tilt-card:hover {
  border-color: rgba(255, 255, 255, 0.44);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36), 0 0 40px rgba(78, 192, 255, 0.2);
}

.stat-card {
  padding: 1.2rem;
}

.stat-card h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 2rem;
  color: var(--accent-a);
  text-shadow: 0 0 14px rgba(255, 122, 24, 0.45);
}

.stat-card p {
  margin: 0.4rem 0 0;
  color: #e5eefb;
  font-size: 0.96rem;
}

.feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1.4rem 0 2.2rem;
}

.feature {
  padding: 1.3rem 1.2rem;
}

.feature h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.15rem;
}

.feature p {
  margin: 0.55rem 0 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0 2.2rem;
  color: var(--ink-muted);
  font-size: 0.93rem;
}

.site-footer a {
  color: #9ce9df;
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: revealUp 600ms cubic-bezier(0.2, 0.65, 0.3, 1) forwards;
  animation-delay: var(--reveal-delay, 0s);
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes driftA {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-26px) scale(1.03);
  }
}

@keyframes driftB {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(24px) scale(1.04);
  }
}

@keyframes driftC {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-20px) scale(1.05);
  }
}

@keyframes ribbonSpin {
  to {
    transform: rotate(1turn);
  }
}

@media (prefers-reduced-motion: reduce) {
  .color-ribbon,
  .orb-one,
  .orb-two,
  .orb-three {
    animation: none;
  }

  .tilt-card {
    transition: none;
  }
}

@media (max-width: 960px) {
  .stats,
  .feature-band {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  nav {
    flex-wrap: wrap;
  }

  .chat-form {
    flex-direction: column;
  }
}
