:root {
  --ink: #1A1A1C;          /* near-black text         */
  --paper: #F1F0EC;        /* off-white base          */
  --card: #FBFBF9;         /* lifted near-white card  */
  --slate: #1A1A1C;
  --ember: #1800AD;        /* PRIMARY accent = brand violet             */
  --rust: #1800AD;         /* detail violet (icons, numbers, labels)    */
  --sage: #8A8A8E;         /* muted neutral gray      */
  --forest: #1800AD;
  --on-accent: #FFFFFF;    /* white text on the violet accent           */
  --wire: #1800AD;         /* particle constellation color              */
  --line: rgba(26, 26, 28, .11);
  --shadow-tint: 24, 0, 173; /* rgb triple for ambient shadow/glow tint */
  --font-heading: 'termina', 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-deco:    'termina', 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'proxima-nova', 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  --font-sub:     'dharma-gothic-m', 'Anton', 'Oswald', ui-sans-serif, sans-serif; /* subheadings: Dharma Gothic Extra Bold */
}

html.dark {
  --ink: #E8E8EA;          /* near-white text                 */
  --paper: #1E1E1E;        /* editor-gray base (VS Code dark) */
  --card: #252527;         /* lifted panel gray               */
  --slate: #E8E8EA;
  --ember: #3B8EFF;        /* bright blue so buttons lift off the gray page */
  --rust: #6FB0FF;         /* lighter blue, stays legible at small sizes    */
  --sage: #3A3A3C;         /* muted neutral gray              */
  --forest: #6FB0FF;
  --on-accent: #FFFFFF;    /* white text on the blue accent                 */
  --wire: #6FB0FF;         /* particle constellation on dark                */
  --line: rgba(232, 232, 234, .12);
  --shadow-tint: 59, 142, 255;
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.55;
  transition: background-color .35s ease, color .35s ease;
}

.font-mono { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace; }

.wrap { max-width: 1360px; margin-inline: auto; padding-inline: 1.5rem; }
@media (min-width: 768px) { .wrap { padding-inline: 2.5rem; } }

h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.005em; }
h1.type-heading, h2.type-heading { font-weight: 700; }  /* Termina display, beats Tailwind font-light */
.font-deco { font-family: var(--font-deco); }  /* Termina tier: big stat numbers */
/* Subheadings (card titles) = Dharma Gothic M Extra Bold. h3[class] beats Tailwind .font-semibold */
h3[class] { font-family: var(--font-sub); font-weight: 800; font-size: 1.05rem; line-height: 1.15; letter-spacing: 0.01em; }

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 500;
}

/* blueprint grid texture, faint structural lines behind content, Firecrawl-style */
.blueprint-grid {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: .5;
  mask-image: linear-gradient(to bottom, black, black 92%, transparent);
}

/* section index markers, e.g. [ 03 / 08 ] · SERVICES */
.section-index {
  display: flex; align-items: center; gap: .6rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); opacity: .35;
  margin-bottom: 2.5rem;
}
.section-index .idx-num { color: var(--forest); opacity: 1; }

/* decorative status tags, pure texture, no real meaning, Firecrawl-style */
.deco-tag {
  position: absolute; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .68rem;
  letter-spacing: .08em; color: var(--ink); opacity: .16; pointer-events: none;
  white-space: nowrap; user-select: none; z-index: 1;
}
@media (max-width: 767px) { .deco-tag { display: none; } }

/* decorative cycling pseudo-code, meaningless, aesthetic only */
.deco-code {
  position: absolute; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .76rem; line-height: 2; letter-spacing: .04em;
  color: var(--ink); opacity: .15; pointer-events: none; user-select: none;
  white-space: pre; z-index: 1;
}
@media (max-width: 1023px) { .deco-code { display: none; } }

