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

:root {
  --bg: #0d0d0d;
  --bg-2: #141414;
  --bg-3: #1a1a1a;
  --bg-4: #222;
  --fg: #f0ede6;
  --fg-2: #a8a49e;
  --fg-3: #666;
  --accent: #ff4d00;
  --accent-dim: rgba(255, 77, 0, 0.15);
  --green: #3eff8e;
  --green-dim: rgba(62, 255, 142, 0.12);
  --red: #ff4444;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === NAV === */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  border-bottom: 1px solid var(--bg-4);
  position: sticky;
  top: 0;
  background: rgba(13,13,13,0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-name {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  color: var(--fg-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--fg); }

/* === HERO === */
.hero {
  padding: 80px 48px 100px;
  max-width: 1400px;
  margin: 0 auto;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
}
.label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero-sub {
  font-size: 18px;
  color: var(--fg-2);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 460px;
}
.hero-prompt-box {
  border: 1px solid var(--bg-4);
  border-radius: 8px;
  padding: 20px 24px;
  background: var(--bg-2);
  max-width: 400px;
}
.prompt-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  margin-bottom: 8px;
}
.prompt-text {
  font-family: var(--font-code);
  font-size: 13px;
  color: var(--fg-2);
  display: inline;
}
.prompt-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Terminal */
.code-terminal {
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--bg-4);
  box-shadow: 0 32px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,77,0,0.05);
}
.terminal-bar {
  background: var(--bg-4);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.terminal-title {
  font-family: var(--font-code);
  font-size: 12px;
  color: var(--fg-3);
  margin-left: 8px;
}
.terminal-body {
  padding: 20px 24px;
  font-family: var(--font-code);
  font-size: 13px;
  line-height: 1.8;
}
.t-line { white-space: pre; }
.t-pad { height: 8px; }
.t-comment { color: #555; }
.t-keyword { color: #c792ea; }
.t-var { color: #82aaff; }
.t-string { color: #c3e88d; }
.t-green { color: var(--green); }
.t-red { color: var(--red); }
.t-orange { color: var(--accent); }
.t-accent { color: var(--accent); font-weight: 700; }
.t-muted { color: var(--fg-3); }
.t-url { color: #82aaff; text-decoration: underline; }
.t-error-line { color: var(--red); }
.t-final { color: var(--fg-2); }

/* === SECTION HEADER === */
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 600px;
  margin: 0 auto 16px;
}
.section-sub {
  font-size: 17px;
  color: var(--fg-2);
  max-width: 480px;
  margin: 0 auto;
}

/* === PIPELINE === */
.pipeline {
  padding: 100px 48px;
  max-width: 1200px;
  margin: 0 auto;
}
.pipeline-steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  justify-content: center;
  margin-bottom: 48px;
}
.step {
  flex: 0 0 auto;
  width: 160px;
  text-align: center;
}
.step-num {
  font-family: var(--font-code);
  font-size: 11px;
  color: var(--fg-3);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.step-icon { margin-bottom: 16px; }
.step-name {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}
.step-desc {
  font-size: 13px;
  color: var(--fg-3);
  line-height: 1.5;
}
.step-arrow {
  flex: 0 0 auto;
  padding-top: 52px;
  display: flex;
  align-items: flex-start;
}
.pipeline-aside {
  border: 1px solid var(--bg-4);
  border-radius: 8px;
  padding: 16px 24px;
  background: var(--bg-2);
  font-family: var(--font-code);
  font-size: 13px;
  color: var(--fg-2);
  max-width: 540px;
  margin: 0 auto;
}
.aside-comment { color: #555; }
.aside-green { color: var(--green); }

/* === FEATURES === */
.features {
  padding: 100px 48px;
  background: var(--bg-2);
}
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.feature-wide { grid-column: span 2; }
.feature-card {
  background: var(--bg-3);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--bg-4);
}
.feature-visual {
  margin-bottom: 24px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.feature-text h3 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.feature-text p {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.65;
}

/* Sandbox diagram */
.sandbox-diagram {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.sandbox-node {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-4);
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-code);
  font-size: 12px;
  color: var(--fg-2);
}
.sandbox-drivers {
  font-size: 12px;
  color: var(--fg-3);
  font-style: italic;
}

/* Mock mode */
.mock-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,77,0,0.3);
  padding: 6px 14px;
  border-radius: 100px;
  font-family: var(--font-code);
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 16px;
}
.mock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
.mock-demo {
  background: var(--bg-4);
  border-radius: 8px;
  padding: 16px;
}
.mock-line {
  display: flex;
  gap: 12px;
  font-family: var(--font-code);
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px solid var(--bg-3);
}
.mock-line:last-child { border-bottom: none; }
.mock-label { color: var(--fg-3); width: 60px; flex-shrink: 0; }
.mock-url { color: var(--accent); text-decoration: underline; }

/* Stack diagram */
.stack-diagram {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stack-layer {
  background: var(--bg-4);
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font-code);
  font-size: 12px;
  color: var(--fg-2);
}

/* Deploy flow */
.deploy-flow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.deploy-node {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-4);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--fg-2);
}
.deploy-badge {
  font-size: 12px;
  color: var(--green);
  font-family: var(--font-code);
}

/* === DIFFERENCE === */
.difference {
  padding: 100px 48px;
  max-width: 1200px;
  margin: 0 auto;
}
.diff-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.diff-column {
  border-radius: 16px;
  padding: 32px;
}
.diff-other {
  background: var(--bg-2);
  border: 1px solid var(--bg-4);
}
.diff-kortex {
  background: var(--bg-3);
  border: 1px solid rgba(255,77,0,0.2);
}
.diff-label {
  font-family: var(--font-code);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
}
.diff-label-other { color: var(--fg-3); }
.diff-label-kortex { color: var(--accent); }
.diff-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.diff-step {
  display: flex;
  align-items: center;
  gap: 10px;
}
.diff-step.diff-step-kortex .diff-num { color: var(--accent); border-color: var(--accent); }
.diff-num {
  font-family: var(--font-code);
  font-size: 12px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--bg-4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-3);
  flex-shrink: 0;
}
.diff-text {
  font-size: 13px;
  color: var(--fg-2);
}
.diff-warn { color: var(--red); }
.diff-result {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--bg-4);
}
.diff-result-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}
.diff-result-desc {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.55;
}
.diff-result-bad .diff-result-title { color: var(--fg); }
.diff-result-good .diff-result-title { color: var(--green); }

