:root {
  --bg: #050508;
  --bg-soft: #0a0b12;
  --panel: #0c0d16;
  --panel-2: #121320;
  --panel-hover: #161828;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(229, 200, 104, 0.35);
  --border-cyan: rgba(0, 229, 255, 0.35);
  --text: #f4f5f0;
  --muted: #8d909b;
  --accent: #e5c868;
  --accent-soft: rgba(229, 200, 104, 0.12);
  --accent-glow: rgba(229, 200, 104, 0.25);
  --cyan: #00e5ff;
  --cyan-soft: rgba(0, 229, 255, 0.12);
  --cyan-glow: rgba(0, 229, 255, 0.25);
  --green: #00ff88;
  --green-soft: rgba(0, 255, 136, 0.12);
  --header-height: 72px;
  --mono: "IBM Plex Mono", monospace;
  --sans: "Inter", sans-serif;
  --heading: "Space Grotesk", "Inter", sans-serif;
  --radius: 6px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  padding-top: var(--header-height);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(229, 200, 104, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(0, 229, 255, 0.03) 0%, transparent 35%),
    linear-gradient(180deg, #07080d 0%, #050508 50%, #030305 100%);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle background tech grid lines */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 1;
}

.site-shell {
  position: relative;
  z-index: 2;
}

/* Topbar Header */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  background: rgba(5, 5, 8, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  width: min(1200px, calc(100% - 2.5rem));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 150px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 59, 92, 0.45));
  transition: transform 200ms ease;
  display: block;
}

.brand:hover .brand-icon {
  transform: scale(1.08);
}

.brand-bracket {
  color: var(--accent);
}

.brand-text {
  color: var(--text);
}

.brand-sub {
  color: var(--cyan);
  font-size: 0.8em;
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 500;
  transition: color 200ms ease;
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 240ms ease;
}

.nav-link:hover::after {
  width: 100%;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  background: rgba(0, 255, 136, 0.06);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--green);
}

.status-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(229, 200, 104, 0.3);
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 200ms ease;
}

.nav-cta:hover {
  background: var(--accent);
  color: #050508;
  box-shadow: 0 0 16px var(--accent-glow);
}

/* Mobile Menu Toggle Button */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.menu-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 240ms ease;
}

.menu-toggle.is-open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.is-open .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation Drawer */
.mobile-nav {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: rgba(8, 9, 15, 0.98);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1.75rem 2rem;
  flex-direction: column;
  gap: 1rem;
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 240ms ease, opacity 240ms ease;
}

