/* Authprint marketing site: static, zero-build.
   Tokens mirror the editor's globals.css (apps/web in the public repo):
   zinc neutrals, indigo/violet accent, emerald reserved for outcomes,
   warm colors reserved for state signals (unused here by design). */

:root {
  --bg: #ffffff;
  --bg-panel: #ffffff;
  --bg-subtle: #f4f4f5;
  --border-default: #d4d4d8;
  --border-subtle: #e4e4e7;
  --fg: #18181b;
  --fg-muted: #52525b;
  --fg-subtle: #71717a;

  --accent: #6366f1;
  --accent-solid: #4f46e5;
  --accent-solid-hover: #4338ca;
  --accent-bg: #eef2ff;
  --accent-fg: #4338ca;
  --accent-border-muted: #a5b4fc;
  --violet: #8b5cf6;
  --emerald: #10b981;

  /* The canvas dot grid, borrowed from the editor itself */
  --dot: #d4d4d8;
  /* Section tops start on this tint and fade to --bg (react.dev-style
     contrast between sections, no separator lines) */
  --section-tint: #f4f4f5;

  /* Code window is always dark (both themes); tones from the editor's dark set */
  --code-bg: #18181b;
  --code-border: #3f3f46;
  --code-fg: #d4d4d8;
  --code-key: #a5b4fc;
  --code-str: #6ee7b7;
  --code-kind: #c4b5fd;
  --code-comment: #71717a;
  --code-punct: #71717a;

  --shadow-card: 0 1px 2px rgb(9 9 11 / 0.04), 0 8px 24px rgb(9 9 11 / 0.06);
  --shadow-shot: 0 2px 6px rgb(9 9 11 / 0.06), 0 24px 64px -12px rgb(9 9 11 / 0.18);
  --radius: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 150ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --bg-panel: #18181b;
    --bg-subtle: #27272a;
    --border-default: #3f3f46;
    --border-subtle: #27272a;
    --fg: #f4f4f5;
    --fg-muted: #d4d4d8;
    --fg-subtle: #a1a1aa;

    --accent: #818cf8;
    /* Filled buttons keep the saturated indigo so white text stays readable;
       the light indigo-400 the editor uses for accents fails contrast as a
       button fill */
    --accent-solid: #4f46e5;
    --accent-solid-hover: #6366f1;
    --accent-bg: #1e1b4b;
    --accent-fg: #a5b4fc;
    --accent-border-muted: #3730a3;

    --dot: #313136;
    --section-tint: #141417;

    --shadow-card: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.4);
    --shadow-shot: 0 2px 6px rgb(0 0 0 / 0.5), 0 24px 64px -12px rgb(0 0 0 / 0.6);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

code,
pre {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

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

a:hover {
  text-decoration: underline;
}

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

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

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
}

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

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

.site-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  align-items: center;
}

.site-nav a {
  color: var(--fg-muted);
  font-size: 14.5px;
  font-weight: 500;
}

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

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease),
    color var(--duration) var(--ease);
}

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

.btn-primary {
  background: var(--accent-solid);
  color: #ffffff !important;
}

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

.btn-ghost {
  border-color: var(--border-default);
  color: var(--fg);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  border-color: var(--fg-subtle);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 14px;
  border-radius: 8px;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 72px 0 72px;
  text-align: center;
  background:
    radial-gradient(56% 46% at 50% 0%, color-mix(in srgb, var(--accent) 11%, transparent), transparent);
}

/* The editor's own canvas texture, fading out toward the content */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(72% 62% at 50% 0%, black, transparent 78%);
  mask-image: radial-gradient(72% 62% at 50% 0%, black, transparent 78%);
  pointer-events: none;
}

.hero .container {
  position: relative;
}

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.hero-brand .wordmark {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--accent-fg);
  background: color-mix(in srgb, var(--accent-bg) 80%, transparent);
  border: 1px solid var(--accent-border-muted);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 auto 20px;
  max-width: 17ch;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lede {
  font-size: 19px;
  color: var(--fg-muted);
  max-width: 58ch;
  margin: 0 auto 34px;
}

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

