/* ==========================================================================
   dulus.ai — dulus.css
   The design system every page loads: tokens, base, layout, components and
   the site-wide pieces (nav, drawer, footer, consent, command palette), in
   that order. No build step, no framework. Styles that belong to one page
   live next to it — home.css, fuel.css, pricing.css … — loaded after this.

   The palette is Brand Kit v1, which is the palette of the golden bird
   itself: #FFD27A → #F5982A → #E0701A, gold #FAD38B, ember #C85C23, on
   #0a0a0b. The site is dark by design — the bird belongs on the night.

   Accent rules, from docs/BRAND_GUIDE.md and the kit:
     · orange is for accents and calls to action, never a section background
     · at most two accent colours in one composition (here: gold + one signal)
     · an accent used as small text uses --gold-ink, which passes AA on --bg
   ========================================================================== */

/* ---------------------------------------------------------------- fonts -- */

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  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";
  src: url("/assets/fonts/jetbrains-mono-symbols.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+B7, U+2022, U+2026, U+2190-2193, U+2197-2198, U+21E7, U+2318, U+2325,
    U+2500-2503, U+250C, U+2510, U+2514, U+2518, U+251C, U+2524, U+252C, U+2534, U+253C,
    U+2550-2551, U+2554, U+2557, U+255A, U+255D, U+2560, U+2563, U+256D-2570, U+2578,
    U+257A, U+2580, U+2584, U+2588, U+2591-2593, U+25A0-25A1, U+25AA-25AB, U+25B6,
    U+25B8-25B9, U+25C0, U+25C6-25C7, U+25CE-25CF, U+2715, U+27E8-27E9;
}

/* --------------------------------------------------------------- tokens -- */

:root {
  color-scheme: dark;

  /* Night */
  --bg: #0a0a0b;
  --bg-1: #0e0d0c;
  --bg-2: #131211;
  --surface: #131316;
  --raised: #17161a;
  --sunk: #070708;

  /* Plumage */
  --gold-hi: #ffe7be;
  --gold-1: #ffd27a;
  --gold: #fad38b;
  --orange: #f5982a;
  --orange-2: #e0701a;
  --ember: #c85c23;
  --gold-ink: #f7b45a; /* accent as small text — 9.4:1 on --bg */
  --plumage: linear-gradient(180deg, var(--gold-1) 0%, var(--orange) 56%, var(--orange-2) 100%);
  --plumage-x: linear-gradient(100deg, var(--gold-hi) 0%, var(--gold-1) 22%, var(--orange) 60%, var(--orange-2) 100%);

  /* Signals — never more than one next to gold */
  --live: #3ee6a0;
  --sky: #6cb8ff;
  --alert: #ffcc4d;
  --danger: #ff6b6b;

  /* Ink. Even the dimmest is text-grade: --ink-4 keeps 4.5:1 (WCAG AA for
     small type) on every dark surface up to #1c1b19. */
  --ink: #f5f5f7;
  --ink-2: #c9c6c0;
  --ink-3: #9c9891;
  --ink-4: #85827d;

  /* Lines — warm hairlines */
  --line: rgba(255, 236, 210, 0.075);
  --line-2: rgba(255, 236, 210, 0.13);
  --line-3: rgba(255, 236, 210, 0.22);
  --line-gold: rgba(250, 211, 139, 0.32);

  /* Type */
  --display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-hero: clamp(3.1rem, 1.2rem + 7.6vw, 8.4rem);
  --fs-1: clamp(2.5rem, 1.1rem + 5vw, 5.4rem);
  --fs-2: clamp(2.1rem, 1.2rem + 3.2vw, 4rem);
  --fs-3: clamp(1.45rem, 1.1rem + 1.2vw, 2.1rem);
  --fs-4: clamp(1.15rem, 1.02rem + 0.5vw, 1.4rem);
  --fs-lede: clamp(1.08rem, 0.98rem + 0.45vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;
  --fs-mono: 0.75rem;

  /* Space */
  --gutter: clamp(20px, 4.2vw, 48px);
  --max: 1220px;
  --max-wide: 1400px;
  --max-text: 40rem;
  --section: clamp(96px, 9vw + 40px, 184px);

  /* Shape */
  --r-xs: 8px;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --pill: 999px;

  /* Depth */
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 18px 40px -18px rgba(0, 0, 0, 0.75);
  --shadow-3: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 40px 120px -40px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 236, 210, 0.06);
  --glow: 0 0 0 1px rgba(255, 210, 122, 0.45) inset, 0 10px 34px -10px rgba(245, 152, 42, 0.75),
    0 1px 0 rgba(255, 255, 255, 0.55) inset;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 160ms;
  --t: 320ms;
  --t-slow: 900ms;

  --nav-h: 64px;
}

