/* ==========================================================================
   VTLWeb Design System - main.css
   Modern dark UI, KodeKloud-inspired (not copied)
   ========================================================================== */

/* Root tokens
   -------------------------------------------------------------------------- */

:root {
  /* Colors */
  --color-bg: #050814;
  --color-bg-elevated: #0b1020;
  --color-bg-elevated-soft: #101528;
  --color-bg-subtle: #070b18;
  --color-surface: #151a30;
  --color-surface-soft: #1b2140;

  --color-border-subtle: #252b45;
  --color-border-strong: #3a4270;

  --color-text: #f5f7ff;
  --color-text-soft: #c3c7e6;
  --color-text-muted: #8a90b5;
  --color-text-inverse: #050814;

  --color-primary: #3b82f6;
  --color-primary-soft: rgba(59, 130, 246, 0.12);
  --color-primary-strong: #2563eb;

  --color-accent: #8b5cf6;
  --color-accent-soft: rgba(139, 92, 246, 0.16);

  --color-teal: #14b8a6;
  --color-teal-soft: rgba(20, 184, 166, 0.16);

  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  --color-success: #22c55e;

  --color-code-bg: #050816;
  --color-code-border: #1f2937;

  /* Shadows & radii */
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
  --shadow-subtle: 0 10px 30px rgba(0, 0, 0, 0.4);
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Fira Code", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.5rem;

  /* Layout */
  --container-width: 1120px;
  --gutter: 1.5rem;
  --header-height: 64px;

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-med: 220ms ease-out;
}

/* Global reset & base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body.vtl-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: radial-gradient(circle at top left, #111827 0, #020617 40%, #000 100%);
  -webkit-font-smoothing: antialiased;
}

/* Typography utilities
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.5em;
  font-weight: 600;
  color: var(--color-text);
}

p {
  margin: 0 0 0.75em;
  color: var(--color-text-soft);
  line-height: 1.6;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.body-text {
  font-size: var(--text-md);
  color: var(--color-text-soft);
}

/* Layout: container, header, main, footer
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(5, 8, 20, 0.96), rgba(5, 8, 20, 0.85), transparent);
  border-bottom: 1px solid rgba(37, 43, 69, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1.5rem;
}

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

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-text);
  text-decoration: none;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: radial-gradient(circle at 20% 0, #38bdf8, #6366f1 40%, #a855f7 80%);
  color: var(--color-text-inverse);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.9), 0 12px 30px rgba(15, 23, 42, 0.9);
}

.brand-logo-sm {
  width: 26px;
  height: 26px;
  font-size: 0.75rem;
}

.brand-text {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}

.site-nav {
  flex: 1;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.6rem;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: color var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--color-primary), var(--color-accent));
  transform: translateX(-50%);
  opacity: 0;
  transition: width var(--transition-med), opacity var(--transition-med);
}

.nav-link:hover {
  color: var(--color-text);
  background-color: rgba(15, 23, 42, 0.7);
  transform: translateY(-1px);
}

.nav-link.is-active {
  color: var(--color-text);
  background-color: rgba(37, 99, 235, 0.16);
}

.nav-link.is-active::after {
  width: 70%;
  opacity: 1;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-main {
  padding: 2.5rem 0 3.5rem;
}

.site-footer {
  border-top: 1px solid rgba(37, 43, 69, 0.8);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 1));
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-left: 0.75rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-text-soft);
}

/* Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--color-text);
  transition: background-color var(--transition-med), border-color var(--transition-med), transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: var(--text-xs);
}

.btn-xs {
  padding: 0.35rem 0.75rem;
  font-size: var(--text-xs);
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-color: rgba(148, 163, 253, 0.4);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.6);
}

.btn-primary-outline {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 253, 0.5);
  color: var(--color-text-soft);
}

.btn-primary-outline:hover {
  background: rgba(37, 99, 235, 0.16);
  color: var(--color-text);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(148, 163, 253, 0.2);
  color: var(--color-text-soft);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.8);
  color: var(--color-text);
}

/* Badges, pills, tags
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-accent {
  background: rgba(139, 92, 246, 0.16);
  color: #e9d5ff;
  border: 1px solid rgba(139, 92, 246, 0.5);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 500;
}

.pill-soft {
  background: rgba(148, 163, 253, 0.12);
  color: var(--color-text-soft);
  border: 1px solid rgba(148, 163, 253, 0.3);
}

/* Hero section
   -------------------------------------------------------------------------- */

.hero {
  padding-top: 1.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-content {
  max-width: 640px;
}

.hero-title {
  font-size: var(--text-3xl);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: var(--text-md);
  color: var(--color-text-soft);
  margin-bottom: 1.25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.meta-item {
  opacity: 0.9;
}

.meta-dot {
  opacity: 0.5;
}

/* Hero side panel (code card)
   -------------------------------------------------------------------------- */

.hero-panel {
  display: flex;
  justify-content: flex-end;
}

.code-card {
  width: 100%;
  max-width: 420px;
  background: radial-gradient(circle at top left, #111827, #020617 60%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 43, 69, 0.9);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.code-card-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(to right, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.9));
  border-bottom: 1px solid rgba(37, 43, 69, 0.9);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #4b5563;
}

.dot-red {
  background: #f97373;
}

.dot-amber {
  background: #facc15;
}

.dot-green {
  background: #4ade80;
}

.code-card-title {
  margin-left: 0.35rem;
  font-size: var(--text-xs);
  color: var(--color-text-soft);
}

.code-card-body {
  padding: 0.9rem 1rem 1.1rem;
  background: var(--color-code-bg);
}

.code-card-body pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #e5e7eb;
  white-space: pre-wrap;
}

/* Sections, cards, grids
   -------------------------------------------------------------------------- */

.section {
  margin-top: 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.section-header-left {
  text-align: left;
}

.section-title {
  font-size: var(--text-2xl);
  margin-bottom: 0.4rem;
}

.section-subtitle {
  font-size: var(--text-md);
  color: var(--color-text-soft);
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  padding: 1.25rem 1.3rem;
  box-shadow: var(--shadow-subtle);
}

.card.feature-card {
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), rgba(15, 23, 42, 1));
}

.card-icon {
  margin-bottom: 0.75rem;
}

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-inverse);
}

