html {
  scroll-behavior: smooth;
}

/* ===== Hero (full viewport) ===== */
.hero-full {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  position: relative;
}

.hero-content {
  max-width: 640px;
}

.hero-icon {
  font-size: 36px;
  color: #005cbf;
  vertical-align: middle;
  margin-right: 8px;
}

.hero-title {
  font-size: 48px;
  color: #1a1a1a;
  margin: 0;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  animation: fadeUp 0.8s ease both;
}

.hero-subtitle {
  font-size: 18px;
  color: #555;
  line-height: 1.7;
  margin: 24px 0 36px;
  font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
  animation: fadeUp 0.8s 0.15s ease both;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  animation: fadeUp 0.8s 0.3s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: 'Open Sans', sans-serif;
}

.btn-primary {
  background: #1a1a1a;
  color: white;
}

.btn-primary:hover {
  background: #333;
  color: white;
  text-decoration: none;
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #bbb;
  font-size: 13px;
  font-family: 'Source Sans Pro', sans-serif;
  animation: fadeUp 0.8s 0.5s ease both;
}

.scroll-hint i {
  font-size: 16px;
  animation: bounce 2s 1s infinite;
}

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

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ===== Scroll-driven Demo Sections ===== */
.demo-scroll-section {
  position: relative;
}

.demo-sticky {
  position: sticky;
  top: 70px;
  padding: 24px 20px 40px;
  max-width: 860px;
  margin: 0 auto;
}

.demo-label {
  text-align: center;
  margin-bottom: 20px;
}

.demo-step {
  font-size: 64px;
  font-weight: 700;
  color: #eee;
  line-height: 1;
  display: block;
  font-family: 'Open Sans', sans-serif;
}

.demo-label h2 {
  font-size: 28px;
  color: #1a1a1a;
  margin: 4px 0 8px;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
}

.demo-label p {
  color: #888;
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.5;
  font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
}