.shot-frame {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-shot);
  background: var(--bg-panel);
  text-align: left;
}

.shot-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.shot-chrome {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.shot-chrome span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-default);
}

/* ── Sections ───────────────────────────────────────────────────────────── */

section {
  padding: 88px 0;
}

/* Each section opens on a slightly darker tint and settles into the page
   background; the tonal shift separates sections without rule lines */
main > section:not(.hero),
.site-footer {
  background: linear-gradient(to bottom, var(--section-tint), var(--bg) 340px);
}

.kicker {
  display: block;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

section h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 16px;
  max-width: 26ch;
}

.section-lede {
  font-size: 17.5px;
  color: var(--fg-muted);
  max-width: 64ch;
  margin: 0 0 40px;
}

.section-lede strong {
  color: var(--fg);
  font-weight: 600;
}

/* Why cards */

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

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.card h3 {
  font-size: 16.5px;
  font-weight: 650;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 15px;
  color: var(--fg-muted);
  margin: 0;
}

.card .dot-chip {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 9px;
}

/* Two-column feature layout (DSL section) */

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: start;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  gap: 18px;
}

.feature-list li {
  padding-left: 30px;
  position: relative;
  font-size: 15.5px;
  color: var(--fg-muted);
}

.feature-list li strong {
  display: block;
  color: var(--fg);
  font-weight: 620;
  margin-bottom: 2px;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--violet);
}

/* ── Code window ────────────────────────────────────────────────────────── */

.code-window {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.code-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  font-size: 13px;
  color: #a1a1aa;
  border-bottom: 1px solid var(--code-border);
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

.code-title .lang {
  color: #71717a;
  font-size: 12px;
}

.code-window pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 13.2px;
  line-height: 1.62;
  color: var(--code-fg);
}

.tok-key { color: var(--code-key); }
.tok-str { color: var(--code-str); }
.tok-kind { color: var(--code-kind); }
.tok-comment { color: var(--code-comment); font-style: italic; }
.tok-punct { color: var(--code-punct); }

/* ── Editor section ─────────────────────────────────────────────────────── */

.editor-cta-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.editor-cta-row .note {
  font-size: 14px;
  color: var(--fg-subtle);
  max-width: 52ch;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 40px;
  margin-top: 40px;
}

/* ── Open source ────────────────────────────────────────────────────────── */

.oss-panel {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 40px;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 44px 48px;
  box-shadow: var(--shadow-card);
}

.license-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0 0;
}

.chip {
  font-size: 13px;
  font-weight: 600;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-default);
  color: var(--fg-muted);
}

.chip b {
  color: var(--fg);
  font-weight: 650;
}

.oss-actions {
  display: grid;
  gap: 12px;
  justify-items: stretch;
}

.oss-actions .btn {
  justify-content: center;
}

/* ── Creator ────────────────────────────────────────────────────────────── */

.creator-card {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  max-width: 640px;
}

.avatar {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  object-fit: cover;
}

.creator-card h3 {
  margin: 2px 0 6px;
  font-size: 18px;
  font-weight: 650;
}

.creator-card p {
  margin: 0 0 12px;
  font-size: 15.5px;
  color: var(--fg-muted);
}

.creator-links {
  display: flex;
  gap: 16px;
  font-size: 14.5px;
  font-weight: 550;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  padding: 36px 0 44px;
  font-size: 14px;
  color: var(--fg-subtle);
}

.site-footer .container {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.site-footer nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

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

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 880px) {
  .hero {
    padding: 48px 0 48px;
  }

  section {
    padding: 60px 0;
  }

  .card-grid,
  .split,
  .feature-grid,
  .oss-panel {
    grid-template-columns: 1fr;
  }

  .oss-panel {
    padding: 30px 26px;
  }

  .site-nav a:not(.btn) {
    display: none;
  }
}
