/* Kinox Landing Page & Documentation Stylesheet */
:root {
  --bg-main: #0a0d14;
  --bg-card: rgba(18, 24, 38, 0.7);
  --bg-card-hover: rgba(28, 38, 58, 0.85);
  --accent-cyan: #58a6ff;
  --accent-glow: rgba(88, 166, 255, 0.35);
  --accent-gold: #e3b341;
  --accent-green: #3fb950;
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --border-color: rgba(240, 246, 252, 0.1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 50% -10%, rgba(88, 166, 255, 0.15), transparent 45%),
    radial-gradient(circle at 90% 40%, rgba(139, 92, 246, 0.08), transparent 40%),
    radial-gradient(circle at 10% 80%, rgba(63, 185, 80, 0.06), transparent 40%);
  background-attachment: fixed;
}

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

/* Header & Nav */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 13, 20, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 0;
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #58a6ff, #1f6feb);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 16px var(--accent-glow);
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-title span {
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-btn-group {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 2px;
  border: 1px solid var(--border-color);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--accent-cyan);
  color: #0a0d14;
}

.btn-launch-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #58a6ff, #1f6feb);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(88, 166, 255, 0.35);
  transition: all 0.2s ease;
}

.btn-launch-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(88, 166, 255, 0.5);
}

.btn-capture-nav {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(88, 166, 255, 0.45);
  color: var(--text-main, #f0f6fc);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-capture-nav:hover {
  border-color: #58a6ff;
  background: rgba(88, 166, 255, 0.1);
}

/* Hero Section */
.hero-section {
  padding: 80px 0 60px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 24px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 40%, rgba(255, 255, 255, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #58a6ff, #1f6feb);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(88, 166, 255, 0.4);
  transition: all 0.2s ease;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(88, 166, 255, 0.6);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.hero-canvas-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  height: 440px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(88, 166, 255, 0.15);
}

#heroCanvas {
  width: 100%;
  height: 100%;
}

.hero-canvas-overlay {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 13, 20, 0.8);
  backdrop-filter: blur(12px);
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  font-size: 12px;
}

/* Sections */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--border-color);
}

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

.section-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 14px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
}

/* Bento Features Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(88, 166, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(88, 166, 255, 0.1);
}

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

.bento-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.bento-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.bento-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Model Matrix Cards */
.model-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

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

.model-card-header {
  margin-bottom: 16px;
}

.model-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.model-badge.flagship {
  background: rgba(227, 179, 65, 0.2);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.model-badge.standard {
  background: rgba(88, 166, 255, 0.2);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
}

.model-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.model-desc-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.model-specs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
}

.spec-label { color: var(--text-muted); }
.spec-val { font-family: var(--font-mono); font-weight: 600; color: var(--text-main); }

/* Architecture Visual Section */
.arch-diagram-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 36px;
  margin-top: 20px;
}

.diagram-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.flow-node {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
  flex: 1;
  min-width: 180px;
  text-align: center;
}

.flow-node.highlight {
  border-color: var(--accent-cyan);
  background: rgba(88, 166, 255, 0.05);
}

.flow-icon { font-size: 28px; margin-bottom: 8px; }
.flow-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.flow-desc { font-size: 11px; color: var(--text-muted); }

.flow-arrow {
  font-size: 20px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* Live examples */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 20px;
}

.example-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.example-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  max-width: 100%;
  background: #06080d;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.example-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
}

.example-poster {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  background: radial-gradient(circle at 30% 30%, rgba(88, 166, 255, 0.28), transparent 60%), linear-gradient(135deg, #111827, #0a0d14);
}

.example-open {
  position: absolute;
  left: 14px;
  bottom: 14px;
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
  background: linear-gradient(135deg, #58a6ff, #1f6feb);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.example-open:focus-visible,
.example-link:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.example-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.example-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.example-body .model-badge {
  align-self: flex-start;
  margin-bottom: 0;
}

.example-title {
  font-size: 17px;
  font-weight: 700;
}

.example-desc {
  color: var(--text-muted);
  font-size: 14px;
}

.example-link {
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.examples-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 18px;
}

/* Colab Launch Box */
.colab-box {
  background: #0d1117;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  position: relative;
}

.colab-code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #79c0ff;
  white-space: pre-wrap;
  line-height: 1.6;
  overflow-x: auto; /* long tokens (URLs, environment lines) scroll inside the box instead of widening the page */
}

.btn-copy-colab {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-colab:hover {
  background: var(--accent-cyan);
  color: #0a0d14;
}

/* Footer */
.landing-footer {
  padding: 50px 0;
  border-top: 1px solid var(--border-color);
  background: rgba(10, 13, 20, 0.95);
  font-size: 13px;
  color: var(--text-muted);
}

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

/* Responsive */
@media (max-width: 992px) {
  /* The section links move to their own scrolling row, so the header never widens the page. */
  .nav-container { flex-wrap: wrap; row-gap: 10px; }
  .nav-links { order: 3; width: 100%; gap: 20px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .hero-section { grid-template-columns: 1fr; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card.span-2 { grid-column: span 1; }
  .model-grid { grid-template-columns: 1fr 1fr; }
  .diagram-flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  /* Phones: brand on the first row, language and the two actions on the second; section links are one scroll away. */
  .nav-links { display: none; }
  .nav-right { width: 100%; justify-content: space-between; gap: 8px; }
  .btn-capture-nav, .btn-launch-nav { padding: 7px 10px; font-size: 12.5px; }
  .arch-diagram-card { padding: 20px; }
  .colab-box { padding: 14px; }
}
@media (max-width: 360px) {
  .nav-right { flex-wrap: wrap; justify-content: flex-start; }
  .model-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 34px; }
}
