/* =====================================================
   Ball Programming Language — ball-lang.dev
   A dark, modern website for a revolutionary language
   ===================================================== */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #E2E8F0;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #0B0E17;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: #A78BFA;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: #C4B5FD;
}

code {
  font-family: 'JetBrains Mono', monospace;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px 24px;
  background-color: rgba(11, 14, 23, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  font-size: 28px;
}

.brand-text {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-links a,
.navbar-links > span {
  color: #94A3B8;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
  cursor: pointer;
}

.navbar-links a:hover,
.navbar-links > span:hover {
  color: #FFFFFF;
}

.nav-github {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-icon-external {
  font-size: 12px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: #7C3AED;
  color: #FFFFFF;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.3);
}
.btn-primary:hover {
  background-color: #6D28D9;
  color: #FFFFFF;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: #1E1B4B;
  color: #A78BFA;
  border: 1px solid rgba(139, 92, 246, 0.3);
}
.btn-secondary:hover {
  background-color: #2E1065;
  color: #C4B5FD;
  border-color: rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
}

.btn-ghost {
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.btn-ghost:hover {
  color: #FFFFFF;
  border-color: rgba(148, 163, 184, 0.5);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 17px;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  padding: 160px 24px 80px;
  min-height: 100vh;
  overflow: hidden;
}

.hero-bg-effects {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.hero-glow-1 {
  width: 600px;
  height: 600px;
  top: -200px;
  right: -200px;
  background: #7C3AED;
}

.hero-glow-2 {
  width: 500px;
  height: 500px;
  bottom: -100px;
  left: -150px;
  background: #3B82F6;
}

.hero-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: center;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 100px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.08);
  padding: 8px 20px;
  margin-bottom: 32px;
  font-size: 14px;
  color: #A78BFA;
  font-weight: 500;
}

.hero-badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.hero-title {
  font-size: 72px;
  font-weight: 900;
  line-height: 1.05;
  color: #FFFFFF;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-title-accent {
  background: linear-gradient(135deg, #A78BFA, #7C3AED, #3B82F6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 20px;
  line-height: 1.7;
  color: #94A3B8;
  max-width: 680px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero-code-preview {
  max-width: 720px;
  text-align: left;
  margin: 0 auto;
}

/* ===== TRUSTED ===== */
.trusted-section {
  padding: 40px 24px;
  border-top: 1px solid rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid rgba(139, 92, 246, 0.08);
}

.trusted-inner {
  max-width: 1200px;
  text-align: center;
  margin: 0 auto;
}

.trusted-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748B;
  margin-bottom: 16px;
}

.trusted-logos {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.trusted-item {
  font-size: 16px;
  font-weight: 600;
  color: #475569;
}

.trusted-divider {
  color: #334155;
}

/* ===== SECTION COMMON ===== */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px;
}

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #A78BFA;
  margin-bottom: 12px;
}

.section-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 18px;
  line-height: 1.7;
  color: #94A3B8;
}

/* ===== FEATURES ===== */
.features-section {
  padding: 100px 24px;
}

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

.feature-card {
  padding: 32px;
  border-radius: 16px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(59, 130, 246, 0.03));
  transition: all 0.3s ease;
}
.feature-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(139, 92, 246, 0.1);
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 16px;
}

.feature-title {
  color: #FFFFFF;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-desc {
  color: #94A3B8;
  font-size: 15px;
  line-height: 1.6;
}

/* ===== HOW IT WORKS ===== */
.how-section {
  padding: 100px 24px;
  background: linear-gradient(to bottom, rgba(139, 92, 246, 0.03), transparent);
}

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

.how-card {
  padding: 36px;
  border-radius: 16px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  background: rgba(15, 18, 32, 0.6);
  text-align: center;
}

.how-card-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.how-card-title {
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.how-card-arrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #A78BFA;
  border-radius: 100px;
  border: 1px solid rgba(167, 139, 250, 0.3);
  background: rgba(167, 139, 250, 0.08);
  padding: 4px 14px;
  margin-bottom: 16px;
}

