/* Reset & base */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Noto Sans, Apple SD Gothic Neo, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
/* Theme variables moved to docs/assets/theme.css */

main {
  padding: 24px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section {
  padding: 56px 0;
}
.section h2 {
  margin-top: 0;
}

/* Typography */
h1,
h2,
h3 {
  letter-spacing: -0.02em;
}
h1 {
  font-weight: 900;
}
h2 {
  font-size: clamp(22px, 2.2vw, 28px);
}
p {
  margin: 0.5em 0 1em;
}
.kicker {
  color: var(--accent-2);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  margin-bottom: 8px;
  display: inline-block;
}
.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  position: sticky;
  top: 0;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 20;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
}
.logo {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.nav {
  display: flex;
  gap: 16px;
  align-items: center;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.nav a:hover {
  color: var(--fg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-select,
#lang-select {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.theme-toggle,
.nav-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.theme-toggle:hover,
.nav-toggle:hover {
  transform: translateY(-1px);
}
.theme-toggle:focus-visible,
.nav-toggle:focus-visible,
.button:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
.nav-toggle {
  display: none;
}

@media (max-width: 760px) {
  .nav {
    position: absolute;
    right: var(--gutter);
    top: 58px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow);
    min-width: 180px;
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    color: var(--fg);
  }
  .nav-toggle {
    display: inline-grid;
  }
}

/* Hero */
.hero {
  padding: 100px 0 40px;
  text-align: center;
  position: relative;
}
.hero-inner {
  max-width: 850px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.1;
  margin: 0 0 16px;
}
.hero .lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 760px;
  margin: 0 auto;
}
.badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: color-mix(in oklab, var(--card) 65%, transparent);
  color: var(--fg);
  font-weight: 700;
  font-size: 12px;
}
.cta {
  margin: 20px auto 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: white;
}
.button:hover {
  transform: translateY(-1px);
}
.accent {
  color: var(--accent-2);
  font-weight: 800;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -120px 0 auto;
  height: 340px;
  pointer-events: none;
  background: radial-gradient(
      1200px 300px at 20% 20%,
      color-mix(in oklab, var(--accent) 25%, transparent),
      transparent 60%
    ),
    radial-gradient(
      1000px 240px at 80% 10%,
      color-mix(in oklab, var(--accent-2) 25%, transparent),
      transparent 60%
    );
  filter: blur(20px);
  opacity: 0.55;
}
.hero-visual {
  margin: 28px auto 0;
  max-width: 960px;
  border-radius: 16px;
  overflow: clip;
  border: 1px solid var(--outline);
  background: var(--card);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35), var(--shadow);
}
.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
}
.hero-visual picture {
  display: block;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 1px, 1px);
  white-space: nowrap;
  border: 0;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
  margin: 16px 0 0;
}
.card {
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: 14px;
  padding: 16px;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  min-width: 0;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border);
}
.card-title {
  font-weight: 900;
  margin-bottom: 6px;
}
.card-desc {
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}
.steps li {
  position: relative;
  background: var(--card);
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 14px 16px 14px 44px;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 12px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  transform: translateY(25%);
}
.note {
  color: var(--muted);
  margin-top: 10px;
}

/* Code */
.code-block {
  position: relative;
}
pre.code {
  background: #0a0f1e;
  color: #d6e9ff;
  border: 1px solid #17203a;
  border-radius: 12px;
  padding: 14px;
  overflow-x: auto;
  box-shadow: var(--shadow);
}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 10px;
  background: color-mix(in oklab, var(--card) 70%, transparent);
  border: 1px solid var(--outline);
  color: var(--fg);
  cursor: pointer;
}
.copy-btn:hover {
  transform: translateY(-1px);
}

/* Footer */
.site-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* Utilities */
.small {
  font-size: 14px;
  color: var(--muted);
}
.split {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 840px) {
  .split {
    grid-template-columns: 1fr;
  }
}
.callout {
  border: 1px dashed var(--outline);
  background: color-mix(in oklab, var(--card) 70%, transparent);
  padding: 12px;
  border-radius: 12px;
}
.callout-title {
  font-weight: 900;
  margin-bottom: 6px;
}
.usage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
}
@media (max-width: 900px) {
  .usage-grid {
    grid-template-columns: 1fr;
  }
}
.usage-visual {
  margin: 0;
  border: 1px solid var(--outline);
  border-radius: 12px;
  overflow: clip;
  background: var(--card);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
