/* askversa.ai tokens. Source of truth: DESIGN.md sections 1 and 9. */
:root {
  /* colour: light theme (default) */
  --bg: #f7f6f2;
  --bg-raised: #ffffff;
  --bg-tint: #ebe9e2;
  --ink: #0a071e;
  --ink-2: #4a4760;
  --ink-muted: #625f78;
  --line: rgb(10 7 30 / 0.12);
  --accent: #413f9b;
  --glass: rgb(255 255 255 / 0.6);

  /* colour: dark sections */
  --bg-dark: #0a071e;
  --bg-dark-mid: #413f9b;
  --on-dark: #ffffff;
  --on-dark-2: #b4b2c8;
  --accent-on-dark: #8f8df0;
  --canvas: #f7f6f2;   /* the one page colour (same as --bg) */
  --peak: #5c58d2;     /* the violet the page deepens to in a gradient moment (sampled from the early versa.agency concept) */
  --line-on-dark: rgb(255 255 255 / 0.15);

  /* layout, from versa.agency */
  --margin-min: 40px;
  --margin-vw: 7.5vw;
  --margin-max: 200px;
  --margin: clamp(var(--margin-min), var(--margin-vw), var(--margin-max));
  --radius-card: 40px;
  --radius-image: 16px;
  --radius-pill: 60px;
  --radius-button: 40px;
  --radius-round: 9999px; /* fully round: the front door input */

  --space-small:  clamp(calc(var(--margin-min) / 2), calc(var(--margin-vw) / 4), calc(var(--margin-max) / 4));
  --space-slim:   clamp(var(--margin-min), calc(var(--margin-vw) / 2.5), calc(var(--margin-max) / 2.5));
  --space-medium: clamp(var(--margin-min), calc(var(--margin-vw) / 2), calc(var(--margin-max) / 2));
  --space-main:   clamp(calc(var(--margin-min) * 1.5), var(--margin-vw), var(--margin-max));

  /* type. Helvetica Neue LT Pro from Adobe Fonts (web project axw7cbe, linked in index.html), then the system stack as the fallback. */
  --font: "helvetica-neue-lt-pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --w-body: 300;
  --w-large: 200;
  --w-title: 400;  /* section titles (h2): ?weight=bold makes this 500 */
  --w-h3: 300;     /* h3 headings (card, timeline and principle titles): ?weight=bold makes this 400 */
  --w-sub: 200;    /* section subtitles (.why-sub): ?weight=bold makes this 400 */

  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* grain: the versa.agency noise tile, on dark and mid-tone sections only (it did not work on light).
     Overlay shows over lit areas such as the horizon glow. Flat #0a071e shows almost none, as on versa.agency. */
  --noise-y: 0px; /* set by js/site.js on scroll, for the parallax */
}

/* A dark section re-points the same tokens, so components need no dark variants.
   It also sets its own text colour, so any element (not just .section) can be dark. */
.section--dark, .section--mid { color: var(--ink); }
.section--dark {
  --bg: var(--bg-dark);
  --bg-raised: rgb(255 255 255 / 0.06);
  --bg-tint: rgb(255 255 255 / 0.08);
  --ink: var(--on-dark);
  --ink-2: var(--on-dark-2);
  --ink-muted: var(--on-dark-2);
  --line: var(--line-on-dark);
  --accent: var(--accent-on-dark);
  --glass: rgb(0 0 0 / 0.5);
  --noise-blend: overlay;
  --noise-opacity: .5;
}
.section--glow, .section--peak { color: var(--ink); }
/* A gradient moment (.section--glow) fades from the page colour up to --peak and back, so it has no edges. Text on it is white.
   .section--peak is the solid end of one (the footer). --bg here is the colour for text on a light button, not the background. */
.section--glow, .section--peak {
  --bg: #1b1450;
  --bg-raised: rgb(255 255 255 / 0.12);
  --bg-tint: rgb(255 255 255 / 0.16);
  --ink: #ffffff;
  --ink-2: rgb(255 255 255 / 0.86);
  --ink-muted: rgb(255 255 255 / 0.8);
  --line: rgb(255 255 255 / 0.3);
  --accent: #ffffff;
  --glass: rgb(255 255 255 / 0.14);
  --noise-blend: overlay;   /* the grain: strongest where the violet is, fading out with it, because overlay shows nothing on near-white */
  --noise-opacity: .4;
}
.section--mid {
  --bg: var(--bg-dark-mid);
  --bg-raised: rgb(255 255 255 / 0.08);
  --bg-tint: rgb(255 255 255 / 0.1);
  --ink: var(--on-dark);
  --ink-2: var(--on-dark-2);
  --ink-muted: var(--on-dark-2);
  --line: var(--line-on-dark);
  --accent: var(--accent-on-dark);
  --glass: rgb(0 0 0 / 0.3);
  --noise-blend: overlay;
  --noise-opacity: .4;
}

@media (max-width: 991px) { :root { --margin-vw: 10.5vw; --radius-card: 24px; } }
/* versa.agency uses 14.5vw / 32px here, which leaves about 270px of content on a 390px phone. Tighter for askversa.ai. */
@media (max-width: 767px) { :root { --margin-min: 24px; --margin-vw: 7vw; --margin-max: 140px; } }

/* ?weight=bold (inline script in index.html sets html[data-weight]): heavier section titles and subtitles. thin (the default) is the original weights. */
html[data-weight="bold"] { --w-title: 500; --w-sub: 400; --w-h3: 400; }
