:root {
  --bg: #f8f4ef;
  --bg-ink: #12100f;
  --accent: #ff6b35;
  --accent-dark: #d45020;
  --muted: #6b625b;
  --card: #fff6ee;
  --border: #ead9cc;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[data-theme='dark'] {
  --bg: #111010;
  --bg-ink: #f4ede7;
  --accent: #ff985f;
  --accent-dark: #ff7a3d;
  --muted: #b8a99d;
  --card: #1b1714;
  --border: #2a231f;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--bg-ink);
  background: radial-gradient(1200px 800px at 80% -10%, #ffe7d1 0%, transparent 70%),
              radial-gradient(900px 600px at -10% 10%, #d6f1ff 0%, transparent 60%),
              var(--bg);
}

[data-theme='dark'] body {
  background: radial-gradient(1200px 800px at 80% -10%, rgba(255, 152, 95, 0.12) 0%, transparent 70%),
              radial-gradient(900px 600px at -10% 10%, rgba(95, 190, 255, 0.12) 0%, transparent 60%),
              var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(16px);
  background: rgba(248, 244, 239, 0.8);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

[data-theme='dark'] .site-header {
  background: rgba(17, 16, 16, 0.8);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--bg-ink);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-icon svg {
  width: 1.05rem;
  height: 1.05rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-label {
  font-size: 0.85rem;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--bg-ink);
}

.hero {
  padding: 5rem 1.5rem 4rem;
}

.hero-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
}

.pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #ffe7d1;
  font-weight: 600;
  margin-bottom: 1rem;
}

[data-theme='dark'] .pill {
  background: #2a211c;
  color: #f4ede7;
}

.cta-row {
  display: flex;
  gap: 1rem;
  margin: 1.75rem 0 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 10px 24px rgba(255, 107, 53, 0.25);
}

.btn-secondary {
  background: transparent;
}

.btn-ghost {
  background: #fff;
  border-color: var(--border);
  color: var(--bg-ink);
}

[data-theme='dark'] .btn-ghost {
  background: #1f1a17;
  border-color: #2f2722;
  color: #f4ede7;
}

.btn:hover {
  transform: translateY(-2px);
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: 0 18px 30px rgba(18, 16, 15, 0.08);
}

.hero-card pre {
  background: #171514;
  color: #f9f1ea;
  padding: 1rem;
  border-radius: 16px;
  font-family: var(--mono);
  font-size: 0.9rem;
  white-space: pre-wrap;
}

[data-theme='dark'] .hero-card pre {
  background: #0f0d0c;
}

.card-title {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.card-foot {
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  padding: 4rem 1.5rem;
}

.section-head {
  max-width: 1100px;
  margin: 0 auto 2rem;
}

.section-head h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-head p {
  color: var(--muted);
  max-width: 700px;
}

.feature-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  min-height: 150px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

[data-theme='dark'] .feature {
  background: #151210;
}

.feature h3 {
  margin-top: 0;
}

.install {
  background: #fffaf6;
}

[data-theme='dark'] .install {
  background: #151210;
}

.install-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.install-card {
  border: 1px dashed var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  background: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

[data-theme='dark'] .install-card {
  background: #1a1512;
}

.install-card pre,
.flow-step code {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: #1c1a19;
  color: #f5ede7;
  padding: 1rem;
  border-radius: 12px;
  display: block;
  white-space: pre-wrap;
}

.flow {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.flow-step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

[data-theme='dark'] .flow-step {
  background: #151210;
}

.flow-step span {
  color: var(--accent-dark);
  font-weight: 700;
}

.docs {
  padding-bottom: 5rem;
}

.docs-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.doc-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  background: #fff;
  transition: transform 0.2s ease;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

[data-theme='dark'] .doc-card {
  background: #151210;
}

.doc-card:hover {
  transform: translateY(-4px);
}

.feature.is-visible,
.install-card.is-visible,
.flow-step.is-visible,
.doc-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  color: var(--muted);
}

.tagline {
  color: var(--muted);
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
  .site-footer {
    flex-direction: column;
    gap: 0.75rem;
  }
}
