/* Tokens from the PixelCrew design system for microproject.app, light + dark. */
:root {
  color-scheme: light dark;

  --background: #F8F8FC;
  --text-primary: #18181B;
  --text-secondary: #52525B;
  --text-muted: #71717A;
  --accent: #6E56CF;
  --accent-hover: #5A44B5;
  --accent-subtle: #F4F2FC;
  --surface: #FFFFFF;
  --surface-code: #F0EFF8;
  --surface-hover: #F1F0F8;
  --backdrop: rgba(248, 248, 252, 0.85);
  --border: #E5E3F0;
  --border-subtle: #ECEAF5;
  --border-strong: #D4D1E2;
  --shadow-shot: 0 4px 20px rgba(0, 0, 0, 0.04);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 6px;
  --radius-lg: 8px;
  --transition: 150ms ease-out;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0D1117;
    --text-primary: #F0F6FC;
    --text-secondary: #8B949E;
    --text-muted: #6E7681;
    --accent: #8E7CF0;
    --accent-hover: #9D8EF2;
    --accent-subtle: #1C1936;
    --surface: #161B22;
    --surface-code: #161B22;
    --surface-hover: #1C2128;
    --backdrop: rgba(13, 17, 23, 0.85);
    --border: #30363D;
    --border-subtle: #21262D;
    --border-strong: #484F58;
    --shadow-shot: 0 4px 24px rgba(0, 0, 0, 0.4);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

img { display: block; max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) { .container { padding: 0 24px; } }
@media (min-width: 1024px) { .container { padding: 0 32px; } }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: var(--backdrop);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
}

.wordmark {
  display: inline-block;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-subtle);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition), background-color var(--transition);
}

.site-nav a:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.site-nav a.primary { color: var(--text-primary); font-weight: 600; }
.site-nav a.primary:hover { color: var(--accent); }

.site-nav svg {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
  flex: none;
}

@media (min-width: 640px) {
  .site-nav { gap: 8px; }
  .site-nav a { padding: 6px 10px; font-size: 14px; }
}

@media (max-width: 560px) {
  .site-header .container {
    height: auto;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .site-nav { width: 100%; gap: 0; margin-left: -8px; }
  .site-nav a { padding: 4px 8px; font-size: 13px; }
  .site-nav svg { display: none; }
}

/* Sections */
main .container {
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding-top: 48px;
  padding-bottom: 64px;
}

@media (min-width: 768px) {
  main .container { gap: 96px; padding-top: 72px; padding-bottom: 96px; }
}

section > header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 { font-size: 24px; line-height: 1.3; }
h3 { font-size: 15px; letter-spacing: -0.01em; }

p { margin: 0; text-wrap: pretty; }

.lead { color: var(--text-secondary); }
.muted { color: var(--text-muted); font-size: 13px; }

/* Hero */
.hero { display: flex; flex-direction: column; gap: 32px; }

.hero-copy {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

@media (min-width: 640px) { .hero h1 { font-size: 38px; } }

.hero .lead { font-size: 16px; }

.points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--border);
}

@media (min-width: 640px) { .points { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.points > div {
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

.points dt { font-weight: 600; }
.points dd { margin: 4px 0 0; font-size: 13px; color: var(--text-secondary); }

.shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-shot);
}

.shot img { width: 100%; }

figcaption { margin-top: 8px; font-size: 13px; color: var(--text-muted); }

/* Feature ledger */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px 48px;
  margin: 0;
}

@media (min-width: 768px) { .features { grid-template-columns: 1fr 1fr; gap: 36px 48px; } }

.features > div { padding-top: 14px; border-top: 1px solid var(--border-subtle); }
.features dt { font-weight: 600; }
.features dd { margin: 4px 0 0; color: var(--text-secondary); }

/* Quick start */
.quickstart {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

@media (min-width: 900px) { .quickstart { grid-template-columns: 7fr 5fr; } }

.code {
  margin: 0;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-code);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
}

.code .label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-muted);
}

.code .label svg { width: 14px; height: 14px; }
.code code { display: block; white-space: pre; }

.docs {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.docs .note { font-size: 13px; color: var(--text-secondary); }
.docs .note code { font-family: var(--mono); font-size: 12px; color: var(--text-primary); }

.docs h3 { font-size: 13px; }

.docs ul {
  margin: 0;
  padding: 12px 0 0;
  list-style: none;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.docs a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.docs a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
.docs a svg { width: 12px; height: 12px; color: var(--text-muted); }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) { .gallery { grid-template-columns: 1fr 1fr; gap: 32px; } }

.gallery figure { margin: 0; }
.gallery .shot a { display: block; }

.mobile-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 32px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

@media (min-width: 768px) {
  .mobile-card { grid-template-columns: 7fr 5fr; padding: 32px; }
  .mobile-card .phone { justify-self: end; }
}

.mobile-card .copy { display: flex; flex-direction: column; gap: 8px; }
.mobile-card .copy p { color: var(--text-secondary); }

.phone {
  width: 220px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-shot);
}

.phone img { border-radius: 12px; }

.version { margin-top: 24px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

@media (min-width: 640px) {
  .site-footer .container { flex-direction: row; justify-content: space-between; text-align: left; }
}

.site-footer .meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }

.site-footer a {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--border-strong);
  transition: color var(--transition);
}

.site-footer a:hover { color: var(--text-primary); text-decoration-color: currentColor; }
.site-footer .meta a { color: var(--text-primary); font-weight: 500; }
.site-footer .meta a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, ::before, ::after { transition-duration: 0.01ms !important; }
}