.how-card-desc {
  color: #94A3B8;
  font-size: 15px;
  line-height: 1.6;
}

/* ===== CODE BLOCK ===== */
.code-block {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.2);
  background: linear-gradient(135deg, #1A1D2E, #151827);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  padding: 10px 20px;
}

.code-filename {
  color: #A78BFA;
  font-size: 13px;
  font-weight: 500;
}

.code-lang {
  color: #64748B;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-pre {
  padding: 20px;
  margin: 0;
  overflow-x: auto;
}

.code-content {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  line-height: 1.7;
  color: #E2E8F0;
  white-space: pre;
  tab-size: 2;
}

/* ===== CODE DEMO ===== */
.demo-section {
  padding: 100px 24px;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ===== LANGUAGE SUPPORT ===== */
.lang-section {
  padding: 100px 24px;
  background: linear-gradient(to bottom, rgba(59, 130, 246, 0.03), transparent);
}

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

.lang-card {
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.12);
  background: rgba(15, 18, 32, 0.5);
  transition: border-color 0.2s ease;
}
.lang-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

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

.lang-card-name {
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
}

.lang-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
}

.status-mature {
  color: #22C55E;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-prototype {
  color: #F59E0B;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-bindings {
  color: #64748B;
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.lang-card-desc {
  color: #94A3B8;
  font-size: 14px;
  line-height: 1.5;
}

/* ===== ARCHITECTURE ===== */
.arch-section {
  padding: 100px 24px;
}

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

.expr-card {
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.1);
  background: rgba(15, 18, 32, 0.4);
}

.expr-name {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: #A78BFA;
  background: rgba(167, 139, 250, 0.1);
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 10px;
}

.expr-title {
  color: #E2E8F0;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.expr-desc {
  color: #64748B;
  font-size: 13px;
  line-height: 1.5;
}

/* ===== CTA ===== */
.cta-section {
  position: relative;
  padding: 120px 24px;
  text-align: center;
  overflow: hidden;
}

