/* Ularix: the monolith in the void, printed like a rave flyer.
   Layout: a fixed WebGL stage (monolith, warped two-screen halftone smoke) behind everything; content zigzags across
   a 12-column field over giant cropped outline type; tape bands cross the page; a scroll HUD runs along the bottom. */
:root {
  --void: #050506;
  --deep: #0a0b0c;
  --basalt: #111214;
  --hull: #1c1e22;
  --chalk: #f2f1ee;
  --mist: #c6c6c3;
  --ash: #8d9097;
  --amber: #f2a33a;
  --amber-hi: #f7b257;
  --ember: #b8321a;
  --teal: #4fd1c5;
  --panel: rgba(10, 11, 12, .64);
  --line: rgba(242, 241, 238, .09);
  --line-hot: rgba(242, 163, 58, .42);

  --display: "Ularix Archivo", "Archivo", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --text: "Ularix Plex", "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "Ularix Plex Mono", "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --nav: 60px;
  --pad: clamp(16px, 5vw, 56px);
  --gut-l: max(var(--pad), env(safe-area-inset-left, 0px));
  --gut-r: max(var(--pad), env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

@font-face { font-family: "Ularix Archivo"; src: url("fonts/archivo-var.woff") format("woff"); font-weight: 500 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Ularix Plex"; src: url("fonts/plex-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Ularix Plex"; src: url("fonts/plex-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Ularix Plex Mono"; src: url("fonts/plexmono-400.woff") format("woff"); font-weight: 400; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--void); scroll-padding-top: calc(var(--nav) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--void);
  color: var(--mist);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
::selection { background: var(--amber); color: var(--void); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--amber); color: var(--void); padding: 8px 14px; font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

/* ---------- the stage ---------- */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.stage canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s var(--ease); }
html.gl .stage canvas { opacity: 1; }
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .04;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: no-preference) { .grain { animation: grain .9s steps(6) infinite; } }
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-3%, 2%); } 66% { transform: translate(2%, -3%); } 100% { transform: translate(-1%, 1%); } }

