:root {
  --bg: #05060a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --text: #f6f7fb;
  --muted: rgba(245, 246, 255, 0.65);
  --accent: linear-gradient(135deg, #7af5ff, #747bff, #9c4aff);
  --shadow: 0 20px 35px rgba(0, 0, 0, 0.4);
  --border: rgba(255, 255, 255, 0.12);
}

html[data-theme='light'] {
  --bg: #f7f8fc;
  --surface: rgba(6, 12, 24, 0.05);
  --surface-strong: rgba(6, 12, 24, 0.1);
  --text: #0d1117;
  --muted: #4f5b6b;
  --accent: linear-gradient(135deg, #2d5cff, #5ddcff, #23ce6b);
  --shadow: 0 20px 35px rgba(13, 17, 23, 0.15);
  --border: rgba(6, 12, 24, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

main {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding-bottom: 5rem;
}

section {
  padding: 0 5vw;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 3px 3px;
  opacity: 0.25;
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 5vw;
  backdrop-filter: blur(12px);
  background: rgba(5, 6, 10, 0.8);
  border-bottom: 1px solid var(--surface-strong);
  z-index: 10;
}

html[data-theme='light'] .site-header {
  background: rgba(247, 248, 252, 0.8);
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

.logo small {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  opacity: 0.6;
}

nav {
  display: flex;
  gap: 1rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

nav a:hover,
nav a.active {
  color: var(--text);
}

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

.language-select {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: var(--surface);
  display: flex;
  align-items: center;
}

.language-select select {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
}

.language-select option {
  color: #05060a;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.btn {
  border: 1px solid transparent;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-weight: 600;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background-image: var(--accent);
  color: #05060a;
  box-shadow: var(--shadow);
}

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

.btn.secondary:hover,
.btn.ghost:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.hero {
  padding-top: 6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  margin: 0 0 1rem 0;
}

.hero-copy p {
  margin: 0.5rem 0 1rem;
  color: var(--muted);
}

.eyebrow {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
}

.metrics {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.metrics .metric {
  display: block;
  font-size: 2rem;
  font-weight: 600;
}

.hero-media {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.build-feed {
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.build-feed pre {
  margin: 0;
  font-family: 'Space Grotesk', monospace;
  color: var(--muted);
  white-space: pre-wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background-image: var(--accent);
  color: #05060a;
  font-weight: 600;
}

.signal-card {
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.signal-card .label {
  font-size: 0.85rem;
  color: var(--muted);
}

.graph {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.graph span {
  display: block;
  width: 100%;
  height: 80px;
  background-image: var(--accent);
  border-radius: 12px;
  opacity: 0.5;
  animation: pulse 3s ease-in-out infinite;
  animation-delay: calc(var(--x) * 1ms);
}

@keyframes pulse {
  0%, 100% {
    transform: scaleY(0.5);
    opacity: 0.3;
  }
  50% {
    transform: scaleY(1);
    opacity: 0.8;
  }
}

.partners {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.partner-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.partner-logos span {
  border: 1px solid var(--border);
  padding: 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
}

.section-heading {
  max-width: 650px;
  margin-bottom: 2rem;
}

.card-grid,
.case-grid,
.product-grid,
.approach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card,
.approach-grid article,
.product-grid article,
.case-grid article {
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 1.5rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card h3,
.approach-grid h3,
.product-grid h3,
.case-grid h3 {
  margin-top: 0;
}

.card ul,
.cta-card ul {
  padding-left: 1rem;
  color: var(--muted);
}

.approach-grid .tag {
  display: inline-flex;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}

.product-grid .chip {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background-image: var(--accent);
  color: #05060a;
  font-size: 0.75rem;
  font-weight: 600;
}

.case-grid .data {
  color: var(--muted);
  font-size: 0.85rem;
}

.cta {
  padding: 0 5vw 3rem;
}

.cta-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
}

input,
textarea {
  padding: 0.85rem;
  border-radius: 0.8rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
}

html[data-theme='light'] input,
html[data-theme='light'] textarea {
  background: rgba(255, 255, 255, 0.85);
  color: #0d1117;
}

.form-status {
  min-height: 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer {
  padding: 2rem 5vw;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-footer a {
  color: inherit;
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .header-actions {
    flex-direction: column;
    width: 100%;
  }

  .header-actions .btn {
    width: 100%;
    text-align: center;
  }

  .language-select {
    width: 100%;
    justify-content: center;
  }

  .hero-cta {
    flex-direction: column;
  }
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}