/* ----------------------------------------------------------------- base -- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  background: var(--bg);
  hanging-punctuation: first last;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg,
video,
canvas,
picture {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

code,
kbd,
samp,
pre {
  font-family: var(--mono);
  font-size: 0.92em;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

::selection {
  background: var(--orange);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--gold-1);
  outline-offset: 3px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

.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 {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform var(--t) var(--ease);
}
.skip:focus {
  transform: none;
}

/* The film grain sits over everything at a few percent. It is what makes
   flat dark gradients read as light instead of banding. */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .94  0 0 0 0 .86  0 0 0 1.4 -.2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* --------------------------------------------------------------- layout -- */

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--wide {
  max-width: calc(var(--max-wide) + var(--gutter) * 2);
}
.wrap--text {
  max-width: calc(46rem + var(--gutter) * 2);
}

.section {
  position: relative;
  padding-block: var(--section);
}
.section--tight {
  padding-block: calc(var(--section) * 0.6);
}
.section + .section {
  padding-top: calc(var(--section) * 0.72);
}

.stack > * + * {
  margin-top: var(--stack, 1rem);
}

.grid {
  display: grid;
  gap: var(--gap, 20px);
}

/* -------------------------------------------------------------- type ui -- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.eyebrow::before {
  content: "//";
  letter-spacing: 0.04em;
  color: var(--ink-4);
}
.eyebrow--plain::before {
  content: none;
}

.h-hero {
  font-size: var(--fs-hero);
  line-height: 0.9;
  letter-spacing: -0.052em;
  font-weight: 600;
}
.h1 {
  font-size: var(--fs-1);
  line-height: 0.95;
  letter-spacing: -0.048em;
}
.h2 {
  font-size: var(--fs-2);
  line-height: 0.98;
  letter-spacing: -0.042em;
}
.h3 {
  font-size: var(--fs-3);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.h4 {
  font-size: var(--fs-4);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* The serif italic is the voice of the bird: one or two words per headline,
   in plumage. Never a whole sentence. */
.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.012em;
  padding-right: 0.06em;
  background: var(--plumage);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.serif--ink {
  background: none;
  color: var(--ink);
}

.lede {
  font-size: var(--fs-lede);
  line-height: 1.55;
  color: var(--ink-3);
  max-width: var(--max-text);
}
.lede strong {
  color: var(--ink);
  font-weight: 500;
}

.muted {
  color: var(--ink-3);
}
.dim {
  color: var(--ink-4);
}
.mono {
  font-family: var(--mono);
}
.gold {
  color: var(--gold-ink);
}

.sec-head {
  display: grid;
  gap: 22px;
  max-width: 54rem;
}
.sec-head--center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}
.sec-head .lede {
  margin-top: 4px;
}

/* -------------------------------------------------------------- buttons -- */

