/* ============================================================
   Turbo EA Marketing Site — Design System
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #0f0f18;
  --bg-card: #141420;
  --bg-card-hover: #1a1a2e;
  --bg-surface: rgba(255, 255, 255, 0.04);

  --text-primary: #f0f0f5;
  --text-secondary: #9a9ab0;
  --text-muted: #5a5a70;

  --accent-blue: #0f7eb5;
  --accent-green: #33cc58;
  --accent-purple: #774fcc;
  --accent-pink: #c7527d;
  --accent-orange: #ffa31f;
  --accent-teal: #02afa4;

  --gradient-primary: linear-gradient(135deg, #0f7eb5, #774fcc);
  --gradient-hero: linear-gradient(135deg, #0f7eb5 0%, #774fcc 50%, #c7527d 100%);
  --gradient-card: linear-gradient(135deg, rgba(15, 126, 181, 0.08), rgba(119, 79, 204, 0.08));

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(15, 126, 181, 0.15);

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section Shared --- */
section {
  padding: 120px 0;
  position: relative;
}

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

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-blue);
  background: rgba(15, 126, 181, 0.1);
  border: 1px solid rgba(15, 126, 181, 0.2);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(15, 126, 181, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(15, 126, 181, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-outline:hover {
  background: var(--bg-surface);
  border-color: rgba(255, 255, 255, 0.2);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition-base);
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.5rem;
}

.nav-logo-img {
  height: 32px;
  width: auto;
}

.nav-logo-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-base);
}

.nav-btn:hover {
  box-shadow: 0 4px 20px rgba(15, 126, 181, 0.4);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent);
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(15, 126, 181, 0.12) 0%, rgba(119, 79, 204, 0.08) 40%, transparent 70%);
  filter: blur(60px);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 8px 20px;
  border-radius: 100px;
  margin-bottom: 32px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

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

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 32px;
}

.hero-stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-subtle);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent-blue), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

