/* VM Studio - Linear Style Redesign (Split Layout) */

:root {
  /* Colors */
  --bg-body: #050505;
  --bg-surface: #0A0A0A;
  --bg-surface-hover: #121212;
  --bg-surface-active: #1A1A1A;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);

  --text-primary: #EDEDED;
  --text-secondary: #888888;
  --text-tertiary: #767676;

  --accent: #FFFFFF;
  --accent-glow: rgba(255, 255, 255, 0.15);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Animation */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

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

html {
  font-size: 16px;
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

ul {
  list-style: none;
}

/* Utilities */
.container {
  max-width: 100%;
  /* Fluid in right panel */
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  border-radius: 99px;
  transition: all 0.2s var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: #E5E5E5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-primary:active {
  transform: translateY(0);
  background: #CCCCCC;
}

.btn-sm {
  height: 32px;
  padding: 0 16px;
  font-size: 13px;
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
  width: 100%;
  /* Full width on left panel */
  max-width: 300px;
}

/* Split Layout Structure */
.split-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 1265px;
  /* Increased width by 10% (1150px * 1.1) */
  margin: 0 auto;
  /* Center the layout */
  border-left: 1px solid var(--border-subtle);
  /* Add borders for when it's centered */
  border-right: 1px solid var(--border-subtle);
  align-items: flex-start;
  /* Ensure sticky works by not stretching */
}

/* Left Panel */
.left-panel {
  width: 40%;
  max-width: 480px;
  min-width: 320px;
  height: 100dvh;
  /* Full viewport height */
  position: sticky;
  top: 0;
  border-right: 1px solid var(--border-subtle);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-body);
  z-index: 10;
  overflow: hidden;
}

.header-content {
  margin-bottom: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.logo img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.hero-text-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  align-self: flex-start;
}

.hero-title {
  font-size: 48px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  background: linear-gradient(to bottom right, #FFF 30%, #888 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
  text-wrap: balance;
}

.hero-actions {
  margin-bottom: 64px;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-links a {
  font-size: 15px;
  color: var(--text-secondary);
  width: fit-content;
}

.nav-links a:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

.footer-content {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-tertiary);
}

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

/* Right Panel */
.right-panel {
  flex: 1;
  /* height: 100%; Removed for page scroll */
  /* overflow-y: auto; Removed for page scroll */
  scroll-behavior: smooth;
  background: #080808;
  /* Slightly lighter than body */
}

/* Hero Media (Video) */
.hero-media-container {
  padding: 48px 48px 0 48px;
  /* Match left/right spacing of other sections (48px) */
  /* Removed sticky positioning */
}

.hero-media {
  margin-bottom: -20px;
  position: relative;
  width: 100%;
  border-radius: 12px;
  padding: 4px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 20px 40px -10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.4s var(--ease-out);
}

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

.video-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 64px;
  height: 64px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s var(--ease-out);
  opacity: 0;
  /* Hidden by default if autoplaying */
}

.hero-media:hover .play-button {
  transform: translate(-50%, -50%) scale(1);
  background: rgba(0, 0, 0, 0.6);
  opacity: 1;
}

.hero-media.playing .play-button {
  opacity: 0;
  pointer-events: none;
}

/* Sections in Right Panel */
.features,
.models,
.faq,
.cta {
  padding: 80px 48px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 16px;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* 2 cols for right panel */
  gap: 16px;
}

.bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
}

.card-large {
  grid-column: span 2;
}

.card-medium {
  grid-column: span 2;
}

.icon-box {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.bento-card h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.bento-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* KBD Style */
.kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-secondary);
  vertical-align: middle;
  background-color: var(--bg-surface-hover);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  box-shadow: inset 0 -1px 0 var(--border-subtle);
  margin: 0 2px;
}

/* Models Table */
.models-table {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-surface);
  overflow: hidden;
}

.table-header {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr 1fr;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.02);
}

.table-row {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr 1fr;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
  transition: background 0.2s ease;
}

.table-row:last-child {
  border-bottom: none;
}

.table-row:hover {
  background: var(--bg-surface-hover);
}

.col-model {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.model-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.model-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--text-primary);
}

.model-name {
  font-weight: 500;
  font-size: 14px;
  display: block;
}

.model-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  display: block;
}

.col-caps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.col-provider {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.col-provider a {
  font-size: 12px;
  color: var(--text-secondary);
}

.col-provider a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.align-right {
  text-align: right;
  align-items: flex-end;
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* Single column in right panel */
  gap: 16px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
}

.faq-item h3 {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-primary);
  line-height: 1.4;
}

.faq-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* CTA */
.cta-card {
  background: linear-gradient(to bottom right, #1a1a1a, #0a0a0a);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 64px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.cta-card h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-card p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 32px;
}

/* Responsive */
@media (max-width: 1024px) {
  body {
    overflow: auto;
    height: auto;
  }

  .split-layout {
    flex-direction: column;
    height: auto;
  }

  .left-panel {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 90vh;
    /* Take up most of screen initially */
    position: static;
    /* Reset sticky */
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 32px 24px;
  }

  .right-panel {
    overflow: visible;
  }

  .hero-media-container {
    padding: 0;
    position: relative;
    top: 0;
    background: none;
  }

  .hero-media {
    border-radius: 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
  }

  .video-wrapper {
    border-radius: 0;
  }

  .features,
  .models,
  .faq,
  .cta {
    padding: 64px 24px;
  }

  .hero-title {
    font-size: 40px;
  }
}

@media (max-width: 768px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .card-large,
  .card-medium {
    grid-column: span 1;
  }

  .table-header,
  .table-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .align-right {
    text-align: left;
    align-items: flex-start;
  }

  .col-provider {
    flex-direction: row;
    gap: 12px;
  }
}