/* Ularix, direction A "Black Monolith". The system lives in design/DESIGN.md: change it there first. */
@font-face { font-family: "Archivo"; src: url(fonts/archivo-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex"; src: url(fonts/plex-sans-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url(fonts/plex-sans-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --void: #050506;       /* page */
  --deep: #0a0b0c;       /* alternate section */
  --basalt: #111214;     /* raised surfaces (plates) */
  --hull: #1c1e22;       /* hairlines */
  --chalk: #f2f1ee;      /* text */
  --mist: #c6c6c3;       /* long body text */
  --ash: #8d9097;        /* secondary text */
  --amber: #f2a33a;      /* the one action colour, the monolith's light, live */
  --amber-hi: #f7b257;   /* button hover */
  --teal: #4fd1c5;       /* "in use" status */
  --display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --text: "Plex", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --nav: 56px;
  --pad: clamp(20px, 5vw, 48px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--void); color: var(--chalk); font: 400 1.0625rem/1.55 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #000; padding: 8px 14px; z-index: 99; }
.skip:focus { left: 8px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.2vw, 5.6rem); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(2.2rem, 5vw, 4.5rem); line-height: 1.05; letter-spacing: -0.03em; }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.15; letter-spacing: -0.02em; }
p { text-wrap: pretty; }
.dim { color: var(--ash); }
.lead { font-size: clamp(1.15rem, 1.7vw, 1.45rem); line-height: 1.45; color: var(--mist); max-width: 34ch; margin: 28px 0 0; }
.sub { font-size: clamp(1.1rem, 1.5vw, 1.35rem); color: var(--ash); max-width: 46ch; margin: 20px 0 0; }

/* buttons: square-cut, flat, no pill */
.btn { display: inline-flex; align-items: center; height: 48px; padding: 0 1.4em; border-radius: 3px;
  font: 600 1rem/1 var(--text); color: #1a1003; background: var(--amber); text-decoration: none;
  transition: transform .18s var(--ease), background-color .2s; }
.btn:hover { background: var(--amber-hi); text-decoration: none; }
.btn:active { transform: scale(.97); transition-duration: .06s; }

/* nav: the one glass surface */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav); background: rgb(5 5 6 / .72);
  backdrop-filter: saturate(160%) blur(20px); -webkit-backdrop-filter: saturate(160%) blur(20px); border-bottom: 1px solid rgb(255 255 255 / .07); }
@media (prefers-reduced-transparency: reduce) { .nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--void); } }
.nav-in { max-width: 1200px; margin: 0 auto; height: 100%; padding: 0 var(--pad); display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--chalk); font: 700 1.15rem/1 var(--display); letter-spacing: -0.02em; }
.brand svg { width: 16px; height: 22px; }
.brand:hover { text-decoration: none; }
.nav nav { display: flex; gap: 28px; margin-left: auto; }
.nav nav a { color: var(--ash); font-size: .95rem; }
.nav nav a:hover { color: var(--chalk); text-decoration: none; }
.nav-mail { font-size: .95rem; padding: 7px 12px; border: 1px solid rgb(242 163 58 / .45); border-radius: 3px; }
.nav-mail:hover { text-decoration: none; background: rgb(242 163 58 / .1); }
@media (max-width: 720px) { .nav nav { display: none; } .nav-mail { margin-left: auto; } }

/* the opening: headline + monolith; with motion the section is tall and the stage stays pinned while the slab opens */
.intro { --p: 0; position: relative; }
.stage { min-height: calc(100svh - var(--nav)); display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(32px, 5vw, 80px);
  max-width: 1280px; margin: 0 auto; padding: clamp(40px, 6vh, 80px) var(--pad); }
