/*
 * Stoolap Homepage — "Engineered Precision"
 * Immersive terminal hero, spotlight features, distinctive layout.
 */

/* ── Remove wrapper padding on homepage ── */
.site-content:has(.hero) { padding: 0; }
.site-content.homepage-content { padding: 0; }
.site-content:has(.hero) ~ .site-footer { margin-top: 0; }
.site-content.homepage-content ~ .site-footer { margin-top: 0; }

/* ── Entrance animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Shared section style ── */
.section-heading {
  font-size: 2.4rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  line-height: 1.2;
  color: var(--color-text);
}

.section-sub {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.08rem;
  max-width: 560px;
  margin: 0 auto 3.5rem;
  line-height: 1.65;
}

/* ============================================
   HERO — Immersive Terminal
   ============================================ */
.hero {
  position: relative;
  margin-top: calc(-1 * var(--header-height));
  padding: calc(var(--header-height) + 4rem) 0 3.5rem;
  overflow: hidden;
  color: var(--color-text);
}

[data-theme="dark"] .hero {
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #94a3b8 0%, #b0bcc9 35%, #cdd5de 65%, #eef1f5 100%);
  z-index: 0;
}

[data-theme="dark"] .hero-bg {
  background: linear-gradient(180deg, #0a1a28 0%, #0f2535 35%, #163348 65%, #1a3b50 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* ── Heading ── */
.hero-heading {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: var(--color-text);
  animation: fadeUp 0.7s ease both;
}

[data-theme="dark"] .hero-heading {
  color: #fff;
}

.hero-accent {
  color: transparent;
  background-image: linear-gradient(100deg, rgb(15, 125, 60) 0%, rgb(74, 173, 53) 50%, rgb(122, 184, 46) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero-accent {
  background-image: linear-gradient(100deg, rgb(77, 217, 138) 0%, rgb(149, 212, 79) 50%, rgb(199, 232, 107) 100%);
}

.hero-tagline {
  font-size: 1.18rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin: 0 0 1.5rem;
  font-weight: 400;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeUp 0.7s ease 0.1s both;
}

[data-theme="dark"] .hero-tagline {
  color: rgba(255,255,255,0.55);
}

/* ── Terminal Simulation ── */
.hero-terminal {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
  height: 18rem;
  padding: 1.4rem 2rem;
  margin-bottom: 2.5rem;
  border-radius: 14px;
  background: transparent;
  border: none;
  box-shadow: none;
  animation: fadeIn 0.8s ease 0.25s both;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge */
}
.hero-terminal::-webkit-scrollbar { display: none; }

[data-theme="dark"] .hero-terminal {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.hero-term-output {
  min-height: 0;
  transition: opacity 0.35s ease;
}

.hero-term-line {
  white-space: pre;
  display: block;
}

.hero-term-line.is-query {
  color: var(--color-text);
  font-weight: 500;
}

[data-theme="dark"] .hero-term-line.is-query {
  color: #e6edf3;
}

.hero-term-line.is-result {
  color: var(--color-text-muted);
}

[data-theme="dark"] .hero-term-line.is-result {
  color: rgba(255,255,255,0.4);
}

.hero-term-input {
  display: flex;
  align-items: flex-start;
}

.hero-prompt {
  color: var(--color-primary);
  font-weight: 700;
  flex-shrink: 0;
  user-select: none;
}

[data-theme="dark"] .hero-prompt {
  color: #7ee787;
}

.hero-typed {
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-all;
  font-weight: 500;
}

[data-theme="dark"] .hero-typed {
  color: #e6edf3;
}

.hero-cursor {
  display: inline-block;
  width: 9px;
  height: 1.2em;
  background: var(--color-primary);
  vertical-align: text-bottom;
  margin-left: 1px;
  flex-shrink: 0;
  border-radius: 1px;
  animation: heroBlinkCursor 1s step-end infinite;
}

[data-theme="dark"] .hero-cursor {
  background: #7ee787;
}

.hero-cursor.typing {
  animation: none;
  opacity: 1;
}

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

/* Terminal output syntax highlighting — light */
.hero-term-output .tk { color: #a626a4; font-weight: 600; }
.hero-term-output .tf { color: #4078f2; font-weight: 600; }
.hero-term-output .ts { color: #50a14f; }
.hero-term-output .tn { color: #986801; }

/* Terminal output syntax highlighting — dark */
[data-theme="dark"] .hero-term-output .tk { color: #d2a8ff; font-weight: 600; }
[data-theme="dark"] .hero-term-output .tf { color: #79c0ff; font-weight: 600; }
[data-theme="dark"] .hero-term-output .ts { color: #a5d6ff; }
[data-theme="dark"] .hero-term-output .tn { color: #ffa657; }

@media (prefers-reduced-motion: reduce) {
  .hero-cursor { animation: none; }
}

/* ── Hero buttons ── */
.hero-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  animation: fadeUp 0.7s ease 0.2s both;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(135deg, #1a9355 0%, #4aad35 100%);
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(26,147,85,0.35), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26,147,85,0.45), inset 0 1px 0 rgba(255,255,255,0.1);
  text-decoration: none;
  color: #fff !important;
}

.btn-hero-playground {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.18);
  cursor: pointer;
  text-decoration: none;
  background: rgba(0,0,0,0.04);
  color: var(--color-text) !important;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-hero-playground:hover {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.28);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text) !important;
}

[data-theme="dark"] .btn-hero-playground {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.05);
  color: #fff !important;
}

[data-theme="dark"] .btn-hero-playground:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.28);
  color: #fff !important;
}

.btn-hero-playground svg { flex-shrink: 0; }

.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.18);
  cursor: pointer;
  text-decoration: none;
  background: rgba(0,0,0,0.04);
  color: var(--color-text) !important;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-hero-ghost:hover {
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.28);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--color-text) !important;
}

[data-theme="dark"] .btn-hero-ghost {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.05);
  color: #fff !important;
}

[data-theme="dark"] .btn-hero-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.28);
  color: #fff !important;
}

.btn-hero-ghost svg { flex-shrink: 0; }

/* Terminal syntax tokens — theme-aware (try-live section) */
.try-preview-term .t-muted { color: #a0a1a7; }
.try-preview-term .t-green { color: #50a14f; }
.try-preview-term .t-green-str { color: #4078f2; }
.try-preview-term .t-purple { color: #a626a4; }
.try-preview-term .t-yellow { color: #c18401; }
.try-preview-term .t-orange { color: #986801; }
.try-preview-term .t-fn { color: #a626a4; font-weight: 500; }
.try-preview-term .t-dim { color: #a0a1a7; }

[data-theme="dark"] .try-preview-term .t-muted { color: #6e7681; }
[data-theme="dark"] .try-preview-term .t-green { color: #7ee787; }
[data-theme="dark"] .try-preview-term .t-green-str { color: #a5d6ff; }
[data-theme="dark"] .try-preview-term .t-purple { color: #d2a8ff; }
[data-theme="dark"] .try-preview-term .t-yellow { color: #e3b341; }
[data-theme="dark"] .try-preview-term .t-orange { color: #ffa657; }
[data-theme="dark"] .try-preview-term .t-fn { color: #d2a8ff; font-weight: 500; }
[data-theme="dark"] .try-preview-term .t-dim { color: #8b949e; }

/* ============================================
   SPOTLIGHT FEATURES — Alternating text + code
   ============================================ */
.spotlights {
  padding: 5rem 0 4rem;
  background: linear-gradient(180deg, #eef1f5 0%, var(--color-bg) 15%);
  margin-top: -1px;
}

[data-theme="dark"] .spotlights {
  background: linear-gradient(180deg, #1a3b50 0%, #1a3b50 3%, var(--color-bg) 30%);
}

.spotlight-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 5rem;
}

.spotlight-item:last-child {
  margin-bottom: 0;
}

.spotlight-reverse {
  direction: rtl;
}

.spotlight-reverse > * {
  direction: ltr;
}

.spotlight-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 0.6rem;
}

.spotlight-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.8rem;
  color: var(--color-text);
  border-bottom: none !important;
  padding-bottom: 0 !important;
  line-height: 1.2;
}

.spotlight-content p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0 0 1rem;
}

.spotlight-content code {
  padding: 0.15em 0.4em;
  background: rgba(var(--color-primary-rgb), 0.08);
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--color-primary);
}

.spotlight-link {
  display: inline-block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

.spotlight-link:hover {
  opacity: 0.8;
  text-decoration: none;
}

.spotlight-visual {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

[data-theme="dark"] .spotlight-visual {
  background: #0b1018;
  border-color: #1e293b;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

/* Use .spotlight-visual parent for specificity > pre:not(.highlight) */
.spotlight-visual .spotlight-code {
  padding: 1.4rem 1.6rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--color-text);
  background: transparent;
  border: none;
  border-radius: 0;
  overflow-x: auto;
  box-shadow: none;
}

[data-theme="dark"] .spotlight-visual .spotlight-code {
  color: #c9d1d9;
}

/* Code syntax tokens — One Light */
.c-kw { color: #a626a4; font-weight: 500; }
.c-fn { color: #4078f2; }
.c-str { color: #50a14f; }
.c-cmt { color: #a0a1a7; font-style: italic; }
.c-type { color: #c18401; }
.c-num { color: #986801; }
.c-dim { color: #a0a1a7; font-style: italic; }

/* Code syntax tokens — One Dark */
[data-theme="dark"] .c-kw { color: #c678dd; }
[data-theme="dark"] .c-fn { color: #61afef; }
[data-theme="dark"] .c-str { color: #98c379; }
[data-theme="dark"] .c-cmt { color: #5c6370; }
[data-theme="dark"] .c-type { color: #e5c07b; }
[data-theme="dark"] .c-num { color: #d19a66; }
[data-theme="dark"] .c-dim { color: #5c6370; }

/* ============================================
   MORE FEATURES — Compact icon+text grid
   ============================================ */
.more-features {
  padding: 6rem 0;
  border-top: 1px solid var(--color-border);
}

.mf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 2.5rem;
}

.mf-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.mf-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-primary);
}

.mf-item h4 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}

.mf-item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* ============================================
   TRY IT LIVE — Split with terminal preview
   ============================================ */
.try-live {
  padding: 5rem 0;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.try-live-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

.try-live-text h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.8rem;
  color: var(--color-text);
  border-bottom: none !important;
  padding-bottom: 0 !important;
  line-height: 1.2;
}

.try-live-text p {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0 0 1.5rem;
}

.try-preview-term {
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  box-shadow:
    0 24px 80px rgba(0,0,0,0.08),
    0 8px 24px rgba(0,0,0,0.06);
}

[data-theme="dark"] .try-preview-term {
  background: #0b1018;
  border-color: #1e293b;
  box-shadow:
    0 24px 80px rgba(0,0,0,0.3),
    0 8px 24px rgba(0,0,0,0.2),
    0 0 0 1px rgba(255,255,255,0.06);
}

.hero-term-chrome {
  display: flex;
  gap: 6px;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--color-border);
}

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

.try-preview-term .hero-term-chrome {
  background: var(--color-bg-alt);
  border-bottom-color: var(--color-border);
}

[data-theme="dark"] .try-preview-term .hero-term-chrome {
  background: #0f1520;
  border-bottom-color: rgba(255,255,255,0.04);
}

/* Use .try-preview-term parent for specificity > pre:not(.highlight) */
.try-preview-term .hero-term-body {
  padding: 1.2rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--color-text);
  overflow-x: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}

[data-theme="dark"] .try-preview-term .hero-term-body {
  color: #c9d1d9;
}

/* ============================================
   CODE EXAMPLES — Terminal-inspired code window
   ============================================ */
.code-examples {
  padding: 6.5rem 0;
  position: relative;
}

.code-window {
  max-width: 960px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
}

[data-theme="dark"] .code-window {
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  border-color: #1e293b;
}

.code-chrome {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  gap: 1rem;
}

[data-theme="dark"] .code-chrome {
  background: #111720;
  border-bottom-color: #1e293b;
}

.code-dots {
  display: flex;
  gap: 6px;
}

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

.code-dot:nth-child(1) { background: #ff5f56; }
.code-dot:nth-child(2) { background: #ffbd2e; }
.code-dot:nth-child(3) { background: #27c93f; }

.code-tabs {
  display: flex;
  gap: 0;
}

.code-tab {
  padding: 0.4rem 1rem;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.code-tab:hover { color: var(--color-text); }

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

.code-panel { display: none; }
.code-panel.active { display: block; }

.code-panel .code-pre {
  padding: 1.5rem 1.8rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-text);
  background: transparent;
  border: none;
  border-radius: 0;
  overflow-x: auto;
  box-shadow: none;
}

[data-theme="dark"] .code-panel .code-pre {
  background: #0b1018;
}

.code-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.code-links a {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.code-links a:hover {
  text-decoration: none;
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.04);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

[data-theme="dark"] .code-links a {
  background: var(--color-bg-alt);
}

[data-theme="dark"] .code-links a:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ============================================
   COMPARISON TABLE
   ============================================ */
.comparison {
  padding: 7rem 0 6rem;
  position: relative;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.table-wrap {
  max-width: 900px;
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

[data-theme="dark"] .table-wrap {
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  display: table;
  margin: 0;
  font-size: 0.9rem;
}

.table-wrap th,
.table-wrap td {
  padding: 0.75rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  border-right: none;
  border-left: none;
}

.table-wrap th:first-child,
.table-wrap td:first-child {
  text-align: left;
  padding-left: 1.5rem;
  font-weight: 500;
  color: var(--color-text);
}

.table-wrap thead th {
  background: var(--color-bg-alt);
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  border-bottom: 2px solid var(--color-border);
  color: var(--color-text-muted);
}

.table-wrap tbody tr:last-child td { border-bottom: none; }
.table-wrap tbody tr:nth-child(even) { background: rgba(var(--color-bg-alt-rgb), 0.5); }

.hl { background: rgba(var(--color-primary-rgb), 0.05) !important; }
.table-wrap thead th.hl {
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.1) !important;
  font-weight: 700;
}

[data-theme="dark"] .hl { background: rgba(var(--color-primary-rgb), 0.1) !important; }
[data-theme="dark"] .table-wrap thead th.hl { background: rgba(var(--color-primary-rgb), 0.16) !important; }

.y { color: var(--color-primary); font-weight: 700; font-size: 1.2em; }
.n { color: var(--color-text-light); opacity: 0.35; font-size: 1.1em; }

/* ============================================
   ARCHITECTURE
   ============================================ */
.architecture {
  padding: 7rem 0 6rem;
}

.arch-diagram {
  background: var(--color-bg);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  overflow-x: auto;
  margin-bottom: 3.5rem;
}

[data-theme="dark"] .arch-diagram {
  background: #111720;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  border-color: #1e293b;
}

.arch-svg {
  width: 100%;
  height: auto;
  display: block;
  max-width: 900px;
  margin: 0 auto;
}

.arch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.arch-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.arch-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.arch-icon-green { background: rgba(var(--color-primary-rgb), 0.1); color: var(--color-primary); }
.arch-icon-blue { background: rgba(33,150,243,0.08); color: #2196f3; }
.arch-icon-purple { background: rgba(156,39,176,0.08); color: #9c27b0; }

[data-theme="dark"] .arch-icon-green { background: rgba(var(--color-primary-rgb), 0.15); }
[data-theme="dark"] .arch-icon-blue { background: rgba(33,150,243,0.12); color: #64b5f6; }
[data-theme="dark"] .arch-icon-purple { background: rgba(156,39,176,0.12); color: #ce93d8; }

.arch-item h4 { margin: 0 0 0.3rem; font-size: 1rem; font-weight: 600; }
.arch-item p { margin: 0; color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.6; }

.center-link { text-align: center; margin-top: 2.5rem; }

.btn-outline {
  display: inline-block;
  padding: 0.65rem 1.3rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.04);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ============================================
   OPEN SOURCE
   ============================================ */
.opensource {
  padding: 6rem 0;
  border-top: 1px solid var(--color-border);
}

.os-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 820px;
  margin: 0 auto 2.5rem;
}

.os-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.os-item > svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-primary);
}

.os-item h4 { margin: 0 0 0.25rem; font-size: 0.95rem; font-weight: 600; }
.os-item p { margin: 0; font-size: 0.88rem; color: var(--color-text-muted); line-height: 1.55; }

.os-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================
   FINAL CTA
   ============================================ */
.final-cta {
  padding: 6.5rem 0;
  text-align: center;
  color: var(--color-text);
  position: relative;
  overflow: hidden;
  background: #c5cdd8;
}

[data-theme="dark"] .final-cta {
  color: #fff;
  background: #122a3d;
}

.final-cta .container { position: relative; z-index: 1; }

.final-cta h2 {
  font-size: 2.4rem;
  margin: 0 0 0.65rem;
  color: var(--color-text) !important;
  font-weight: 700;
  letter-spacing: -0.03em;
  border-bottom: none !important;
  padding-bottom: 0 !important;
  line-height: 1.2;
}

[data-theme="dark"] .final-cta h2 {
  color: #fff !important;
}

.final-cta p {
  font-size: 1.12rem;
  color: var(--color-text-muted);
  margin-bottom: 2.25rem;
}

[data-theme="dark"] .final-cta p {
  color: rgba(255,255,255,0.55);
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .spotlight-item { grid-template-columns: 1fr; gap: 1.5rem; }
  .spotlight-reverse { direction: ltr; }

  .mf-grid { grid-template-columns: repeat(2, 1fr); }
  .arch-grid { grid-template-columns: repeat(2, 1fr); }

  .try-live-inner { grid-template-columns: 1fr; gap: 2rem; }
  .try-live-text { text-align: center; }
}

@media (max-width: 768px) {
  .hero { padding: calc(var(--header-height) + 2rem) 0 2rem; }
  .hero-heading { font-size: 2rem; }
  .hero-tagline { font-size: 1rem; }
  .hero-terminal { font-size: 0.82rem; height: 16rem; padding: 1.2rem 1.4rem; }
  .section-heading { font-size: 1.9rem; }
  .section-sub { font-size: 1rem; margin-bottom: 2.5rem; }

  .spotlight-content h2 { font-size: 1.5rem; }
  .spotlights { padding: 4rem 0 3rem; }
  .spotlight-item { margin-bottom: 3.5rem; }

  .mf-grid { grid-template-columns: 1fr; }
  .more-features { padding: 4rem 0; }

  .code-examples { padding: 5rem 0; }
  .code-window { max-width: 100%; }

  .comparison { padding: 5rem 0; }
  .table-wrap {
    margin: 0 -1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .architecture { padding: 5rem 0; }
  .arch-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .os-grid { grid-template-columns: 1fr; gap: 1.5rem; }

  .final-cta h2 { font-size: 1.9rem; }
  .final-cta { padding: 5rem 0; }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn-hero-primary,
  .btn-hero-playground,
  .btn-hero-ghost {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero { padding: calc(var(--header-height) + 1.5rem) 0 1.5rem; }
  .hero-heading { font-size: 1.6rem; }
  .hero-tagline { font-size: 0.88rem; }
  .hero-terminal { font-size: 0.75rem; height: 14rem; padding: 1rem; }
  .section-heading { font-size: 1.65rem; }
}