.btn {
  --lift: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--pill);
  font-family: var(--sans);
  font-size: 0.9875rem;
  font-weight: 560;
  letter-spacing: -0.005em;
  white-space: nowrap;
  isolation: isolate;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
    background-color var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
  transform: translateY(calc(var(--lift) * -1px));
}
.btn:hover {
  --lift: 1;
}
.btn:active {
  --lift: 0;
  transition-duration: 60ms;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn--primary {
  color: #1d1003;
  background: var(--plumage);
  box-shadow: var(--glow);
}
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(120% 140% at 50% 0%, rgba(255, 255, 255, 0.55), transparent 55%);
  opacity: 0.55;
  transition: opacity var(--t) var(--ease);
}
.btn--primary:hover {
  box-shadow: 0 0 0 1px rgba(255, 220, 150, 0.6) inset, 0 16px 44px -10px rgba(245, 152, 42, 0.95),
    0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.btn--primary:hover::after {
  opacity: 0.85;
}

.btn--glass {
  color: var(--ink);
  background: rgba(255, 245, 230, 0.045);
  box-shadow: 0 0 0 1px var(--line-2) inset, 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.btn--glass:hover {
  background: rgba(255, 245, 230, 0.075);
  box-shadow: 0 0 0 1px var(--line-3) inset, 0 1px 0 rgba(255, 255, 255, 0.07) inset;
}

.btn--ghost {
  color: var(--ink-2);
  background: transparent;
  box-shadow: 0 0 0 1px var(--line-2) inset;
}
.btn--ghost:hover {
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-3) inset;
}

.btn--sm {
  height: 38px;
  padding: 0 16px;
  font-size: 0.875rem;
}
.btn--lg {
  height: 56px;
  padding: 0 28px;
  font-size: 1.0625rem;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 500;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--t) var(--ease), color var(--t) var(--ease);
}
.link:hover {
  background-size: 100% 1px;
}
.link svg {
  width: 15px;
  height: 15px;
  transition: transform var(--t) var(--ease);
}
.link:hover svg {
  transform: translateX(3px);
}
.link--gold {
  color: var(--gold-ink);
}

/* `$ pip install dulus` — the command is the call to action. */
.cmd {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  padding: 0 6px 0 18px;
  border-radius: var(--pill);
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--gold);
  background: rgba(245, 152, 42, 0.07);
  box-shadow: 0 0 0 1px rgba(245, 152, 42, 0.28) inset;
  max-width: 100%;
}
.cmd__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmd__text::before {
  content: "$ ";
  color: var(--ink-4);
}
.cmd__copy {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: 6px;
  border-radius: 50%;
  color: var(--ink-3);
  transition: color var(--t-fast), background-color var(--t-fast);
}
.cmd__copy:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}
.cmd__copy svg {
  width: 16px;
  height: 16px;
}
.cmd__copy .i-check {
  display: none;
  color: var(--live);
}
/* Copying needs a script; without one the command is still selectable. */
html:not(.js) .cmd__copy {
  display: none;
}
.cmd__copy[data-copied="true"] .i-copy {
  display: none;
}
.cmd__copy[data-copied="true"] .i-check {
  display: block;
}

/* --------------------------------------------------------------- badges -- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--pill);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-2);
  background: rgba(255, 245, 230, 0.04);
  box-shadow: 0 0 0 1px var(--line-2) inset;
  white-space: nowrap;
}
.chip--mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.chip--gold {
  color: var(--gold);
  background: rgba(245, 152, 42, 0.08);
  box-shadow: 0 0 0 1px rgba(245, 152, 42, 0.3) inset;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 3px rgba(62, 230, 160, 0.16), 0 0 14px rgba(62, 230, 160, 0.8);
  flex: none;
}
.dot--gold {
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(245, 152, 42, 0.18), 0 0 14px rgba(245, 152, 42, 0.8);
}
.dot--pulse {
  animation: pulse 2.4s var(--ease-in-out) infinite;
}

/* -------------------------------------------------------------- surface -- */

/* A card is a sheet of dark glass with a warm hairline and a light that
   follows the pointer (--mx/--my are written by main.js). */
.card {
  --mx: 50%;
  --my: 0%;
  --spot: 0;
  position: relative;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 245, 230, 0.035), rgba(255, 245, 230, 0.012)), var(--bg-1);
  box-shadow: 0 0 0 1px var(--line) inset, var(--shadow-2);
  overflow: hidden;
  isolation: isolate;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--mx) var(--my), rgba(250, 211, 139, 0.085), transparent 42%);
  opacity: var(--spot);
  transition: opacity var(--t) var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(250, 211, 139, 0.55), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: var(--spot);
  transition: opacity var(--t) var(--ease);
}
.card:hover {
  --spot: 1;
}
.card__pad {
  padding: clamp(22px, 2.6vw, 34px);
}

.panel {
  border-radius: var(--r);
  background: var(--sunk);
  box-shadow: 0 0 0 1px var(--line) inset;
}

.hr {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent);
}

/* --------------------------------------------------------------- icons --- */

