/* ===== CUSTOM PROPERTIES ===== */
:root {
  --primary: #1a1a2e;
  --accent: #D85630;
  --accent-hover: #DF7A48;
  --secondary: #5A39B6;
  --blue: #2352C3;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #444;
  --muted: #888;
  --border: #e0e0e0;
  --code-bg: #1a1a2e;
  --nav-height: 72px;
  --max-width: 1200px;
  --radius: 4px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
  --transition: 0.25s ease;
  --pipe-capture: #4D90FE;
  --pipe-preprocess: #67C2A5;
  --pipe-feature: #FFB366;
  --pipe-sfm: #EF767A;
  --pipe-neural: #FFEDA0;
  --pipe-semantic: #A2D9CE;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== SECTION HEADINGS ===== */
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 56px;
  font-weight: 400;
}

section {
  padding: 100px 40px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  transition: box-shadow var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  border-bottom-color: var(--border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-ovr-logo img {
  height: 28px;
  width: auto;
  display: block;
  opacity: 0.9;
  transition: opacity var(--transition);
}
.nav-ovr-logo:hover img { opacity: 1; }

.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--primary);
}

.nav-links a {
  position: relative;
}

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

.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--primary);
  transition: var(--transition);
}

.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); }

/* ===== MEGA TABS ===== */
.mega-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  padding-top: calc(var(--nav-height) + 20px);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.mega-tab {
  flex: 1;
  max-width: 400px;
  padding: 20px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.3px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.mega-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.mega-tab:hover:not(.locked) {
  color: var(--primary);
}

.mega-tab.locked {
  cursor: not-allowed;
  opacity: 0.45;
  filter: blur(0.5px);
  user-select: none;
  pointer-events: none;
}

.mega-tab.locked svg {
  opacity: 0.7;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(8,8,24,0.88) 0%, rgba(26,26,46,0.78) 100%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 40px;
  width: 100%;
}

.hero-content {
  flex: 1;
  padding: 0;
  text-align: left;
}

.hero-title {
  font-size: clamp(3.5rem, 9vw, 6rem);
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 20px;
  color: var(--primary);
  line-height: 1;
}

/* Dark background overrides */
.hero .hero-subtitle { color: rgba(255,255,255,0.72); }
.hero .hero-authors { color: rgba(255,255,255,0.45); }
.hero .stat-number { color: #fff; }
.hero .stat-label { color: rgba(255,255,255,0.45); }
.hero .stat-item + .stat-item::before { background: rgba(255,255,255,0.15); }
.hero .hero-buttons { justify-content: flex-start; }
.hero .hero-stats { justify-content: flex-start; }

/* Phone mockup */
.hero-phone {
  flex-shrink: 0;
}

.phone-mockup {
  width: 260px;
  height: 540px;
  background: #000;
  border-radius: 44px;
  border: 8px solid rgba(255,255,255,0.14);
  box-shadow: 0 40px 80px rgba(0,0,0,0.65), inset 0 0 0 1px rgba(255,255,255,0.06);
  overflow: hidden;
  position: relative;
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 26px;
  background: #000;
  border-radius: 0 0 18px 18px;
  z-index: 10;
}

.phone-mockup video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    padding: 60px 24px;
    gap: 48px;
  }
  .hero-content { text-align: center; }
  .hero .hero-buttons { justify-content: center; }
  .hero .hero-stats { justify-content: center; }
  .phone-mockup { width: 220px; height: 460px; }
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 12px;
  line-height: 1.5;
}

.hero-authors {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 40px;
  font-weight: 400;
}

/* Buttons */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 64px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  border: 1.5px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: #2a2a42;
  border-color: #2a2a42;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
}

/* Stat counters */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  position: relative;
}

.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 15%;
  height: 70%;
  width: 1px;
  background: var(--border);
}

.stat-number {
  display: block;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 4px;
}

/* ===== OVERVIEW ===== */
.overview-text {
  max-width: 800px;
  margin: 0 auto 56px;
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--border);
  border: 1px solid var(--border);
}

.feature-card {
  background: var(--card-bg);
  padding: 32px 28px;
  transition: all var(--transition);
}

.feature-card:hover {
  background: var(--bg-alt);
}

.feature-icon {
  margin-bottom: 16px;
  display: block;
  line-height: 1;
}

.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
  letter-spacing: -0.2px;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ===== SAMPLES ===== */
.filter-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.filter-tag {
  padding: 8px 20px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--muted);
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-tag.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.samples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: var(--max-width);
  margin: 0 auto 40px;
}

.sample-item {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-alt);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}

.sample-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.sample-item img,
.sample-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sample-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.sample-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #bbb;
  font-size: 0.8rem;
  gap: 8px;
}