.cta-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.cta-glow {
  position: absolute;
  width: 800px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(124, 58, 237, 0.1), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.cta-title {
  font-size: 48px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-desc {
  font-size: 18px;
  color: #94A3B8;
  line-height: 1.7;
  margin-bottom: 40px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.cta-install {
  max-width: 620px;
  text-align: left;
  margin: 0 auto;
}

/* ===== FOOTER ===== */
.site-footer {
  padding: 64px 24px;
  border-top: 1px solid rgba(139, 92, 246, 0.15);
  background: linear-gradient(to bottom, #0B0E17, #0F1220);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-brand-icon {
  font-size: 24px;
}

.footer-brand-text {
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
}

.footer-tagline {
  color: #64748B;
  font-size: 14px;
  line-height: 1.6;
}

.footer-heading {
  color: #E2E8F0;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
  color: #64748B;
  font-size: 14px;
}

.footer-links a {
  color: #94A3B8;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #A78BFA;
}

.footer-bottom {
  border-top: 1px solid rgba(100, 116, 139, 0.2);
  padding-top: 24px;
  text-align: center;
}

.footer-copy {
  color: #475569;
  font-size: 13px;
}

/* ===== DOCS PAGE ===== */
.docs-header {
  padding: 140px 24px 60px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(139, 92, 246, 0.05), transparent);
}

.docs-header-inner {
  max-width: 700px;
  margin: 0 auto;
}

.docs-title {
  font-size: 52px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.docs-subtitle {
  font-size: 18px;
  color: #94A3B8;
  line-height: 1.7;
}

.docs-content {
  padding: 40px 24px;
}

.docs-inner {
  max-width: 850px;
  margin: 0 auto;
}

.docs-section {
  margin-bottom: 72px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.docs-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #A78BFA;
  margin-bottom: 8px;
}

.docs-h2 {
  font-size: 32px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.docs-h3 {
  font-size: 20px;
  font-weight: 700;
  color: #E2E8F0;
  margin-bottom: 8px;
}

.docs-h4 {
  font-size: 18px;
  font-weight: 700;
  color: #E2E8F0;
  margin-top: 32px;
  margin-bottom: 16px;
}

.docs-text {
  font-size: 16px;
  line-height: 1.8;
  color: #94A3B8;
  margin-bottom: 16px;
}

.docs-text code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: #A78BFA;
  background: rgba(167, 139, 250, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.docs-principle {
  margin-bottom: 24px;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.1);
  background: rgba(15, 18, 32, 0.4);
}

.docs-list {
  margin-bottom: 16px;
  margin-left: 24px;
  color: #94A3B8;
  font-size: 15px;
  line-height: 1.8;
}

.docs-list li {
  margin-bottom: 8px;
}

/* Docs tables */
.docs-table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 8px;
  overflow: hidden;
}

.docs-table th {
  padding: 12px 16px;
  text-align: left;
  background: rgba(139, 92, 246, 0.08);
  border-bottom: 1px solid rgba(139, 92, 246, 0.15);
  font-size: 13px;
  font-weight: 600;
  color: #A78BFA;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.docs-table td {
  padding: 10px 16px;
  font-size: 14px;
  color: #CBD5E1;
  border-bottom: 1px solid rgba(139, 92, 246, 0.08);
}

.docs-table code {
  font-size: 13px;
  color: #A78BFA;
  font-weight: 600;
}

.table-example {
  color: #64748B;
  font-size: 13px;
}

/* Std categories */
.docs-std-category {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(100, 116, 139, 0.1);
}

.docs-std-name {
  color: #E2E8F0;
  font-size: 14px;
  font-weight: 600;
  min-width: 120px;
}

.docs-std-funcs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #64748B;
  line-height: 1.5;
}

/* ===== EXAMPLES PAGE ===== */
.examples-header {
  padding: 140px 24px 60px;
  text-align: center;
  background: linear-gradient(to bottom, rgba(59, 130, 246, 0.05), transparent);
}

.examples-header-inner {
  max-width: 700px;
  margin: 0 auto;
}

.examples-title {
  font-size: 52px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.examples-subtitle {
  font-size: 18px;
  color: #94A3B8;
  line-height: 1.7;
}

.examples-content {
  padding: 40px 24px;
}

.examples-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.example-item {
  margin-bottom: 80px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.example-title {
  font-size: 28px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.example-desc {
  font-size: 16px;
  color: #94A3B8;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 700px;
}

.example-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.example-col-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  margin-bottom: 12px;
}

.example-note {
  margin-bottom: 32px;
  padding: 12px 20px;
  border-radius: 8px;
  border-left: 3px solid rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.06);
}

.example-note-text {
  font-size: 14px;
  color: #94A3B8;
  line-height: 1.6;
  margin: 0;
}

.examples-run {
  padding: 40px;
  border-radius: 16px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(59, 130, 246, 0.02));
}

.examples-run-title {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 16px;
}

.examples-run code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: #A78BFA;
  background: rgba(167, 139, 250, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 44px;
  }
  .hero-subtitle {
    font-size: 17px;
  }
  .section-title {
    font-size: 32px;
  }
  .cta-title {
    font-size: 36px;
  }
  .navbar-links {
    gap: 16px;
  }
  .demo-grid,
  .example-grid {
    grid-template-columns: 1fr;
  }
  .docs-title,
  .examples-title {
    font-size: 36px;
  }
  .docs-std-category {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 36px;
  }
  .navbar-links {
    gap: 12px;
    font-size: 13px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== LANGUAGE TABS ===== */
.lang-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  background: rgba(139, 92, 246, 0.06);
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.12);
}

.lang-tab-btn {
  flex: 1;
  padding: 8px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lang-tab-btn:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(139, 92, 246, 0.1);
}

.lang-tab-btn.active {
  color: #fff;
  background: rgba(139, 92, 246, 0.25);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.lang-tab-panel {
  animation: tabFadeIn 0.2s ease;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
