/* priorwork.fyi — v2 design system (shared by every v2 page).
   Dark, luminous, editorial. Tokens first; components after. */

:root {
  color-scheme: dark;
  --bg: #060913;
  --bg-2: #0a1020;
  --surface: rgba(148, 170, 255, 0.045);
  --surface-2: rgba(148, 170, 255, 0.075);
  --surface-solid: #0e1526;
  --line: rgba(160, 180, 255, 0.11);
  --line-2: rgba(160, 180, 255, 0.2);
  --text: #eef1fa;
  --text-2: #b6c0d8;
  --muted: #8592ad;
  --faint: #5d6a85;

  --blue: #5b9dff;
  --cyan: #3fd0f0;
  --violet: #9b8cff;
  --indigo: #7c83ff;
  --amber: #fbbf24;
  --teal: #2dd4bf;
  --rose: #fb7185;
  --green: #34d399;

  --grad: linear-gradient(100deg, #6ea8ff 0%, #9b8cff 45%, #3fd0f0 100%);
  --grad-soft: linear-gradient(135deg, rgba(110, 168, 255, 0.16), rgba(155, 140, 255, 0.12) 50%, rgba(63, 208, 240, 0.12));

  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 24px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --glow: 0 0 0 1px rgba(124, 131, 255, 0.35), 0 10px 40px -10px rgba(91, 157, 255, 0.45);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Outfit", "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 64px;
}

*, *::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 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
body::before {               /* ambient aurora behind everything */
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(91, 157, 255, 0.16), transparent 60%),
    radial-gradient(800px 600px at 95% 4%, rgba(155, 140, 255, 0.13), transparent 60%),
    radial-gradient(1000px 700px at 50% 120%, rgba(63, 208, 240, 0.08), transparent 60%),
    var(--bg);
}
body::after {                /* fine grain so gradients don't band */
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: #8fbcff; }
img, svg { max-width: 100%; }
::selection { background: rgba(124, 131, 255, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.12; margin: 0; color: var(--text); }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--mono); font-feature-settings: "zero", "ss01"; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- eyebrow / pills / badges ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 0.72rem/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 0.82rem; color: var(--text-2); backdrop-filter: blur(8px);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font: 700 0.64rem/1.6 var(--font);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.badge.beta { color: #fde68a; background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.35); }
.badge.new { color: #a7f3d0; background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.35); }

/* ---------- buttons ---------- */
.btn {
  --b: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 12px;
  font: 600 0.92rem/1 var(--font); color: var(--text);
  background: var(--b); border: 1px solid var(--line-2);
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { color: #fff; border-color: rgba(160, 180, 255, 0.35); background: rgba(148, 170, 255, 0.12); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  border: 0; color: #fff;
  background: linear-gradient(100deg, #4f7dff, #7c6cff 55%, #3fb8e8);
  box-shadow: 0 8px 28px -8px rgba(91, 120, 255, 0.7), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}
.btn.primary:hover { box-shadow: 0 12px 36px -8px rgba(91, 120, 255, 0.9), 0 1px 0 rgba(255, 255, 255, 0.3) inset; transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface); color: var(--text); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 0.84rem; border-radius: 10px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(6, 9, 19, 0.62);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(6, 9, 19, 0.82); }
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand-word { font: 600 1.22rem/1 var(--display); letter-spacing: -0.02em; }
.brand-word b { font-weight: 600; color: var(--cyan); }
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-links a, .nav-links summary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 10px; font-size: 0.9rem; color: var(--text-2);
  cursor: pointer; list-style: none; transition: background 0.15s, color 0.15s;
}
.nav-links summary::-webkit-details-marker { display: none; }
.nav-links a:hover, .nav-links summary:hover { color: var(--text); background: var(--surface); }
.nav-links a[aria-current="page"], .nav-links summary.on { color: var(--text); background: var(--surface-2); }
.nav-links .ico { width: 15px; height: 15px; opacity: 0.85; }
.nav-drop { position: relative; }
.nav-drop .menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; padding: 6px;
  background: rgba(14, 21, 38, 0.96); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7); backdrop-filter: blur(14px);
}
.nav-drop .menu a { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; }
.nav-drop .menu a small { color: var(--muted); font-size: 0.78rem; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-toggle { display: none; }

@media (max-width: 920px) {
  .nav .wrap { gap: 12px; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 2px; padding: 12px var(--gutter) 20px; background: rgba(8, 12, 24, 0.98);
    border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a, .nav-links summary { padding: 12px 14px; font-size: 1rem; }
  .nav-drop .menu { position: static; box-shadow: none; background: transparent; border: 0; padding: 0 0 0 12px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
    border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); cursor: pointer;
  }
  .nav-actions .hide-sm { display: none; }
}

/* ---------- sections ---------- */
section { position: relative; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 600; margin: 14px 0 14px; }
.section-head p { color: var(--text-2); font-size: 1.06rem; }

/* ---------- cards ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-l); box-shadow: var(--shadow);
}
.card.glow::before {         /* gradient hairline border */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(110, 168, 255, 0.55), rgba(155, 140, 255, 0.18) 40%, rgba(63, 208, 240, 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0 40px; margin-top: 40px; color: var(--muted); font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer h4 { font: 600 0.78rem/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); margin-bottom: 14px; }
.footer a { display: block; color: var(--muted); padding: 4px 0; }
.footer a:hover { color: var(--text); }
.footer .fine { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.82rem; color: var(--faint); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- preview ribbon (only for preview accounts) ---------- */
.preview-ribbon {
  position: fixed; right: 14px; bottom: 14px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-radius: 999px;
  background: rgba(14, 21, 38, 0.92); border: 1px solid var(--line-2); font-size: 0.8rem; color: var(--text-2);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7); backdrop-filter: blur(10px);
}
.preview-ribbon button { font: inherit; color: var(--cyan); background: none; border: 0; cursor: pointer; padding: 2px 6px; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- form controls (shared) ---------- */
.input, select.input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px;
  background: rgba(6, 10, 22, 0.6); border: 1px solid var(--line-2); color: var(--text);
  font: 400 0.95rem/1.4 var(--font); transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: rgba(124, 131, 255, 0.7); box-shadow: 0 0 0 4px rgba(124, 131, 255, 0.18); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 0.88rem; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track {
  position: relative; width: 38px; height: 22px; border-radius: 999px; background: rgba(148, 170, 255, 0.18);
  border: 1px solid var(--line-2); transition: background 0.2s; flex-shrink: 0;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #cfd6ea; transition: transform 0.2s cubic-bezier(.3, .7, .3, 1), background 0.2s;
}
.switch input:checked + .track { background: linear-gradient(90deg, #5b7cff, #8b7bff); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + .track { outline: 2px solid var(--cyan); outline-offset: 2px; }
.switch input:disabled + .track { opacity: 0.5; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

h1, h2, .hero-lede, .fw-lede, .section-head p { text-wrap: balance; }

.nav-links a.nav-admin { color: #fcd34d; }
.nav-links a.nav-admin:hover { background: rgba(251, 191, 36, 0.1); color: #fde68a; }
