/* Proxyxin design tokens — locked from plan */
:root {
  /* Color: dark theme default */
  --bg: #09090b;            /* zinc-950 */
  --bg-elev-1: #18181b;     /* zinc-900 */
  --bg-elev-2: #27272a;     /* zinc-800 */
  --bg-elev-3: #3f3f46;     /* zinc-700 */
  --border: #27272a;        /* zinc-800 */
  --border-strong: #3f3f46; /* zinc-700 */

  --text: #fafafa;          /* zinc-50 */
  --text-muted: #a1a1aa;    /* zinc-400 */
  /* Bumped from zinc-500 (#71717a, 4.18:1) to #8a8a93 (~5.0:1 on --bg)
     so body-sized hint/timestamp copy clears WCAG AA 4.5:1. */
  --text-faint: #8a8a93;

  /* Accent: monochrome — zinc-50 (near-white). Replaces lime-400
     after user feedback that the yellow-green hurt their eyes.
     Status colors (success/warning/danger) keep their hue so
     semantic meaning stays clear. */
  --accent: #fafafa;
  --accent-hover: #e4e4e7;
  --accent-faint: rgba(250, 250, 250, 0.08);
  --accent-glow: rgba(250, 250, 250, 0.12);
  /* Color rendered ON the accent (button text, etc.) */
  --accent-fg: #0a0a0a;

  /* Semantic accent tokens — replace hardcoded #3b82f6 / #a3e635. */
  --accent-cta:        #3b82f6;   /* CTA blue (customer order page) */
  --accent-cta-hover:  #2563eb;
  --accent-cta-faint:  rgba(59, 130, 246, 0.10);
  --accent-cta-glow:   rgba(59, 130, 246, 0.24);
  --accent-brand:      #a3e635;   /* Lime brand (public marketing) */
  --accent-brand-hi:   #bef264;
  --accent-brand-glow: rgba(163, 230, 53, 0.18);

  /* Semantic */
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;

  /* Spacing scale removed — no `var(--space-*)` reference exists in any
     CSS/HTML/template. Re-add deliberately if/when migrating to a token-
     based spacing system; until then, the inline rem/px values used today
     keep the rule count down. */

  /* Radius */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Type */
  --font-sans: 'Geist', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Global keyboard-visible focus ring. `:focus-visible` only fires on
   keyboard navigation, not mouse-click — so we get clear a11y feedback
   without the "outlined when clicked" annoyance. Single source of truth
   for the entire panel; templates must NOT do `outline: none` anywhere. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Screen-reader-only utility: visually hide content but keep it in the
   accessibility tree (skip links, fieldset legends, "more info" hints).
   `.sr-only` is an alias so templates rendered without Tailwind (admin_proxyxin)
   also get the same behavior as Tailwind's utility. */
.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-to-content link — first focusable element on every page.
   Hidden until keyboard-focused so it doesn't clutter sighted UX. */
.skip-link {
  position: absolute;
  left: 0; top: 0;
  transform: translateY(-150%);
  padding: 0.625rem 1rem;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
  transition: transform 0.15s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--accent-fg);
}

/* Respect users who asked for less motion (vestibular safety). */
@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;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Utility-ish base */
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.accent { color: var(--accent); }

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

/* Common buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
  text-decoration: none;
}
.btn-primary {
  background: var(--bg-elev-2);
  color: var(--text);
  font-weight: 600;
  border-color: var(--border-strong);
}
.btn-primary:hover {
  background: var(--bg-elev-3);
  color: var(--text);
  border-color: var(--text-muted);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--bg-elev-1);
  color: var(--text);
}
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8125rem; }

/* Cards */
.card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.card:hover { border-color: var(--border-strong); }

/* Pill / badge */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-elev-1);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.pill-accent {
  background: var(--accent-faint);
  border-color: rgba(250, 250, 250, 0.25);
  color: var(--accent);
}
.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* Common page wrap */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.wrap-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Nav */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(9, 9, 11, 0.7);
  border-bottom: 1px solid var(--border);
}
.topnav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--accent);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand:hover { color: var(--accent); }
.topnav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.topnav-links a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 400;
  transition: color 0.15s;
}
.topnav-links a:hover { color: var(--text); }

/* Sections */
.section { padding: 5rem 0; }
.section-tight { padding: 3rem 0; }

/* Headlines */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0;
}
.h-display {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.0;
}
.h-section {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
}

/* Footer */
footer.foot {
  border-top: 1px solid var(--border);
  padding: 4rem 0 3rem;
  margin-top: 6rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}
.foot h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 0.5rem 0; }
.foot a { color: var(--text-muted); font-size: 0.875rem; }
.foot a:hover { color: var(--accent); }
.foot-bottom {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
}

@media (max-width: 768px) {
  .topnav-links a:not(.btn) { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
