* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: #0b0f17;
  color: #e8eefc;
}

.landing {
  background-color: #060912;
  background-image: url("/background-vertical.png");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.landing {
  background-image: url("/background-horizontal.png");
}

@media (max-width: 820px) {
  .landing {
    background-image: url("/background-vertical.png");
  }
}

.landing .page {
  min-height: 100vh;
}

.landing .page::before,
.landing .page::after {
  display: none;
}

.landing::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 50% 18%, rgba(0, 212, 255, 0.14), rgba(0, 0, 0, 0)),
    linear-gradient(180deg, rgba(6, 9, 18, 0.55), rgba(6, 9, 18, 0.92));
}

.landing::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.03),
      rgba(255, 255, 255, 0.03) 1px,
      rgba(0, 0, 0, 0) 6px,
      rgba(0, 0, 0, 0) 10px
    );
  opacity: 0.55;
  mix-blend-mode: overlay;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.032),
      rgba(255, 255, 255, 0.032) 1px,
      rgba(0, 0, 0, 0) 6px,
      rgba(0, 0, 0, 0) 10px
    ),
    radial-gradient(1200px 600px at 50% -10%, rgba(0, 212, 255, 0.08), rgba(11, 15, 23, 0));
  opacity: 0.55;
  mix-blend-mode: overlay;
}

.page::before {
  content: "";
  position: fixed;
  inset: -120px -80px auto -80px;
  height: 520px;
  background: radial-gradient(closest-side, rgba(69, 112, 210, 0.24), rgba(11, 15, 23, 0));
  pointer-events: none;
  z-index: -1;
  animation: drift 16s ease-in-out infinite alternate;
}

.page::after {
  content: "";
  position: fixed;
  inset: auto -120px -140px auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(closest-side, rgba(163, 99, 255, 0.18), rgba(11, 15, 23, 0));
  pointer-events: none;
  z-index: -1;
  animation: drift 18s ease-in-out infinite alternate-reverse;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  position: sticky;
  top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #1d2943;
  border-radius: 12px;
  background: rgba(14, 21, 36, 0.78);
  backdrop-filter: blur(10px);
}

.brand {
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 12px;
}

.content {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  border: 1px solid #1d2943;
  border-radius: 12px;
  padding: 16px;
  background: #0e1524;
}

.hero {
  position: relative;
  padding: 22px;
  background: linear-gradient(180deg, rgba(14, 21, 36, 0.92), rgba(14, 21, 36, 0.72));
  border-color: rgba(53, 88, 154, 0.35);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background:
    conic-gradient(
      from 180deg at 50% 50%,
      rgba(69, 112, 210, 0.0),
      rgba(69, 112, 210, 0.22),
      rgba(163, 99, 255, 0.16),
      rgba(0, 212, 255, 0.14),
      rgba(69, 112, 210, 0.0)
    );
  filter: blur(22px);
  opacity: 0.85;
  transform: translate3d(0, 0, 0) scale(1.05);
  animation: ring 10s linear infinite;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.0) 25%, rgba(255, 255, 255, 0.0) 75%, rgba(255, 255, 255, 0.05)),
    radial-gradient(900px 240px at 20% 0%, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0));
  opacity: 0.22;
}

.hero-top {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #2b3b62;
  background: rgba(24, 35, 58, 0.6);
  border-radius: 999px;
  color: #cbd7f3;
  font-size: 12px;
}

.pill.subtle {
  border-color: #1d2943;
  background: rgba(7, 10, 16, 0.35);
}

.hero-title {
  position: relative;
  margin: 14px 0 0 0;
  font-size: 40px;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.hero-subtitle {
  position: relative;
  margin: 10px 0 0 0;
  color: #cbd7f3;
  max-width: 760px;
  line-height: 1.5;
}

.cta-row {
  position: relative;
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid #2b3b62;
  color: #e8eefc;
  background: #18233a;
  font-weight: 600;
}

.btn:hover {
  background: #1b2842;
}

.btn-primary {
  border-color: rgba(69, 112, 210, 0.75);
  background: linear-gradient(180deg, rgba(53, 88, 154, 0.9), rgba(31, 55, 98, 0.9));
}

.btn-primary:hover {
  background: linear-gradient(180deg, rgba(61, 98, 171, 0.95), rgba(35, 62, 112, 0.95));
}

.btn-secondary {
  background: rgba(24, 35, 58, 0.55);
}

.kpis {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mini-list {
  margin: 14px 0 0 0;
  padding-left: 18px;
  color: #cbd7f3;
  line-height: 1.55;
}

.mini-list li {
  margin: 6px 0;
}

.signal {
  position: relative;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(43, 59, 98, 0.9);
  background: rgba(7, 10, 16, 0.35);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: #cbd7f3;
}

.signal-label {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.signal-value {
  font-weight: 800;
  color: rgba(0, 255, 160, 0.9);
}

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 255, 160, 0.95);
  box-shadow: 0 0 18px rgba(0, 255, 160, 0.35);
  animation: pulse 1.4s ease-in-out infinite;
}

.kpi {
  border: 1px solid #1d2943;
  border-radius: 12px;
  padding: 12px;
  background: rgba(7, 10, 16, 0.22);
}

.kpi-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.kpi-label {
  margin-top: 4px;
  color: #cbd7f3;
  font-size: 12px;
}

.section-title {
  margin: 0 0 12px 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feature {
  border: 1px solid #1d2943;
  border-radius: 12px;
  padding: 14px;
  background: rgba(7, 10, 16, 0.22);
}

.feature-title {
  font-weight: 700;
}

.feature-body {
  margin-top: 6px;
  color: #cbd7f3;
  line-height: 1.45;
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid #1d2943;
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(7, 10, 16, 0.18);
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border: 1px solid rgba(69, 112, 210, 0.55);
  background: rgba(53, 88, 154, 0.2);
}

.step-title {
  font-weight: 700;
}

.step-text {
  margin-top: 4px;
  color: #cbd7f3;
  line-height: 1.45;
}

.note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(43, 59, 98, 0.9);
  background: rgba(24, 35, 58, 0.28);
  color: #cbd7f3;
  line-height: 1.45;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: #cbd7f3;
  font-size: 13px;
}

input {
  background: #0b0f17;
  border: 1px solid #1d2943;
  color: #e8eefc;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}

input:focus {
  border-color: #35589a;
}

button {
  background: #18233a;
  border: 1px solid #2b3b62;
  color: #e8eefc;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

button:hover {
  background: #1b2842;
}

.row a {
  text-decoration: none;
}

.card p {
  color: #cbd7f3;
  line-height: 1.5;
}

.row {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.log {
  margin-top: 12px;
  background: #070a10;
  border: 1px solid #1d2943;
  border-radius: 12px;
  padding: 12px;
  min-height: 120px;
  overflow: auto;
  white-space: pre-wrap;
}

/* AuthReturn header overrides (auth css must load first) */
.auth-header-login-btn,
.auth-header-signup-btn,
.auth-header-logout-btn {
  border-radius: 10px;
  background: transparent;
  border: 1px solid #2b3b62;
  color: #e8eefc;
}

.auth-header-user-email {
  color: #cbd7f3;
}

@media (max-width: 860px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 34px;
  }
}

@keyframes drift {
  from {
    transform: translate3d(-10px, -8px, 0);
  }
  to {
    transform: translate3d(12px, 10px, 0);
  }
}

@keyframes ring {
  from {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1.05);
  }
  to {
    transform: translate3d(0, 0, 0) rotate(360deg) scale(1.05);
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.65;
  }
  50% {
    transform: scale(1.0);
    opacity: 1;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.65;
  }
}

