@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/archivo-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/archivo.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-italic-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================
   Avennex — base
   Tokens, type, grid, surfaces, motion primitives.
   The one source of truth. Nothing below it overrides it.
   ========================================================== */

:root {
  /* the surface: one deep night, lit by haze rather than split into bands */
  --paper:      #0D0B18;
  --paper-2:    #151226;
  --paper-3:    #1E1A36;
  --ink:        #F4F1FB;
  --ink-2:      #CFC9E2;
  --ink-3:      #A69FC2;
  --rule:       rgba(207, 201, 226, 0.2);
  --hair:       rgba(207, 201, 226, 0.085);

  /* panels share the surface now, so their tokens match it */
  --panel:      var(--paper);
  --panel-2:    var(--paper-2);
  --panel-3:    var(--paper-3);
  --panel-ink:  var(--ink);
  --panel-ink-2:var(--ink-2);
  --panel-ink-3:var(--ink-3);
  --panel-rule: var(--rule);
  --panel-hair: var(--hair);

  /* amber marks what matters, royal purple carries the atmosphere */
  --mark:       #F6B84B;
  --mark-lit:   #FFCB6B;
  --mark-soft:  rgba(246, 184, 75, 0.14);
  --mark-ink:   #1A1204;
  --royal:      #7C3AED;
  --royal-lit:  #B69CFF;
  --royal-deep: #3B1782;
  --royal-soft: rgba(124, 58, 237, 0.2);

  /* state, kept away from the accent */
  --ok:         #5CCB8F;
  --warn:       #F2A33A;
  --stop:       #F2766B;

  /* chart series for the public dashboards, read by js/dashboard.js */
  --dash-series: #F6B84B, #B69CFF, #5CCB8F, #6FA8FF, #F2766B, #C9D46B;

  --display: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --text:    'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --label:   'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif:   'Instrument Serif', Georgia, 'Times New Roman', serif;

  --col: 12;
  --gutter: 24px;
  --margin: 40px;
  --maxw: 1480px;
  --measure: 66ch;

  --ease: cubic-bezier(0.22, 0.61, 0.20, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 180ms;
  --t-base: 300ms;
  --t-slow: 620ms;

  --sect-y: 124px;
  --sect-y-tight: 84px;
  --sect-y-loose: 150px;

  color-scheme: dark;
}

/* ---------- reset ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }
::selection { background: var(--royal); color: #fff; }

:focus-visible {
  outline: 2px solid var(--mark);
  outline-offset: 3px;
}
.panel :focus-visible, .hero :focus-visible { outline-color: var(--mark-lit); }

.skip-link {
  position: absolute;
  top: -100px; left: var(--margin);
  z-index: 300;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--label);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 14px; }

.icon { display: inline-flex; align-items: center; justify-content: center; }
.icon svg { display: block; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- haze: slow light behind every page ---------- */

body::before {
  content: '';
  position: fixed;
  inset: -12vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(52vmax 42vmax at 10% 4%, rgba(124, 58, 237, 0.38), transparent 64%),
    radial-gradient(40vmax 34vmax at 96% 22%, rgba(246, 184, 75, 0.15), transparent 62%),
    radial-gradient(60vmax 46vmax at 74% 104%, rgba(91, 33, 214, 0.32), transparent 64%),
    radial-gradient(34vmax 30vmax at 4% 78%, rgba(246, 184, 75, 0.08), transparent 62%);
  filter: blur(8px);
}
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: haze-drift 38s ease-in-out infinite alternate; }
}
@keyframes haze-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3vmax, 2vmax, 0) scale(1.06); }
}

/* ---------- grain, faint, so the haze reads as air rather than a gradient ---------- */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.15'/%3E%3C/svg%3E");
}

/* ---------- surfaces ---------- */

/* a panel is the same night, tinted a shade toward purple so a block of
   machinery still reads as its own place without a hard band */
.panel {
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.09), rgba(124, 58, 237, 0.025));
  border-block: 1px solid var(--hair);
  color: var(--panel-ink);
  --rule: var(--panel-rule);
  --hair: var(--panel-hair);
  --ink: var(--panel-ink);
  --ink-2: var(--panel-ink-2);
  --ink-3: var(--panel-ink-3);
  --mark: var(--mark-lit);
  --paper: var(--panel);
  --paper-2: var(--panel-2);
  --paper-3: var(--panel-3);
}
.paper-2 { background: var(--paper-2); }

/* ---------- the grid, visible so layout reads as constructed ---------- */

.frame {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--margin);
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--col), minmax(0, 1fr));
  column-gap: var(--gutter);
}

.rules {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(var(--col), minmax(0, 1fr));
  column-gap: var(--gutter);
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--margin);
}
.rules > span { border-left: 1px solid var(--hair); }
.rules > span:last-child { border-right: 1px solid var(--hair); }

