:root {
  --canvas: #ffffff;
  --surface: #ffffff;
  --subtle: #f4f4f5;
  --sunken: #f4f4f5;
  --line: rgba(9, 9, 11, 0.07);
  --line-strong: rgba(9, 9, 11, 0.12);

  --ink: #18181b;
  --muted: #52525b;
  --faint: #8a8a93;

  --accent: #5b5bd6;
  --accent-strong: #4d4dc9;
  --accent-soft: #eeeefc;
  --accent-contrast: #ffffff;

  --danger: #dc2626;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.06);
  --shadow-md:
    0 8px 24px -8px rgba(9, 9, 11, 0.18), 0 2px 6px -3px rgba(9, 9, 11, 0.12);
  --shadow-lg: 0 16px 40px -12px rgba(9, 9, 11, 0.24);

  --font-sans:
    "Inter Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0a0a0c;
    --surface: #0a0a0c;
    --subtle: rgba(255, 255, 255, 0.055);
    --sunken: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.145);

    --ink: #ededef;
    --muted: #a1a1aa;
    --faint: #71717a;

    --accent: #8087f0;
    --accent-strong: #9aa0f5;
    --accent-soft: rgba(128, 135, 240, 0.16);
    --accent-contrast: #ffffff;

    --danger: #f87171;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md:
      0 10px 28px -8px rgba(0, 0, 0, 0.7), 0 2px 6px -3px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 18px 44px -12px rgba(0, 0, 0, 0.8);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent-soft);
}

a {
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

/* Layout */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 760px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

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

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color 130ms cubic-bezier(0.2, 0, 0, 1);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    background 130ms cubic-bezier(0.2, 0, 0, 1),
    border-color 130ms cubic-bezier(0.2, 0, 0, 1),
    transform 130ms cubic-bezier(0.2, 0, 0, 1);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn--primary:hover {
  background: var(--accent-strong);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--subtle);
}

.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* Typography */
h1,
h2,
h3 {
  letter-spacing: -0.015em;
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

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

/* Icon */
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 96px;
}

.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0;
  color: var(--faint);
  font-size: 0.875rem;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

@media (max-width: 640px) {
  .site-nav {
    gap: 16px;
  }
  .site-footer__row {
    flex-direction: column;
    align-items: flex-start;
  }
}
