/* ---------- Tokens ---------- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --max-width: 64rem;

  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-contrast: #ffffff;
  --accent-hover: #1d4ed8;
  --focus: #93c5fd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --bg-alt: #0f172a;
    --surface: #111827;
    --text: #e6edf7;
    --text-muted: #94a3b8;
    --border: #1f2937;
    --accent: #60a5fa;
    --accent-contrast: #0b1220;
    --accent-hover: #93c5fd;
    --focus: #1e3a8a;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.95em;
  padding: 0.1em 0.35em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: top 0.15s ease;
  z-index: 100;
}

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

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.brand-dot {
  color: var(--accent);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  text-decoration: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 5rem);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 999px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 2rem;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    transform 0.05s ease;
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

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

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-contrast);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--bg-alt);
  color: var(--text);
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1rem;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ---------- Feature grid ---------- */
.feature-grid {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.feature:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.feature h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.cta-inner {
  max-width: 40rem;
  margin: 0 auto;
}

.cta-inner p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.footer-inner p {
  margin: 0;
}

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

/* ---------- Mobile tweaks ---------- */
@media (max-width: 480px) {
  .site-nav ul {
    gap: 0.9rem;
  }

  .site-nav a {
    font-size: 0.9rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}

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

  .btn,
  .feature {
    transition: none;
  }
}