.fallback { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity 1s var(--ease); }
html.gl .fallback { opacity: 0; }
.fallback::before {
  content: ""; position: absolute; width: 70vmin; height: 70vmin; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 163, 58, .2), rgba(242, 163, 58, .04) 55%, transparent);
  filter: blur(10px);
}
.fallback i {
  position: relative; display: block; width: min(22vmin, 180px); aspect-ratio: 4 / 9;
  background: linear-gradient(100deg, #15171a, #08090a 45%, #121316);
  border: 1px solid rgba(242, 163, 58, .16); border-top-color: var(--amber);
  box-shadow: 0 0 60px rgba(242, 163, 58, .12), inset 0 1px 0 rgba(242, 163, 58, .5);
}
.fallback i::after { content: ""; position: absolute; left: 40%; width: 20%; top: 35%; aspect-ratio: 1; background: var(--amber); box-shadow: 0 0 24px var(--amber); }
@media (min-width: 900px) { .fallback { justify-items: end; padding-right: 18vw; } }

/* ---------- header + HUD ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--void); }
.top {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 20; height: var(--nav);
  display: flex; align-items: center; gap: 24px;
  padding-left: var(--gut-l); padding-right: var(--gut-r);
  background: linear-gradient(var(--void), rgba(5, 5, 6, .72) 60%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--chalk); font: 800 19px/1 var(--display); letter-spacing: -.01em; }
.brand svg { width: 15px; height: 21px; }
.top nav { margin-left: auto; display: flex; gap: 26px; }
.top nav a { text-decoration: none; color: var(--ash); font-size: 15px; transition: color .2s; }
.top nav a:hover { color: var(--chalk); }
.mailbtn { text-decoration: none; color: var(--amber); font: 400 14px/1 var(--mono); border: 1px solid var(--line-hot); padding: 10px 14px; transition: background .2s, color .2s; }
.mailbtn:hover { background: var(--amber); color: var(--void); }
@media (max-width: 760px) { .top nav { display: none; } .mailbtn { margin-left: auto; } }

.hud {
  position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px;
  padding-left: var(--gut-l); padding-right: var(--gut-r);
  padding-block: 10px calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, rgba(5, 5, 6, .7));
}
.hud .bar { flex: 1; height: 1px; background: var(--line); position: relative; }
.hud .bar i { position: absolute; left: 0; top: -1px; height: 3px; width: calc(var(--prog, 0) * 100%); background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.hud [data-hud-sec] { min-width: 15ch; color: var(--amber); }
.hud [data-hud-pct] { font-variant-numeric: tabular-nums; }

/* ---------- shared ---------- */
main { position: relative; z-index: 2; }
.wrap { padding-left: var(--gut-l); padding-right: var(--gut-r); }
.tag { font: 400 12.5px/1.4 var(--mono); color: var(--ash); letter-spacing: .02em; }
.tag b { color: var(--amber); font-weight: 400; }
h1, h2, h3 { font-family: var(--display); color: var(--chalk); margin: 0; text-wrap: balance; }
.lede { max-width: 34ch; font-size: clamp(17px, 1.5vw, 20px); color: var(--mist); margin: 0; }
.panel { position: relative; background: var(--panel); border: 1px solid var(--line); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.panel::before, .panel::after { content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none; border: 1px solid var(--amber); opacity: .7; }
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* giant cropped outline type: the acid layer behind the content; JS stretches its width axis with the scroll */
.ghost {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 0; margin: 0;
  display: flex; justify-content: center; white-space: nowrap; pointer-events: none; user-select: none;
  font: 900 clamp(84px, 17vw, 300px)/.8 var(--display); letter-spacing: -.045em;
  font-variation-settings: "wdth" var(--wd, 90);
  color: transparent; -webkit-text-stroke: 1px rgba(242, 163, 58, .2);
  transition: -webkit-text-stroke-color .6s var(--ease);
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 980px);
  display: grid; align-content: end; gap: 28px;
  padding-block: calc(var(--nav) + 64px) 84px;
}
.hero h1 { font-size: clamp(46px, 8.4vw, 136px); line-height: .88; letter-spacing: -.035em; font-weight: 850; }
.hero h1 .l { display: block; white-space: nowrap; font-variation-settings: "wdth" 78; }
.hero h1 .o { color: transparent; -webkit-text-stroke: 1.2px rgba(242, 241, 238, .6); }
@supports not (-webkit-text-stroke: 1px black) { .hero h1 .o { color: var(--ash); } }
/* each letter breathes on the width axis, offset from its neighbours: liquid type */
.hero h1 .ch { display: inline-block; font-variation-settings: "wdth" 78; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .ch { animation: breathe 3.6s cubic-bezier(.45, 0, .55, 1) infinite; animation-delay: calc(var(--i, 0) * -.16s); }
}
@keyframes breathe { 0%, 100% { font-variation-settings: "wdth" 64; } 50% { font-variation-settings: "wdth" 112; } }
.hero .row { display: flex; flex-wrap: wrap; align-items: end; gap: 28px 64px; }
.readout { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 22px; margin: 0; }
.readout div { display: grid; gap: 2px; }
.readout dt { font: 400 11.5px/1.3 var(--mono); color: var(--ash); text-transform: uppercase; letter-spacing: .08em; }
.readout dd { margin: 0; font: 800 30px/1 var(--display); color: var(--chalk); font-variant-numeric: tabular-nums; font-variation-settings: "wdth" 70; }
.readout .hot dd { color: var(--amber); }
.cue { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; justify-self: start; }
.cue::before { content: ""; width: 1px; height: 34px; background: linear-gradient(var(--amber), transparent); }
.side { position: absolute; right: var(--gut-r); bottom: 84px; margin: 0; writing-mode: vertical-rl; transform: rotate(180deg); }
@media (max-width: 560px) { .readout { grid-template-columns: repeat(2, auto); } }
@media (max-width: 1100px) { .side { display: none; } }

/* ---------- ULARIX wordmark: a misregistered print, skewed by scroll speed ---------- */
.mark { overflow: hidden; padding-block: 3vw 2vw; }
.mark p {
  margin: 0; display: flex; justify-content: center; white-space: nowrap; user-select: none;
  font: 900 clamp(90px, 25vw, 470px)/.8 var(--display); letter-spacing: -.045em;
  font-variation-settings: "wdth" var(--wd, 90);
  color: transparent; -webkit-text-stroke: 1px rgba(242, 163, 58, .5);
  text-shadow: .045em .02em 0 rgba(184, 50, 26, .15), -.03em -.01em 0 rgba(242, 163, 58, .08);
  transform: skewX(calc(var(--vel, 0) * -14deg));
}
.mark small { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; }

/* ---------- tools: zigzag spreads over each tool's name ---------- */
.tools { padding-block: 14vh 4vh; display: grid; gap: 28px; }
.head { display: grid; gap: 16px; max-width: 640px; }
.head h2 { font-size: clamp(38px, 5.4vw, 78px); line-height: .95; letter-spacing: -.03em; font-weight: 850; font-variation-settings: "wdth" 80; }
.toollist { list-style: none; margin: 0; padding: 0; display: grid; }
.spread {
  position: relative; min-height: 86vh; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center;
  overflow: clip; margin-inline: calc(-1 * var(--gut-l)) calc(-1 * var(--gut-r)); padding-inline: var(--gut-l) var(--gut-r);
}
.spread .tool { grid-row: 1; position: relative; z-index: 1; }
.s-left .tool { grid-column: 1 / span 5; }
.s-right .tool { grid-column: 8 / span 5; }
.s-left2 .tool { grid-column: 2 / span 6; }
.s-mid .tool { grid-column: 4 / span 6; }
.s-left .ghost, .s-left2 .ghost { justify-content: flex-start; padding-left: 2vw; }
.s-right .ghost { justify-content: flex-end; padding-right: 2vw; }
.spread.on .ghost { -webkit-text-stroke-color: rgba(242, 163, 58, .55); }
.tool { padding: clamp(22px, 3vw, 34px); display: grid; gap: 14px; transition: border-color .5s var(--ease), background .5s var(--ease); }
.spread.on .tool { border-color: rgba(242, 163, 58, .32); background: rgba(12, 12, 13, .76); }
.tool header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tool h3 { font-size: clamp(40px, 5vw, 66px); line-height: .9; letter-spacing: -.03em; font-weight: 850; font-variation-settings: "wdth" 72; transition: font-variation-settings .7s var(--ease); }
.tool:hover h3 { font-variation-settings: "wdth" 110; }
.tool .what { margin: 0; color: var(--chalk); font: 600 19px/1.35 var(--text); }
.tool p { margin: 0; }
.tool a.out { justify-self: start; color: var(--amber); font: 400 14px/1 var(--mono); text-decoration: none; border-bottom: 1px solid var(--line-hot); padding-bottom: 4px; }
.tool a.out:hover { color: var(--amber-hi); border-color: var(--amber-hi); }
.status { display: inline-flex; align-items: center; gap: 8px; font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ash); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.use { color: var(--amber); }
.status.live { color: var(--teal); }
.status.live::before { box-shadow: 0 0 10px var(--teal); }
.status.dev::before { background: transparent; border: 1px solid currentColor; }

/* ---------- rave tape: two bands crossing the page ---------- */
.tape { position: relative; z-index: 3; height: clamp(170px, 22vw, 320px); overflow: hidden; }
.tape > div { position: absolute; left: -10%; right: -10%; top: 50%; padding-block: 14px; white-space: nowrap; overflow: hidden; }
.tape-a { background: var(--amber); color: var(--void); transform: translateY(-50%) rotate(-4deg) skewX(calc(var(--vel, 0) * 10deg)); box-shadow: 0 0 60px rgba(242, 163, 58, .25); }
.tape-b { background: var(--void); color: transparent; -webkit-text-stroke: 1px var(--amber); border-block: 1px solid var(--line-hot); transform: translateY(-50%) rotate(3.5deg); }
.tape p { margin: 0; display: inline-block; font: 900 clamp(26px, 4vw, 62px)/1 var(--display); font-variation-settings: "wdth" 70; letter-spacing: -.005em; }
@media (prefers-reduced-motion: no-preference) {
  .tape-a p { animation: run 30s linear infinite; }
  .tape-b p { animation: run 38s linear infinite reverse; }
}
@keyframes run { to { transform: translateX(-50%); } }

/* ---------- how we build: a staircase ---------- */
.how { padding-block: 14vh; display: grid; gap: 40px; }
.how .head { max-width: none; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.steps > li { position: relative; overflow: hidden; align-self: start; padding: clamp(26px, 2.6vw, 36px) clamp(26px, 2.6vw, 36px) clamp(64px, 6vw, 96px); display: grid; gap: 14px; align-content: start; }
.steps > li:nth-child(1) { grid-column: 1 / span 4; }
.steps > li:nth-child(2) { grid-column: 5 / span 4; margin-top: 16vh; }
.steps > li:nth-child(3) { grid-column: 9 / span 4; margin-top: 32vh; }
.steps .big {
  position: absolute; right: -.04em; bottom: -.2em; z-index: 0; pointer-events: none;
  font: 900 clamp(170px, 17vw, 280px)/1 var(--display); font-variation-settings: "wdth" 62;
  color: rgba(242, 163, 58, .04); -webkit-text-stroke: 1.2px rgba(242, 163, 58, .5);
}
.steps > li > :not(.big) { position: relative; z-index: 1; }
.steps .n { font: 400 12.5px/1 var(--mono); color: var(--amber); }
.steps h3 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.02; letter-spacing: -.015em; font-weight: 800; font-variation-settings: "wdth" 85; }
.steps p { margin: 0; max-width: 34ch; }
.chips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font: 400 12px/1 var(--mono); color: var(--amber); border: 1px solid var(--line-hot); padding: 7px 9px; text-transform: uppercase; letter-spacing: .06em; background: rgba(242, 163, 58, .05); }

