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

:root {
  --bg: #0a0a0a;
  --bg-code: #1a1a1a;
  --fg: #fafafa;
  --fg-code: #e4e4e7;
  --muted: #a1a1aa;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #fff;
  --link: #a1a1aa;
  --link-hover: #fafafa;
  --grid: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.02);
  --border-hover: rgba(255, 255, 255, 0.14);
  --btn-primary-hover: #e0e0e0;
  --font-sans: 'Geist', 'Geist Sans', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
  --content-width: 720px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  display: block;
  height: 1.5rem;
  width: auto;
  vertical-align: middle;
}

.header-link {
  font-size: 0.875rem;
  color: var(--link);
  text-decoration: none;
}

.header-link:hover {
  color: var(--link-hover);
}

.main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--content-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 5rem 1.5rem 4rem;
}

.hero {
  text-align: center;
  padding: 3rem 0 4rem;
}

.title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--fg);
  margin-bottom: 1rem;
}

.tagline {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
  border-color: var(--btn-primary-hover);
}

.btn-secondary {
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  color: var(--fg);
  border-color: var(--muted);
}

:focus-visible {
  outline: 2px solid var(--muted);
  outline-offset: 2px;
}

.section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.card {
  margin-bottom: 2rem;
  padding: 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
  border-radius: 8px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.card:last-of-type {
  border-bottom: 0;
  margin-bottom: 0;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.card-desc a {
  color: var(--link);
  text-decoration: none;
}

.card-desc a:hover {
  color: var(--link-hover);
}

.card-desc code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 0.15em 0.4em;
  background: var(--bg-code);
  border-radius: 4px;
  color: var(--fg-code);
}

.code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  background: var(--bg-code);
  color: var(--fg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 0.5rem 0 0;
  position: relative;
}

.code[data-lang] {
  padding-top: 1.5rem;
}

.code[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.2rem 0.6rem;
  font-size: 0.6875rem;
  color: var(--muted);
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.code code {
  background: none;
  padding: 0;
}

.wireframe {
  font-size: 0.6875rem;
  line-height: 1.4;
  white-space: pre;
  overflow-x: auto;
}

.tools-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.tools-list li {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--fg-code);
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
}

.footer {
  margin-top: auto;
  padding: 2rem 0 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-text {
  font-size: 0.75rem;
  color: var(--muted);
}

.footer-link {
  font-size: 0.75rem;
  color: var(--link);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--link-hover);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out both;
}

.fade-delay-1 {
  animation-delay: 0.1s;
}

.fade-delay-2 {
  animation-delay: 0.2s;
}

@media (min-width: 640px) {
  .main {
    padding: 6rem 2rem 4rem;
  }

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

  .tagline {
    font-size: 1.125rem;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .card {
    transition: none;
  }

  .btn {
    transition: none;
  }
}