/* terminal / code-style widget */
.term-window { background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 20px 40px -26px rgba(0,0,0,.3); }
.term-titlebar { display: flex; align-items: center; justify-content: space-between; padding: .6rem .9rem; border-bottom: 1px solid var(--line); }
.term-dots { display: flex; gap: .4rem; }
.term-dots span { width: 8px; height: 8px; border-radius: 999px; background: var(--line); }
.term-tag { font-family: 'JetBrains Mono', monospace; font-size: .65rem; letter-spacing: .08em; color: var(--ink); opacity: .4; }
.term-body { padding: 1.25rem 1.4rem 1.5rem; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .82rem; line-height: 1.9; min-height: 190px; }
.term-line { color: var(--ink); opacity: 0; }
.term-line.is-typing, .term-line.is-done { opacity: 1; }
.term-prompt { color: var(--rust); }
.term-ok { color: var(--rust); }
.term-cursor { display: inline-block; width: .5em; height: 1em; background: var(--rust); vertical-align: -0.15em; animation: term-blink 1s step-end infinite; }
@keyframes term-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .term-cursor { animation: none; } }

/* typewriter headings */
.type-heading { min-height: 1em; }
.type-heading .term-cursor { width: .06em; background: var(--rust); }

/* grain texture overlay */
/* No mix-blend-mode here on purpose. A blended full-viewport overlay has to
   re-read and recomposite everything underneath it whenever the backdrop
   changes, and the two particle canvases change every frame — it measured at
   9fps with the blend and 29fps without, on the same machine. Plain alpha
   compositing is a single GPU operation and at these opacities the texture
   reads the same. */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 40;
  opacity: .05;
  /* its own compositor layer, so the noise is rasterised once instead of being
     repainted over the animating canvases underneath it */
  transform: translateZ(0);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
html.dark .grain { opacity: .06; }

/* theme toggle */
.theme-toggle { padding: .55rem; border-radius: 999px; color: var(--ink); display: inline-flex; transition: background-color .15s ease; }
.theme-toggle:hover { background: rgba(0,0,0,.06); }
html.dark .theme-toggle:hover { background: rgba(255,255,255,.1); }
.theme-icon-moon { display: none; }
html.dark .theme-icon-sun { display: none; }
html.dark .theme-icon-moon { display: block; }

.theme-light-img { display: block; }
.theme-dark-img { display: none; }
html.dark .theme-light-img { display: none; }
html.dark .theme-dark-img { display: block; }

/* Founder portrait.
   Grayscale rather than full colour: the page sits on warm off-white with a
   single violet accent, and a photo's skin tones plus a white shirt fight both.
   The treatment is a plain filter, not mix-blend-mode — a blended layer forces
   the compositor to re-read everything beneath it, and the particle canvas
   underneath repaints constantly (same reason .grain lost its blend mode). */
.portrait { position: relative; display: block; }
/* offset outline peeking out behind the frame, the blueprint language the rest
   of the page uses, instead of a plain drop shadow */
.portrait::before {
  content: ''; position: absolute; inset: 0;
  border: 1px solid var(--ember); border-radius: 8px;
  transform: translate(14px, 14px);
  pointer-events: none;
}
.portrait img {
  position: relative; display: block; width: 100%; height: auto;
  border-radius: 8px; border: 1px solid var(--line); background: var(--card);
  filter: grayscale(1) contrast(1.04);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 22px 40px -28px rgba(var(--shadow-tint), .45);
}
/* Colour treatment: the shot was taken on a white backdrop, and desaturated on a
   warm off-white page that leaves a washed-out rectangle. A brand-tinted wash
   rising from the bottom grounds it and ties it to the accent, while staying off
   the face. Normal blending, for the compositor reason above. */
.portrait::after {
  content: ''; position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(to top,
    rgba(var(--shadow-tint), .12),
    rgba(var(--shadow-tint), .04) 42%,
    rgba(var(--shadow-tint), 0) 72%);
  pointer-events: none;
}
/* shot on a white backdrop, which reads as a lit panel against a near-black page */
html.dark .portrait img { filter: grayscale(1) contrast(1.02) brightness(.78); }
html.dark .portrait::after {
  background: linear-gradient(to top,
    rgba(var(--shadow-tint), .16),
    rgba(var(--shadow-tint), .05) 42%,
    rgba(var(--shadow-tint), 0) 72%);
}

