/* ============================================================================
   Easy AI Agents — shared design system
   ============================================================================

   Every page used to carry its own inline copy of this file. Eleven copies, no
   single source, and they had already drifted: terms-of-service was missing
   --bg-elevated and a footer breakpoint that privacy-policy had. A rebrand meant
   editing eleven files and hoping.

   This is the one copy. Link it, do not paste it:
       <link rel="stylesheet" href="/css/system.css" />

   Page-specific rules still belong in that page's own <style> block, after this
   link. This file holds only what more than one page genuinely shares.

   ── Colour rule, do not break it ──
   --text-tertiary (#566159) measures 2.73:1 on --bg-surface and 2.46:1 on
   --bg-elevated. --text-faint (#3A4340) is worse. Both are below even the 3:1
   WCAG floor for large text, so NEITHER IS A TEXT COLOUR. Working backwards from
   the contrast formula, the dimmest compliant grey on these backgrounds is about
   #808080, which is already --text-secondary. A third accessible text tier does
   not exist on this palette. Subordinate text earns its rank from size, weight,
   letter-spacing and case, not from dimness.

   Both tokens survive for hairlines, decorative fills and disabled controls,
   which WCAG 1.4.3 exempts.
   ========================================================================= */

/* ── Variables ── */
:root {
  /* Grounds, darkest to lightest */
  --bg-primary: #0B0F0E;
  --bg-surface: #141A18;
  --bg-elevated: #1C2420;

  /* Accents. Semantic only: links, hover, focus, success, and one meaningful
     contrast pair per page. Not rails, tinted callouts, card top-bars or kickers. */
  --accent-green: #28C98E;
  --accent-green-hover: #22B57E;
  --accent-gold: #C9A227;

  /* Text */
  --text-primary: #E8EDEA;
  --text-secondary: #8A9590;
  --text-tertiary: #566159;  /* NOT a text colour. See the header. */
  --text-faint: #3A4340;     /* NOT a text colour. See the header. */

  --border-subtle: rgba(255, 255, 255, 0.05);

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-section: 100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ── Skip link ──
   Same treatment the ten hand-built pages carry inline. Kept here so the pages
   that already share this stylesheet get one implementation rather than another
   copy each. Off-canvas rather than display:none, so it stays in the tab order
   and the first Tab on the page lands on it. */
.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 300;
  transform: translateY(-160%);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-green);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: transform 0.18s ease;
}
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}
/* Skip destination: the landmark takes focus so the link genuinely skips
   rather than only scrolling. It is a region, not a control, so the ring
   the browser would draw around the whole of it is suppressed. */
main[tabindex="-1"]:focus,
section[tabindex="-1"]:focus,
div[tabindex="-1"]:focus { outline: none; }

/* ── Nav ── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

#nav.scrolled {
  background-color: rgba(11, 15, 14, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border-subtle);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .nav-inner { padding: 20px 48px; }
}

/* ── CTA Button ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  background-color: var(--accent-green);
  color: #0B0F0E;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  box-shadow:
    0 0 0 1px rgba(40, 201, 142, 0.2),
    0 4px 16px rgba(40, 201, 142, 0.18),
    0 1px 3px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover {
  background-color: var(--accent-green-hover);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(40, 201, 142, 0.3),
    0 8px 24px rgba(40, 201, 142, 0.24),
    0 2px 6px rgba(0, 0, 0, 0.4);
}

/* The ring-plus-lift active state came from the page copies, not the legal
   pages: four of six had it and the two thinnest did not. Promoted rather than
   flattened, because the richer version was the majority and the considered one. */
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 0 0 1px rgba(40, 201, 142, 0.2), 0 2px 8px rgba(40, 201, 142, 0.14);
}
.btn-primary:focus-visible { outline: 2px solid var(--accent-green); outline-offset: 3px; }

/* ── Policy content ── */
#policy {
  position: relative;
  z-index: 1;
  padding-top: 140px;
  padding-bottom: 120px;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 768px) {
  #policy {
    padding-top: 160px;
    padding-left: 48px;
    padding-right: 48px;
  }
}

.policy-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.policy-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .policy-title { font-size: 36px; }
}

.policy-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.policy-body p {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.policy-body h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text-primary);
  margin-top: 40px;
  margin-bottom: 16px;
}

.policy-body ul {
  list-style: none;
  padding-left: 24px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.policy-body ul li {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
}

.policy-body ul li::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--accent-green);
  flex-shrink: 0;
}

.policy-body ol {
  list-style: none;
  padding-left: 24px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: policy-ol;
}

.policy-body ol li {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
  counter-increment: policy-ol;
}

.policy-body ol li::before {
  content: counter(policy-ol) ".";
  position: absolute;
  left: -22px;
  color: var(--accent-green);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  top: 0.2em;
}

.policy-body a {
  color: var(--accent-green);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.policy-body a:hover { text-decoration: underline; opacity: 0.85; }
.policy-body a:focus-visible { outline: 2px solid var(--accent-green); outline-offset: 2px; border-radius: 2px; }

/* ── Nav links ── */
.nav-links { margin-left: auto; display: flex; align-items: center; gap: var(--space-lg); }
.nav-link {
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  color: var(--text-secondary); text-decoration: none;
  transition: color 0.18s ease;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:focus-visible { outline: 2px solid var(--accent-green); outline-offset: 3px; border-radius: 2px; }


/* Footer moved to css/footer.css so the six pages that cannot take this
   file can still share one footer. Link both. */

@media (max-width: 767px) {
  #policy  { padding-bottom: 56px; }
}