.hint { margin: 40px 0 0; font-size: .9rem; color: var(--ash); display: none; }
.mono { position: relative; height: min(600px, 70svh); display: grid; place-items: center; }
.slab { position: absolute; inset: 0 34%; border-radius: 2px;
  background: linear-gradient(180deg, #1b1c20 0%, #0d0e10 60%, var(--void) 100%);
  box-shadow: inset 1px 0 0 rgb(242 163 58 / .25), inset -1px 0 0 rgb(255 255 255 / .05); }
.slab .edge { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--amber), transparent); }
.mono::before { content: ""; position: absolute; inset: 15% 10%; background: radial-gradient(closest-side, rgb(242 163 58 / .13), transparent); filter: blur(30px); }
.plates { position: relative; list-style: none; margin: 0; padding: 0; width: min(100%, 460px); display: grid; gap: 10px; }
.plates li { --q: 1; }
.plates li:nth-child(1) { --i: 0; } .plates li:nth-child(2) { --i: 1; } .plates li:nth-child(3) { --i: 2; } .plates li:nth-child(4) { --i: 3; } .plates li:nth-child(5) { --i: 4; }
.plates a { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; padding: 0 22px;
  background: var(--basalt); border: 1px solid var(--hull); border-left: 2px solid var(--hull); border-radius: 3px; color: var(--chalk);
  transition: border-color .2s, background-color .2s; }
