/* dust — shared shell: tokens, reset, header, footer, buttons. */

:root {
  color-scheme: dark;
  --bg: #0a0908;
  --bg-soft: #0f0d0b;
  --panel: #14110e;
  --panel-2: #191510;
  --line: rgba(231, 201, 154, 0.13);
  --line-strong: rgba(231, 201, 154, 0.26);
  --text: #f4ecdf;
  --muted: #a99d8c;
  --faint: #7d7264;
  --sand: #e7c99a;
  --amber: #e2a45f;
  --ember: #c9683a;
  --green: #9cc9a8;
  --red: #e08e7c;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Ubuntu Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1180px;
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font: 16px/1.65 var(--sans);
  background:
    radial-gradient(1100px 560px at 80% -8%, rgba(226, 164, 95, 0.13), transparent 62%),
    radial-gradient(820px 460px at 6% 4%, rgba(201, 104, 58, 0.08), transparent 58%),
    linear-gradient(180deg, #0c0b09 0%, var(--bg) 45%, #0b0907 100%);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* A fine film of dust over the whole page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(226, 164, 95, 0.28);
  color: #fff8ec;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

.wrap {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

section[id] {
  scroll-margin-top: 88px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--sand);
  color: #201307;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 14px;
}

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

.text-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 18px;
  padding-bottom: 2px;
  color: var(--sand);
  font-size: 0.88rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(231, 201, 154, 0.28);
  transition: border-color 0.16s ease;
}

.text-link:hover {
  border-bottom-color: var(--sand);
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 9, 8, 0.74);
  backdrop-filter: blur(14px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 30px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand svg {
  width: 26px;
  height: 26px;
  color: var(--sand);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav a:not(.btn) {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
  transition: color 0.18s ease;
}

.nav a:not(.btn):hover {
  color: var(--text);
}

.nav .install {
  color: var(--text);
}

/* Buttons --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font: 600 0.92rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.btn-primary {
  background: linear-gradient(180deg, #f2d8ac, var(--amber));
  color: #251607;
  box-shadow: 0 10px 34px -14px rgba(226, 164, 95, 0.7);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 40px -14px rgba(226, 164, 95, 0.85);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--sand);
  background: rgba(231, 201, 154, 0.06);
}

.btn-sm {
  padding: 0.56rem 0.9rem;
  font-size: 0.86rem;
}

/* Footer ---------------------------------------------------------------- */

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 40px;
  padding: 56px 0 40px;
}

.footer-brand p {
  max-width: 30ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-col h2 {
  margin: 2px 0 14px;
  color: var(--faint);
  font: 700 0.7rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--sand);
}

.footer-base {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.8rem;
}

.footer-base span:last-child {
  margin-left: auto;
  font-family: var(--mono);
}

/* Reveal ---------------------------------------------------------------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn {
    transition: none;
  }
}

@media print {
  html.js .reveal {
    opacity: 1;
    transform: none;
  }

  body::before,
  .site-header {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header .wrap {
    gap: 16px;
  }

  .nav {
    gap: 16px;
  }

  .nav .demo-link {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .nav .install {
    display: none;
  }
}

@media (max-width: 460px) {
  .nav .docs-link {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