.ico {
  width: 22px;
  height: 22px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico-tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: var(--gold);
  background: linear-gradient(180deg, rgba(250, 211, 139, 0.16), rgba(245, 152, 42, 0.05));
  box-shadow: 0 0 0 1px rgba(250, 211, 139, 0.22) inset, 0 8px 20px -10px rgba(245, 152, 42, 0.6);
}

/* ------------------------------------------------------------------ nav -- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  padding: 12px var(--gutter) 0;
  pointer-events: none;
}
.nav__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: var(--max-wide);
  height: var(--nav-h);
  padding: 0 10px 0 18px;
  border-radius: 20px;
  transition: background-color var(--t) var(--ease), box-shadow var(--t) var(--ease),
    max-width var(--t-slow) var(--ease), -webkit-backdrop-filter var(--t), backdrop-filter var(--t);
}
.nav[data-stuck="true"] .nav__bar {
  max-width: 1120px;
  background: rgba(14, 13, 12, 0.72);
  box-shadow: 0 0 0 1px var(--line-2) inset, 0 20px 50px -24px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding-right: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.045em;
  color: var(--ink);
}
.brand img {
  width: 30px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(245, 152, 42, 0.45));
  transition: transform var(--t-slow) var(--spring);
}
.brand:hover img {
  transform: rotate(-8deg) translateY(-2px);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 14px;
}
.nav__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 13px;
  border-radius: var(--pill);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--ink-3);
  transition: color var(--t-fast), background-color var(--t-fast);
}
.nav__links a:hover {
  color: var(--ink);
  background: rgba(255, 245, 230, 0.05);
}
.nav__links a[aria-current="page"] {
  color: var(--ink);
}
.nav__end {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.nav__gh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--pill);
  font-size: 0.875rem;
  color: var(--ink-3);
  transition: color var(--t-fast), background-color var(--t-fast);
}
.nav__gh:hover {
  color: var(--ink);
  background: rgba(255, 245, 230, 0.05);
}
.nav__gh svg {
  width: 18px;
  height: 18px;
}

.lang {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 3px;
  border-radius: var(--pill);
  box-shadow: 0 0 0 1px var(--line-2) inset;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
.lang a {
  display: grid;
  place-items: center;
  height: 28px;
  padding: 0 9px;
  border-radius: var(--pill);
  color: var(--ink-4);
  transition: color var(--t-fast), background-color var(--t-fast);
}
.lang a:hover {
  color: var(--ink);
}
.lang a[aria-current="true"] {
  color: var(--bg);
  background: var(--ink);
}

.nav__menu {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  place-items: center;
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-2) inset;
}
.nav__menu svg {
  width: 20px;
  height: 20px;
}

/* Between the full bar and the menu button the links tighten and GitHub
   keeps only its mark (its aria-label names it), so longer languages fit. */
@media (max-width: 1180px) {
  .nav__links {
    margin-left: 4px;
  }
  .nav__links a {
    padding: 0 10px;
  }
  .nav__gh {
    padding: 0 10px;
  }
  .nav__gh span {
    display: none;
  }
}
@media (max-width: 980px) {
  .nav__links,
  .nav__gh {
    display: none;
  }
  .nav__menu {
    display: grid;
  }
}
@media (max-width: 560px) {
  .nav__end .lang,
  .nav__end .btn {
    display: none;
  }
}

/* The drawer is a full-screen sheet; main.js makes the rest of the page
   inert while it is open and returns focus to the button that opened it. */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  padding: 18px var(--gutter) 32px;
  background: rgba(10, 10, 11, 0.94);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t) var(--ease), visibility 0s linear var(--t);
}
.drawer[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--t) var(--ease), visibility 0s;
}
.drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.drawer__links {
  display: grid;
  margin-top: 36px;
}
.drawer__links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 2px;
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  border-bottom: 1px solid var(--line);
  transform: translateY(12px);
  opacity: 0;
  transition: transform var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease);
}
.drawer[data-open="true"] .drawer__links a {
  transform: none;
  opacity: 1;
}
.drawer__links a:nth-child(2) { transition-delay: 40ms; }
.drawer__links a:nth-child(3) { transition-delay: 80ms; }
.drawer__links a:nth-child(4) { transition-delay: 120ms; }
.drawer__links a:nth-child(5) { transition-delay: 160ms; }
.drawer__links a:nth-child(6) { transition-delay: 200ms; }
.drawer__end {
  display: grid;
  gap: 12px;
  margin-top: auto;
}
.drawer__end .btn {
  width: 100%;
}