/* --- Metamodel Layers --- */
.metamodel-visual {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.layers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.layer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.layer-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.layer-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

[data-layer="strategy"] .layer-card-accent { background: linear-gradient(90deg, #c7527d, #33cc58); }
[data-layer="business"] .layer-card-accent { background: linear-gradient(90deg, #2889ff, #003399); }
[data-layer="application"] .layer-card-accent { background: linear-gradient(90deg, #0f7eb5, #774fcc); }
[data-layer="technical"] .layer-card-accent { background: linear-gradient(90deg, #d29270, #ffa31f); }

.layer-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.layer-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.layer-card-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.layer-type {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  background: color-mix(in srgb, var(--type-color) 15%, transparent);
  color: var(--type-color);
  border: 1px solid color-mix(in srgb, var(--type-color) 25%, transparent);
}

.layer-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.layers-connections {
  text-align: center;
  margin-top: 48px;
  position: relative;
}

.connection-line {
  width: 200px;
  height: 2px;
  background: var(--gradient-primary);
  margin: 0 auto 16px;
  border-radius: 1px;
  position: relative;
}

.connection-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-blue);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin-top: -9px;
  animation: conn-pulse 2s ease-in-out infinite;
}

@keyframes conn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(15, 126, 181, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(15, 126, 181, 0); }
}

.connection-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Features --- */
.features {
  background: var(--bg-primary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-base);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--icon-bg);
  color: var(--icon-color);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- BPM Solution --- */
.bpm {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.bpm::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(51, 204, 88, 0.06) 0%, rgba(15, 126, 181, 0.04) 40%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.section-tag-bpm {
  color: var(--accent-green);
  background: rgba(51, 204, 88, 0.1);
  border-color: rgba(51, 204, 88, 0.2);
}

.bpm-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 64px;
}

.bpm-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-base);
}

.bpm-feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(51, 204, 88, 0.2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.bpm-feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 204, 88, 0.1);
  color: var(--accent-green);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.bpm-feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.bpm-feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.bpm-screenshots-title {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 32px;
  color: var(--text-secondary);
}

.bpm-screenshots-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.bpm-screenshots-grid .screenshot-card-large {
  grid-column: 1 / -1;
}

/* --- Architecture --- */
.architecture {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.arch-diagram {
  max-width: 800px;
  margin: 0 auto 48px;
}

.arch-tier {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.arch-tier-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.arch-tier-items {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.arch-item {
  flex: 1;
  min-width: 120px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: center;
  transition: all var(--transition-base);
}

.arch-item:hover {
  border-color: var(--accent-blue);
  background: rgba(15, 126, 181, 0.06);
}

.arch-item-wide {
  flex: 1 1 100%;
}

.arch-item-name {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.arch-item-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.arch-connector {
  display: flex;
  justify-content: center;
  padding: 8px 0;
  color: var(--text-muted);
}

.arch-deploy {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.arch-deploy-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 126, 181, 0.1);
  border-radius: var(--radius-md);
  color: var(--accent-blue);
}

.arch-deploy-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.arch-deploy-text code {
  display: inline-block;
  font-size: 0.85rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: rgba(15, 126, 181, 0.1);
  color: var(--accent-blue);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid rgba(15, 126, 181, 0.2);
}

.arch-deploy-text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- Reports --- */
.reports {
  background: var(--bg-primary);
}

.reports-showcase {
  position: relative;
}

.reports-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.report-tab {
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 20px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.report-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.report-tab.active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
}

.reports-content {
  position: relative;
  min-height: 400px;
}

.report-panel {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  animation: fadeInPanel 0.4s ease;
}

.report-panel.active {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
}

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

.report-visual {
  padding: 40px;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.report-info {
  padding: 40px;
}

.report-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.report-info p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Screenshot Placeholder (shared) */
.screenshot-placeholder {
  width: 100%;
  min-height: 280px;
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 32px;
}

.screenshot-placeholder svg {
  opacity: 0.3;
}

.screenshot-placeholder span {
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--text-secondary);
}

.screenshot-placeholder small {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.screenshot-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
}

/* Hero screenshot */
.hero-screenshot-wrap {
  position: relative;
  z-index: 1;
  margin-top: 48px;
}

.hero-screenshot {
  max-width: 1000px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  background: var(--bg-card);
}

.hero-screenshot .screenshot-placeholder-hero {
  min-height: 400px;
}

/* Screenshots showcase section */
.screenshots-showcase {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

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

.screenshot-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.screenshot-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.screenshot-card-large {
  grid-column: 1 / -1;
}

.screenshot-card .screenshot-placeholder {
  border: none;
  border-radius: 0;
  min-height: 220px;
}

.screenshot-card-large .screenshot-placeholder {
  min-height: 340px;
}

.screenshot-card .screenshot-img {
  border-radius: 0;
}

.screenshot-card-label {
  padding: 16px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
}

/* --- Integrations --- */
.integrations {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.integration-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-base);
}

.integration-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.integration-icon {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.integration-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.integration-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- Self-Hosted --- */
.self-hosted {
  background: var(--bg-primary);
}

.self-hosted-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.self-hosted-content .section-title {
  text-align: left;
}

.self-hosted-content .section-desc {
  margin-bottom: 32px;
}

.benefits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.benefits-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.benefit-check {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(51, 204, 88, 0.1);
  color: var(--accent-green);
  border-radius: 50%;
  margin-top: 2px;
}

.benefits-list li strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.benefits-list li span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Terminal */
.terminal {
  background: #1a1b26;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 20px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.82rem;
  line-height: 2;
}

.terminal-line {
  display: flex;
  gap: 8px;
  align-items: center;
}

.terminal-prompt {
  color: var(--accent-green);
  font-weight: 700;
  user-select: none;
}

.terminal-cmd {
  color: var(--text-primary);
}

.terminal-output {
  color: var(--text-muted);
}

.terminal-success {
  color: var(--accent-green);
}

.terminal-cursor {
  color: var(--accent-blue);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- Highlights --- */
.highlights {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.highlight-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition-base);
}

.highlight-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.highlight-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 126, 181, 0.1);
  color: var(--accent-blue);
  border-radius: var(--radius-sm);
  margin: 0 auto 16px;
}

.highlight-item h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.highlight-item p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- CTA --- */
.cta {
  background: var(--bg-primary);
  padding: 100px 0 120px;
}

.cta-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 64px;
  text-align: center;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(15, 126, 181, 0.1) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.cta-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  position: relative;
}

.cta-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
  position: relative;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  margin-bottom: 24px;
}

.cta-code {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
}

.cta-code code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.cta-copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition-fast);
}

.cta-copy:hover {
  color: var(--text-primary);
}

.cta-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  position: relative;
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

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

.footer-logo {
  height: 24px;
  width: auto;
}

.footer-brand-text {
  font-weight: 800;
  font-size: 1.3rem;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .layers-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .report-panel.active {
    grid-template-columns: 1fr;
  }

  .self-hosted-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

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

  .screenshots-grid {
    grid-template-columns: 1fr;
  }

  .screenshot-card-large {
    grid-column: auto;
  }

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

  .bpm-screenshots-grid {
    grid-template-columns: 1fr;
  }

  .bpm-screenshots-grid .screenshot-card-large {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  section {
    padding: 80px 0;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    font-size: 1.2rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .hero-stat-divider {
    width: 40px;
    height: 1px;
  }

  .hero-screenshot .screenshot-placeholder-hero {
    min-height: 240px;
  }

  .layers-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .integrations-grid {
    grid-template-columns: 1fr;
  }

  .bpm-features {
    grid-template-columns: 1fr;
  }

  .highlights-grid {
    grid-template-columns: 1fr;
  }

  .reports-tabs {
    gap: 6px;
  }

  .report-tab {
    font-size: 0.75rem;
    padding: 8px 14px;
  }

  .report-panel.active {
    grid-template-columns: 1fr;
  }

  .report-visual {
    padding: 24px;
    min-height: 200px;
  }

  .screenshot-placeholder {
    min-height: 180px;
  }

  .cta-card {
    padding: 40px 24px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

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

  .cta-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .arch-tier-items {
    flex-direction: column;
  }

  .arch-item {
    min-width: auto;
  }
}
