:root {
  --bg: #030712;
  --bg-elevated: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #f8fafc;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-tertiary: rgba(255, 255, 255, 0.4);
  --cyan: #06b6d4;
  --cyan-light: #67e8f9;
  --purple: #a855f7;
  --radius: 16px;
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Cyber grid background */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  /* 3D grid math: tilt the plane 55deg around X axis, viewed from 700px away */
  transform: perspective(700px) rotateX(55deg);
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 90%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 90%);
}

.grid-bg::before {
  content: "";
  position: absolute;
  inset: -50% 0;
  height: 200%;
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridFlow 10s linear infinite;
}

@keyframes gridFlow {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50px); }
}

/* Aurora blobs */
.aurora {
  position: fixed;
  border-radius: 50%;
  /* Large blur radius (80px) keeps aurora edges soft and diffuse */
  filter: blur(80px);
  z-index: -3;
  pointer-events: none;
}

.aurora-1 {
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 60%);
  top: -15%;
  left: -20%;
  animation: auroraMove 14s ease-in-out infinite alternate;
}

.aurora-2 {
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.14) 0%, transparent 60%);
  bottom: -25%;
  right: -20%;
  animation: auroraMove 16s ease-in-out infinite alternate-reverse;
}

@keyframes auroraMove {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 8%) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .grid-bg::before {
    animation: none;
  }
  .aurora-1,
  .aurora-2 {
    animation: none;
  }
}

/* Backdrop-filter fallback: use a solid dark background when blur is unsupported */
@supports not (backdrop-filter: blur(12px)) {
  .site-header,
  .btn-primary,
  .hero-card,
  .feature-card,
  .pricing-card,
  .toast {
    background: var(--bg);
  }
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(3, 7, 18, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text);
  background: linear-gradient(135deg, #fff 0%, var(--cyan-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lang-switch {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s;
}

.lang-switch:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem 4rem;
  position: relative;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--cyan-light);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.badge::before {
  content: "◆";
  font-size: 0.6rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--text);
  background: linear-gradient(135deg, #fff 0%, var(--cyan-light) 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 2rem;
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.6rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(6, 182, 212, 0.12);
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(6, 182, 212, 0.22);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.hero-card {
  width: 100%;
  max-width: 760px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.hero-card-header {
  display: flex;
  gap: 0.5rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.hero-card-body {
  padding: 4rem 1.5rem;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 1rem;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
}

/* Sections */
.section {
  padding: 5rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan-light);
  margin-bottom: 0.75rem;
}

.section h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 1.5rem;
}

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--cyan-light);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Code block */
.code-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.code-block code {
  flex: 1;
  color: var(--cyan-light);
  white-space: nowrap;
}

.copy-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: border-color 0.2s, color 0.2s;
}

.copy-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.pricing-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.pricing-card.featured {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.05);
}

.pricing-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.price {
  font-size: 2.4rem;
  font-weight: 800;
  margin: 1rem 0;
  letter-spacing: -0.02em;
}

.pricing-card ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.pricing-card li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  padding-left: 1.3rem;
  position: relative;
}

.pricing-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--cyan-light);
}

/* FAQ */
.faq-list {
  margin-top: 2rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.faq-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.faq-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(16px);
  color: var(--text);
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 200;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Mobile */
@media (max-width: 640px) {
  .hero {
    padding-top: 6rem;
  }
  .cta-row {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }
  .btn {
    width: 100%;
  }
  .code-block {
    flex-direction: column;
    align-items: flex-start;
  }
}
