:root {
  --bg: #0b0c11; --bg-2: #15161e; --ink: #ebe7df; --dim: #86837c; --line: rgba(235, 231, 223, .14); --acc: #ff5a3c;
  --display: "Lexend Exa", "Arial Black", system-ui, sans-serif; --sans: "Hanken Grotesk", system-ui, sans-serif;
  --serif: var(--sans); --mono: var(--sans);
  --ease: cubic-bezier(.2, .8, .2, 1); --pad: clamp(16px, 4vw, 56px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body { background: var(--bg); color: var(--ink); font: 400 1.05rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
body::after {
  content: ""; position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: .1; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%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");
}
a { color: inherit; }
em { font-style: normal; color: var(--acc); }
::selection { background: var(--acc); color: var(--bg); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 4px; }
.mono { font: 500 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }

nav { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 20px var(--pad); background: rgba(11, 12, 17, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
nav a { text-decoration: none; }
.logo { display: flex; align-items: center; }
.logo img { height: 22px; width: auto; display: block; }
.back { transition: color .3s; }
.back:hover { color: var(--acc); }

header { padding: clamp(60px, 10vw, 130px) var(--pad) clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); }
header .mono { color: var(--dim); }
h1 { font: 800 clamp(1.8rem, 6.4vw, 5.6rem)/1.05 var(--display); text-transform: uppercase; margin: 18px 0 26px; overflow: hidden; }
h1 span { display: inline-block; animation: up 1.1s var(--ease) both; }
h1 span + span { animation-delay: .1s; }
@keyframes up { from { transform: translateY(110%) rotate(3deg); } }
header p { max-width: 56ch; color: var(--dim); }

.doc { display: grid; grid-template-columns: 260px 1fr; gap: clamp(30px, 6vw, 110px); padding: clamp(40px, 6vw, 90px) var(--pad); align-items: start; }
.toc { position: sticky; top: 100px; display: grid; gap: 2px; counter-reset: t; }
.toc a { counter-increment: t; display: flex; gap: 12px; padding: 7px 0; text-decoration: none; color: var(--dim); font-size: .92rem; transition: color .3s, transform .4s var(--ease); }
.toc a::before { content: counter(t, decimal-leading-zero); font: 500 .7rem/2 var(--mono); }
.toc a:hover, .toc a.on { color: var(--ink); transform: translateX(8px); }
.toc a.on::before { color: var(--acc); }
@media (max-width: 820px) { .doc { grid-template-columns: 1fr; } .toc { display: none; } }

article { max-width: 68ch; counter-reset: s; }
article section { counter-increment: s; padding: 34px 0; border-top: 1px solid var(--line); }
article section:first-child { border-top: 0; padding-top: 0; }
article h2 { font: 700 clamp(1.4rem, 2.6vw, 2rem)/1.15 var(--sans); letter-spacing: -.01em; margin-bottom: 14px; }
article h2::before { content: counter(s, decimal-leading-zero); display: block; margin-bottom: 10px; font: 500 .72rem var(--mono); letter-spacing: .12em; color: var(--acc); }
article p, article li { color: #c9c5bc; }
article p + p, article ul { margin-top: 12px; }
article ul { padding-left: 1.2em; display: grid; gap: 6px; }
article li::marker { color: var(--acc); }
article a { text-decoration-color: var(--acc); text-underline-offset: 4px; }

footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 26px var(--pad); background: var(--bg-2); color: var(--dim); }
footer a { text-decoration: none; }
footer a:hover { color: var(--acc); }

.lost { min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding: var(--pad); }
.lost h1 { font-size: clamp(5rem, 27vw, 22rem); line-height: .9; margin: 0; color: var(--acc); }
.lost p { font: 600 clamp(1.4rem, 3.2vw, 2.4rem)/1.15 var(--sans); max-width: 20ch; }
.lost .go { display: inline-block; margin-top: 24px; padding: 16px 28px; border: 1px solid var(--ink); border-radius: 999px; text-decoration: none; transition: background .3s, color .3s; }
.lost .go:hover { background: var(--acc); border-color: var(--acc); color: var(--bg); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

@media (max-width: 760px) {
  nav { padding: 14px var(--pad); }
  h1 { font-size: clamp(1.6rem, 8vw, 2.6rem); }
  article section { padding: 26px 0; }
  footer { flex-direction: column; }
  .lost p { max-width: none; }
}
