/* Renvoro — design tokens, reset, typography.
   Palette is contrast-checked against WCAG 2.2 AA; the ratio for each
   text colour on --paper is noted beside it. Do not lighten these
   without re-checking. */

:root {
  /* Surfaces — warm paper rather than cool grey, so the page does not
     read as an inverted dark-mode template. */
  --paper:        #FBFAF8;
  --paper-edge:   #F4F2EC;
  --surface:      #FFFFFF;
  --sunk:         #F5F3EE;

  /* Text */
  --ink:          #16181F;  /* 15.9:1 on paper */
  --ink-2:        #3F434E;  /*  8.9:1 */
  /* --ink-3 is checked against the DARKEST surface it ever sits on
     (--paper-edge, the footer), not just --paper: 5.1:1 on paper,
     4.8:1 on --paper-edge. */
  --ink-3:        #676C7B;
  --label:        #5C6070;  /*  5.9:1 — uppercase micro-labels */

  /* Brand. --brand is a fill only (white text sits on it at 4.7:1).
     --brand-ink is the text/link variant: #635BFF as text is 4.45:1,
     which misses AA, so links use the darker value. */
  --brand:        #635BFF;
  --brand-ink:    #5048E5;  /*  5.9:1 */
  --brand-deep:   #4A42D6;
  --brand-wash:   #EEECFF;
  --brand-line:   rgba(99, 91, 255, .28);

  /* Semantic */
  --pos:          #17704F;  /*  5.8:1 on paper, 5.5:1 on its own wash */
  --pos-wash:     #E7F6EF;
  --warn:         #8A560B;  /*  5.8:1 */
  --warn-wash:    #FDF7EC;
  --neg:          #BE3945;  /*  5.2:1 on paper, 4.9:1 on its own wash */
  --neg-wash:     #FDF0F1;
  --info:         #1C6FC4;
  --info-wash:    #EAF2FD;

  /* Lines and shadows. Shadows are tight and neutral — no coloured
     glow, no blurred radial light sources. */
  --line:         rgba(22, 24, 31, .10);
  --line-soft:    rgba(22, 24, 31, .06);
  --shadow-sm:    0 1px 2px rgba(22, 24, 31, .05);
  --shadow-md:    0 1px 2px rgba(22, 24, 31, .05), 0 6px 16px rgba(22, 24, 31, .06);
  --shadow-lg:    0 1px 2px rgba(22, 24, 31, .05), 0 14px 36px rgba(22, 24, 31, .09);

  /* Type */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-ui:      "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;

  /* Spacing — marketing rhythm, low density */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shell:     1160px;
  --measure:   66ch;

  /* Motion — Standard tier: 400-600ms reveals, 150-250ms feedback */
  --ease:      cubic-bezier(.22, .61, .36, 1);
  --ease-out:  cubic-bezier(.16, 1, .3, 1);
  --t-fast:    160ms;
  --t-base:    240ms;
  --t-slow:    520ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -.012em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 1.5rem + 3.6vw, 3.9rem); }
h2 { font-size: clamp(1.85rem, 1.3rem + 2.1vw, 2.65rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .55vw, 1.4rem); font-family: var(--font-ui); font-weight: 600; letter-spacing: -.005em; line-height: 1.3; }
h4 { font-size: 1.0625rem; font-family: var(--font-ui); font-weight: 600; letter-spacing: 0; line-height: 1.4; }

p { margin: 0; text-wrap: pretty; }

a {
  color: var(--brand-ink);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--brand-deep); text-decoration: underline; }

/* Focus is never removed — only restyled. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

table { border-collapse: collapse; width: 100%; }

/* Numbers line up in columns wherever money is shown. */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---------- Layout primitives ---------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--s-5);
}
@media (min-width: 700px) { .shell { padding-inline: var(--s-6); } }

.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tight { padding-block: clamp(36px, 5vw, 64px); }
.section + .section { padding-top: 0; }

.rule { border: 0; border-top: 1px solid var(--line-soft); margin: 0; }

.stack > * + * { margin-top: var(--s-4); }
.lede { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-3); max-width: 56ch; }

.eyebrow {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--label);
  margin: 0 0 var(--s-3);
}

.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;
}

.skip-link {
  position: absolute; left: var(--s-4); top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-weight: 600;
  transition: top var(--t-base) var(--ease);
}
.skip-link:focus { top: var(--s-4); }

/* ---------- Scroll reveal ----------
   Standard tier: 8-16px offset, 520ms, power2-equivalent easing.
   Content is visible by default; JS opts in, so nothing is hidden
   from crawlers or from users with JS disabled. */
.reveal[data-reveal-armed] {
  opacity: 0;
  transform: translateY(14px);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity var(--t-slow) var(--ease-out),
              transform var(--t-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal[data-reveal-armed] { opacity: 1; transform: none; }
}