/* ===== Terminal ===== */
.terminal {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.terminal-header {
  background: #f6f6f6;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

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

.dot-close { background: #ff5f57; }
.dot-minimize { background: #febc2e; }
.dot-maximize { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: #999;
  font-family: 'SF Mono', Menlo, Monaco, 'Courier New', monospace;
}

.terminal-spacer {
  width: 50px;
}

.terminal-body {
  background: #ffffff;
  padding: 16px 20px;
  min-height: 200px;
  font-family: 'SF Mono', Menlo, Monaco, 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #333;
}

/* ===== Terminal lines ===== */
.tl {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  white-space: pre-wrap;
  word-break: break-word;
}

.tl.visible {
  opacity: 1;
  transform: translateY(0);
}

.tl-dim { color: #999; }

.tp {
  color: #22863a;
  font-weight: bold;
}

.tl-typed { color: #24292e; }

.ta {
  color: #e36209;
  margin-right: 4px;
}

.tl-tool {
  color: #999;
  font-size: 12px;
}

.tl-success {
  color: #22863a;
  font-weight: 600;
}

.tl-link { color: #005cbf; }
.tl-file { color: #6f42c1; }

.tl-heading {
  color: #d73a49;
  font-weight: 600;
  text-decoration: underline;
}

.tl-prompt {
  color: #005cbf;
  font-weight: 600;
}

.cursor {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Table and code wrappers: override pre-wrap to avoid whitespace rendering */
.tl-table-wrap,
.tl-code-wrap {
  white-space: normal;
}

/* Terminal tables */
.tl-table-wrap {
  margin: 2px 0;
}

.tl-table-title {
  text-align: center;
  color: #666;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  font-family: 'SF Mono', Menlo, Monaco, 'Courier New', monospace;
}

.term-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  border: 1px solid #d0d7de;
  margin: 0;
  font-family: 'SF Mono', Menlo, Monaco, 'Courier New', monospace;
}

.term-table th {
  background: #f6f8fa;
  padding: 5px 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid #d0d7de;
  color: #57606a;
}

.term-table td {
  padding: 4px 12px;
  border-bottom: 1px solid #eee;
}

.td-easy { color: #22863a; font-weight: 600; }
.td-medium { color: #e36209; font-weight: 600; }
.td-hard { color: #cb2431; font-weight: 600; }

/* Terminal code blocks */
.term-code {
  background: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 4px;
  padding: 10px 14px;
  margin: 4px 0 4px 16px;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  font-family: 'SF Mono', Menlo, Monaco, 'Courier New', monospace;
  white-space: pre;
}

.code-kw { color: #d73a49; }
.code-cls { color: #6f42c1; }
.code-fn { color: #005cbf; }
.code-str { color: #032f62; }
.code-cmt { color: #6a737d; font-style: italic; }

/* ===== Standard Sections ===== */
.section {
  padding: 60px 20px;
}

.section-gray {
  background: #f8f9fa;
}

.section-inner {
  max-width: 860px;
  margin: 0 auto;
}

.section-title {
  font-size: 28px;
  color: #1a1a1a;
  margin: 0 0 8px;
  text-align: center;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
}

.section-desc {
  color: #666;
  text-align: center;
  margin: 0 0 30px;
  font-size: 16px;
  line-height: 1.6;
  font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
}

/* ===== Screenshots (sequential, same width) ===== */
.screenshots-sequential {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  margin-top: 30px;
}

.screenshot-solo {
  width: 100%;
  max-width: 700px;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s, box-shadow 0.3s, opacity 0.6s;
  opacity: 0;
  transform: translateY(30px);
}

.screenshot-solo.revealed {
  opacity: 1;
  transform: translateY(0);
}

.screenshot-solo:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.screenshot-solo img {
  width: 100%;
  display: block;
}

.screenshot-caption {
  text-align: center;
  font-size: 14px;
  color: #888;
  padding: 12px 16px;
  margin: 0;
  background: #fafafa;
  font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
}

/* ===== Architecture ===== */
.arch-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.arch-node {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px 24px;
  text-align: center;
  min-width: 140px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.arch-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.arch-node i {
  font-size: 24px;
  color: #005cbf;
  display: block;
  margin-bottom: 8px;
}

.arch-node strong {
  display: block;
  font-size: 15px;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.arch-node span {
  font-size: 12px;
  color: #888;
}

.arch-arrow {
  color: #ccc;
  font-size: 20px;
}

.arch-sub-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arch-connector {
  font-size: 24px;
  color: #ccc;
  margin: 8px 0;
  text-align: center;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 30px;
}

.tech-badge {
  background: white;
  border: 1px solid #e0e0e0;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  color: #555;
  font-weight: 500;
  font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
  transition: border-color 0.2s;
}

.tech-badge:hover {
  border-color: #005cbf;
}

/* ===== Footer ===== */
.page-footer {
  text-align: center;
  padding: 30px 20px;
  color: #999;
  font-size: 14px;
  font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
  border-top: 1px solid #eee;
}

.page-footer a {
  color: #005cbf;
  text-decoration: none;
}

.page-footer a:hover {
  text-decoration: underline;
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close:hover {
  color: #ccc;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
}

/* ===== Responsive ===== */
@media screen and (max-width: 768px) {
  .hero-full { min-height: 90vh; }
  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 16px; }

  .demo-sticky {
    position: relative;
    top: auto;
    padding: 30px 16px;
  }

  .demo-scroll-section {
    min-height: auto !important;
  }

  .demo-step { font-size: 48px; }

  .tl {
    opacity: 1 !important;
    transform: none !important;
  }

  .terminal-body {
    font-size: 11px;
    padding: 12px;
  }

  .term-table { font-size: 11px; }
  .term-code { font-size: 11px; padding: 8px 10px; }

  .section { padding: 40px 16px; }
  .screenshot-solo { max-width: 100%; }

  .arch-flow { flex-direction: column; }
  .arch-arrow { transform: rotate(90deg); }
}
