/* =============================================================================
   DronOps marketing — "instrument readout"
   =============================================================================
   Design direction derived from DESIGN_SYSTEM.md §1 rather than invented:

     §1.1 Evidence looks different from opinion — system fact is mono.
     §1.2 Colour = meaning. The only chroma is the accent and status colours;
          decorative colour is a defect.
     §1.3 Density with hierarchy.
     §1.5 Both themes first-class; print is always light.

   So this page looks like the product's own evidence surface: graphite ground,
   Aironov teal as the single chroma, mono reserved for labels and identifiers,
   sans for prose. A compliance record is a set of labelled fields, so the page
   is laid out as one — a mono marker rail beside prose.

   THREE HARD CONSTRAINTS, all from marketing/vercel.json's CSP:
     style-src 'self'   -> no inline styles, no <style> blocks. All of it here.
     default-src 'none' -> zero JavaScript. Every effect below is CSS-only,
                           including the section numbering (CSS counters).
     font-src 'self'    -> no webfonts. No font files ship with this site, so
                           --font-sans falls back to the system UI face and
                           --font-mono to the system mono. Inter is named to
                           match DESIGN_SYSTEM.md §2.5 and will be used if it is
                           ever self-hosted; it is NOT loaded today. Stated
                           rather than implied, because a font stack that
                           silently never resolves is the kind of thing that
                           looks intentional and is not.
   ============================================================================= */

/* ── Tokens — graphite v2, dark first (DESIGN_SYSTEM.md §2.1–2.2) ─────────── */
:root {
  color-scheme: dark;

  --teal-300: #63DDB5;
  --teal-400: #44D7A8;
  --teal-500: #1FBA8A;

  --bg-app: #0A0D10;
  --bg-surface: #0C0F14;
  --bg-raised: #0F1318;
  --bg-inset: #070A0C;

  --fg-primary: #E8ECEF;
  --fg-secondary: #8C97A2;
  --fg-muted: #4E5864;

  --border-subtle: #141921;
  --border-default: #1A2028;
  --border-strong: #3A434F;

  --accent: var(--teal-400);
  --accent-hover: #5FE0B6;
  --fg-on-accent: #052019;
  --accent-subtle: color-mix(in oklab, var(--teal-400) 12%, transparent);

  --status-ok-fg: #4ABE6A;

  /* Texture only — deliberately weaker than any real border (§1.2: it must
     read as atmosphere, never as decorative colour or as a rule). */
  --grid-line: rgb(255 255 255 / .022);

  /* §2.5 — named to match the product; see the font-src note above. */
  --font-sans: "Inter", "Noto Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* §2.6 — spacing, radius, motion. No ad-hoc values below this line. */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-16: 64px; --space-24: 96px;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px; --radius-pill: 999px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur-fast: 120ms; --dur-med: 200ms; --dur-slow: 520ms;

  --measure: 34rem;   /* prose line length — ~68ch, not the page width */
  --page: 68rem;
  --rail: 8.5rem;     /* the mono marker rail */
}

/* §1.5 — light is first-class, not an afterthought. */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg-app: #FFFFFF;
    --bg-surface: #F8FAFB;
    --bg-raised: #F1F4F6;
    --bg-inset: #F1F4F6;
    --fg-primary: #0A0D10;
    --fg-secondary: #4E5864;
    --fg-muted: #6B7681;
    --border-subtle: #E1E6EA;
    --border-default: #CDD3D9;
    --border-strong: #B4BCC4;
    --accent: #107C5C;
    --accent-hover: #0C5E46;
    --fg-on-accent: #FFFFFF;
    --accent-subtle: color-mix(in oklab, #107C5C 10%, transparent);
    --status-ok-fg: #1B7A3D;
    --grid-line: rgb(10 13 16 / .028);
  }
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg-app);
  color: var(--fg-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* Atmosphere without images: a faint instrument grid, and a single teal
     bloom behind the hero. Both are gradients — nothing to load, and nothing
     for the CSP to block. Kept far below the text contrast threshold so it
     reads as texture rather than decoration (§1.2). */
  background-image:
    radial-gradient(60rem 32rem at 72% -8%, var(--accent-subtle), transparent 70%),
    repeating-linear-gradient(to right, var(--grid-line) 0 1px, transparent 1px var(--space-16)),
    repeating-linear-gradient(to bottom, var(--grid-line) 0 1px, transparent 1px var(--space-16));
  background-attachment: fixed;
}