/* the content of a section sits above its own rules */
.frame > * { position: relative; z-index: 1; }

/* ---------- type ---------- */

.cap,
.section-eyebrow {
  font-family: var(--label);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}
.section-eyebrow { color: var(--mark); }
.section-eyebrow::before {
  content: '';
  width: 30px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.display, .h-hero, .h-sect, .h-block,
.section-heading, .cta-heading, .page-hero h1 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}

.h-hero { font-size: clamp(2.05rem, 4.7vw, 4.75rem); }
.h-sect,
.section-heading,
.cta-heading { font-size: clamp(1.65rem, 3.1vw, 2.95rem); }
.h-block { font-size: clamp(1.25rem, 1.85vw, 1.75rem); letter-spacing: -0.028em; line-height: 1.08; }
.h-small { font-family: var(--display); font-size: 1.02rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }

.lede,
.page-hero-subtext,
.section-subtext,
.cta-subtext {
  font-size: clamp(1rem, 1.2vw, 1.18rem);
  line-height: 1.55;
  letter-spacing: -0.011em;
  color: var(--ink-2);
  max-width: 48ch;
}
/* a line written to sit on one row on desktop, wrapping only on small screens */
.subtext-wide { max-width: none; }

.body p, .prose p {
  font-size: 1rem;
  line-height: 1.68;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  max-width: var(--measure);
}
.body p + p, .prose p + p { margin-top: 1.1em; }
.body a, .prose a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  transition: border-color var(--t-fast) var(--ease);
}
.body a:hover, .prose a:hover { border-color: var(--ink); }

/* one italic serif line per page, for the sentence that carries weight */
.pull, .callout {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.35rem, 2.25vw, 2.15rem);
  line-height: 1.26;
  letter-spacing: -0.012em;
  color: var(--ink);
  max-width: 32ch;
}

.mono { font-family: var(--label); }
.tnum { font-variant-numeric: tabular-nums; }
.quiet { color: var(--ink-3); }
.text-muted { color: var(--ink-3); }

/* ---------- the section header ---------- */

.record {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(var(--col), minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 60px;
}
.record-head { grid-column: 1 / -1; }
.record-head .section-eyebrow { margin-bottom: 14px; }
.record-head .section-subtext { margin-top: 18px; }
.dot {
  width: 5px;
  height: 5px;
  background: var(--mark);
  flex: none;
}

/* ---------- section rhythm ---------- */

.section, .sect {
  position: relative;
  padding-block: var(--sect-y);
}
.section-tight { padding-block: var(--sect-y-tight); }
.section-loose { padding-block: var(--sect-y-loose); }
.section-inner {
  position: relative;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--margin);
}
.section-divider { height: 1px; background: var(--rule); }

/* ---------- motion: three primitives, nothing else ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* one: rules draw */
  .m-rule {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--t-slow) var(--ease-out);
  }
  .m-rule.is-in { transform: scaleX(1); }

  /* two: type sets, word by word, from behind a mask */
  .m-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.16em;
    margin-bottom: -0.16em;
  }
  .m-word > span {
    display: inline-block;
    transform: translateY(0.42em);
    transition: transform 700ms var(--ease-out);
  }
  .m-word.is-in > span { transform: translateY(0); }

  /* three: blocks settle */
  .m-in {
    opacity: 0.001;
    transform: translateY(9px);
    transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease-out);
  }
  .m-in.is-in { opacity: 1; transform: none; }

  .m-draw .m-draw-path {
    stroke-dasharray: var(--len, 1000);
    stroke-dashoffset: var(--len, 1000);
    transition: stroke-dashoffset 1400ms var(--ease-out);
  }
  .m-draw.is-in .m-draw-path { stroke-dashoffset: 0; }
}

/* the page keeps working with no observer and with motion turned off */
.no-motion .m-in,
.no-motion .m-rule,
.no-motion .m-word > span { opacity: 1; transform: none; }

/* ---------- page-to-page, where the browser supports it ---------- */

@view-transition { navigation: auto; }

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out 180ms var(--ease) both; }
  ::view-transition-new(root) { animation: vt-in 260ms var(--ease-out) both; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
}
.site-header { view-transition-name: site-header; }

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  :root { --margin: 30px; --gutter: 20px; --sect-y: 104px; --sect-y-loose: 124px; }
}

@media (max-width: 720px) {
  :root {
    --col: 4;
    --margin: 18px;
    --gutter: 14px;
    --sect-y: 72px;
    --sect-y-tight: 56px;
    --sect-y-loose: 84px;
  }
  .rules > span:nth-child(n+5) { display: none; }
  .rules > span:nth-child(4) { border-right: 1px solid var(--hair); }
  .record { margin-bottom: 40px; }
  .pull, .callout { max-width: none; }
}
