:root {
  --bg-0: #07080f;
  --bg-1: #0d1020;
  --bg-2: #151a2e;
  --text: #f5f7ff;
  --muted: #a6afcf;
  --line: #2a2f47;
  --accent: #d4a82f;
  --accent-2: #a87512;
  --good: #34d399;
  --warn: #fbbf24;
  --card: rgba(16, 20, 36, 0.72);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: radial-gradient(circle at 15% 10%, #1a2140 0%, #0b0e19 45%, #07080f 100%);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', 'Manrope', system-ui, -apple-system, Segoe UI, sans-serif;
  background: transparent;
  color: var(--text);
  min-height: 100vh;
  visibility: hidden;
  opacity: 0;
  transition: opacity .35s ease;
}

body.loaded { visibility: visible; opacity: 1; }

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(16px);
  background: rgba(5, 8, 18, .75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-container {
  width: min(1240px, calc(100% - 24px));
  margin: 0 auto;
  min-height: 74px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: .2px;
  font-size: 1.1rem;
}

.nav-logo-icon {
  font-size: 1.5rem;
  color: #f2cc6c;
}

.footer-logo-icon {
  font-size: 1.25rem;
  color: #f2cc6c;
}

.nav-links { display: flex; gap: 22px; }

.nav-links-main {
  justify-self: center;
  justify-content: center;
}

.nav-link {
  text-decoration: none;
  color: #c8d0ef;
  font-size: .95rem;
  transition: color .2s ease;
}

.nav-link:hover,
.nav-link.active { color: var(--accent); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 360px;
  justify-content: flex-end;
}

.auth-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #e8edff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  transition: transform .2s ease, border-color .2s ease;
}

.auth-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 168, 47, 0.55);
}

.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(212, 168, 47, 0.5);
  background: rgba(255, 255, 255, 0.04);
  color: #f2cc6c;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 7, 14, 0.76);
}

.auth-modal.open {
  display: flex;
}

.auth-dialog {
  width: min(100%, 420px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.95), rgba(13, 17, 23, 0.9));
  box-shadow: var(--shadow);
  padding: 20px;
}

.auth-dialog h3 {
  margin-bottom: 10px;
}

.auth-dialog p {
  color: var(--muted);
  margin-bottom: 14px;
  font-size: .92rem;
}

.auth-field {
  margin-bottom: 10px;
}

.auth-field label {
  font-size: .84rem;
  color: #d1d8f0;
  display: block;
  margin-bottom: 4px;
}

.auth-field input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #f5f7ff;
  padding: 10px 12px;
  outline: none;
}

.auth-field input:focus {
  border-color: rgba(212, 168, 47, 0.65);
}

.auth-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.auth-message {
  margin-top: 12px;
  min-height: 20px;
  font-size: .86rem;
  color: #f2cc6c;
}

body.welcome-modal-open {
  overflow: hidden;
}

.welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 4, 10, 0.74);
  backdrop-filter: blur(6px);
}

.welcome-modal.open {
  display: flex;
}

.welcome-modal-panel {
  width: min(100%, 480px);
  border-radius: 18px;
  border: 1px solid rgba(212, 168, 47, 0.35);
  background: linear-gradient(165deg, rgba(16, 14, 9, 0.98), rgba(10, 12, 20, 0.96));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  padding: 22px 20px 18px;
  position: relative;
}

.welcome-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #e8edff;
  cursor: pointer;
}

.welcome-modal-badge {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #191004;
  background: radial-gradient(circle at 35% 30%, #f4d27f, #d4a82f 60%, #8b641c);
  box-shadow: 0 0 0 8px rgba(212, 168, 47, 0.14);
  margin-bottom: 12px;
}

.welcome-modal-panel h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.welcome-modal-panel p {
  color: #cfd6ee;
  line-height: 1.55;
  margin-bottom: 14px;
}

.welcome-modal-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  color: #e8ddc2;
  font-size: .92rem;
}

.welcome-modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.welcome-modal-actions .btn-primary,
.welcome-modal-actions .btn-secondary {
  flex: 1 1 180px;
  justify-content: center;
}

