:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-alt: #f5f7ff;
  --text: #111827;
  --muted: #4b5563;
  --accent: #6d28d9;
  --accent-soft: rgba(109, 40, 217, 0.08);
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

.hero {
  background: radial-gradient(circle at 0% 0%, rgba(109, 40, 217, 0.16), transparent 55%),
              linear-gradient(180deg, #faf5ff 0%, #ffffff 65%);
  padding: 48px 24px 72px;
  position: relative;
}

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

.brand {
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
  text-decoration: none;
}

.nav-links a {
  margin-left: 18px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

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

.hero-content {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero-logo {
  width: 180px;
  max-width: 60%;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(48px, 6vw, 72px);
  margin: 0 0 16px;
  letter-spacing: -0.04em;
}

.tagline {
  margin: 0 auto 32px;
  font-size: 18px;
  color: var(--muted);
}

.cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 30px rgba(109, 40, 217, 0.25);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.pip {
  display: inline-flex;
  padding: 10px 18px;
  background: var(--accent-soft);
  border-radius: 10px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: var(--accent);
}

.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section.alt {
  background: var(--bg-alt);
  border-radius: 32px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.03);
}

.section h2 {
  font-size: 32px;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 32px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
  align-items: start;
}

.overview-text ul {
  padding-left: 20px;
  margin: 0;
}

.overview-snippet pre {
  background: #111827;
  color: #e5e7eb;
}

.outputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.workflow {
  margin-top: 32px;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.03);
}

.workflow ol {
  margin: 12px 0 0 20px;
  line-height: 1.6;
}

.card {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.04);
}

.card h3 {
  margin-top: 0;
}

.install-grid,
.code-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

pre {
  margin: 0;
  padding: 18px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 16px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.moire-layout {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 2fr);
  gap: 32px;
  align-items: center;
}

.moire-text ul {
  padding-left: 20px;
}

.pattern-samples,
.moire-samples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  align-items: start;
  margin-top: 24px;
}

.pattern-samples figure,
.moire-samples figure {
  margin: 0;
  text-align: center;
}

.pattern-samples img,
.moire-samples img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.resource {
  display: block;
  padding: 16px 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.resource:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

footer {
  text-align: center;
  padding: 48px 24px 64px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    gap: 12px;
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links a {
    margin: 4px 8px;
  }

  .moire-layout {
    grid-template-columns: 1fr;
  }

  .section.alt > * {
    padding: 0;
  }
}

.moire-samples figcaption,
.pattern-samples figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.moire-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

