/* Useful Patch — unified design system v1
   Dark, confident, trust-first. Single source of truth for site-wide styles. */

:root {
  /* Surfaces */
  --bg: #07090f;
  --bg-2: #0a0e1a;
  --surface: #0f1424;
  --surface-2: #141a2e;
  --surface-3: #1b2238;
  --border: #1f2742;
  --border-strong: #2c3654;

  /* Type */
  --text: #f1f4ff;
  --text-2: #c5cce0;
  --muted: #8892ad;
  --dim: #5c6481;

  /* Accent */
  --accent: #f5a524;
  --accent-2: #fb923c;
  --accent-soft: rgba(245, 165, 36, 0.12);
  --accent-line: rgba(245, 165, 36, 0.32);

  /* Status */
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.1);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.1);
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.1);
  --purple: #a78bfa;

  /* Geometry */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;

  /* Type scale (fluid) */
  --fs-xs: 0.78rem;
  --fs-sm: 0.88rem;
  --fs-base: 0.98rem;
  --fs-lg: 1.08rem;
  --fs-xl: 1.22rem;
  --fs-2xl: clamp(1.4rem, 2vw, 1.65rem);
  --fs-3xl: clamp(1.7rem, 2.6vw, 2.1rem);
  --fs-4xl: clamp(2.1rem, 3.6vw, 2.9rem);
  --fs-5xl: clamp(2.6rem, 5.5vw, 4.2rem);

  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.25);
  --shadow: 0 14px 38px rgba(0,0,0,0.32);
  --shadow-glow: 0 18px 52px rgba(245,165,36,0.18);

  /* Layout */
  --max: 1140px;
  --max-narrow: 760px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: var(--fs-base);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(245, 165, 36, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 50%, rgba(96, 165, 250, 0.05), transparent 70%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Selection */
::selection { background: var(--accent); color: #1a0f00; }

/* Links */
a { color: var(--text); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--accent); }

/* Typography */
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.025em; font-weight: 700; }
h1 { font-size: var(--fs-5xl); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); font-weight: 700; }
p { color: var(--text-2); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
strong { font-weight: 700; color: var(--text); }
small { font-size: var(--fs-sm); color: var(--muted); }

/* Layout primitives */
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
@media (max-width: 720px) { .section { padding: 64px 0; } .section-sm { padding: 40px 0; } }

/* Top announcement bar */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-size: var(--fs-sm);
  text-align: center;
  padding: 9px 16px;
}
.topbar strong { color: var(--accent); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 15, 0.86);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 9px; color: var(--text); }
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; color: #1a0f00; font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(245, 165, 36, 0.3);
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-cta { padding: 9px 16px; }
@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--fs-base);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a0f00;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { box-shadow: 0 22px 60px rgba(245, 165, 36, 0.28); color: #1a0f00; }
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-3); border-color: var(--accent-line); color: var(--text); }
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }
.btn-lg { padding: 16px 28px; font-size: var(--fs-lg); border-radius: var(--radius-lg); }
.btn-sm { padding: 9px 14px; font-size: var(--fs-sm); }

/* Pills/badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  color: #fcd34d;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}
.pill-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 3px rgba(245,165,36,0.18); }
.pill-blue { background: var(--blue-soft); border-color: rgba(96,165,250,0.3); color: #bfdbfe; }
.pill-blue .pill-dot { background: var(--blue); box-shadow: 0 0 0 3px rgba(96,165,250,0.18); }
.pill-green { background: var(--green-soft); border-color: rgba(34,197,94,0.3); color: #86efac; }
.pill-green .pill-dot { background: var(--green); box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
a.card:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
.card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.card p { color: var(--muted); font-size: var(--fs-sm); }
.card-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); text-transform: uppercase; margin-bottom: 10px; }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 920px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* Hero */
.hero {
  padding: 88px 0 64px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 35% at 30% 20%, rgba(245, 165, 36, 0.14), transparent 60%),
    radial-gradient(ellipse 45% 30% at 80% 60%, rgba(96, 165, 250, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

/* Stats row */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 28px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.stat-num { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.025em; color: var(--text); }
.stat-num .accent { color: var(--accent); }
.stat-label { font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; margin-top: 4px; }

/* Checklist */
.checklist { list-style: none; display: grid; gap: 12px; }
.checklist li { color: var(--text-2); font-size: var(--fs-base); padding-left: 30px; position: relative; }
.checklist li::before {
  content: '';
  position: absolute;
  left: 0; top: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--green-soft);
  border: 1px solid var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px;
}

/* Forms */
input[type="text"], input[type="email"], input[type="url"], textarea, select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 13px 16px;
  color: var(--text);
  font-size: var(--fs-base);
  font-family: inherit;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 165, 36, 0.14);
}
label { display: block; color: var(--muted); font-size: var(--fs-sm); margin-bottom: 7px; font-weight: 500; }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 56px 24px 40px;
  margin-top: 80px;
  background: var(--bg-2);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
}
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 14px; font-weight: 700; }
.footer-links { list-style: none; display: grid; gap: 9px; }
.footer-links a { color: var(--text-2); font-size: var(--fs-sm); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--max);
  margin: 36px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* Reveal animation — only hides content if JS is enabled (.js-ready is added by site.js).
   This prevents content being invisible if JS fails or delays. */
.js-ready .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); }
.js-ready .reveal.in { opacity: 1; transform: translateY(0); }

/* Subtle floating elements */
@keyframes float-slow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.float { animation: float-slow 6s ease-in-out infinite; }

/* Pulse for live signals */
@keyframes pulse-soft { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.pulse { animation: pulse-soft 2s ease-in-out infinite; }

/* Visually hidden */
.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; }
