/* ============================================================================
   SetLight — Design System  (setlight.css)
   Single source of truth for how SetLight looks. Every page links this file.
   Colours sampled from the logo (docs/SETLIGHT_BRAND_SYSTEM.md, 2026-08-03).
   This is SetLight's OWN brand — never the artist brand Brand/Wordmark Studio
   generate for customers. Do not put customer palettes in here.
   ============================================================================ */

/* Palette + typeface live in the tokens sheet (single source of truth). */
@import url('setlight-tokens.css');

/* ---- reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--violet-light); text-decoration: none; }
a:hover { color: var(--lilac); }

/* ---- type scale --------------------------------------------------------- */
.display { font-weight: 600; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
h1, .h1 { font-weight: 600; font-size: 32px; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h2, .h2 { font-weight: 500; font-size: 24px; line-height: 1.2;  margin: 0 0 .5em; }
h3, .h3 { font-weight: 500; font-size: 18px; line-height: 1.3;  margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.small { font-size: 13.5px; }
.muted { color: var(--muted); }
.label-caps {
  font-weight: 500; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

/* ---- layout ------------------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
@media (max-width: 640px) { .section { padding: 48px 0; } }

/* ---- header ------------------------------------------------------------- */
.sl-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10,7,17,0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.sl-header .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.sl-header .logo { height: 30px; width: auto; }
.sl-header nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.sl-header nav a.navlink { color: var(--muted); font-size: 14px; white-space: nowrap; }
.sl-header nav a.navlink:hover { color: var(--ink); }
@media (max-width: 640px) {
  .sl-header nav { gap: 14px; }
  .sl-header nav a.navlink:not(.always) { display: none; }   /* keep sign-in visible on phone */
}

/* ---- buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 500; font-size: 15px; line-height: 1;
  padding: 12px 20px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--violet); color: #fff; border: none; }
.btn-primary:hover { background: var(--grad); color: #fff; }
.btn-secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { border-color: var(--violet-light); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.btn-destructive { background: transparent; color: var(--bad); border-color: transparent; }
.btn-destructive:hover { background: var(--bad); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: default; pointer-events: none; }
.btn-lg { padding: 15px 26px; font-size: 16px; }

/* ---- cards -------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.card.clickable { transition: border-color .15s; cursor: pointer; }
.card.clickable:hover { border-color: var(--violet-light); }

/* ---- inputs ------------------------------------------------------------- */
.field { display: block; margin-bottom: 16px; }
.field > label { display: block; margin-bottom: 7px; }
.input, input[type=text], input[type=email], input[type=password], input[type=url], textarea, select {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 12px;
}
.input::placeholder, textarea::placeholder { color: var(--faint); }
.input:focus, input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ---- status pills ------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.pill-good { background: rgba(61,214,140,0.12); color: var(--good); }
.pill-warn { background: rgba(255,180,84,0.12); color: var(--warn); }
.pill-bad  { background: rgba(255,93,115,0.12); color: var(--bad); }
.pill-info { background: rgba(8,137,255,0.12);  color: var(--blue); }

/* ---- the glow (decorative, rare; never behind readable text) ------------ */
.glow-host { position: relative; overflow: hidden; }   /* clip the glow so it never widens the page */
.glow-host::before {
  content: ""; position: absolute; inset: -20% 0 auto 20%; height: 420px;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  pointer-events: none; z-index: 0;
}
.glow-host > * { position: relative; z-index: 1; }

/* ---- footer ------------------------------------------------------------- */
.sl-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); }
.sl-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.sl-footer a { color: var(--muted); font-size: 14px; }
.sl-footer a:hover { color: var(--ink); }
.sl-footer .spacer { margin-left: auto; }

/* ---- helpers ------------------------------------------------------------ */
.gradient-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-2 { grid-template-columns: 1fr 1fr; } }