/* === PRINCIPLES === */
.principles {
  padding: 100px 48px;
  background: var(--bg-2);
}
.principles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.principle { }
.principle-icon {
  margin-bottom: 20px;
}
.principle-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.principle-desc {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.65;
}

/* === CLOSING === */
.closing {
  padding: 120px 48px;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  text-align: center;
}
.closing-inner { max-width: 760px; margin: 0 auto; }
.closing-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.closing-headline {
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
}
.closing-body {
  font-size: 18px;
  color: var(--fg-2);
  line-height: 1.7;
  margin-bottom: 56px;
}
.closing-aside {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-bottom: 48px;
}
.closing-divider {
  width: 1px;
  height: 40px;
  background: var(--bg-4);
}
.closing-stat { text-align: center; }
.stat-num {
  font-family: var(--font-head);
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 13px;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.closing-cta { }
.cta-text {
  font-size: 15px;
  color: var(--fg-3);
}

/* === FOOTER === */
.footer {
  padding: 40px 48px;
  border-top: 1px solid var(--bg-4);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
}
.footer-copy {
  font-size: 13px;
  color: var(--fg-3);
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .nav { padding: 16px 24px; }
  .nav-links { display: none; }
  .hero { padding: 60px 24px 80px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-right { order: -1; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-wide { grid-column: span 1; }
  .pipeline-steps { flex-direction: column; align-items: flex-start; }
  .step-arrow { transform: rotate(90deg); padding: 0; }
  .diff-comparison { grid-template-columns: 1fr; }
  .principles-grid { grid-template-columns: 1fr; }
  .closing-aside { gap: 24px; }
  .closing, .pipeline, .features, .principles, .difference { padding: 60px 24px; }
}