::selection { background: var(--accent); color: var(--fg-on-accent); }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
a:hover { color: var(--accent-hover); border-bottom-color: currentColor; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

hr {
  border: 0;
  border-top: 1px solid var(--border-default);
  margin: var(--space-16) 0;
}

/* ── Shell ────────────────────────────────────────────────────────────────── */
header.site, main, footer.site {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

header.site {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-16);
}

/* The wordmark reads as an identifier, not a logo — mono, tight, with the
   accent carried by a single square rather than by colouring the text (§1.2:
   the accent means "brand", and one mark is enough to say it). */
header.site > strong {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
header.site > strong::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

header.site nav { display: flex; align-items: center; gap: var(--space-5); }
header.site nav a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--fg-secondary);
}
header.site nav a:hover { color: var(--fg-primary); }

/* The last nav link is the sign-in affordance — the one primary per surface
   (§7.6). Given as a bordered chip so it reads as a control, not prose. */
header.site nav a:last-child {
  color: var(--fg-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4);
}
header.site nav a:last-child:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Type scale (§2.5, shifted up for a marketing surface) ─────────────────── */
h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.033em;
  font-weight: 640;
  margin: 0 0 var(--space-5);
  max-width: 18ch;                /* the headline breaks where it should */
  text-wrap: balance;
}

h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: var(--space-8) 0 var(--space-2);
}

p { margin: 0 0 var(--space-4); max-width: var(--measure); }

.lede {
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--fg-secondary);
  max-width: 46ch;
}

.small { font-size: 13px; line-height: 1.5; }
.muted { color: var(--fg-secondary); }

strong { font-weight: 620; color: var(--fg-primary); }
em { font-style: normal; color: var(--fg-secondary); }

/* ── The marker rail — index sections as labelled fields ──────────────────── */
/* CSS counters do the numbering. With no JavaScript available this is not a
   workaround; it is the correct tool, and it keeps the markup free of numbers
   that would otherwise drift out of order when a section is added. */
main { counter-reset: field; }

main > h2 {
  counter-increment: field;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  align-items: baseline;
  gap: var(--space-6);
  max-width: none;
  margin-top: var(--space-24);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-default);
}

/* The rail marker: a mono field label, the way the product renders a system
   identifier. Sits in the gutter and never wraps into the prose. */
main > h2::before {
  content: counter(field, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding-top: var(--space-1);
}

/* Prose under a marked heading aligns to the same rail. */
main > h2 ~ p { margin-left: calc(var(--rail) + var(--space-6)); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
main > h1 { margin-top: 0; }

/* ── Jurisdiction badges — the product's own vocabulary, on the page ──────── */
/* This is the element that ties marketing to product: the same pill treatment
   the app uses for JurisdictionBadge. It carries real information (which
   regulators are implemented) in the form the customer will meet later. */
ul.jurisdictions {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-8);
  padding: 0;
}
ul.jurisdictions li {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--fg-secondary);
  background: var(--bg-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
ul.jurisdictions li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--status-ok-fg);
}
ul.jurisdictions li b {
  font-weight: 600;
  color: var(--fg-primary);
}

/* ── Controls (§7.6 — exactly one primary per surface) ────────────────────── */
.cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--accent);
  color: var(--fg-on-accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  border-bottom: 0;
  min-height: 44px;                      /* touch target, §5.6 */
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.cta::after { content: "\2192"; }        /* → */
.cta:hover {
  background: var(--accent-hover);
  color: var(--fg-on-accent);
  border-bottom: 0;
  transform: translateY(-1px);
}
.cta:active { transform: translateY(0); }

/* ── Surfaces ─────────────────────────────────────────────────────────────── */
/* §7.4: a card is bg-surface, LIGHTER than the page on dark. Never inset. */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}
.card > :last-child { margin-bottom: 0; }

