/* assets/app.css - Modern TezzNative Design System */

:root {
  /* Color Palette - Dark Theme (Default) */
  --bg-base: #080b11;
  --bg-surface: #0f1422;
  --bg-surface-raised: #161e31;
  --bg-surface-elevated: #1e2842;
  --bg-glass: rgba(15, 20, 34, 0.75);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-accent: rgba(255, 153, 51, 0.4);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-accent: #ff9933;

  --brand-primary: #ff7700;
  --brand-saffron: #ff9933;
  --brand-saffron-deep: #ff671f;
  --brand-gradient: linear-gradient(135deg, #ff9933 0%, #ff671f 50%, #ea580c 100%);
  --brand-glow: 0 0 28px rgba(255, 122, 0, 0.38);

  --success: #10b981;
  --warning: #ff9933;
  --danger: #ef4444;

  --code-bg: #090d16;
  --code-border: rgba(255, 255, 255, 0.1);
  --code-keyword: #f43f5e;
  --code-fn: #ff9933;
  --code-type: #38bdf8;
  --code-string: #10b981;
  --code-number: #fbbf24;
  --code-comment: #64748b;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(56, 189, 248, 0.2);
}

/* Light Theme Overrides */
html.light {
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-raised: #f1f5f9;
  --bg-surface-elevated: #e2e8f0;
  --bg-glass: rgba(255, 255, 255, 0.85);

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.14);
  --border-accent: rgba(2, 132, 199, 0.4);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-accent: #0284c7;

  --brand-glow: 0 0 24px rgba(2, 132, 199, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);

  --code-bg: #0f172a;
  --code-border: rgba(0, 0, 0, 0.1);
}

/* Base & Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--text-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #7dd3fc;
}

code,
pre {
  font-family: var(--font-mono);
}

/* Announcement Banner */
.announcement-banner {
  background: linear-gradient(90deg, #c2410c 0%, #ea580c 40%, #ff7700 80%, #ff9933 100%);
  color: #ffffff;
  padding: 8px 16px;
  font-size: 0.84rem;
  text-align: center;
  position: relative;
  z-index: 60;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.banner-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.banner-badge {
  background: rgba(255, 255, 255, 0.22);
  padding: 2px 9px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.banner-text {
  font-weight: 500;
}

.banner-text code {
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 5px;
  border-radius: 4px;
}

.banner-link {
  color: #ffffff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.banner-link:hover {
  color: #fff7ed;
}

/* Header & Sticky Navigation */
.main-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  text-decoration: none;
}

.logo-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 12px rgba(255, 153, 51, 0.55));
}

.logo-symbol.small {
  transform: scale(0.85);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-accent {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.version-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-raised);
  color: var(--text-accent);
  border: 1px solid var(--border-subtle);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface-raised);
}

.nav-link.active {
  color: var(--text-accent);
  background: rgba(255, 153, 51, 0.12);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  transform: scale(1.05);
}

html.dark .sun-icon {
  display: block;
}

html.dark .moon-icon {
  display: none;
}

html.light .sun-icon {
  display: none;
}

html.light .moon-icon {
  display: block;
}

.btn-install-desktop {
  display: inline-flex;
}