.icon-blue {
  background: linear-gradient(135deg, #38bdf8, #3b82f6);
}

.icon-purple {
  background: linear-gradient(135deg, #a855f7, #6366f1);
}

.icon-teal {
  background: linear-gradient(135deg, #22c55e, #14b8a6);
}

.card-title {
  font-size: var(--text-lg);
  margin-bottom: 0.35rem;
}

.card-text {
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

.card-meta-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0.75rem;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.card-meta-list li {
  margin-bottom: 0.25rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* Lab cards
   -------------------------------------------------------------------------- */

.lab-card {
  background: #1f2937;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.lab-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.lab-card h3 {
  margin-bottom: 0.5rem;
  color: #fff;
}

.lab-card p {
  margin-bottom: 1rem;
  color: #d1d5db;
}

.lab-card .btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: #2563eb;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}

.lab-card .btn:hover {
  background: #1d4ed8;
}

.card-tag {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 500;
  background: rgba(59, 130, 246, 0.16);
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.5);
}

.card-tag-purple {
  background: rgba(139, 92, 246, 0.16);
  color: #e9d5ff;
  border-color: rgba(139, 92, 246, 0.5);
}

.card-tag-teal {
  background: rgba(20, 184, 166, 0.16);
  color: #a7f3d0;
  border-color: rgba(20, 184, 166, 0.5);
}

/* Pricing cards
   -------------------------------------------------------------------------- */

.pricing-grid {
  align-items: stretch;
}

.pricing-card {
  position: relative;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.pricing-card-featured {
  background: radial-gradient(circle at top, rgba(59, 130, 246, 0.16), rgba(15, 23, 42, 1));
  border-color: rgba(59, 130, 246, 0.7);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.5);
}

.pricing-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.pricing-badge {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 500;
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, 0.5);
}

.pricing-title {
  font-size: var(--text-lg);
  margin-bottom: 0.75rem;
}

.pricing-price {
  margin: 0 0 0.75rem;
}

.pricing-amount {
  font-size: 1.8rem;
  font-weight: 600;
}

.pricing-period {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-left: 0.25rem;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

.pricing-features li {
  margin-bottom: 0.35rem;
}

/* Grids
   -------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1.5rem;
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* About & stack diagram
   -------------------------------------------------------------------------- */

.about-grid {
  align-items: flex-start;
}

.list-check {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

.list-check li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.4rem;
}

.list-check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.1rem;
  font-size: 0.8rem;
  color: var(--color-teal);
}

.stack-diagram {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(148, 163, 253, 0.4);
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), rgba(15, 23, 42, 1));
}

.stack-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.stack-arrow {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Contact page
   -------------------------------------------------------------------------- */

.contact-grid {
  align-items: flex-start;
}

.form-card {
  background: var(--color-surface-soft);
}

.form-group {
  margin-bottom: 0.9rem;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text-soft);
  margin-bottom: 0.3rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
  background: rgba(15, 23, 42, 0.9);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
  background: rgba(15, 23, 42, 1);
}

.form-textarea {
  resize: vertical;
}

.form-actions {
  margin-top: 0.75rem;
}

/* Form error states
   -------------------------------------------------------------------------- */

.form-input-error,
.form-textarea.form-input-error {
  border-color: rgba(239, 68, 68, 0.9);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.6);
}

.field-error-text {
  margin-top: 0.25rem;
  font-size: var(--text-xs);
  color: #fecaca;
}

.list-errors {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
}

.contact-side {
  padding: 0.5rem 0 0;
}

.list-bullets {
  list-style: disc;
  padding-left: 1.2rem;
  margin: 0.5rem 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

/* Alerts
   -------------------------------------------------------------------------- */

.alert {
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.9);
}

.alert-title {
  font-size: var(--text-md);
  margin-bottom: 0.25rem;
}

.alert-text {
  font-size: var(--text-sm);
  color: var(--color-text-soft);
}

.alert-success {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(22, 163, 74, 0.16);
}

.alert-warning {
  border-color: rgba(245, 158, 11, 0.6);
  background: rgba(245, 158, 11, 0.16);
}

/* Spacing utilities
   -------------------------------------------------------------------------- */

.mt-lg {
  margin-top: 1.75rem;
}

.mt-xl {
  margin-top: 2.5rem;
}

.mb-lg {
  margin-bottom: 1.75rem;
}

/* Responsive behavior
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }

  .pricing-card-featured {
    transform: none;
  }
}

@media (max-width: 900px) {
  .header-inner {
    gap: 1rem;
  }

  .site-nav {
    display: none; /* For simplicity; could be replaced with a burger menu later */
  }

  .header-cta {
    margin-left: auto;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    justify-content: flex-start;
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .site-main {
    padding-top: 1.75rem;
  }

  .hero-title {
    font-size: 1.9rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .container {
    padding: 0 1rem;
  }

  .logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  }
}

.lab-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.terminal-block {
  height: 600px;
  background: #000;
  border-radius: 8px;
}

.guide-block {
  background: #111827;
  padding: 20px;
  border-radius: 8px;
}

.content {
  width: 100%;
  padding: 2rem 0;
}