.stat-tile { border-top: 1px solid var(--line); padding-top: 1.25rem; }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-question {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1.35rem 0; font-weight: 600; color: var(--ink);
  transition: opacity .15s ease;
}
.faq-question:hover { opacity: .7; }
.faq-question::-webkit-details-marker { display: none; }
.faq-chevron { flex-shrink: 0; transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-answer { max-width: 640px; margin: -.5rem 0 1.35rem; color: var(--ink); opacity: .6; font-size: .9rem; line-height: 1.7; }
.faq-item[open] .faq-answer { animation: faq-in .38s cubic-bezier(.16,.84,.28,1); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: .6; transform: none; } }
@media (prefers-reduced-motion: reduce) { .faq-item[open] .faq-answer { animation: none; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 700; font-size: .9rem; letter-spacing: -0.005em;
  padding: .95rem 1.9rem; border-radius: 9999px;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s cubic-bezier(.2,.8,.2,1), background-color .18s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: var(--ember); color: var(--on-accent);
  box-shadow: 0 1px 1px rgba(0,0,0,.15), 0 12px 24px -10px rgba(var(--shadow-tint),.5);
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 1px 1px rgba(0,0,0,.15), 0 18px 32px -10px rgba(var(--shadow-tint),.6); transform: translateY(-1px); }
.btn-ghost {
  border: 1px solid rgba(0,0,0,.16); color: var(--ink);
}
.btn-ghost:hover { border-color: rgba(0,0,0,.4); background: rgba(0,0,0,.03); }
html.dark .btn-ghost { border-color: rgba(255,255,255,.22); }
html.dark .btn-ghost:hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.06); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--rust); outline-offset: 3px; border-radius: 2px;
}

/* nav */
.nav-pill {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 1px rgba(0,0,0,.04), 0 20px 40px -22px rgba(0,0,0,.35);
  transition: background-color .3s ease, border-color .3s ease;
}
.nav-link { color: var(--ink); opacity: .62; font-weight: 500; font-size: .92rem; transition: opacity .15s ease; white-space: nowrap; }
.nav-link:hover { opacity: 1; }

/* cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 16px 28px -22px rgba(0,0,0,.18);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease, background-color .3s ease;
}
.card:hover { border-color: rgba(var(--shadow-tint),.3); transform: translateY(-3px); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 22px 34px -20px rgba(var(--shadow-tint),.22); }

.hr-line { border-top: 0; }

.accent-mark {
  display: inline-block; background: var(--ember); color: var(--on-accent);
  padding: 0 .18em; border-radius: 3px; transform: rotate(-1deg);
}

/* particle fields */
.particle-field { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The page-wide field is viewport-fixed (position:fixed is set inline so it beats
   the rule above). Sizing it to the full document height gave a 45-megapixel
   backing store that clearRect had to wipe on every frame, which alone dropped the
   page to ~15fps; particles keep page coordinates and are drawn scroll-offset. */
.particle-field[data-mode="global"] { will-change: transform; }

/* marquee */
/* padding gives the hover lift room inside the overflow box (which clips at the
   padding edge); the matching negative margin keeps the row's spacing identical */
.marquee { overflow: hidden; padding-block: .5rem; margin-block: -.5rem; -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent); mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent); }
.marquee-track { display: flex; align-items: flex-start; gap: 2.75rem; width: max-content; animation: marquee 46s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.tool-item { display: flex; flex-direction: column; align-items: center; gap: .75rem; width: 108px; opacity: .55; transition: opacity .2s ease, transform .2s ease; }
.tool-item:hover { opacity: 1; transform: translateY(-2px); }
.tool-icon { width: 38px; height: 38px; background-color: var(--ink); flex-shrink: 0; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
.tool-glyph { width: 38px; height: 38px; flex-shrink: 0; border: 1.6px solid var(--ink); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem; letter-spacing: -0.02em; color: var(--ink); }
.tool-label { font-size: .82rem; font-weight: 600; letter-spacing: .01em; color: var(--ink); white-space: nowrap; text-align: center; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .85s cubic-bezier(.16,.84,.28,1), transform .85s cubic-bezier(.16,.84,.28,1); will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn, .card { transition: none !important; }
}

/* mobile menu */
#mobileMenu { transition: opacity .25s ease, visibility .25s ease; }
#mobileMenu.hidden-menu { opacity: 0; visibility: hidden; pointer-events: none; }

/* floating CTA */
.floating-cta {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 45;
  box-shadow: 0 1px 1px rgba(0,0,0,.15), 0 16px 32px -10px rgba(var(--shadow-tint),.5);
  opacity: 0; transform: translateY(12px) scale(.96); pointer-events: none;
  transition: opacity .3s cubic-bezier(.2,.7,.2,1), transform .3s cubic-bezier(.2,.7,.2,1);
}
.floating-cta.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .floating-cta { transition: opacity .15s linear; transform: none; } }

/* ------------------------------------------------------------------ */
/* audit request form (audit.html)                                     */
/* ------------------------------------------------------------------ */

/* muted text that still reads on both themes, used for empty selects */
:root { --muted: #8A8A8E; }
html.dark { --muted: #77777D; }

.form-group { border-top: 1px solid var(--line); padding-top: 1.6rem; }
.form-group-title {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); opacity: .38; margin-bottom: 1.25rem;
}
.form-group-title .idx { color: var(--forest); opacity: 1; }

.field-label {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .7rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink); opacity: .5; margin-bottom: .5rem;
}
.field-label .req { color: var(--rust); opacity: 1; }

.field {
  width: 100%; background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px;
  padding: .8rem 1rem; font-size: .875rem; line-height: 1.5;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field::placeholder { color: var(--ink); opacity: .3; }
.field:hover { border-color: rgba(var(--shadow-tint), .32); }
.field:focus {
  outline: none; border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(var(--shadow-tint), .14);
}
textarea.field { resize: vertical; min-height: 6.5rem; }

/* native select arrows differ per platform, so hide it and draw our own */
.select-wrap { position: relative; }
.select-wrap select.field { appearance: none; -webkit-appearance: none; padding-right: 2.6rem; cursor: pointer; }
.select-wrap select.field.is-empty { color: var(--muted); }
.select-chevron { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); pointer-events: none; opacity: .4; }

/* multi-select chips for the "which areas" question */
.check-card {
  display: flex; align-items: flex-start; gap: .65rem;
  padding: .75rem .9rem; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  transition: border-color .15s ease, background-color .15s ease;
}
.check-card:hover { border-color: rgba(var(--shadow-tint), .32); }
.check-card input { accent-color: var(--ember); width: 1rem; height: 1rem; margin-top: .12rem; flex-shrink: 0; }
.check-card span { font-size: .85rem; line-height: 1.4; color: var(--ink); opacity: .78; }
.check-card:has(input:checked) { border-color: var(--ember); background: rgba(var(--shadow-tint), .06); }
.check-card:has(input:checked) span { opacity: 1; }
.check-card:has(input:focus-visible) { outline: 2px solid var(--rust); outline-offset: 2px; }

.form-note { font-size: .75rem; line-height: 1.6; color: var(--ink); opacity: .45; }
.form-error { font-size: .75rem; color: var(--rust); margin-top: .4rem; }

/* No sticky intro column here: `html, body { overflow-x: clip }` turns the body
   into a scroll container, which stops position:sticky from following the scroll
   and just offsets the column by its `top` value instead. */
.audit-aside { align-self: start; }