.mobile-toggle {
  display: none;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mobile-toggle:hover {
  border-color: var(--border-accent);
  color: #ff9933;
  transform: scale(1.04);
}

/* ── Off-Canvas Sidebar & Backdrop Overlay ── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: min(340px, 86vw);
  height: 100vh;
  height: 100dvh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-medium);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.65);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.mobile-sidebar.open {
  transform: translateX(0);
}

body.sidebar-locked {
  overflow: hidden !important;
}

.sidebar-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-raised);
  position: sticky;
  top: 0;
  z-index: 2;
}

.sidebar-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sidebar-close-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
  background: rgba(255, 153, 51, 0.1);
}

.sidebar-body {
  padding: 20px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.sidebar-link svg {
  flex-shrink: 0;
  color: var(--text-tertiary);
  transition: color 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(255, 153, 51, 0.12);
  color: var(--text-accent);
  border-color: rgba(255, 153, 51, 0.25);
}

.sidebar-link:hover svg,
.sidebar-link.active svg {
  color: var(--text-accent);
}

.sidebar-badge {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(255, 103, 31, 0.18);
  color: #ff9933;
  font-weight: 600;
  border: 1px solid rgba(255, 153, 51, 0.3);
}

.sidebar-cta-box {
  background: linear-gradient(135deg, rgba(255, 153, 51, 0.12) 0%, rgba(255, 103, 31, 0.05) 100%);
  border: 1px solid rgba(255, 153, 51, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.sidebar-cta-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-cta-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.sidebar-btn-install {
  width: 100%;
  padding: 11px 16px;
  font-size: 0.88rem;
  justify-content: center;
  gap: 8px;
}

.sidebar-cta-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}

.sidebar-sub-link {
  font-size: 0.75rem;
  color: var(--text-accent);
  text-decoration: none;
  font-weight: 500;
}

.sidebar-sub-link:hover {
  text-decoration: underline;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-raised);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.sidebar-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.sidebar-footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.sidebar-footer-links a:hover {
  color: var(--text-accent);
}

.sidebar-copy {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

/* ── Page Shell & Forms ── */
.page-shell-section {
  padding-top: 40px;
}

.page-shell-header {
  text-align: left;
  margin-bottom: 30px;
}

.page-shell-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.page-shell-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-top: 10px;
  max-width: 720px;
}

.support-container {
  margin-top: 24px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.support-card {
  padding: 32px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-input {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.15);
}

.form-file-input {
  padding: 8px;
  cursor: pointer;
}

/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(255, 103, 31, 0.38);
}

.btn-primary:hover {
  color: #ffffff;
  box-shadow: 0 6px 26px rgba(255, 103, 31, 0.6);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background: var(--bg-surface-elevated);
  color: #ffffff;
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-outline:hover {
  background: var(--bg-surface-raised);
  border-color: var(--text-accent);
}

.btn-sm {
  font-size: 0.85rem;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  font-size: 1.05rem;
  padding: 14px 28px;
  border-radius: var(--radius-md);
}

.icon-inline,
.btn-icon {
  flex-shrink: 0;
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 80px 24px 70px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.18) 0%, rgba(79, 70, 229, 0.12) 50%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 153, 51, 0.1);
  border: 1px solid rgba(255, 153, 51, 0.35);
  color: #ff9933;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  max-width: 100%;
  text-align: center;
  box-shadow: 0 0 20px rgba(255, 103, 31, 0.15);
  margin-bottom: 24px;
}

.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-accent);
  margin-bottom: 24px;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(56, 189, 248, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
  }
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1.2px;
  margin-bottom: 22px;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 40%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

html.light .text-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #0284c7 50%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 34px;
  max-width: 600px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 28px;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Hero Terminal Box */
.hero-terminal-card {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  overflow: hidden;
}

.terminal-header {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--code-border);
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.dot.red {
  background: #ef4444;
}

.dot.yellow {
  background: #f59e0b;
}

.dot.green {
  background: #10b981;
}

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.terminal-comment {
  color: var(--code-comment);
  margin-bottom: 4px;
}

.terminal-cmd {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 14px;
}

