:root {
  --bg-base: #07070d;
  --bg-2: #0d0d18;
  --text: #ececf1;
  --text-dim: #8e8ea0;
  --text-faint: #5a5a6a;
  --glass: rgba(255, 255, 255, 0.035);
  --glass-strong: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-strong: rgba(255, 255, 255, 0.14);
  --accent-1: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #22d3ee;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
}

html,
body.landing-body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body.landing-body {
  background: radial-gradient(1200px 600px at 50% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 110%, rgba(34, 211, 238, 0.10), transparent 60%),
    var(--bg-base);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  animation: pageFadeIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.landing-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.landing-bg::before,
.landing-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  will-change: transform;
}

.landing-bg::before {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
  top: -120px;
  left: -100px;
  animation: floatA 22s ease-in-out infinite alternate;
}

.landing-bg::after {
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  bottom: -180px;
  right: -160px;
  animation: floatB 28s ease-in-out infinite alternate;
}

.landing-bg .blob-3 {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.55) 0%, transparent 70%);
  filter: blur(110px);
  opacity: 0.28;
  top: 30%;
  left: 55%;
  animation: floatC 32s ease-in-out infinite alternate;
}

@keyframes floatA {
  from {
    transform: translate3d(-30px, -20px, 0) scale(1);
  }
  to {
    transform: translate3d(60px, 40px, 0) scale(1.08);
  }
}

@keyframes floatB {
  from {
    transform: translate3d(20px, 30px, 0) scale(1);
  }
  to {
    transform: translate3d(-50px, -40px, 0) scale(1.1);
  }
}

@keyframes floatC {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-80px, 60px, 0) scale(1.12);
  }
}

.landing-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
}

.landing-card {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(99, 102, 241, 0.35));
}

/* Headline */
.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  background: linear-gradient(180deg, #ffffff 0%, #b9b9c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  margin: 0;
  color: var(--text-dim);
  font-size: 16px;
}

/* Loader card */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.loader-card {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, Menlo, monospace;
  font-size: 14px;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent-2);
  animation: spin 0.9s linear infinite;
  flex: 0 0 auto;
}

.spinner.done {
  border: 0;
  background: var(--success);
  position: relative;
  animation: none;
}

.spinner.done::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #07070d;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

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

.loader-text-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--text);
}

.loader-text {
  display: inline-block;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.loader-text.swap-out {
  opacity: 0;
  transform: translateY(-6px);
}

.caret {
  display: inline-block;
  width: 8px;
  height: 16px;
  margin-left: 4px;
  background: var(--accent-2);
  vertical-align: middle;
  animation: blink 1.05s steps(1, end) infinite;
  border-radius: 1px;
  flex: 0 0 auto;
}

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

/* Status grid */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.status-card {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.status-card:hover {
  transform: translateY(-2px);
  border-color: var(--glass-border-strong);
}

.status-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

.status-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.status-sub {
  font-size: 11px;
  color: var(--text-dim);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: pulse 1.8s ease-out infinite;
  flex: 0 0 auto;
}

.dot.warning {
  background: var(--warning);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
}

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

.badge-env {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  text-transform: capitalize;
}

.badge-env.prod {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

/* Live timestamp row */
.live-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
  padding: 0 4px;
}

.live-bar .uptime {
  color: var(--text-faint);
}

/* CTA */
.cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 14px 40px -12px rgba(99, 102, 241, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 0.22s ease, box-shadow 0.3s ease, filter 0.2s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px -10px rgba(139, 92, 246, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: #fff;
  filter: brightness(1.06);
}

.cta:active {
  transform: translateY(0);
}

.cta .arrow {
  transition: transform 0.22s ease;
}

.cta:hover .arrow {
  transform: translateX(4px);
}

.kbd-hint {
  font-size: 12px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kbd {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-bottom-width: 2px;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 11px;
  color: var(--text);
}

/* Footer note */
.foot {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 32px;
  }
  .hero p {
    font-size: 14px;
  }
  .status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .loader-card {
    font-size: 12.5px;
    padding: 14px 16px;
  }
  .landing-shell {
    padding: 36px 18px;
  }
  .landing-card {
    gap: 24px;
  }
  .cta {
    padding: 12px 22px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.landing-body,
  .landing-bg::before,
  .landing-bg::after,
  .landing-bg .blob-3,
  .spinner,
  .caret,
  .dot,
  .cta .arrow {
    animation: none !important;
    transition: none !important;
  }
  .loader-text {
    transition: none !important;
  }
}