/* --------------------------------------------------------------- footer -- */

.footer {
  position: relative;
  padding: clamp(72px, 9vw, 120px) 0 36px;
  border-top: 1px solid var(--line);
  background: radial-gradient(80% 60% at 50% 120%, rgba(245, 152, 42, 0.08), transparent 70%), var(--bg);
  overflow: hidden;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
}
.footer__brand p {
  margin-top: 16px;
  max-width: 22rem;
  color: var(--ink-3);
  font-size: var(--fs-sm);
}
.footer h2 {
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 16px;
}
.footer li + li {
  margin-top: 10px;
}
.footer li a,
.footer li button {
  font-size: var(--fs-sm);
  color: var(--ink-3);
  transition: color var(--t-fast);
  text-align: left;
}
.footer li a:hover,
.footer li button:hover {
  color: var(--ink);
}
.footer__mark {
  margin-top: clamp(56px, 8vw, 110px);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(5rem, 23vw, 22rem);
  line-height: 0.74;
  letter-spacing: -0.07em;
  text-align: center;
  color: transparent;
  background: linear-gradient(180deg, rgba(250, 211, 139, 0.22), rgba(250, 211, 139, 0) 82%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
}
.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--ink-4);
}
.footer__base .mono {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
}
@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
}

/* -------------------------------------------------------------- consent -- */
/* consent.js renders this; the markup is .consent > .consent__body + .consent__actions. */

.consent {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 150;
  display: grid;
  gap: 14px;
  width: min(380px, calc(100vw - 32px));
  padding: 18px;
  border-radius: var(--r);
  background: rgba(19, 18, 17, 0.92);
  box-shadow: 0 0 0 1px var(--line-2) inset, 0 30px 80px -20px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}
.consent[data-open="true"] {
  opacity: 1;
  transform: none;
}
.consent__title {
  font-weight: 600;
  font-size: var(--fs-sm);
}
.consent__text {
  margin-top: 6px;
  font-size: var(--fs-xs);
  line-height: 1.55;
  color: var(--ink-3);
}
.consent__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 560px) {
  .consent {
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    gap: 10px;
    padding: 14px 14px 12px;
    border-radius: 16px;
  }
  .consent__title {
    font-size: 0.875rem;
  }
  .consent__text {
    margin-top: 4px;
    font-size: 0.75rem;
    line-height: 1.5;
  }
  .consent__actions .btn {
    flex: 1;
  }
}

/* --------------------------------------------------------------- reveal -- */
/* Decoration that can never delete the page: elements are only hidden under
   html.js, main.js reveals on geometry (not isIntersecting), and a deadline
   reveals anything still pending. */

html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out), filter 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
html.js .reveal.is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Headline words rise one by one (main.js wraps them in .w > span). */
.w {
  display: inline-block;
  overflow: clip;
  overflow-clip-margin: 0.32em;
  vertical-align: top;
  padding: 0 0.04em 0.22em;
  margin: 0 -0.04em -0.22em;
}
html.js .split .w > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(var(--wi, 0) * 55ms + var(--split-delay, 0ms));
}
html.js .split.is-in .w > span {
  transform: none;
}
/* background-clip: text does not reach into transformed children, so a
   split serif accent paints its plumage per word instead of on the <em>.
   Without JavaScript nothing is split and the <em> keeps its own. */
