:root {
  /* Colors */
  --color-cream: #fcfcf9;
  --color-stone: #f4f3ef;
  --color-sand: #e8e6e1;
  --color-charcoal: #1f1f1f;
  --color-text-secondary: #585752;
  --color-terracotta: #d97757;
  --color-terracotta-dark: #b05a3e;
  --color-green-600: #16a34a;

  /* Fonts */
  --font-serif: "EB Garamond", serif;
  --font-sans: "Inter", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-cream);
  color: var(--color-charcoal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: radial-gradient(var(--color-sand) 1px, transparent 1px);
  background-size: 32px 32px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.1;
  color: var(--color-charcoal);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* Utilities */
.container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.opacity-70 { opacity: 0.7; }
.text-success { color: var(--color-green-600); }
.text-terracotta { color: var(--color-terracotta); }
.italic { font-style: italic; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.ml-1 { margin-left: 0.25rem; }

/* Animations */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes slideUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}
@keyframes shuttle {
  0% { left: -10%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 110%; opacity: 0; }
}

.animate-fade-in { animation: fadeIn 0.6s ease-out forwards; }
.animate-slide-up { opacity: 0; animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-pulse-slow { animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-shuttle { animation: shuttle 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite; }

/* Header */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}
header.scrolled, header.mobile-open {
  background-color: rgba(252, 252, 249, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--color-sand);
}
.header-content {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-actions {
  display: none;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 768px) { .header-actions { display: flex; } }

.header-nav { display: flex; align-items: center; gap: 1.5rem; }
.header-divider { height: 1rem; width: 1px; background-color: rgba(31, 31, 31, 0.1); }

.logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-icon {
  width: 2rem; height: 2rem;
  background-color: var(--color-charcoal);
  color: var(--color-cream);
  border-radius: 0.375rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.logo:hover .logo-icon { transform: scale(1.05); }

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.nav-link {
  font-size: 0.875rem; font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--color-terracotta); }
.nav-link-github { display: flex; align-items: center; gap: 0.25rem; }

.version-badge {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--color-text-secondary);
    border: 1px solid rgba(31,31,31,0.2);
    border-radius: 0.25rem;
    transition: all 0.2s;
}
.version-badge:hover {
    border-color: var(--color-terracotta);
    color: var(--color-terracotta);
}

.mobile-toggle-btn { padding: 0.5rem; color: var(--color-charcoal); }
@media (min-width: 768px) { .mobile-toggle-btn { display: none; } }

.mobile-menu {
  position: absolute; top: 4rem; left: 0; right: 0;
  background-color: var(--color-cream);
  border-bottom: 1px solid var(--color-sand);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.mobile-menu-link { font-size: 1.125rem; font-family: var(--font-serif); color: var(--color-charcoal); transition: color 0.2s; }
.mobile-menu-link:hover { color: var(--color-terracotta); }
.mobile-menu-divider { height: 1px; background-color: var(--color-sand); margin: 0.5rem 0; }

/* Main Layout */
main { flex-grow: 1; padding-top: 5rem; overflow: hidden; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.2s;
  font-family: var(--font-sans);
}
.btn-primary {
  background-color: var(--color-charcoal);
  color: var(--color-cream);
}
.btn-primary:hover {
  background-color: var(--color-terracotta);
  box-shadow: 0 10px 15px -3px rgba(217, 119, 87, 0.2);
}
.btn-primary:hover svg { transform: translateX(0.25rem); }

.btn-secondary {
  background-color: white;
  border: 1px solid var(--color-sand);
  color: var(--color-charcoal);
}
.btn-secondary:hover {
  border-color: var(--color-terracotta);
  color: var(--color-terracotta);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.btn svg { transition: transform 0.2s; }

/* Hero Section */
.hero-section {
  position: relative;
  padding-top: 2rem; padding-bottom: 6rem;
  padding-left: 1.5rem; padding-right: 1.5rem;
}
@media (min-width: 768px) {
  .hero-section { padding-top: 4rem; padding-bottom: 8rem; }
}
.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: repeat(2, 1fr); gap: 6rem; }
}
.hero-title {
  font-family: var(--font-serif);
  font-size: 3rem; 
  line-height: 1; 
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--color-charcoal);
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .hero-title { font-size: 4.5rem; }
}
.hero-text {
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--color-text-secondary);
  margin-bottom: 2.5rem;
  max-width: 32rem;
}
@media (min-width: 768px) { .hero-text { font-size: 1.25rem; } }

