/* Same tokens as apps/frontend/src/index.css — keep the two in step (DESIGN.md). */
:root {
  color-scheme: light dark;

  --background: #f7f7f8;
  --foreground: #1d1d1f;
  --card: #ffffff;
  --muted: #f1f2f4;
  --muted-foreground: #5e5e66;
  --primary: #1348dc;
  --primary-hover: #0f3cb8;
  --primary-foreground: #ffffff;
  --accent: #ebf1fe;
  --accent-foreground: #1348dc;
  --border: #e3e4e8;
  --ring: #1348dc;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --page: 1120px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1b1c1e;
    --foreground: #ededef;
    --card: #232428;
    --muted: #2a2b2f;
    --muted-foreground: #a5a6ad;
    --primary-hover: #2e5ae8;
    --accent: #1c2947;
    --accent-foreground: #8ab0ff;
    --border: #3a3b40;
    --ring: #7fa0f0;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: underline;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  text-wrap: balance;
}

.container {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--border);
}

/* ── header ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--foreground);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 30px;
  height: 30px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── buttons ────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.button:hover {
  text-decoration: none;
}

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

.button-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.button-primary:hover {
  background: var(--primary-hover);
}

.button-outline {
  background: var(--card);
  border-color: var(--border);
  color: var(--foreground);
}

.button-outline:hover {
  background: var(--muted);
}

.button-lg {
  min-height: 44px;
  padding: 10px 24px;
  font-size: 15px;
}

/* ── hero ───────────────────────────────────────────────────────────── */

.hero {
  padding: 80px 0 56px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 20px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
}

.hero h1 {
  max-width: 760px;
  margin: 0 auto;
  font-size: clamp(34px, 5.2vw, 52px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.hero .lede {
  max-width: 600px;
  margin: 20px auto 0;
  color: var(--muted-foreground);
  font-size: 18px;
  line-height: 1.55;
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.shot {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
}

.hero .shot {
  margin-top: 56px;
}

/* ── sections ───────────────────────────────────────────────────────── */

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

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.section-head .label {
  margin-bottom: 10px;
  color: var(--accent-foreground);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: clamp(26px, 3.2vw, 32px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.section-head p {
  margin-top: 12px;
  color: var(--muted-foreground);
  font-size: 16px;
}

/* workflow */

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  overflow: hidden;
}

.steps li {
  padding: 24px 20px;
  border-left: 1px solid var(--border);
}

.steps li:first-child {
  border-left: 0;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-foreground);
  font-size: 13px;
  font-weight: 600;
}

.steps h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.steps p {
  margin-top: 6px;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.5;
}

/* features */

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.feature svg {
  width: 22px;
  height: 22px;
  margin-bottom: 16px;
  color: var(--accent-foreground);
}

.feature h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature p {
  margin-top: 6px;
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 1.55;
}

/* split: text beside a screenshot */

.split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 48px;
  align-items: center;
}

.split .section-head {
  margin-bottom: 0;
}

.checks {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-top: 1px solid var(--border);
  font-size: 15px;
}

.checks li:last-child {
  border-bottom: 1px solid var(--border);
}

.checks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 17px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--accent-foreground);
  border-bottom: 2px solid var(--accent-foreground);
  transform: rotate(-45deg);
}

/* closing call to action */

.cta {
  padding: 56px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  text-align: center;
}

.cta h2 {
  font-size: clamp(26px, 3.2vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cta p {
  margin-top: 10px;
  color: var(--muted-foreground);
  font-size: 16px;
}

.cta .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

/* ── footer ─────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 28px;
}

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

.site-footer a {
  color: var(--muted-foreground);
}

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

/* ── 404 ────────────────────────────────────────────────────────────── */

.not-found {
  padding: 120px 0;
  text-align: center;
}

.not-found h1 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.not-found p {
  margin: 12px 0 28px;
  color: var(--muted-foreground);
}

/* ── responsive ─────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .steps {
    grid-template-columns: 1fr;
  }

  .steps li {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .steps li:first-child {
    border-top: 0;
  }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
  }

  .hero {
    padding: 56px 0 40px;
  }

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

  .hero .shot {
    margin-top: 40px;
  }

  .section {
    padding: 56px 0;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .nav-actions .button-outline {
    display: none;
  }

  .cta {
    padding: 40px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .button:active {
    transform: none;
  }
}