html.js .split .serif {
  background: none;
  color: inherit;
}
html.js .split .serif .w > span {
  padding: 0 0.08em 0.14em 0;
  margin: 0 -0.08em -0.14em 0;
  background: var(--plumage);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (forced-colors: active) {
  .split .serif .w > span {
    color: CanvasText;
    background: none;
  }
}

/* First-screen entrances run on CSS alone, from the first paint: the hero
   must never wait for a script to become visible. */
.rise {
  animation: rise 1s var(--ease-out) both;
  animation-delay: var(--d, 0ms);
}
.hero h1 > span {
  animation: rise 1.1s var(--ease-out) 60ms both;
}
.hero h1 > .serif {
  animation: rise 1.2s var(--ease-out) 180ms both;
}

/* ------------------------------------------------------------ keyframes -- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(6px);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(0.82);
  }
}
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-14px) rotate(-1.2deg);
  }
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@keyframes shimmer {
  from {
    background-position: -200% 0;
  }
  to {
    background-position: 200% 0;
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* -------------------------------------------------------- accessibility -- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
  html.js .reveal,
  html.js .split .w > span {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  * {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .nav[data-stuck="true"] .nav__bar,
  .drawer,
  .consent {
    background: var(--bg-2);
  }
}

@media (forced-colors: active) {
  .grain,
  .card::before,
  .card::after {
    display: none;
  }
  .serif {
    color: CanvasText;
    background: none;
  }
  .btn {
    border: 1px solid ButtonText;
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .nav[data-stuck="true"] .nav__bar,
  .drawer,
  .consent {
    background: var(--bg-2);
  }
}

/* ---------------------------------------------------------- nav extras -- */

.nav__menu--close {
  display: grid;
}
.footer__legal {
  margin-top: 28px;
  max-width: 52rem;
  font-size: var(--fs-xs);
  color: var(--ink-4);
}

/* ------------------------------------------------------------- palette -- */
/* "/" or ⌘K anywhere: the site behaves like the CLI it sells. */

.nav__cmd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px 0 11px;
  border-radius: var(--pill);
  color: var(--ink-3);
  box-shadow: 0 0 0 1px var(--line-2) inset;
  transition: color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
}
.nav__cmd:hover {
  color: var(--ink);
  background: rgba(255, 245, 230, 0.04);
  box-shadow: 0 0 0 1px var(--line-3) inset;
}
.nav__cmd .ico {
  width: 16px;
  height: 16px;
}
.nav__cmd kbd,
.palette kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  background: rgba(255, 245, 230, 0.06);
  box-shadow: 0 0 0 1px var(--line-2) inset, 0 1px 0 rgba(0, 0, 0, 0.4);
}
html:not(.js) .nav__cmd {
  display: none;
}
@media (max-width: 980px) {
  .nav__cmd {
    display: none;
  }
}

.palette {
  width: min(640px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 120px));
  margin: 12vh auto auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  background: rgba(17, 16, 15, 0.94);
  box-shadow: 0 0 0 1px var(--line-2) inset, 0 40px 120px -20px rgba(0, 0, 0, 0.95), 0 0 80px -30px rgba(245, 152, 42, 0.35);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.palette[open] {
  display: flex;
  animation: palette-in 260ms var(--ease-out) both;
}
.palette::backdrop {
  background: rgba(5, 5, 6, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
@keyframes palette-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
  }
}
.palette__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 58px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
}
.palette__head .ico {
  width: 18px;
  height: 18px;
}
.palette__input {
  flex: 1;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 1.02rem;
  color: var(--ink);
}
.palette__input::placeholder {
  color: var(--ink-4);
}
.palette__list {
  overflow-y: auto;
  padding: 6px 8px 10px;
  overscroll-behavior: contain;
}
.palette__label {
  padding: 12px 10px 6px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.palette__list a,
.palette__list button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 0.95rem;
  text-align: left;
  color: var(--ink-2);
  outline: 0;
}
.palette__list a .ico,
.palette__list button .ico {
  width: 18px;
  height: 18px;
  color: var(--ink-4);
}
.palette__list span {
  flex: 1;
}
.palette__list code {
  font-size: 0.75rem;
  color: var(--ink-4);
}
.palette__list [aria-selected="true"] {
  color: var(--ink);
  background: rgba(245, 152, 42, 0.09);
  box-shadow: 0 0 0 1px rgba(245, 152, 42, 0.22) inset;
}
.palette__list [aria-selected="true"] .ico,
.palette__list [aria-selected="true"] code {
  color: var(--gold-ink);
}
.palette__list [data-copied="true"] code {
  color: var(--live);
}
.palette__empty {
  padding: 28px 18px 32px;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--ink-3);
}
.palette__foot {
  display: flex;
  gap: 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--ink-4);
}
.palette__foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
@media (prefers-reduced-transparency: reduce) {
  .palette {
    background: var(--bg-2);
  }
}
