/* Clipsmith — one stylesheet, three pages. Dark only: a single theme is half the CSS. */
:root {
  --bg: #0F172A;
  --surface: #1E293B;
  --surface-2: #334155;
  --text: #F8FAFC;
  --muted: #A3B2C7;
  --accent: #22C55E;
  --accent-ink: #042F16;
  --border: rgba(248, 250, 252, 0.11);
  --radius: 14px;
  --max: 1060px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Soft glow behind the top of the page, purely decorative. */
body::before {
  content: "";
  position: fixed;
  inset: -20vh 0 auto 0;
  height: 70vh;
  background: radial-gradient(60% 60% at 50% 0%, rgba(34, 197, 94, 0.13), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- type ---------- */
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 650; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.0625rem; font-weight: 600; }
p { margin: 0 0 1.1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code {
  font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, monospace;
  font-size: 0.875em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}
.lead { font-size: clamp(1.0625rem, 2vw, 1.25rem); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand svg { color: var(--accent); }
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9375rem;
  transition: color 200ms, background-color 200ms;
}
.site-nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text); }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 10vw, 104px) 0 clamp(40px, 7vw, 72px); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  margin-bottom: 24px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 200ms, border-color 200ms, color 200ms;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #16A34A; text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface); border-color: var(--muted); text-decoration: none; }

/* ---------- sections ---------- */
/* The header is sticky, so an anchor jump must stop clear of it. */
section[id] { scroll-margin-top: 80px; }
section { padding: clamp(44px, 7vw, 76px) 0; }
section + section { border-top: 1px solid var(--border); }
.section-head { max-width: 62ch; margin-bottom: 40px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card svg { color: var(--accent); margin-bottom: 14px; }
.card p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

/* numbered steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; gap: 16px; align-items: start; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
}
.steps strong { display: block; font-weight: 600; }
.steps span { color: var(--muted); font-size: 0.9375rem; }

/* scope table */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; min-width: 560px; }
caption { text-align: left; color: var(--muted); font-size: 0.875rem; padding: 0 0 10px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--surface); font-weight: 600; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }

/* ---------- legal pages ---------- */
.legal { max-width: 70ch; padding: clamp(40px, 6vw, 64px) 0; }
.legal h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2.2em; }
.legal h3 { margin-top: 1.8em; }
/* Full scope URLs are longer than a phone is wide, and must break rather than scroll the page. */
.legal code { overflow-wrap: anywhere; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 0.5em; }
.legal li::marker { color: var(--accent); }
.updated { color: var(--muted); font-size: 0.9375rem; margin-bottom: 2.5em; }
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 1.8em 0;
}
.callout :last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: 0.9375rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.site-foot nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 20px; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