.section {
  padding: 90px 0;
  position: relative;
}

.hero {
  padding: 92px 0 78px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 26px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f2cc6c;
  background: rgba(212, 168, 47, .16);
  border: 1px solid rgba(212, 168, 47, .42);
  border-radius: 999px;
  font-size: .8rem;
  padding: 8px 14px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.03;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}

.hero-os-wrap {
  display: inline-flex;
  align-items: baseline;
  min-width: 9ch;
  margin-left: .25ch;
  color: var(--accent);
}

#heroOsText {
  display: inline-block;
}

.hero-os-cursor {
  display: inline-block;
  margin-left: 1px;
  color: #f7d188;
  animation: heroCursorBlink .95s steps(1, end) infinite;
}

@keyframes heroCursorBlink {
  50% { opacity: 0; }
}

.hero p {
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 22px;
  font-size: 1.06rem;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }

.btn-primary,
.btn-secondary,
.plan-button {
  border: none;
  text-decoration: none;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 700;
  font-size: .95rem;
  padding: 13px 18px;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease, background .25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary,
.plan-button.primary {
  color: #06111f;
  background: linear-gradient(100deg, var(--accent), #f0c474 55%, #f5d89a 100%);
  box-shadow: 0 10px 30px rgba(212,168,47,0.28);
}

.btn-primary:hover,
.plan-button.primary:hover { transform: translateY(-2px); }

.btn-secondary,
.plan-button {
  color: #ecf1ff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-secondary:hover,
.plan-button:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 168, 47, 0.45);
}

.mini-proof {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: #c6d1f6;
  font-size: .9rem;
}

.mini-proof i {
  color: #f2cc6c;
}

.hero-card {
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(212,168,47,.10), rgba(168,117,18,.12) 55%, rgba(16, 20, 36, .88));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  padding: 22px;
}

.stack-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 9px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
}

.stack-item:last-child { margin-bottom: 0; }

.stack-left { color: #e5ecff; font-size: .92rem; }

.stack-pill {
  color: #93f4c5;
  font-size: .75rem;
  border: 1px solid rgba(52, 211, 153, .45);
  background: rgba(52, 211, 153, .08);
  padding: 4px 8px;
  border-radius: 999px;
}

.section-head { margin-bottom: 24px; }
.section-head h2 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); margin-bottom: 8px; }
.section-head p { color: var(--muted); max-width: 62ch; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-card {
  background: var(--card);
  border: 1px solid rgba(255,255,255, .12);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 168, 47, 0.3);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: linear-gradient(130deg, rgba(212,168,47,.24), rgba(168,117,18,.20));
  border: 1px solid rgba(255,255,255,.14);
  color: #f2cc6c;
}

.feature-card h3 { margin-bottom: 6px; font-size: 1.04rem; }
.feature-card p { color: var(--muted); font-size: .95rem; }

.server-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.server-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 168, 47, 0.25);
  color: #e5ecff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: .92rem;
  transition: all .2s ease;
}

.server-tag:hover {
  background: rgba(212, 168, 47, 0.15);
  border-color: rgba(212, 168, 47, 0.45);
  transform: translateY(-2px);
}

.ide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ide-card {
  background: var(--card);
  border: 1px solid rgba(255,255,255, .12);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}

.ide-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 168, 47, 0.3);
}

.ide-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: linear-gradient(130deg, rgba(212,168,47,.24), rgba(168,117,18,.20));
  border: 1px solid rgba(255,255,255,.14);
  color: #f2cc6c;
  font-size: 20px;
}

.ide-card h4 {
  margin-bottom: 4px;
  font-size: 1.04rem;
}