.terminal-cmd code {
  color: #38bdf8;
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

/* Performance Benchmark Section */
.section {
  padding: 80px 24px;
  position: relative;
}

.section-alt {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 50px;
}

.section-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Benchmark Grid */
.benchmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.benchmark-card {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.benchmark-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
}

.bench-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.bench-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.bench-metric {
  font-size: 0.76rem;
  color: var(--text-accent);
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.bench-row {
  margin-bottom: 12px;
}

.bench-lang-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.bench-lang-name {
  color: var(--text-secondary);
}

.bench-lang-name.highlight {
  color: #38bdf8;
  font-weight: 700;
}

.bench-val {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.bench-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.bench-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.bench-bar-fill.tezz {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.bench-bar-fill.c {
  background: #64748b;
}

.bench-bar-fill.rust {
  background: #ea580c;
}

.bench-bar-fill.go {
  background: #06b6d4;
}

.bench-bar-fill.python {
  background: #eab308;
}

/* Interactive Code Playground */
.playground-wrapper {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.playground-nav-tabs {
  display: flex;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--code-border);
  overflow-x: auto;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
  background: rgba(56, 189, 248, 0.05);
}

.playground-content-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 420px;
}

.editor-pane {
  padding: 24px;
  border-right: 1px solid var(--code-border);
  position: relative;
  overflow-x: auto;
}

.code-view {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.7;
  color: #f1f5f9;
}

.code-view .kw {
  color: var(--code-keyword);
  font-weight: 600;
}

.code-view .fn {
  color: var(--code-fn);
  font-weight: 600;
}

.code-view .ty {
  color: var(--code-type);
}

.code-view .str {
  color: var(--code-string);
}

.code-view .num {
  color: var(--code-number);
}

.code-view .cmt {
  color: var(--code-comment);
  font-style: italic;
}

.code-view .op {
  color: #f43f5e;
  font-weight: 700;
}

.run-pane {
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

.run-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--code-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.run-status {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 6px;
}

.run-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
}

.terminal-output {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.6;
  flex-grow: 1;
}

.output-line {
  margin-bottom: 4px;
}

.output-line.success {
  color: #38bdf8;
  font-weight: 600;
}

.output-line.perf {
  color: #10b981;
  font-weight: 600;
}

/* Feature Pillars Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.28rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
  flex-grow: 1;
}

.feature-code-snippet {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.5;
  overflow-x: auto;
}

/* LSP Showcase Section */
.lsp-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.ide-mockup {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.ide-header {
  background: var(--bg-surface);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--code-border);
}

.ide-tabs {
  display: flex;
  gap: 8px;
}

.ide-tab {
  background: var(--code-bg);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.ide-editor-body {
  padding: 24px;
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
}

.lsp-hover-tooltip {
  position: absolute;
  top: 60px;
  left: 120px;
  background: var(--bg-surface-raised);
  border: 1px solid #38bdf8;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-lg);
  z-index: 10;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tooltip-type {
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 4px;
}

.tooltip-doc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

/* Package Registry Grid & Search */
.registry-search-bar {
  display: flex;
  align-items: center;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  gap: 12px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text-primary);
  flex-grow: 1;
}

.category-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.chip-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-btn:hover {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
}

.chip-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
}

.package-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.package-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.pkg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.pkg-name {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: #38bdf8;
}

.pkg-ver {
  font-size: 0.74rem;
  background: var(--bg-surface-raised);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  font-weight: 600;
}

.pkg-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
  flex-grow: 1;
}

.pkg-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.pkg-cmd {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--code-bg);
  padding: 4px 10px;
  border-radius: 4px;
  color: #cbd5e1;
}

/* Download Cards */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.download-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s ease;
}

.download-card.featured {
  border-color: #0284c7;
  box-shadow: 0 0 30px rgba(2, 132, 199, 0.2);
}

.featured-ribbon {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.download-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.download-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.download-meta {
  font-size: 0.84rem;
  color: var(--text-tertiary);
  margin-bottom: 14px;
}

.download-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

/* Footer */
.main-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 70px 24px 30px;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand-name {
  font-size: 1.25rem;
  font-weight: 800;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-bio {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.f-badge {
  font-size: 0.72rem;
  background: var(--bg-surface-raised);
  color: var(--text-tertiary);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.footer-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #38bdf8;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-tertiary);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* ── Code Block Copy Button (auto-injected) ─────────────────────────────────── */
.code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-tertiary);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  opacity: 0;
  z-index: 5;
}

pre:hover .code-copy-btn,
pre:focus-within .code-copy-btn {
  opacity: 1;
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.25);
}

html.light .code-copy-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.12);
  color: #64748b;
}

html.light .code-copy-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #0f172a;
}

/* ── Text Visibility Fixes (Dark & Light Mode) ──────────────────────────────── */

