:root {
  --bg: #0c0f14;
  --panel: #111723;
  --panel-2: #161d2a;
  --accent: #46d6b4;
  --accent-2: #f8b545;
  --text: #f4f6f9;
  --muted: #9aa4b2;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  background: radial-gradient(circle at top, #1a2333 0%, #0b0e13 48%, #080a0f 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body.landing {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

body.landing .container {
  margin-top: 40px;
}

.landing-main {
  width: min(1100px, 92vw);
  margin: 48px auto 80px;
  display: grid;
  gap: 32px;
  position: relative;
  z-index: 2;
}

.landing-topbar {
  padding-top: 28px;
}

.landing-topbar .tag {
  color: rgba(15, 23, 42, 0.6);
}

.landing-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(0px);
  opacity: 0.45;
  z-index: 0;
}

.shape-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.22), transparent 70%);
  top: -120px;
  left: -120px;
}

.shape-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.2), transparent 70%);
  bottom: -220px;
  right: -160px;
}

.shape-3 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(14, 116, 144, 0.2), transparent 70%);
  top: 240px;
  right: 12%;
}

.orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(0px);
  opacity: 0.2;
  z-index: 0;
}

.orb-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(70, 214, 180, 0.35), transparent 70%);
  top: -120px;
  left: -120px;
}

.orb-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(248, 181, 69, 0.3), transparent 70%);
  bottom: -200px;
  right: -180px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 8vw 0;
  position: relative;
  z-index: 2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: #111;
}

body.landing .logo {
  background: linear-gradient(140deg, #3b82f6, #f97316);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

body.landing .name {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.tag {
  color: var(--muted);
  font-size: 13px;
}

.auth-pill {
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

.container {
  width: min(1100px, 90vw);
  margin: 24px auto 80px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.landing-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  margin-bottom: 14px;
}

.hero-copy p {
  color: rgba(15, 23, 42, 0.7);
  line-height: 1.7;
  font-size: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}

.hero-bullets {
  list-style: none;
  display: grid;
  gap: 10px;
  color: rgba(15, 23, 42, 0.7);
  font-size: 14px;
}

.hero-bullets li::before {
  content: '• ';
  color: #f97316;
  font-weight: 700;
}

.hero-panel {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 14px;
}

.panel-header {
  font-weight: 600;
  color: rgba(15, 23, 42, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
}

.panel-step {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
  align-items: start;
}

.panel-step p {
  color: rgba(15, 23, 42, 0.65);
  font-size: 13px;
  margin-top: 4px;
}

.panel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3b82f6;
  margin-top: 6px;
}

.panel-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.metric-value {
  font-size: 20px;
  font-weight: 700;
}

.metric-label {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.6);
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.landing-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
}

.landing-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.landing-card p {
  color: rgba(15, 23, 42, 0.65);
  font-size: 14px;
  line-height: 1.5;
}

.landing-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 24px;
}

.landing-cta p {
  color: rgba(248, 250, 252, 0.7);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  font-size: 12px;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 28px;
  background: linear-gradient(140deg, rgba(22, 29, 42, 0.9), rgba(12, 15, 20, 0.9));
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: float-in 0.6s ease-out;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(26px, 4vw, 36px);
  margin-bottom: 12px;
}

.hero p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--border);
}

.stat-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.stat {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.cta-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  display: grid;
  gap: 10px;
}

.cta-title {
  font-weight: 600;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.feature-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.feature-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.cta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow);
}

.cta-bar h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
}

.cta-bar p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  margin-bottom: 12px;
}

.hero-card ul {
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.card {
  padding: 24px;
  background: var(--panel);
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: fade-in 0.5s ease-out;
}

.card.compact {
  padding: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

.note {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.stepper {
  display: grid;
  gap: 14px;
}

.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  margin-top: 4px;
}

.step-title {
  font-weight: 600;
  font-size: 14px;
}

.step-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.step.active .step-dot {
  background: var(--accent-2);
}

.step.done .step-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(70, 214, 180, 0.15);
}

.card-body {
  display: grid;
  gap: 16px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

input,
textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.primary {
  background: linear-gradient(135deg, var(--accent), #74f4d4);
  color: #0a0f13;
  border: none;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 12px 20px;
  border-radius: 12px;
  cursor: pointer;
}

body.landing .primary {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #fff7ed;
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

body.landing .ghost {
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.8);
  outline-offset: 2px;
}

.radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.output {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  white-space: pre-wrap;
  min-height: 42px;
}

.note {
  color: var(--muted);
  font-size: 12px;
}

.clerk-box {
  min-height: 48px;
}

.split {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
}

.details summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
}

.details-body {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.75);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 24px;
}

.hidden {
  display: none !important;
  pointer-events: none;
}

.modal-card {
  width: min(520px, 92vw);
  background: var(--panel);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px;
}

#clerk-signin {
  min-height: 360px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.pairing {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding-bottom: 40px;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

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