.hero-actions {
    display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem;
}
.hero-blob {
    position: absolute; inset: -1rem;
    background: radial-gradient(circle at center, rgba(217,119,87,0.2), transparent);
    filter: blur(64px); border-radius: 9999px;
    opacity: 0.5; z-index: -10;
}

/* Install Tabs */
.install-tabs-wrapper {
  display: flex; flex-direction: column; gap: 1rem; width: 100%; max-width: 32rem; margin-bottom: 3rem;
}
.install-tabs-nav {
  display: flex; gap: 0.25rem; padding: 0.25rem;
  background-color: rgba(244, 243, 239, 0.5);
  border: 1px solid var(--color-sand);
  border-radius: 0.75rem;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.tab-btn {
  flex: 1; padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  transition: all 0.3s;
  color: var(--color-text-secondary);
}
.tab-btn:hover { color: var(--color-terracotta); background-color: rgba(255, 255, 255, 0.5); }
.tab-btn.active {
  background-color: white; color: var(--color-charcoal);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.install-cmd-box {
  position: relative;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.25rem;
  background-color: white;
  border: 1px solid var(--color-sand);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.install-cmd-box:hover { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }

.cmd-prefix {
    color: var(--color-terracotta); font-family: var(--font-mono); margin-right: 0.75rem; user-select: none;
}
.cmd-text {
    flex: 1; font-family: var(--font-mono); font-size: 0.875rem; color: var(--color-charcoal);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy-icon-btn {
    color: var(--color-text-secondary); transition: color 0.2s;
}
.install-cmd-box:hover .copy-icon-btn { color: var(--color-terracotta); }

/* Hero Visual */
.hero-visual-wrapper {
  width: 100%; max-width: 560px;
  margin: 0 auto; position: relative; user-select: none;
}
.hero-visual-bg {
  position: absolute; inset: 0;
  background-color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(232, 230, 225, 0.6);
  border-radius: 1.5rem;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  z-index: -10;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.hero-visual-content {
  padding: 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  position: relative;
}
@media (min-width: 768px) { .hero-visual-content { padding: 3.5rem; } }
.hero-visual-line {
  position: absolute; top: 40%; left: 4rem; right: 4rem;
  height: 1px; background-color: rgba(232, 230, 225, 0.8);
  transform: translateY(-50%); z-index: 0;
}
.hero-visual-shuttle-track {
  position: absolute; top: 40%; left: 4rem; right: 4rem;
  height: 2px; transform: translateY(-50%);
  z-index: 0; overflow: hidden; opacity: 0.6;
}
.hero-visual-shuttle {
  position: absolute; top: 0; height: 100%; width: 4rem;
  background: linear-gradient(to right, transparent, var(--color-terracotta), transparent);
  border-radius: 9999px; filter: blur(1px);
}
.hero-node {
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  position: relative; z-index: 10; cursor: default;
}
.hero-node-icon-box {
  width: 3.5rem; height: 3.5rem;
  background-color: white; border-radius: 1rem;
  border: 1px solid var(--color-sand);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.5s;
}
.hero-node-icon-box svg { transition: color 0.3s; color: rgba(31, 31, 31, 0.8); }

.hero-node:hover .hero-node-icon-box { transform: translateY(-0.25rem); }
.hero-node-icon-box.source:hover {
  border-color: rgba(217, 119, 87, 0.4);
  box-shadow: 0 4px 12px rgba(217, 119, 87, 0.15);
}
.hero-node.group:hover .hero-node-icon-box.source svg { color: var(--color-terracotta); }

.hero-node-icon-box.output:hover {
  border-color: rgba(22, 163, 74, 0.4); /* green-600 */
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}
.hero-node.group:hover .hero-node-icon-box.output svg { color: var(--color-green-600); }

.hero-node-label { text-align: center; opacity: 0.8; transition: opacity 0.3s; }
.hero-node:hover .hero-node-label { opacity: 1; }
.hero-node-title {
  font-size: 0.75rem; font-weight: 600; color: var(--color-charcoal);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem;
}
.hero-node-badge {
  font-size: 0.625rem; color: var(--color-text-secondary);
  font-family: var(--font-mono); background-color: white;
  border: 1px solid var(--color-sand); padding: 0.125rem 0.375rem;
  border-radius: 0.25rem; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.hero-engine-glow {
  position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%);
  width: 5rem; height: 5rem;
  background-color: rgba(217, 119, 87, 0.05); border-radius: 9999px;
  filter: blur(24px); transition: background-color 0.5s;
}
.hero-node:hover .hero-engine-glow { background-color: rgba(217, 119, 87, 0.1); }
.hero-engine-box {
  width: 4rem; height: 4rem;
  background-color: var(--color-charcoal); color: var(--color-cream);
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(31, 31, 31, 0.1);
  display: flex; align-items: center; justify-content: center;
  position: relative; box-shadow: 0 0 0 4px white;
  transition: transform 0.5s;
}
.hero-node:hover .hero-engine-box { transform: scale(1.05); }

/* Features Section */
.features-section {
  padding-top: 6rem; padding-bottom: 6rem;
  background-color: white;
  border-top: 1px solid var(--color-sand);
}
.section-header { text-align: center; max-width: 42rem; margin: 0 auto 4rem auto; }
.section-title { font-size: 2.25rem; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .section-title { font-size: 3rem; } }
.section-desc { font-size: 1.125rem; color: var(--color-text-secondary); }

.features-grid {
  display: grid; gap: 1.5rem;
  grid-template-rows: auto;
}
@media (min-width: 768px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
  border-radius: 1rem; border: 1px solid var(--color-sand);
  padding: 2rem; position: relative; overflow: hidden;
  background-color: white;
}
@media (min-width: 768px) { .feature-card { padding: 3rem; } }

.feature-card.large {
  grid-column: span 1;
  background-color: var(--color-stone);
}
.feature-bg-icon {
    position: absolute;
    right: -2rem;
    bottom: -2rem;
    color: var(--color-charcoal);
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
    transform: rotate(-10deg);
}
@media (min-width: 768px) { .feature-card.large { grid-column: span 2; } }

.feature-card.tall {
  grid-row: span 1;
  background-color: var(--color-charcoal); color: var(--color-cream);
  display: flex; flex-direction: column; justify-content: space-between;
}
@media (min-width: 768px) { .feature-card.tall { grid-row: span 2; } }

.feature-icon-box {
  width: 3rem; height: 3rem; border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.5rem;
}
.feature-icon-box.dark { background-color: var(--color-charcoal); color: white; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.feature-icon-box.glass { background-color: rgba(255, 255, 255, 0.1); color: white; backdrop-filter: blur(8px); }
.feature-icon-box.light { background-color: rgba(217, 119, 87, 0.1); color: var(--color-terracotta); }

.feature-title { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 1rem; }
.feature-text { color: var(--color-text-secondary); line-height: 1.625; }
.feature-card.tall .feature-text { color: rgba(255, 255, 255, 0.7); }

.feature-terminal {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem; padding: 1rem;
  font-family: var(--font-mono); font-size: 0.75rem; color: rgba(255, 255, 255, 0.5);
}

/* Steps / How It Works */
.steps-section {
  padding-top: 6rem; padding-bottom: 6rem;
  background-color: var(--color-cream);
}
.steps-grid {
  display: grid; gap: 4rem; align-items: start;
}
@media (min-width: 1024px) {
  .steps-grid { grid-template-columns: 1fr 1fr; align-items: center; }
}
.steps-main-title {
  font-family: var(--font-serif); font-size: 2.5rem; line-height: 1.1; margin-bottom: 3rem;
}
@media (min-width: 768px) { .steps-main-title { font-size: 3.5rem; } }

.step-item { display: flex; gap: 1.5rem; margin-bottom: 2.5rem; }
.step-number {
  flex-shrink: 0; width: 2.5rem; height: 2.5rem;
  border-radius: 9999px; background-color: white; border: 1px solid var(--color-sand);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600; color: var(--color-text-secondary);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.step-item.active .step-number {
  background-color: var(--color-terracotta); color: white; border-color: var(--color-terracotta);
}
.step-title { font-size: 1.25rem; font-weight: 500; margin-bottom: 0.5rem; font-family: var(--font-serif); }
.step-desc { color: var(--color-text-secondary); line-height: 1.6; font-size: 0.95rem; }

/* Code Window */
.code-window {
  background-color: white; border-radius: 1rem;
  border: 1px solid var(--color-sand);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.window-header {
  padding: 1rem; border-bottom: 1px solid var(--color-stone);
  display: flex; align-items: center; justify-content: space-between;
  background-color: rgba(252, 252, 249, 0.8);
}
.window-dots { display: flex; gap: 0.5rem; }
.window-dot { width: 0.75rem; height: 0.75rem; border-radius: 9999px; }
.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }
.window-title { font-family: var(--font-mono); font-size: 0.75rem; color: var(--color-text-secondary); }

.window-body { padding: 1.5rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.6; }
.yaml-key { color: var(--color-terracotta); }
.yaml-string { color: var(--color-green-600); }
.yaml-val { color: var(--color-charcoal); }

/* CTA Section */
.cta-section {
  position: relative;
  background-color: var(--color-charcoal);
  color: white;
  padding-top: 8rem; padding-bottom: 8rem;
  text-align: center;
  overflow: hidden;
}
.cta-curve-bg {
    position: absolute; bottom: -50%; left: -10%; right: -10%; height: 100%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}
.cta-title {
  font-family: var(--font-serif); font-size: 2.5rem; margin-bottom: 1rem; position: relative; z-index: 10;
  color: white;
}
@media (min-width: 768px) { .cta-title { font-size: 3.5rem; } }

.cta-desc {
  font-size: 1.125rem; color: rgba(255, 255, 255, 0.7); max-width: 32rem; margin: 0 auto 3rem auto;
  position: relative; z-index: 10;
}

.cta-buttons { display: flex; gap: 1rem; justify-content: center; position: relative; z-index: 10; }
.btn-white { background-color: white; color: var(--color-charcoal); }
.btn-white:hover { background-color: var(--color-stone); }
.btn-outline-white { border: 1px solid rgba(255, 255, 255, 0.2); color: white; }
.btn-outline-white:hover { border-color: white; background-color: rgba(255, 255, 255, 0.05); }

/* Footer structure */
footer {
  margin-top: auto;
  border-top: 1px solid var(--color-sand);
  background-color: rgba(244, 243, 239, 0.3);
  padding-top: 3rem; padding-bottom: 3rem;
}
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}
.footer-col-2 { grid-column: span 1; }
@media (min-width: 768px) { .footer-col-2 { grid-column: span 2; } }
.footer-heading {
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-secondary);
  margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a { font-size: 0.875rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--color-terracotta); }
.footer-bottom {
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid var(--color-sand);
  display: flex; flex-direction: column; gap: 1rem;
  font-size: 0.75rem; color: var(--color-text-secondary);
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}