.plates a:hover { text-decoration: none; background: #17181b; border-left-color: var(--amber); }
.plates b { font: 700 clamp(1.15rem, 1.8vw, 1.5rem)/1 var(--display); letter-spacing: -0.02em; }
.plates li:last-child a { border-left-color: var(--amber); }

/* status: always a word, the dot only repeats it */
.st { font-size: .9rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st.live { color: var(--amber); }
.st.use { color: var(--teal); }
.st.dev { color: var(--ash); }
.st.dev::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }

@media (prefers-reduced-motion: no-preference) {
  html.motion .intro { height: 260svh; }
  html.motion .stage { position: sticky; top: var(--nav); height: calc(100svh - var(--nav)); min-height: 0; }
  html.motion .hint { display: block; opacity: calc(1 - var(--p) * 5); }
  html.motion .intro-copy { transform: translateY(calc(var(--p) * -40px)); }
  html.motion .slab { transform: scaleX(calc(1 + var(--p) * 1.9)) scaleY(calc(1 - var(--p) * .12)); opacity: calc(1 - var(--p) * .75); }
  html.motion .slab .edge { transform: translateY(calc(var(--p) * min(560px, 66svh))); }
  html.motion .plates li { opacity: calc(var(--q) * 1.6); transform-origin: 50% 50%;
    transform: translateY(calc((2 - var(--i)) * 74px * (1 - var(--q)))) scaleX(calc(.22 + .78 * var(--q))); }
  html.motion .plates li b, html.motion .plates li .st { opacity: calc(var(--q) * 2 - 1); }
  html.motion .plates li a { visibility: visible; }
  html.motion .plates li:focus-within, html.motion .plates li:focus-within b, html.motion .plates li:focus-within .st { opacity: 1; transform: none; }
  .intro-copy { animation: rise .9s var(--ease) both; }
  .slab { animation: slab-in 1.4s .1s var(--ease) both; transform-origin: 50% 100%; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @keyframes slab-in { from { opacity: 0; } }
}

/* the tools: one wide band each, an amber line drawing across the top as it scrolls in */
main section { padding: clamp(88px, 13vw, 168px) 0; }
main section.intro { padding: 0; }
.tools { border-top: 1px solid var(--hull); padding-bottom: 0; }
.tool { --p: .5; position: relative; overflow: hidden; background: linear-gradient(var(--hull), var(--hull)) 0 0 / 100% 1px no-repeat; padding: clamp(56px, 9vw, 120px) 0; margin-top: clamp(40px, 6vw, 72px); }
.tool + .tool { margin-top: 0; }
.tool::before { content: ""; position: absolute; left: 0; top: 0; height: 1px; width: 100%; background: var(--amber); transform-origin: 0 50%; transform: scaleX(0); }
.tool .wrap { position: relative; }
.tool-body { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px 64px; align-items: start; }
.tool-head { display: grid; gap: 10px; justify-items: start; }
.tool-body h3 { font-size: clamp(2.2rem, 4.4vw, 4rem); letter-spacing: -0.035em; margin: 0 0 4px; }
.tool.live h3 { color: var(--amber); }
.tool-body .role { margin: 0; font-weight: 600; font-size: 1.15rem; }
.tool-body .desc { margin: 0; color: var(--mist); font-size: clamp(1.0625rem, 1.3vw, 1.2rem); }
.tool-body .st { margin-top: 6px; }
.tool { --em: clamp(96px, 10vw, 136px); }
.tool-main { padding-top: calc(var(--em) + 24px); }
.tool-main .btn { margin-top: 24px; }
@media (max-width: 820px) {
  .tool-body { grid-template-columns: 1fr; gap: 20px; }
  .tool-main { padding-top: 0; }
}

/* emblems: a line drawing of each tool's job on a small plate; amber marks the one thing that matters */
.emblem { width: var(--em); height: auto; aspect-ratio: 1; padding: calc(var(--em) * .14); margin-bottom: 14px; overflow: hidden;
  background: radial-gradient(circle, rgb(255 255 255 / .07) 1px, transparent 1.2px) 0 0 / 10px 10px, var(--basalt);
  border: 1px solid var(--hull); border-radius: 3px; transition: border-color .3s; }
.tool:hover .emblem { border-color: rgb(242 163 58 / .5); }
.emblem .ln { fill: none; stroke: var(--chalk); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.emblem .ln.dim { stroke: var(--ash); stroke-opacity: .55; }
.emblem .amb { fill: var(--amber); }
.emblem .fill-ash { fill: var(--ash); }
.emblem .hub { fill: var(--void); }
.emblem .node { fill: var(--basalt); stroke: var(--chalk); stroke-width: 2; }
.em-bridge .ln { stroke: var(--ash); stroke-width: 1.5; }
.em-qm .chk { fill: none; stroke: var(--chalk); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.em-qm .c2 { stroke: var(--amber); }
.em-mimic .row rect { fill: var(--ash); }
.em-mimic .row .odd { fill: var(--amber); }
.em-nav .needle { transform: rotate(-18deg); }
.em-nav .needle, .em-overseer .iris, .em-bridge .node { transform-box: fill-box; transform-origin: center; }

/* idle motion, one per emblem; with reduced motion they hold a still frame */
@media (prefers-reduced-motion: no-preference) {
  html.motion .em-overseer .iris { animation: look 7s var(--ease) infinite; }
  html.motion .em-bridge .flow { stroke-dasharray: 3 5; animation: flow 1.6s linear infinite; }
  html.motion .em-bridge .node { animation: ping 4s var(--ease) infinite; }
  html.motion .em-bridge .n2 { animation-delay: 1s; } html.motion .em-bridge .n3 { animation-delay: 2s; } html.motion .em-bridge .n4 { animation-delay: 3s; }
  html.motion .em-qm .feed { animation: feed 2.4s linear infinite; }
  html.motion .em-qm .chk { stroke-dasharray: 1; animation: tick 4.8s var(--ease) infinite; }
  html.motion .em-qm .c2 { animation-name: tick2; }
  html.motion .em-nav .needle { animation: seek 6s var(--ease) infinite; }
  html.motion .em-mimic .lens { animation: scan 5s var(--ease) infinite; }
  html.motion .em-mimic .odd { animation: found 5s var(--ease) infinite; }
  @keyframes look { 0%, 22% { transform: none; } 32%, 52% { transform: translateX(-8px); } 62%, 84% { transform: translateX(8px); } 94%, 100% { transform: none; } }
  @keyframes flow { to { stroke-dashoffset: -8; } }
  @keyframes ping { 0%, 15%, 100% { transform: none; } 7% { transform: scale(1.5); } }
  @keyframes feed { to { transform: translateY(-8px); } }
  @keyframes tick { 0%, 10% { stroke-dashoffset: 1; opacity: 1; } 28%, 86% { stroke-dashoffset: 0; opacity: 1; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }
  @keyframes tick2 { 0%, 38% { stroke-dashoffset: 1; opacity: 1; } 56%, 86% { stroke-dashoffset: 0; opacity: 1; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }
  @keyframes seek { 0% { transform: rotate(-18deg); } 25% { transform: rotate(40deg); } 45% { transform: rotate(-30deg); } 62%, 88% { transform: rotate(12deg); } 100% { transform: rotate(-18deg); } }
  @keyframes scan { 0%, 8% { transform: none; } 40%, 70% { transform: translateX(32.5px); } 92%, 100% { transform: none; } }
  @keyframes found { 0%, 36%, 74%, 100% { opacity: .35; } 42%, 68% { opacity: 1; } }
}
@media (prefers-reduced-motion: no-preference) {
  html.motion .tool::before { transform: scaleX(min(1, calc(var(--p) * 2.4))); }
}
@media (prefers-reduced-motion: reduce) { .tool::before { transform: none; } }
html:not(.motion) .tool::before { transform: none; }

/* how we build: a line that fills as you read */
.how { --f: 1; background: var(--deep); border-top: 1px solid var(--hull); }
.how-in { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.line { position: relative; padding-left: 40px; display: grid; gap: clamp(48px, 9vh, 96px); }
.line::before, .line .fill { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: var(--hull); }
.line .fill { background: var(--amber); transform-origin: 50% 0; transform: scaleY(var(--f)); }
.step h3 { position: relative; }
.step h3::before { content: ""; position: absolute; left: -45px; top: .35em; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); box-shadow: inset 0 0 0 2px var(--amber); }
.step p { color: var(--ash); font-size: 1.15rem; max-width: 40ch; margin: 10px 0 0; }
@media (prefers-reduced-motion: no-preference) {
  html.motion .step { opacity: .3; transition: opacity .5s var(--ease); }
  html.motion .step.on { opacity: 1; }
  html.motion .step h3::before { background: var(--void); transition: background-color .3s; }
  html.motion .step.on h3::before { background: var(--amber); }
}
@media (max-width: 820px) { .how-in { grid-template-columns: 1fr; } }

.follow { text-align: center; border-top: 1px solid var(--hull); }
.follow .sub, .contact .sub { margin-left: auto; margin-right: auto; }
.handle { font: 700 clamp(2.6rem, 8vw, 6.5rem)/1 var(--display); letter-spacing: -0.04em; color: var(--chalk); margin: 48px 0 36px; }
.contact { text-align: center; background: radial-gradient(60% 50% at 50% 100%, rgb(242 163 58 / .10), transparent), var(--void); border-top: 1px solid var(--hull); }
.mail { display: inline-block; margin-top: 40px; font: 700 clamp(1.7rem, 5vw, 3.6rem)/1.1 var(--display); letter-spacing: -0.03em; color: var(--amber); overflow-wrap: anywhere; }

.foot { padding: 32px 0 48px; color: var(--ash); font-size: .9rem; border-top: 1px solid var(--hull); }
.foot .wrap { display: flex; gap: 24px; flex-wrap: wrap; }
.foot span { margin-right: auto; }
.foot a { color: var(--ash); }
.foot a:hover { color: var(--chalk); }

@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; align-content: center; gap: 28px; padding-top: 28px; padding-bottom: 28px; }
  .mono { height: min(400px, 48svh); }
  .plates { gap: 7px; }
  .plates a { height: 50px; padding: 0 16px; }
  .slab { inset: 0 36%; }
  .lead { margin-top: 18px; }
  .hint { margin-top: 18px; }
}
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) {
  html.motion .plates li { transform: translateY(calc((2 - var(--i)) * 57px * (1 - var(--q)))) scaleX(calc(.22 + .78 * var(--q))); }
  html.motion .slab .edge { transform: translateY(calc(var(--p) * min(380px, 46svh))); }
}

/* legal pages and 404: the same system, no motion, a reading column */
.page { padding: clamp(64px, 10vw, 128px) 0 clamp(80px, 12vw, 144px); }
.page .wrap { max-width: calc(68ch + 2 * var(--pad)); }
.page h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin-bottom: 24px; }
.page h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.02em; margin: 56px 0 14px; padding-top: 24px; border-top: 1px solid var(--hull); }
.page p, .page li { color: var(--mist); }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: 12px; }
.page strong { color: var(--chalk); font-weight: 600; }
.page .meta { color: var(--ash); font-size: .95rem; }
.page .btn { margin-top: 24px; }
.todo { color: var(--amber); border: 1px dashed rgb(242 163 58 / .5); padding: 0 6px; border-radius: 3px; }