/* ---------- built in public + contact ---------- */
.follow { position: relative; padding-block: 18vh; min-height: 80vh; display: grid; align-items: center; justify-items: end; overflow: clip; }
.follow .ghost { -webkit-text-stroke-color: rgba(242, 163, 58, .26); font-size: clamp(60px, 13vw, 230px); }
.follow .panel { position: relative; z-index: 1; max-width: 520px; padding: clamp(24px, 3vw, 36px); display: grid; gap: 16px; }
.follow h2, .contact h2 { font-size: clamp(36px, 4.6vw, 66px); line-height: .95; letter-spacing: -.03em; font-weight: 850; font-variation-settings: "wdth" 80; }
.follow p { margin: 0; }
.btn { justify-self: start; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; background: var(--amber); color: var(--void); font: 600 15px/1 var(--text); padding: 14px 18px; transition: background .2s, transform .2s var(--ease); }
.btn:hover { background: var(--amber-hi); }
.btn:active { transform: translateY(1px); }
.contact { padding-block: 22vh 14vh; display: grid; justify-items: center; text-align: center; gap: 18px; }
.contact p { margin: 0; max-width: 46ch; }
.contact .addr {
  font: 800 clamp(30px, 6.6vw, 96px)/1 var(--display); letter-spacing: -.03em; font-variation-settings: "wdth" 75;
  color: var(--chalk); text-decoration: none; overflow-wrap: anywhere; user-select: all;
  text-shadow: 0 0 40px rgba(242, 163, 58, .25);
  transition: color .2s;
}
.contact .addr:hover { color: var(--amber-hi); }

footer.foot {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  padding-block: 28px calc(64px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line); background: linear-gradient(transparent, var(--void) 40%);
}
footer.foot nav { display: flex; gap: 20px; }
footer.foot a { color: var(--ash); text-decoration: none; }
footer.foot a:hover { color: var(--chalk); }

/* ---------- phones ---------- */
@media (max-width: 860px) {
  .spread { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-block: 12vh; }
  .spread .tool, .s-left .tool, .s-right .tool, .s-left2 .tool, .s-mid .tool { grid-column: 1; }
  .ghost { font-size: 24vw; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps > li:nth-child(n) { grid-column: 1; margin-top: 0; }
  .steps > li:nth-child(2) { margin-left: 6vw; }
  .steps > li:nth-child(3) { margin-left: 12vw; }
}
@media (max-width: 760px) {
  :root { --panel: rgba(8, 9, 10, .82); }
  .hero { min-height: auto; padding-block: calc(var(--nav) + 46vh) 64px; }
  .follow { justify-items: stretch; min-height: 0; }
  .hud [data-hud-sec] { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .tool, .tool h3, .contact .addr { transition: none; } .mark p, .tape-a { transform: none; } .tape-a { transform: translateY(-50%) rotate(-4deg); } }