.ide-card p {
  color: var(--muted);
  font-size: .82rem;
  font-family: 'Manrope', monospace;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  text-align: center;
  border-radius: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric strong {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 4px;
  color: #f2cc6c;
}

.metric span { color: var(--muted); font-size: .9rem; }

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.faq-item {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 16px;
}

.faq-item h4 { margin-bottom: 6px; }
.faq-item p { color: var(--muted); font-size: .92rem; }

.cta-panel {
  border-radius: 22px;
  background: linear-gradient(120deg, rgba(212, 168, 47, 0.12), rgba(168, 117, 18, 0.15), rgba(8, 12, 25, 0.9));
  border: 1px solid rgba(212, 168, 47, .25);
  padding: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.cta-panel p { color: #d5dcf4; max-width: 52ch; }

.footer {
  margin-top: 56px;
  border-top: 1px solid rgba(255,255,255,.1);
  background: rgba(4, 7, 14, .88);
}

.footer-content {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-logo {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links { display: flex; gap: 16px; }
.footer-links a {
  color: #c2cbeb;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 14px 0 24px;
  color: #9eabcf;
  font-size: .9rem;
}

/* Pricing Page Styles */
.pricing {
  padding: 88px 0 80px;
}

.pricing-toggle {
  display: flex;
  justify-content: center;
  margin: 12px 0 28px;
}

.toggle-container {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 4px;
  display: inline-flex;
  gap: 4px;
}

.toggle-btn {
  border: none;
  background: transparent;
  color: #c5ceed;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.toggle-btn.active {
  color: #081220;
  background: linear-gradient(100deg, #a87512, #d4a82f, #f2cc6c);
}

.discount-badge {
  margin-left: 6px;
  font-size: .72rem;
  color: #0d1222;
  background: #f8de87;
  border-radius: 999px;
  padding: 2px 7px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pricing-card {
  position: relative;
  border-radius: 18px;
  padding: 22px;
  background: linear-gradient(165deg, rgba(18, 23, 40, .9), rgba(12, 15, 29, .92));
  border: 1px solid rgba(255,255,255,.12);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.card-header {
  display: grid;
  gap: 6px;
}

.card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pricing-card.featured {
  border-color: rgba(212,168,47,.62);
  transform: translateY(-6px);
}

.popular-badge {
  position: absolute;
  top: -11px;
  left: 16px;
  padding: 6px 10px;
  font-size: .74rem;
  border-radius: 999px;
  background: linear-gradient(100deg, #9a7418, #f2cc6c);
}

.plan-name { font-size: 1.2rem; margin-bottom: 8px; }
.plan-description { color: var(--muted); margin: 8px 0 16px; font-size: .95rem; }

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
}

.currency { font-size: 1.2rem; color: #f2e1b2; }
.price { font-size: 2.3rem; font-weight: 800; letter-spacing: -.02em; }
.period { color: #f2e1b2; }

.feature-list {
  list-style: none;
  margin: 14px 0 20px;
  display: grid;
  gap: 9px;
  color: #dce5ff;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #c9d3f1;
  font-size: .92rem;
}

.feature-list i { color: var(--good); }

.cta-section {
  margin-top: 32px;
  text-align: center;
  padding: 40px 22px;
  background: linear-gradient(120deg, rgba(168, 117, 18, 0.24), rgba(230, 184, 0, 0.12), rgba(8, 12, 25, 0.9));
  border: 1px solid rgba(212, 168, 47, .25);
  border-radius: 22px;
}

.cta-section h3 { margin-bottom: 12px; }
.cta-section p { color: #d5dcf4; max-width: 52ch; margin-bottom: 20px; }

.cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.plan-button {
  border: none;
  text-decoration: none;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 700;
  font-size: .95rem;
  padding: 13px 18px;
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease, background .25s ease;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
}

.plan-button.primary {
  color: #06111f;
  background: linear-gradient(100deg, #a87512, #d4a82f, #f2cc6c);
}

.plan-button:hover {
  transform: translateY(-2px);
}

@media (max-width: 980px) {
  .hero-grid,
  .pricing-grid,
  .feature-grid,
  .ide-grid,
  .metrics,
  .faq-grid { grid-template-columns: 1fr; }

  .nav-container {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 10px 0;
  }
  .nav-links-main {
    order: 2;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
  }
  .nav-cta {
    order: 3;
    min-width: 0;
    justify-content: center;
    flex-wrap: wrap;
  }

  .cta-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .hero { padding-top: 74px; }
  .hero-actions { width: 100%; }
  .hero-actions a,
  .hero-actions button,
  .plan-button { width: 100%; text-align: center; justify-content: center; }
}