/* Inline code — always readable */
:not(pre) > code {
  background: var(--bg-surface-raised);
  color: var(--text-accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  border: 1px solid var(--border-subtle);
}

html.light :not(pre) > code {
  background: #f1f5f9;
  color: #0284c7;
  border-color: #e2e8f0;
}

/* Pre / code blocks */
pre {
  background: var(--code-bg, #090d16);
  border: 1px solid var(--code-border, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  position: relative;
}

pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: #e2e8f0;
  font-size: 0.88rem;
  line-height: 1.7;
}

html.light pre {
  background: #0f172a;
  border-color: rgba(0, 0, 0, 0.12);
}

html.light pre code {
  color: #e2e8f0;
}

/* Strong, em, mark — ensure visibility in both modes */
strong, b {
  color: var(--text-primary);
  font-weight: 700;
}

em, i {
  color: var(--text-secondary);
}

html.light strong, html.light b {
  color: #0f172a;
}

html.light em, html.light i {
  color: #475569;
}

/* Headings in content areas */
.section-container h2,
.section-container h3,
.section-container h4 {
  color: var(--text-primary);
}

html.light .section-container h2,
html.light .section-container h3,
html.light .section-container h4 {
  color: #0f172a;
}

/* Paragraph text — ensure proper contrast */
.section-container p {
  color: var(--text-secondary);
}

html.light .section-container p {
  color: #334155;
}

/* Table visibility */
table {
  border-collapse: collapse;
  width: 100%;
}

th {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid var(--border-medium);
}

td {
  padding: 9px 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

html.light th {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

html.light td {
  color: #334155;
  border-color: #e2e8f0;
}

/* ── Library Filter Chips & Search ──────────────────────────────────────────── */
.registry-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 22px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.registry-search-bar:focus-within {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(255, 153, 51, 0.12);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

html.light .registry-search-bar {
  background: #f8fafc;
  border-color: #e2e8f0;
}

html.light .search-input {
  color: #0f172a;
}

html.light .search-input::placeholder {
  color: #94a3b8;
}

.category-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.chip-btn {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chip-btn:hover {
  border-color: var(--border-accent);
  color: var(--text-accent);
  background: rgba(255, 153, 51, 0.08);
}

.chip-btn.active {
  background: var(--brand-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(255, 103, 31, 0.35);
}

html.light .chip-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

html.light .chip-btn:hover {
  border-color: #0284c7;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
}

html.light .chip-btn.active {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #fff;
  border-color: transparent;
}

/* Package grid */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.package-card {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.package-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md);
}

html.light .package-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

html.light .package-card:hover {
  border-color: #0284c7;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.pkg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pkg-name {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

html.light .pkg-name {
  color: #0f172a;
}

.pkg-ver {
  font-size: 0.76rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  font-weight: 600;
  font-family: var(--font-mono);
}

html.light .pkg-ver {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
}

.pkg-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex-grow: 1;
}

html.light .pkg-desc {
  color: #475569;
}

.pkg-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

html.light .pkg-actions {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.pkg-cmd {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #38bdf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.light .pkg-cmd {
  color: #0284c7;
}

/* No results state */
#pkgNoResult {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
  font-size: 1rem;
}

/* ── Team Section ─────────────────────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.team-card {
  background: var(--bg-surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.team-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
}

html.light .team-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

.team-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(255, 103, 31, 0.35);
}

.team-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

html.light .team-name {
  color: #0f172a;
}

.team-role {
  font-size: 0.84rem;
  color: var(--text-accent);
  font-weight: 600;
}

.team-since {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.team-bio {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 4px;
}

html.light .team-bio {
  color: #475569;
}

/* =================================================================
   RESPONSIVE MEDIA QUERIES — TezzNative Language Portal
   Breakpoints: 1200 | 1024 | 900 | 768 | 640 | 420
================================================================= */

/* ── Large Desktop (≤1200px) ─────────────────────────────────── */
@media (max-width: 1200px) {

  .nav-container,
  .section-container,
  .hero-container {
    max-width: 100%;
  }

  .hero-title {
    font-size: 3rem;
  }
}

/* ── Tablet Landscape / Small Desktop (≤1024px) ──────────────── */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-content {
    align-items: center;
    display: flex;
    flex-direction: column;
  }

  .hero-pill-badge {
    align-self: center;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-stats-row {
    grid-template-columns: repeat(4, 1fr);
    justify-items: center;
  }

  .hero-stat-item {
    align-items: center;
  }

  .hero-subtitle {
    max-width: 680px;
    text-align: center;
  }

  .hero-terminal-col {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
  }

  .playground-content-grid {
    grid-template-columns: 1fr;
  }

  .editor-pane {
    border-right: none;
    border-bottom: 1px solid var(--code-border);
    max-height: 280px;
    overflow-y: auto;
  }

  .playground-nav-tabs {
    flex-wrap: wrap;
    gap: 6px;
  }

  .tab-btn {
    font-size: 0.8rem;
    padding: 7px 12px;
    flex: 1 1 auto;
    min-width: 140px;
    justify-content: center;
  }

  .lsp-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand-col {
    grid-column: 1 / -1;
  }
}

/* ── Responsive: Tablet & Below (≤900px) ─────────────────────── */
@media (max-width: 900px) {

  /* Hide desktop-only nav elements to keep navbar compact */
  .btn-install-desktop {
    display: none !important;
  }

  .nav-menu {
    display: none !important;
  }

  .mobile-toggle {
    display: flex !important;
  }

  .version-tag {
    display: none;
  }

  .nav-container {
    padding: 10px 18px;
    gap: 12px;
  }

  .nav-actions {
    gap: 8px;
  }

  /* Page shells & Titles */
  .page-shell-section {
    padding-top: 30px;
  }

  .page-shell-header {
    margin-bottom: 24px;
  }

  .page-shell-title {
    font-size: 2.1rem;
  }

  .page-shell-desc {
    font-size: 0.95rem;
  }

  /* Hero */
  .hero-section {
    padding: 48px 18px 40px;
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-title {
    font-size: clamp(1.9rem, 7vw, 2.7rem);
    line-height: 1.15;
    margin-bottom: 16px;
  }

  .hero-subtitle {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 24px;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    max-width: 360px;
    gap: 10px;
  }

  .hero-cta-group .btn {
    width: 100% !important;
    justify-content: center;
  }

  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 480px;
  }

  /* Grids & Cards */
  .support-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .benchmarks-grid,
  .features-grid,
  .download-grid,
  .community-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  /* Playground */
  .playground-wrapper {
    border-radius: var(--radius-md);
  }

  .playground-content-grid {
    grid-template-columns: 1fr;
  }

  .editor-pane {
    border-right: none;
    border-bottom: 1px solid var(--code-border);
    max-height: 300px;
  }

  .terminal-pane {
    max-height: 300px;
  }

  .playground-nav-tabs {
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px;
  }

  .tab-btn {
    font-size: 0.8rem;
    padding: 7px 10px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-brand-col {
    grid-column: auto;
  }

  .main-footer {
    padding: 44px 18px 24px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ── Responsive: Tablet Portrait (≤768px) ────────────────────── */
@media (max-width: 768px) {

  /* Hero */
  .hero-section {
    padding: 36px 16px 32px;
  }

  .hero-title {
    font-size: clamp(1.75rem, 6.5vw, 2.4rem);
    letter-spacing: -0.5px;
  }

  .hero-subtitle {
    font-size: 0.97rem;
    line-height: 1.65;
  }

  .hero-pill-badge {
    font-size: 0.72rem;
    padding: 5px 12px;
    max-width: 95vw;
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
    line-height: 1.4;
  }

  .badge-sub {
    display: none;
  }

  .hero-terminal-card {
    border-radius: var(--radius-md);
  }

  .terminal-body {
    padding: 14px;
    font-size: 0.8rem;
    overflow-x: auto;
  }

  .terminal-cmd code {
    font-size: 0.72rem;
    word-break: break-all;
    white-space: pre-wrap;
  }

  /* Stats */
  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 100%;
  }

  .stat-value {
    font-size: 1.3rem;
  }

  .stat-label {
    font-size: 0.72rem;
  }

  /* Sections */
  .section {
    padding: 48px 16px;
  }

  .section-title {
    font-size: clamp(1.5rem, 5.5vw, 2rem);
  }

  .section-desc {
    font-size: 0.95rem;
  }

  /* Announcement */
  .announcement-banner {
    font-size: 0.78rem;
    padding: 7px 12px;
  }

  .banner-text {
    display: none;
  }

  /* Nav */
  .nav-container {
    padding: 9px 16px;
  }

  /* Page shell */
  .page-shell-title {
    font-size: 1.95rem;
  }

  /* Cards */
  .feature-card {
    padding: 22px 18px;
  }

  .benchmark-card {
    padding: 20px 16px;
  }

  /* Footer */
  .main-footer {
    padding: 36px 16px 20px;
  }
}

/* ── Mobile (≤640px) ─────────────────────────────────────────── */
@media (max-width: 640px) {

  /* Announcement ribbon */
  .announcement-banner {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .banner-container {
    padding: 0 4px;
    gap: 8px;
    justify-content: center;
    text-align: center;
    flex-wrap: wrap;
  }

  .banner-text {
    display: none;
  }

  .banner-badge {
    font-size: 0.65rem;
    padding: 2px 7px;
  }

  .banner-link {
    font-size: 0.75rem;
  }

  .badge-sub {
    display: none;
  }

  /* Header */
  .nav-container {
    padding: 8px 14px;
    gap: 8px;
  }

  .brand-logo {
    gap: 8px;
  }

  .logo-symbol {
    width: 30px !important;
    height: 30px !important;
  }

  .brand-text {
    font-size: 1.05rem;
  }

  /* Hero */
  .hero-section {
    padding: 28px 14px 24px;
  }

  .hero-title {
    font-size: clamp(1.55rem, 7vw, 2.1rem);
    line-height: 1.18;
    margin-bottom: 14px;
  }

  .hero-subtitle {
    font-size: 0.92rem;
    margin-bottom: 20px;
  }

  .hero-cta-group {
    max-width: 100%;
    gap: 8px;
  }

  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .hero-stat-item {
    padding: 10px;
    background: var(--bg-surface-raised);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    align-items: center;
    text-align: center;
  }

  .stat-value {
    font-size: 1.2rem;
  }

  .stat-label {
    font-size: 0.68rem;
    line-height: 1.3;
  }

  /* Terminal */
  .hero-terminal-card {
    border-radius: var(--radius-md);
  }

  .terminal-body {
    padding: 12px;
    font-size: 0.76rem;
  }

  .terminal-cmd code {
    font-size: 0.7rem;
    word-break: break-all;
    white-space: pre-wrap;
  }

  /* Forms & Support */
  .support-container {
    margin-top: 16px;
  }

  .support-card {
    padding: 20px 16px;
  }

  .form-row-2 {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .form-input {
    font-size: 16px !important;
    /* Prevents auto-zoom on iOS */
    padding: 10px 12px;
  }

  /* Page Shell & Section Titles */
  .page-shell-section {
    padding-top: 20px;
  }

  .page-shell-title {
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .page-shell-header {
    margin-bottom: 18px;
  }

  .section {
    padding: 36px 14px;
  }

  .section-title {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
  }

  .section-pill {
    font-size: 0.65rem;
  }

  .feature-card {
    padding: 18px 14px;
  }

  .benchmark-card {
    padding: 16px 12px;
  }

  /* Buttons */
  .btn-lg {
    font-size: 0.93rem;
    padding: 12px 18px;
  }

  .btn {
    font-size: 0.88rem;
  }

  /* Footer */
  .main-footer {
    padding: 32px 14px 18px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

/* ── Small Mobile (≤420px) ───────────────────────────────────── */
@media (max-width: 420px) {
  .nav-container {
    padding: 8px 10px;
  }

  .page-shell-title {
    font-size: 1.6rem;
  }

  .hero-title {
    font-size: 1.55rem;
  }

  .hero-stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stat-value {
    font-size: 1.15rem;
  }

  .support-card {
    padding: 16px 12px;
  }
}