.sample-placeholder svg {
  opacity: 0.4;
}

.sample-item.hidden {
  display: none;
}

.show-more-wrap {
  text-align: center;
}

.btn-show-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--primary);
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.btn-show-more:hover {
  border-color: var(--primary);
}

.btn-show-more svg {
  transition: transform var(--transition);
}

.btn-show-more.expanded svg {
  transform: rotate(180deg);
}

/* ===== PIPELINE ===== */
.pipeline-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

.pipeline-step {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 28px 22px;
  transition: all var(--transition);
  border-top: 3px solid var(--border);
  display: flex;
  flex-direction: column;
}

.pipeline-step p {
  flex: 1;
}

.pipeline-step:hover {
  background: var(--bg-alt);
}

.pipeline-step.step-capture    { border-top-color: var(--pipe-capture); }
.pipeline-step.step-preprocess { border-top-color: var(--pipe-preprocess); }
.pipeline-step.step-feature    { border-top-color: var(--pipe-feature); }
.pipeline-step.step-sfm        { border-top-color: var(--pipe-sfm); }
.pipeline-step.step-neural     { border-top-color: var(--pipe-neural); }
.pipeline-step.step-semantic   { border-top-color: var(--pipe-semantic); }

.pipeline-arrow {
  display: flex;
  align-items: center;
  padding: 0 4px;
  color: #ccc;
  flex-shrink: 0;
}

.pipeline-icon {
  margin-bottom: 12px;
  display: block;
  line-height: 1;
}

.pipeline-step h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.pipeline-step p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.pipeline-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.step-capture    .pipeline-badge { background: var(--pipe-capture); }
.step-preprocess .pipeline-badge { background: var(--pipe-preprocess); color: #333; }
.step-feature    .pipeline-badge { background: var(--pipe-feature); color: #333; }
.step-sfm        .pipeline-badge { background: var(--pipe-sfm); }
.step-neural     .pipeline-badge { background: var(--pipe-neural); color: #333; }
.step-semantic   .pipeline-badge { background: var(--pipe-semantic); color: #333; }

/* ===== STATISTICS ===== */
.stats-row {
  display: grid;
  gap: 16px;
  max-width: var(--max-width);
  margin: 0 auto 24px;
}

.stats-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  max-width: var(--max-width);
  margin: 40px auto 16px;
}

.stats-row.cols-1 { grid-template-columns: 1fr; }
.stats-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.stats-row.cols-3 { grid-template-columns: repeat(3, 1fr); }

.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition);
  cursor: pointer;
}

.chart-card:hover {
  box-shadow: var(--shadow-md);
}

.chart-card img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== DOWNLOAD ===== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--border);
  border: 1px solid var(--border);
}

.download-card {
  background: var(--card-bg);
  padding: 40px 32px;
  text-align: center;
  transition: all var(--transition);
}

.download-card:hover {
  background: var(--bg-alt);
}

.download-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.download-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.download-badge {
  display: inline-block;
  padding: 4px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-alt);
  color: var(--text-secondary);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.download-card .btn {
  width: 100%;
  justify-content: center;
}

.download-card-soon {
  position: relative;
  opacity: 0.85;
  grid-column: 1 / -1;
}

.download-card-soon .soon-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--text);
  color: #fff;
  text-transform: uppercase;
}

.btn-disabled {
  pointer-events: none;
  opacity: 0.55;
  cursor: not-allowed;
}

/* ===== CITATION ===== */
.citation-block {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  background: var(--code-bg);
  padding: 32px;
  overflow-x: auto;
}

.citation-block pre {
  color: #ccc;
  font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  background: none;
}

.btn-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 18px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: #999;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.btn-copy:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

.btn-copy.copied {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.3);
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 40px;
  text-align: center;
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 10px;
}

.footer-links a {
  font-size: 0.75rem;
  color: var(--muted);
  transition: color var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline-flow { flex-wrap: wrap; gap: 1px; background: var(--border); }
  .pipeline-arrow { display: none; }
  .pipeline-step { flex-basis: calc(50% - 1px); }
  .stats-row.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .download-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-height: 60px; }

  .container { padding: 0 20px; }

  .nav-container { padding: 0 20px; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

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

  .hero-title { letter-spacing: -1px; }
  .hero-stats { gap: 32px; }
  .stat-number { font-size: 2rem; }
  .stat-item + .stat-item::before { display: none; }

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

  .stats-row.cols-2,
  .stats-row.cols-3 { grid-template-columns: 1fr; }

  .pipeline-flow { flex-direction: column; gap: 1px; }
  .pipeline-step { flex-basis: 100%; }

  section { padding: 64px 20px; }
}

@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}
