/* ==========================================================
   Elisio — base.css
   Self-hosted fonts, reset, document defaults, type roles,
   layout primitives, accessibility helpers.
   ========================================================== */

/* ----- Fonts (self-hosted, latin) ----- */
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/sora-600.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/sora-700.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/sora-800.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/manrope-400.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/manrope-500.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/manrope-600.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/manrope-700.woff2') format('woff2'); }

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
img, svg, canvas, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
:where(ul, ol)[role="list"] { list-style: none; padding: 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

/* ----- Document ----- */
body {
  min-height: 100vh;
  background: var(--night);
  color: var(--text);
  font-family: var(--f-text);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* One faint wash of the orb's light at the top of every page.
   Fixed pseudo-element = composited, no background-attachment jank. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(70vw 50vh at 85% -10%, rgba(139, 115, 242, 0.16), transparent 70%),
    radial-gradient(50vw 40vh at 0% 0%, rgba(185, 166, 255, 0.06), transparent 70%);
}

::selection { background: var(--lilac); color: var(--night); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--lilac);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ----- Type roles ----- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.t-display {
  font-family: var(--f-display);
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.045em;
}
.t-h1 { font-size: var(--fs-h1); letter-spacing: -0.035em; line-height: 1.02; }
.t-h2 { font-size: var(--fs-h2); letter-spacing: -0.03em; }
.t-h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }

.lede {
  font-size: var(--fs-lede);
  font-weight: 500;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 62ch;
  text-wrap: pretty;
}
p { text-wrap: pretty; }
.muted { color: var(--text-2); }
.quiet { color: var(--text-3); }

/* Figures: money is amber, always tabular */
.figure, .money {
  font-family: var(--f-display);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  letter-spacing: -0.03em;
}
.money { color: var(--amber); }

/* ----- Layout primitives ----- */
.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--pad) * 2);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.wrap--narrow { max-width: calc(var(--narrow) + var(--pad) * 2); }
.section { padding-block: var(--section); }
.section + .section:not(.section--band) { padding-top: 0; }
.section--band + .section:not(.section--band) { padding-top: var(--section); }
.section--band {
  background: var(--night-2);
  border-block: 1px solid var(--line);
}

/* ----- Accessibility helpers ----- */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 1000;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus-visible { transform: none; outline-color: var(--text); }

main:focus { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