.notice {
  background: var(--bg-raised);
  border: 1px solid var(--border-default);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
  font-size: 14px;
}
.notice > :last-child { margin-bottom: 0; }

/* ── Lists ────────────────────────────────────────────────────────────────── */
main ul:not(.jurisdictions) { padding-left: 0; list-style: none; max-width: var(--measure); }
main ul:not(.jurisdictions) li {
  position: relative;
  padding-left: var(--space-5);
  margin-bottom: var(--space-2);
}
main ul:not(.jurisdictions) li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 6px;
  height: 1px;
  background: var(--border-strong);
}

/* ── Tables (pricing) — §2.5: tabular numerals, identifiers in mono ───────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0 var(--space-8);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--fg-secondary);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-strong);
  background: var(--bg-inset);          /* §7.4: inset is for sticky headers */
}
tbody td, tbody th {
  text-align: left;
  font-weight: 400;
  padding: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer.site {
  margin-top: var(--space-24);
  padding-block: var(--space-8) var(--space-16);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  align-items: baseline;
}
footer.site a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-secondary);
}
footer.site a:hover { color: var(--fg-primary); }
footer.site p {
  flex-basis: 100%;
  margin: var(--space-5) 0 0;
  font-size: 12px;
  color: var(--fg-muted);
  max-width: none;
}

/* ── Motion — one orchestrated entrance, §2.6 micro-motion only ───────────── */
/* Staggered by nth-child rather than by inline delays, because inline style is
   blocked by the CSP. Transform + opacity only, so it stays off the main
   thread and cannot reflow. */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* `backwards`, NOT `both`. This is the whole safety of the effect: backwards
   supplies the from-state only DURING the delay, so if animations never run —
   suppressed, unsupported, a headless renderer, a crawler — the element keeps
   its natural opacity of 1 and the page is readable. `both` holds opacity: 0
   until the animation starts, which renders the entire page blank if it never
   does. Caught by screenshotting this page: only the header drew. */
header.site,
main > * {
  animation: rise var(--dur-slow) var(--ease) backwards;
}
main > *:nth-child(1) { animation-delay: 60ms; }
main > *:nth-child(2) { animation-delay: 110ms; }
main > *:nth-child(3) { animation-delay: 150ms; }
main > *:nth-child(4) { animation-delay: 185ms; }
main > *:nth-child(5) { animation-delay: 215ms; }
main > *:nth-child(n+6) { animation-delay: 240ms; }

/* §2.6 is explicit: respect prefers-reduced-motion. Content must be fully
   visible, not merely un-animated — `both` above would otherwise leave it at
   the keyframe's opacity: 0. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  header.site, main > * { opacity: 1; transform: none; }
}

/* ── Responsive — §5.6, tablet is the floor for the app; this is a public
   page, so it goes down to phone properly. The rail collapses first. ─────── */
@media (max-width: 48rem) {
  :root { --rail: 0px; }
  header.site { flex-wrap: wrap; gap: var(--space-3); }
  header.site nav { gap: var(--space-4); width: 100%; }
  main > h2 {
    grid-template-columns: 1fr;
    gap: var(--space-2);
    margin-top: var(--space-16);
  }
  main > h2::before { padding-top: 0; }
  main > h2 ~ p { margin-left: 0; }
  body { background-attachment: scroll; }  /* fixed attachment janks on iOS */
}

/* ── Print — §1.5: print is ALWAYS light, and never carries decoration ────── */
@media print {
  :root {
    --bg-app: #FFFFFF; --bg-surface: #FFFFFF; --bg-raised: #FFFFFF;
    --bg-inset: #FFFFFF; --fg-primary: #000000; --fg-secondary: #333333;
    --border-default: #999999; --border-subtle: #CCCCCC; --accent: #000000;
  }
  body { background-image: none; }
  header.site nav, .cta { display: none; }
  a { color: #000; border-bottom: 0; }
  main > h2 { break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
}