.mobile-nav.is-open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-link {
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 1.05rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-cta-wrap {
  margin-top: 1rem;
}

/* Main Layout Container */
main {
  width: min(1200px, calc(100% - 2.5rem));
  margin: 0 auto;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  padding: 4rem 0 5rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: rgba(229, 200, 104, 0.08);
  border: 1px solid rgba(229, 200, 104, 0.25);
  border-radius: 99px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.hero-title {
  font-family: var(--heading);
  font-size: clamp(2.8rem, 6.5vw, 5.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 1.5rem;
  color: var(--text);
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 10%, var(--accent) 70%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
  line-height: 1.7;
  max-width: 760px;
  margin: 0 0 2.5rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: linear-gradient(180deg, rgba(18, 19, 32, 0.7), rgba(12, 13, 22, 0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  transition: border-color 200ms ease, transform 200ms ease;
}

.metric-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.metric-num {
  display: block;
  font-family: var(--heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.metric-label {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 220ms ease;
  border: 1px solid transparent;
}

.button.primary {
  background: var(--accent);
  color: #050508;
  border-color: var(--accent);
}

.button.primary:hover {
  background: #f0dc88;
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.button.full-width {
  width: 100%;
}

/* Section Shared Typography & Header */
.section {
  padding: 6rem 0;
  border-bottom: 1px solid var(--border);
}

.section-index {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.section-head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 3.5rem;
}

#ai-labs .section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}

#ai-labs .section-head-text {
  max-width: 680px;
}

.section-head h2 {
  font-family: var(--heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--text);
}

.section-head p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* Pillar Cards (Dual Engine) */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.pillar-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  transition: all 260ms ease;
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.pillar-card.accent-cyan::before {
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.pillar-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.pillar-card.accent-cyan:hover {
  border-color: var(--border-cyan);
}

.pillar-header {
  margin-bottom: 1.25rem;
}

.pillar-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.tag-game {
  background: var(--accent-soft);
  color: var(--accent);
}

.tag-ai {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.pillar-card h3 {
  font-family: var(--heading);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.pillar-sub {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.pillar-card p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.98rem;
  margin: 1rem 0 1.5rem;
}

.pillar-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pillar-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--text);
}

.pillar-features li span {
  color: var(--accent);
}

.pillar-card.accent-cyan .pillar-features li span {
  color: var(--cyan);
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.game-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 260ms ease;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

.game-visual {
  position: relative;
  height: 200px;
  background: #090a12;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-helix {
  background:
    radial-gradient(circle at 50% 50%, rgba(229, 200, 104, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, #090b14 0%, #06070d 100%);
}

.visual-nova {
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, #070e17 0%, #05090f 100%);
}

.visual-redline {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 77, 77, 0.15) 0%, transparent 60%),
    linear-gradient(180deg, #14090b 0%, #0d0607 100%);
}

.visual-aether {
  background:
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.22) 0%, transparent 60%),
    linear-gradient(180deg, #11091e 0%, #080410 100%);
}

.game-hud {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  z-index: 2;
}

.game-badge {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.6);
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  z-index: 2;
}

/* Center HUD Art Elements */
.hud-center-art {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-circle {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 1px dashed rgba(229, 200, 104, 0.4);
  border-radius: 50%;
  animation: spin-radar 12s linear infinite;
}

.radar-sweep {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border-top: 2px solid var(--accent);
  animation: spin-radar 3s linear infinite;
}

.crosshair {
  width: 14px;
  height: 14px;
  border: 1px solid var(--accent);
}

@keyframes spin-radar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.grid-city-lines {
  position: absolute;
  inset: 10px;
  background-image:
    linear-gradient(to right, rgba(0, 229, 255, 0.25) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 229, 255, 0.25) 1px, transparent 1px);
  background-size: 16px 16px;
  transform: perspective(120px) rotateX(45deg);
}

.pulse-node {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.pulse-ring {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.tunnel-mesh {
  position: absolute;
  width: 70px;
  height: 70px;
  border: 1px solid #ff4d4d;
  transform: rotate(45deg);
  animation: pulse-tunnel 2s infinite alternate;
}

@keyframes pulse-tunnel {
  from { transform: rotate(45deg) scale(0.8); }
  to { transform: rotate(45deg) scale(1.2); }
}

.speed-lines {
  position: absolute;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff4d4d, transparent);
  box-shadow: 0 0 8px #ff4d4d;
}

.spatial-cube {
  position: absolute;
  width: 50px;
  height: 50px;
  border: 1.5px solid rgba(168, 85, 247, 0.85);
  border-radius: 6px;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
  transform: rotate(45deg);
  animation: spatial-rotate 9s linear infinite;
}

.spatial-mesh {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 1px dashed rgba(0, 229, 255, 0.55);
  border-radius: 50%;
  animation: spatial-pulse 3s ease-in-out infinite alternate;
}

@keyframes spatial-rotate {
  from { transform: rotate(0deg) scale(0.9); }
  50% { transform: rotate(180deg) scale(1.1); }
  to { transform: rotate(360deg) scale(0.9); }
}

@keyframes spatial-pulse {
  from { transform: scale(0.85); opacity: 0.5; }
  to { transform: scale(1.15); opacity: 0.95; }
}

/* Game Body */
.game-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.game-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.genre {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.status-chip {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.status-active {
  background: rgba(0, 255, 136, 0.12);
  color: var(--green);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.status-prototype {
  background: rgba(0, 229, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.status-concept {
  background: rgba(229, 200, 104, 0.12);
  color: var(--accent);
  border: 1px solid rgba(229, 200, 104, 0.3);
}

.game-body h3 {
  font-family: var(--heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  color: var(--text);
}

.game-body p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
  margin: 0 0 1.25rem;
  flex-grow: 1;
}

.tech-stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text);
}

.game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.code-label {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
}

.detail-link {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 180ms ease;
}

.detail-link:hover {
  color: #fff;
}

/* AI / ML Labs Carousel */
.ai-carousel-wrap {
  position: relative;
  margin-bottom: 3rem;
}

.ai-grid.ai-carousel-track {
  display: flex;
  grid-template-columns: none;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem 0.25rem 1.25rem;
  margin-bottom: 0;
  cursor: grab;
}

.ai-grid.ai-carousel-track:active {
  cursor: grabbing;
}

.ai-grid.ai-carousel-track::-webkit-scrollbar {
  display: none;
}

.ai-carousel-track .ai-feature-card {
  flex: 0 0 calc((100% - 3rem) / 3);
  min-width: 320px;
  scroll-snap-align: start;
}

/* Carousel Navigation & Indicators */
.carousel-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(12, 13, 22, 0.75);
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

.carousel-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 200ms ease;
}

.carousel-nav-btn:hover {
  background: var(--cyan-soft);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.35);
  transform: translateY(-2px);
}

.carousel-nav-btn:active {
  transform: translateY(0);
}

.carousel-indicators {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.35rem;
}

.carousel-indicators .indicator {
  width: 18px;
  height: 5px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  transition: all 240ms ease;
}

.carousel-indicators .indicator:hover {
  background: rgba(0, 229, 255, 0.6);
}

.carousel-indicators .indicator.active {
  width: 34px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.ai-feature-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 240ms ease;
  display: flex;
  flex-direction: column;
}

.ai-feature-card:hover {
  border-color: var(--border-cyan);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--cyan-soft);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.ai-feature-card h3 {
  font-family: var(--heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.ai-feature-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0 0 1.25rem;
  flex-grow: 1;
}

.code-pill {
  font-family: var(--mono);
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--cyan);
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Live Terminal / Telemetry Widget */
.terminal-container {
  background: #06070c;
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 229, 255, 0.08);
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: #0a0c16;
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 0.45rem;
}

.terminal-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--green);
}

.pulse-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-glow 1.5s infinite;
}

.terminal-body {
  padding: 1.5rem;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.9;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.terminal-line {
  word-break: break-all;
}

.t-dim { color: #5a5d6a; }
.t-cyan { color: var(--cyan); }
.t-gold { color: var(--accent); }
.t-green { color: var(--green); }

/* Pipeline Section */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.pipeline-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 220ms ease;
  position: relative;
}

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

.pipeline-step-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.pipeline-card h3 {
  font-family: var(--heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
}

.pipeline-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0 0 1.25rem;
}

.pipeline-detail {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--accent);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.85rem;
}

/* Tech Ribbon */
.tech-ribbon {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(12, 13, 22, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  flex-wrap: wrap;
}

.ribbon-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.ribbon-tags {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.ribbon-item {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Studio Doctrine Ribbon (Identical to .tech-ribbon card aesthetic) */
.doctrine-ribbon {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  background: rgba(12, 13, 22, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.75rem;
  transition: all 200ms ease;
  margin-top: 1rem;
}

.doctrine-ribbon:hover {
  border-color: rgba(229, 200, 104, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.doctrine-ribbon .ribbon-label {
  white-space: nowrap;
  padding-top: 0.15rem;
}

.doctrine-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.doctrine-quote {
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
  padding: 0;
  border: none;
}

.doctrine-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.doctrine-meta .author-tag {
  color: var(--accent);
  border-color: rgba(229, 200, 104, 0.3);
  background: rgba(229, 200, 104, 0.08);
  font-weight: 600;
}

.doctrine-meta .author-sub {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* Contact Section & Brief Builder */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
}

.contact-info-card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.info-block {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.info-label {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.info-val {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text);
}

.info-val a {
  color: var(--accent);
  text-decoration: none;
}

.info-val a:hover {
  text-decoration: underline;
}

.service-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.service-pills span {
  font-family: var(--mono);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
}

/* Form Card */
.contact-form-card {
  background: linear-gradient(180deg, #0e101a, #090a10);
  border: 1px solid rgba(229, 200, 104, 0.25);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.card-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.contact-form-card h3 {
  font-family: var(--heading);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.contact-form-card p {
  color: var(--muted);
  font-size: 0.94rem;
  margin: 0 0 1.75rem;
}

.brief-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 180ms ease;
}

.chip:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.form-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.92rem;
  transition: border-color 200ms ease;
  width: 100%;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.brief-feedback {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--green);
  min-height: 20px;
  margin-top: 0.5rem;
}

.brief-feedback.error {
  color: #ff5f56;
  text-align: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 95, 86, 0.08);
  border: 1px solid rgba(255, 95, 86, 0.25);
  border-radius: var(--radius);
}

.brief-feedback-card {
  background: rgba(12, 13, 22, 0.95);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: left;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 229, 255, 0.1);
  animation: fadeInBrief 260ms ease-out;
}

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

.feedback-status-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--cyan);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.feedback-status-line .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  display: inline-block;
  animation: pulse-dot 1.8s ease-in-out infinite alternate;
}

@keyframes pulse-dot {
  from { opacity: 0.6; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.2); }
}

.feedback-subtext {
  font-family: var(--sans);
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.feedback-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.fallback-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: all 180ms ease;
}

.fallback-btn:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
  transform: translateY(-1px);
}

.fallback-btn.active-copied {
  background: rgba(34, 197, 94, 0.18);
  border-color: #22c55e;
  color: #22c55e;
}

/* Footer */
.footer {
  background: #030305;
  border-top: 1px solid var(--border);
  padding: 4.5rem 0 2.5rem;
}

.footer-inner {
  width: min(1200px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand .brand {
  font-size: 1.25rem;
}

.footer-slogan {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: 380px;
  margin-top: 0.75rem;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.col-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.footer-nav-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 180ms ease;
}

.footer-nav-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.divider {
  color: rgba(255, 255, 255, 0.15);
}

/* Reveal Scroll Animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 550ms cubic-bezier(0.16, 1, 0.3, 1), transform 550ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Media Queries */
@media (max-width: 1080px) {
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ai-carousel-track .ai-feature-card {
    flex: 0 0 calc((100% - 1.5rem) / 2);
  }
  .pipeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
  .status-indicator {
    display: none;
  }
  .section-head {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  #ai-labs .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  #ai-labs .carousel-nav {
    align-self: flex-start;
  }
  .pillar-grid {
    grid-template-columns: 1fr;
  }
  .contact-layout {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .doctrine-ribbon {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --header-height: 64px;
  }
  .hero {
    padding: 3rem 0 3.5rem;
  }
  .hero-metrics {
    grid-template-columns: 1fr;
  }
  .games-grid {
    grid-template-columns: 1fr;
  }
  .ai-carousel-track .ai-feature-card {
    flex: 0 0 88%;
    min-width: 270px;
  }
  .pipeline-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .button {
    width: 100%;
  }
  .section {
    padding: 4rem 0;
  }
}
