/* Smeltery: the forge design system.
   Dark iron-black first (the owner picked black over the brown variant), with a light theme.
   Every colour is a token; translucent tints come from color-mix(). */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage-var.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Hanken"; src: url("../fonts/hanken-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-var.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Pixelify"; src: url("../fonts/pixelify-var.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --accent: #ff4a1c;       /* molten red */
  --accent-2: #ff6a2b;
  --ember: #ff7a1a;
  --amber: #ffb22e;
  --gold: #ffd76a;
  --copper: #d9824a;
  --steel: #a9b4bf;
  --on-accent: #1a0b05;

  --bg: #0c0a09; --bg-2: #151210; --bg-3: #1e1916;
  --line: rgb(255 200 170 / .085); --line-2: rgb(255 200 170 / .16);
  --text: #f5ede6; --text-2: #bdb0a6; --text-3: #85796f;
  --code-bg: #100c0a; --code-line: rgb(255 190 140 / .09);
  --shadow: 0 30px 80px -30px rgb(0 0 0 / .7);

  --font-display: "Bricolage", "Hanken", system-ui, sans-serif;
  --font-text: "Hanken", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --font-pixel: "Pixelify", var(--font-mono);
  --radius: 10px; --radius-lg: 16px; --radius-xl: 24px;
  --header-h: 64px;
  --wrap: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --accent: #c42d14; --accent-2: #d63a1c; --ember: #c95a10; --amber: #a86a05; --gold: #8d6400; --copper: #9c5428;
  --on-accent: #fff;
  --bg: #f8f0e6; --bg-2: #fffaf4; --bg-3: #f0e2d2;
  --line: rgb(70 35 15 / .12); --line-2: rgb(70 35 15 / .21);
  --text: #1e130d; --text-2: #5a4436; --text-3: #85705f;
  --code-bg: #1a110c;
  --shadow: 0 30px 70px -35px rgb(80 40 10 / .35);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --accent: #c42d14; --accent-2: #d63a1c; --ember: #c95a10; --amber: #a86a05; --gold: #8d6400; --copper: #9c5428;
    --on-accent: #fff;
    --bg: #f8f0e6; --bg-2: #fffaf4; --bg-3: #f0e2d2;
    --line: rgb(70 35 15 / .12); --line-2: rgb(70 35 15 / .21);
    --text: #1e130d; --text-2: #5a4436; --text-3: #85705f;
    --code-bg: #1a110c;
    --shadow: 0 30px 70px -35px rgb(80 40 10 / .35);
    color-scheme: light;
  }
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.65 var(--font-text); font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { overflow-x: clip; display: block; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.06; letter-spacing: -.025em; margin: 0 0 .5em; text-wrap: balance; }
code, kbd, pre { font-family: var(--font-mono); font-size: .88em; }
:not(pre) > code { background: color-mix(in srgb, var(--accent) 10%, var(--bg-3)); border: 1px solid var(--line); padding: .08em .4em; border-radius: 6px; overflow-wrap: anywhere; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--text); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.molten { background: linear-gradient(100deg, var(--accent) 0%, var(--ember) 45%, var(--amber) 80%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="light"] .molten { background: linear-gradient(100deg, #b8240f, #c95a10 60%, #a86a05); -webkit-background-clip: text; background-clip: text; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --b: var(--line-2);
  display: inline-flex; align-items: center; gap: .55em; padding: .82em 1.3em; border-radius: 999px;
  font: 600 15px/1 var(--font-text); text-decoration: none; border: 1px solid var(--b); color: var(--text);
  background: color-mix(in srgb, var(--bg-3) 60%, transparent); cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .3s, background .3s, border-color .3s;
}
.btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--ember) 55%, transparent); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff; border-color: transparent;
  box-shadow: 0 0 0 1px rgb(255 120 60 / .35) inset, 0 10px 30px -10px color-mix(in srgb, var(--accent) 80%, transparent), 0 0 24px -6px color-mix(in srgb, var(--ember) 70%, transparent);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgb(255 160 90 / .5) inset, 0 14px 36px -10px var(--accent), 0 0 40px -6px var(--ember); }
.btn-sm { padding: .6em 1em; font-size: 14px; }
.btn svg { width: 18px; height: 18px; }
.cmd-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 9px 9px 16px; border-radius: 999px;
  font: 500 14px/1 var(--font-mono); background: var(--code-bg); color: #f3e3d3; border: 1px solid var(--line-2);
}
.cmd-pill .p { color: var(--ember); }
:root[data-theme="light"] .cmd-pill .p { color: #ff8a3a; }
.copy-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgb(255 200 160 / .18); background: rgb(255 255 255 / .04); color: #e9d6c4; cursor: pointer; }
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn.ok { color: #9be39b; border-color: #9be39b55; }

/* ---------------------------------------------------------------- header + mega menu */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--header-h); border-bottom: 1px solid transparent; transition: background .3s, border-color .3s; }
.topbar.is-scrolled, .topbar.is-open, body.page-docs .topbar { background: color-mix(in srgb, var(--bg) 96%, transparent); border-bottom-color: var(--line); }
.topbar-inner { height: 100%; width: min(1400px, 100% - 32px); margin-inline: auto; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 20px/1 var(--font-display); letter-spacing: -.02em; }
.brand span { background: linear-gradient(90deg, var(--text), color-mix(in srgb, var(--text) 70%, var(--ember))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topnav { display: flex; align-items: center; gap: 2px; margin-right: auto; }
.mm-trigger, .mm-plain {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; border: 0; background: none;
  color: var(--text-2); font: 500 15px/1 var(--font-text); cursor: pointer; text-decoration: none; transition: color .2s, background .2s;
}
.mm-trigger svg { width: 12px; height: 12px; transition: transform .25s; }
.mm-trigger:hover, .mm-plain:hover, .mm-item.open .mm-trigger, .mm-plain[aria-current] { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.mm-item.open .mm-trigger svg { transform: rotate(180deg); }
.mm-panel {
  position: absolute; left: 50%; top: calc(var(--header-h) - 6px); translate: -50% 0; width: min(1160px, 100vw - 32px);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  box-shadow: var(--shadow), 0 0 0 1px rgb(0 0 0 / .2); padding: 22px; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .22s, transform .3s var(--ease), visibility 0s .3s;
}
.mm-panel::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; background: radial-gradient(600px 160px at 50% 0, color-mix(in srgb, var(--ember) 12%, transparent), transparent 70%); }
.mm-item.open .mm-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .22s, transform .3s var(--ease); }
.mm-grid { position: relative; display: grid; gap: 22px; }
.mm-framework { grid-template-columns: 1.05fr 1.9fr 1fr 1.1fr; }
.mm-resources { grid-template-columns: 1fr 2fr; }
.mm-h { font: 600 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin: 4px 0 12px; }
.mm-link { display: block; padding: 9px 10px; border-radius: 10px; text-decoration: none; }
.mm-link b { display: block; font-weight: 600; font-size: 15px; }
.mm-link small, .mm-fam small, .mm-kind small { display: block; color: var(--text-3); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.mm-link:hover, .mm-fam:hover, .mm-eco:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.mm-fams { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mm-fam { display: flex; gap: 12px; padding: 10px; border-radius: 12px; text-decoration: none; align-items: flex-start; }
.mm-fam b { font-size: 15px; }
.mm-ico { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--fa) 12%, var(--bg-3)); border: 1px solid color-mix(in srgb, var(--fa) 30%, transparent); box-shadow: 0 0 18px -8px var(--fa); }
.pix { image-rendering: pixelated; }
.mm-list { display: flex; flex-direction: column; }
.mm-list a { padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--text-2); font-size: 15px; }
.mm-list a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }
.mm-list .mm-all { color: var(--ember); margin-top: 6px; }
.mm-start { border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--bg-3)), var(--bg-2) 70%); }
.mm-start-q { font: 600 13px/1.3 var(--font-mono); color: var(--amber); margin-bottom: 10px; }
.mm-kind { display: grid; grid-template-columns: 14px 1fr; column-gap: 8px; padding: 8px; border-radius: 10px; text-decoration: none; }
.mm-kind small { grid-column: 2; }
.mm-kind:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.mm-dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.mm-dot-2 { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.mm-cmd { display: block; margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: var(--code-bg); color: #f3e3d3; font-size: 13px; }
.mm-ecos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.mm-eco { display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; text-decoration: none; border: 1px solid transparent; }
.mm-eco svg { grid-row: span 2; }
.mm-eco b { font-size: 15px; }
.mm-eco small { color: var(--text-3); font-size: 12.5px; }
.mm-eco:hover { border-color: color-mix(in srgb, var(--fa) 35%, transparent); }
.mm-crates { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 14px; }
.mm-crate { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 8px; font: 500 13.5px/1.3 var(--font-mono); }
.mm-crate a { text-decoration: none; color: var(--text-2); }
.mm-crate a:hover { color: var(--text); }
.mm-crate .mm-dr { color: var(--text-3); font-size: 12px; }
.topbar-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--text-2); cursor: pointer; text-decoration: none; transition: color .2s, border-color .2s; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn svg { width: 19px; height: 19px; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 12px; border-radius: 10px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-3) 50%, transparent); color: var(--text-3); font: 500 14px var(--font-text); cursor: pointer; }
.search-btn svg { width: 16px; height: 16px; }
.search-btn:hover { color: var(--text-2); border-color: var(--line-2); }
.kbd { font: 600 11px/1 var(--font-mono); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text-3); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .theme-toggle .i-sun { display: none; } :root:not([data-theme="dark"]) .theme-toggle .i-moon { display: block; } }
.menu-toggle { display: none; }

@media (max-width: 1080px) {
  .search-label, .search-btn .kbd { display: none; }
  .search-btn { width: 38px; padding: 0; justify-content: center; }
  .mm-framework { grid-template-columns: 1fr 1.6fr 1fr; }
  .mm-framework .mm-col:last-child { display: none; }
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; }
  .topbar-cta { display: none; }
  .topnav {
    position: fixed; inset: var(--header-h) 0 0 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 16px 40px;
    background: var(--bg); overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s;
  }
  .topbar.is-open .topnav { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .3s var(--ease); }
  .mm-item { border-bottom: 1px solid var(--line); }
  .mm-trigger, .mm-plain { width: 100%; justify-content: space-between; padding: 16px 4px; font-size: 18px; color: var(--text); }
  .mm-plain { border-bottom: 1px solid var(--line); border-radius: 0; }
  .mm-panel { position: static; translate: none; width: auto; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: none; padding: 0 0 16px; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .mm-panel::before { display: none; }
  .mm-item.open .mm-panel { display: block; }
  .mm-framework, .mm-resources { grid-template-columns: 1fr; }
  .mm-framework .mm-col:last-child { display: block; }
  .mm-fams { grid-template-columns: 1fr; }
  .brand span { font-size: 19px; }
}
@media (max-width: 420px) { .topbar-tools .icon-btn[aria-label*="GitHub"] { display: none; } }

/* ---------------------------------------------------------------- sections */
.sec { position: relative; padding: clamp(80px, 12vw, 150px) 0; }
.sec-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 60px); }
.sec-head.center { margin-inline: auto; text-align: center; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font: 600 12px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); margin-bottom: 18px; }
.kicker::before { content: ""; width: 22px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--amber)); border-radius: 2px; }
.center .kicker::after { content: ""; width: 22px; height: 2px; background: linear-gradient(90deg, var(--amber), var(--accent)); border-radius: 2px; }
.h2 { font-size: clamp(36px, 5.4vw, 68px); }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); max-width: 640px; }
.center .lede { margin-inline: auto; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--text-2); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 14px; height: 14px; border-radius: 4px; background: color-mix(in srgb, var(--fa, var(--ember)) 18%, transparent); border: 1px solid color-mix(in srgb, var(--fa, var(--ember)) 55%, transparent); }
.ticks li::after { content: ""; position: absolute; left: 6.5px; top: calc(.42em + 3px); width: 3.5px; height: 6.5px; border: solid var(--fa, var(--ember)); border-width: 0 2px 2px 0; rotate: 40deg; }
.glow-line { height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ember) 60%, transparent), transparent); }

/* reveals */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }
.is-static .reveal, .no-js .reveal { opacity: 1; transform: none; transition: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------------------------------------------------------------- code blocks */
.code { position: relative; background: var(--code-bg); border: 1px solid var(--code-line); border-radius: var(--radius); overflow: hidden; color: #eedfd2; min-width: 0; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--code-line); background: rgb(255 255 255 / .02); min-height: 40px; }
.code-label { font: 500 12.5px/1 var(--font-mono); color: #b99c86; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code pre { margin: 0; padding: 16px 18px; overflow: auto; font-size: 13.5px; line-height: 1.7; tab-size: 4; }
.code pre code { font-size: inherit; background: none; border: 0; padding: 0; }
.code-copy { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; border: 1px solid rgb(255 200 160 / .14); background: none; color: #b99c86; cursor: pointer; flex: none; }
.code-copy:hover { color: #f3e3d3; border-color: rgb(255 200 160 / .3); }
.code-copy svg { width: 14px; height: 14px; }
.code-copy.ok { color: #9be39b; }
/* fire palette for pygments */
.hl .k, .hl .kd, .hl .kn, .hl .kr, .hl .kp, .hl .kc, .hl .ow { color: #ff6b3d; }
.hl .kt, .hl .nc, .hl .nn { color: #e9a066; }
.hl .s, .hl .s1, .hl .s2, .hl .sb, .hl .sc, .hl .sh, .hl .se, .hl .si, .hl .sx, .hl .dl { color: #ffcf6e; }
.hl .c, .hl .c1, .hl .cm, .hl .cs, .hl .ch { color: #8c7867; font-style: italic; }
.hl .cp, .hl .cpf { color: #ff9a62; font-style: normal; }
.hl .m, .hl .mi, .hl .mf, .hl .mh, .hl .il { color: #ffb24a; }
.hl .nf, .hl .fm { color: #ffe0a8; }
.hl .nb, .hl .bp { color: #f0a070; }
.hl .nd, .hl .fm, .hl .na, .hl .nt { color: #ff8f5a; }
.hl .nv, .hl .vi { color: #f6d7bd; }
.hl .o, .hl .p { color: #c9ad98; }
.hl .gp { color: #ff7a1a; }
.hl .err { color: inherit; background: none; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; }
.hero-pin { position: relative; height: 230vh; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 640px; display: grid; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg::before { /* isometric grid */
  content: ""; position: absolute; inset: -10%;
  background-image:
    linear-gradient(30deg, var(--line) 1px, transparent 1px),
    linear-gradient(150deg, var(--line) 1px, transparent 1px);
  background-size: 56px 32.3px; opacity: .55;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 68% 55%, #000 25%, transparent 75%); mask-image: radial-gradient(ellipse 70% 65% at 68% 55%, #000 25%, transparent 75%);
}
.hero-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(800px 520px at 72% 60%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%), radial-gradient(600px 400px at 10% 100%, color-mix(in srgb, var(--ember) 10%, transparent), transparent 70%); }
.hero-grid { position: relative; width: min(1320px, 100% - 40px); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: center; gap: 40px; padding-top: var(--header-h); }
.hero-copy { position: relative; z-index: 2; }
.hero-badge { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--bg-3) 70%, transparent); font: 500 13px/1 var(--font-mono); color: var(--text-2); margin-bottom: 26px; text-decoration: none; }
.hero-badge b { padding: 5px 9px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--ember)); color: #fff; font-weight: 600; }
.hero h1 { font-size: clamp(46px, 7.2vw, 104px); line-height: .96; letter-spacing: -.045em; font-weight: 750; margin-bottom: 26px; font-variation-settings: "opsz" 96; }
.hero-intro { font-size: clamp(17px, 1.55vw, 20px); color: var(--text-2); max-width: 560px; margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 30px; }
.hero-scroll { position: absolute; left: 50%; bottom: 26px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 10px; font: 600 11px/1 var(--font-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); transition: opacity .4s; }
.hero-scroll i { width: 1px; height: 40px; background: linear-gradient(var(--ember), transparent); animation: drip 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.stack-wrap { position: relative; aspect-ratio: 1 / 1; width: 100%; max-height: calc(100svh - var(--header-h) - 40px); justify-self: center; }
.stack-svg { width: 100%; height: 100%; overflow: visible; }
.stack-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stack-block { cursor: pointer; }
.stack-block .lift { transition: transform .35s var(--ease); }
.stack-block:hover .lift, .stack-block:focus-visible .lift { transform: translateY(-10px); }
.stack-block:focus { outline: none; }
.stack-tip { position: absolute; z-index: 3; pointer-events: none; padding: 9px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bg-2) 94%, transparent); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13.5px; line-height: 1.4; max-width: 260px; opacity: 0; translate: -50% -110%; transition: opacity .2s; }
.stack-tip b { display: block; font: 700 14px/1.2 var(--font-display); color: var(--tip, var(--amber)); margin-bottom: 2px; }
.stack-tip.on { opacity: 1; }
.badge-chip { font: 600 10.5px var(--font-mono); letter-spacing: .02em; }

@media (max-width: 960px) {
  .hero-pin { height: auto; }
  .hero-stage { position: relative; height: auto; min-height: 0; padding: calc(var(--header-h) + 40px) 0 60px; overflow: visible; }
  .hero-grid { grid-template-columns: 1fr; padding-top: 0; gap: 10px; }
  .stack-wrap { max-width: 560px; width: 100%; max-height: none; }
  .hero-scroll { display: none; }
}

/* ---------------------------------------------------------------- forged-from strip */
.forged { border-block: 1px solid var(--line); padding: 26px 0; position: relative; background: color-mix(in srgb, var(--bg-2) 60%, transparent); }
.forged-inner { display: flex; align-items: center; gap: 36px; }
.forged-label { flex: none; font: 600 12px/1.3 var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); }
.forged-list { display: flex; flex-wrap: wrap; gap: 10px 34px; align-items: center; }
.forged-list a { font: 600 19px/1 var(--font-display); color: var(--text-2); text-decoration: none; letter-spacing: -.01em; transition: color .2s; }
.forged-list a:hover { color: var(--text); }
.forged-list a span { font: 500 11px var(--font-mono); color: var(--text-3); margin-left: 6px; letter-spacing: .04em; }
@media (max-width: 760px) { .forged-inner { flex-direction: column; align-items: flex-start; gap: 16px; } .forged-list { gap: 12px 22px; } .forged-list a { font-size: 17px; } }

/* ---------------------------------------------------------------- installer section */
.start-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 70px); align-items: end; margin-bottom: clamp(30px, 4vw, 50px); }
.start-copy .h2 { max-width: 620px; }
.start-copy .lede { margin-bottom: 0; }
.three-cmds { margin: 0 0 16px; }
.start-side .small-note { margin-bottom: 8px; }
.small-note { font-size: 14.5px; color: var(--text-3); }
.small-note code { font-size: .9em; }
@media (max-width: 960px) { .start-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- the forge journey */
.journey { position: relative; }
.journey-intro { padding-bottom: clamp(40px, 6vw, 70px); }
.forge-stage { position: sticky; top: 0; height: 100vh; height: 100lvh; overflow: hidden; z-index: 0; background: #0a0605; }
.forge-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.forge-px { image-rendering: pixelated; image-rendering: crisp-edges; }
.forge-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgb(8 4 2 / .82) 0%, rgb(8 4 2 / .45) 34%, transparent 58%), linear-gradient(180deg, rgb(8 4 2 / .6), transparent 18%, transparent 82%, rgb(8 4 2 / .85)); }
.forge-hud { position: absolute; z-index: 2; right: 26px; top: calc(var(--header-h) + 22px); display: flex; gap: 6px; }
.forge-hud span { width: 22px; height: 4px; border-radius: 2px; background: rgb(255 220 190 / .16); transition: background .4s, box-shadow .4s; }
.forge-hud span.on { background: var(--hud, #ff7a1a); box-shadow: 0 0 10px var(--hud, #ff7a1a); }
.stations { position: relative; z-index: 1; margin-top: -100vh; margin-top: -100lvh; }
.station { min-height: 100vh; min-height: 100lvh; display: flex; align-items: center; padding: calc(var(--header-h) + 30px) 0 60px; }
.station-card {
  --fa: #ff7a1a;
  width: min(clamp(470px, 40vw, 640px), 100%); margin-left: max(20px, calc((100vw - 1320px) / 2)); color: #f7ede3;
  padding: 30px 30px 26px; border-radius: var(--radius-xl); position: relative;
  background: linear-gradient(160deg, rgb(30 18 12 / .93), rgb(14 8 6 / .9)); border: 1px solid rgb(255 200 160 / .12);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / .8), inset 0 1px 0 rgb(255 230 200 / .06);
  opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.station.in .station-card, .is-static .station-card { opacity: 1; transform: none; }
.station-card::before { content: ""; position: absolute; left: 30px; right: 30px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--fa), transparent); }
.st-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.st-ico { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--fa) 16%, #1e130d); border: 1px solid color-mix(in srgb, var(--fa) 40%, transparent); box-shadow: 0 0 26px -8px var(--fa); }
.st-step { font: 500 13px/1 var(--font-pixel); color: var(--fa); letter-spacing: .06em; text-transform: uppercase; display: block; margin-bottom: 6px; }
.station-card h3 { font-size: clamp(30px, 3.4vw, 44px); margin: 0; color: #fff4ea; }
.st-tag { font: 500 15px/1.35 var(--font-display); color: #e7cdb6; margin: 0 0 12px; font-size: 19px; letter-spacing: -.01em; }
.station-card p { color: #d8c2b0; font-size: 16px; }
.station-card .ticks li { color: #d8c2b0; font-size: 15px; }
.station-card .code { margin-top: 16px; }
.station-card .code pre { font-size: 12.5px; max-height: 240px; }
.st-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; font: 600 14px var(--font-text); }
.st-links a { color: var(--fa); text-decoration: none; }
.st-links a:hover { text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.chips li { font: 500 12px/1 var(--font-mono); padding: 6px 9px; border-radius: 7px; background: rgb(255 220 190 / .06); border: 1px solid rgb(255 220 190 / .1); color: #e3cbb6; }
.journey-outro { position: relative; z-index: 1; }
@media (max-width: 860px) {
  .forge-stage::after { background: linear-gradient(180deg, rgb(8 4 2 / .55), transparent 16%, transparent 40%, rgb(8 4 2 / .92) 64%); }
  .station { align-items: flex-end; padding: 0 0 22px; }
  .station-card { margin: 0 12px; width: auto; padding: 22px 20px 20px; }
  .station-card h3 { font-size: 30px; }
  .st-tag { font-size: 17px; }
  .station-card .code { display: none; }
  .forge-hud { right: 50%; translate: 50% 0; top: calc(var(--header-h) + 10px); }
  .forge-hud span { width: 14px; }
}

/* ---------------------------------------------------------------- web app ⇄ agents */
.dual-toggle { display: inline-flex; padding: 5px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); position: relative; margin: 6px auto 34px; }
.dual-toggle button { position: relative; z-index: 1; border: 0; background: none; color: var(--text-2); font: 600 15px/1 var(--font-text); padding: 12px 22px; border-radius: 999px; cursor: pointer; transition: color .3s; }
.dual-toggle button[aria-pressed="true"] { color: #fff; }
.dual-toggle .knob { position: absolute; top: 5px; bottom: 5px; left: 5px; border-radius: 999px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: 0 0 22px -4px var(--accent); transition: transform .45s var(--ease), width .45s var(--ease); }
.dual-panels { display: grid; }
.dual-panel { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; transition: opacity .45s, transform .45s var(--ease); }
.dual-panel[hidden] { display: grid; opacity: 0; transform: translateY(12px); pointer-events: none; visibility: hidden; }
.dual-panel .code pre { max-height: 440px; }
.center-x { text-align: center; }
@media (max-width: 860px) { .dual-panel { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- everything in the box */
.box-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr); gap: clamp(30px, 5vw, 64px); align-items: start; }
.box-list { margin-top: 26px; }
.tabs-card { border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--code-bg); overflow: hidden; box-shadow: var(--shadow); }
.tab-list { display: flex; gap: 2px; padding: 8px; overflow-x: auto; border-bottom: 1px solid var(--code-line); scrollbar-width: thin; }
.tab-list button { flex: none; border: 0; background: none; color: #a88f7b; font: 500 13px/1 var(--font-mono); padding: 9px 12px; border-radius: 8px; cursor: pointer; transition: color .2s, background .2s; }
.tab-list button:hover { color: #f3e3d3; }
.tab-list button[aria-selected="true"] { color: #fff; background: rgb(255 120 60 / .16); box-shadow: inset 0 0 0 1px rgb(255 120 60 / .35); }
.tab-panel { min-height: 460px; }
.tab-panel .code { border: 0; border-radius: 0; }
.tab-panel .code + .code { border-top: 1px solid var(--code-line); }
.tab-panel .code pre { max-height: 520px; }
@media (max-width: 960px) { .box-grid { grid-template-columns: 1fr; } .tab-panel { min-height: 0; } }

/* ---------------------------------------------------------------- watchfire */
.wf { background: radial-gradient(1000px 500px at 50% 0, color-mix(in srgb, var(--amber) 9%, transparent), transparent 70%); }
.wf-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: clamp(30px, 5vw, 64px); align-items: center; }
.wf-points { display: grid; gap: 18px; margin-top: 28px; }
.wf-point { display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
.wf-point i { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--amber) 12%, var(--bg-3)); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); font: 700 15px var(--font-pixel); color: var(--amber); font-style: normal; }
.wf-point b { display: block; font: 700 17px/1.3 var(--font-display); margin-bottom: 3px; }
.wf-point p { margin: 0; color: var(--text-2); font-size: 15.5px; }
.dash { border-radius: var(--radius-lg); background: #120b08; border: 1px solid rgb(255 200 160 / .12); box-shadow: var(--shadow), 0 0 80px -40px var(--amber); overflow: hidden; color: #f2e4d8; font-size: 14px; }
.dash-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid rgb(255 200 160 / .09); background: rgb(255 255 255 / .02); }
.dash-bar b { font: 700 15px var(--font-display); }
.dash-bar .url { margin-left: auto; font: 500 12px var(--font-mono); color: #a98d77; }
.dash-live { display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--font-mono); color: #8ee08e; letter-spacing: .08em; }
.dash-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #6fe06f; box-shadow: 0 0 8px #6fe06f; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.dash-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 14px 16px 6px; }
.dash-tile { padding: 12px; border-radius: 10px; background: rgb(255 255 255 / .03); border: 1px solid rgb(255 200 160 / .08); }
.dash-tile small { display: block; font: 500 11px var(--font-mono); color: #a98d77; text-transform: uppercase; letter-spacing: .08em; }
.dash-tile b { font: 700 24px/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.dash-rows { padding: 8px 16px 16px; display: grid; gap: 6px; }
.dash-row { display: grid; grid-template-columns: 1.3fr 1.05fr .9fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgb(255 255 255 / .025); border: 1px solid rgb(255 200 160 / .06); font: 500 13px var(--font-mono); }
.dash-row .nm { color: #fff1e4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state { display: inline-flex; align-items: center; gap: 7px; font: 600 12px var(--font-mono); white-space: nowrap; }
.state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.state.running { color: #7fe07f; }
.state.backing_off { color: #ffb22e; }
.state.starting { color: #8ec5ff; }
.state.paused { color: #b9a596; }
.state.failed { color: #ff6b5a; }
.dash-row .meta { color: #a98d77; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-row .acts { display: flex; gap: 4px; }
.dash-row .acts span { font: 600 11px var(--font-text); padding: 5px 8px; border-radius: 6px; border: 1px solid rgb(255 200 160 / .14); color: #d9c3b0; }
.dash-runs { border-top: 1px solid rgb(255 200 160 / .08); padding: 12px 16px 16px; }
.dash-runs p { margin: 0 0 8px; font: 600 11px var(--font-mono); color: #a98d77; letter-spacing: .1em; text-transform: uppercase; }
.dash-log { font: 500 12px/1.7 var(--font-mono); color: #cdb6a2; height: 104px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.dash-log .ok { color: #7fe07f; } .dash-log .warn { color: #ffb22e; } .dash-log .err { color: #ff6b5a; }
@media (max-width: 960px) { .wf-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .dash-tiles { grid-template-columns: repeat(2, 1fr); }
  .dash-row { grid-template-columns: 1fr auto; }
  .dash-row .meta { grid-column: 1 / -1; order: 3; }
  .dash-row .acts { display: none; }
  .dash-bar .url { display: none; }
}

/* ---------------------------------------------------------------- deploy */
.deploy-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 22px; align-items: stretch; }
.term { border-radius: var(--radius-lg); background: #120b08; border: 1px solid rgb(255 200 160 / .12); box-shadow: var(--shadow); overflow: hidden; color: #eedfd2; display: flex; flex-direction: column; }
.term-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 11px 14px; border-bottom: 1px solid rgb(255 200 160 / .08); background: rgb(255 255 255 / .025); }
.term-dots { display: flex; gap: 7px; }
.term-dots i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.term-dots i:nth-child(2) { background: #febc2e; } .term-dots i:nth-child(3) { background: #28c840; }
.term-title { font: 500 12.5px var(--font-mono); color: #a98d77; }
.term-body { padding: 16px 18px; font: 500 13.5px/1.75 var(--font-mono); height: 340px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.term-body .pr { color: #ff7a1a; } .term-body .dim { color: #8c7867; } .term-body .ok { color: #7fe07f; } .term-body .hot { color: #ffcf6e; }
.term-body .caret { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: #ff7a1a; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.layout-card { border-radius: var(--radius-lg); border: 1px solid var(--line-2); background: var(--bg-2); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.layout-card h3 { font-size: 22px; margin: 0; }
.layout-card p { color: var(--text-2); font-size: 15px; margin: 0; }
.procs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.proc { border-radius: 12px; border: 1px solid var(--line-2); padding: 12px; background: var(--bg-3); font: 500 13px var(--font-mono); }
.proc b { display: block; font: 700 15px var(--font-display); margin-bottom: 4px; }
.proc small { color: var(--text-3); }
.proc-shared { grid-column: 1 / -1; text-align: center; border-style: dashed; background: color-mix(in srgb, var(--amber) 8%, var(--bg-3)); }
.deploy-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.fact { border-radius: var(--radius-lg); border: 1px solid var(--line); padding: 20px; background: var(--bg-2); }
.fact b { display: block; font: 700 18px/1.25 var(--font-display); margin-bottom: 6px; }
.fact p { margin: 0; color: var(--text-2); font-size: 15px; }
@media (max-width: 960px) { .deploy-grid, .deploy-facts { grid-template-columns: 1fr; } .term-body { height: 300px; font-size: 12.5px; } }

/* ---------------------------------------------------------------- secure */
.gates { position: relative; border-radius: var(--radius-xl); border: 1px solid var(--line-2); background: linear-gradient(180deg, var(--bg-2), color-mix(in srgb, var(--bg-2) 60%, var(--bg))); padding: 30px 26px 26px; overflow: hidden; margin-bottom: 26px; }
.gates svg { width: 100%; height: auto; overflow: visible; }
.gate-label { font: 600 12px var(--font-mono); fill: var(--text-2); }
.gate-sub { font: 500 10.5px var(--font-mono); fill: var(--text-3); }
.sec-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sec-card { border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--bg-2); padding: 20px; transition: border-color .3s, transform .3s var(--ease); }
.sec-card:hover { border-color: color-mix(in srgb, var(--fa) 45%, transparent); transform: translateY(-2px); }
.sec-card h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 12px; }
.sec-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sec-card li { font-size: 14px; line-height: 1.5; color: var(--text-2); padding-left: 14px; position: relative; }
.sec-card li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 1px; background: var(--fa); }
.sec-close { text-align: center; margin: 34px auto 0; max-width: 720px; font: 500 18px/1.5 var(--font-display); color: var(--text-2); }
@media (max-width: 1100px) { .sec-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .sec-cards { grid-template-columns: 1fr; } .gates { padding: 18px 10px; } }

/* ---------------------------------------------------------------- CTA */
.cta { text-align: center; padding: clamp(110px, 16vw, 200px) 0; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; left: 50%; bottom: -260px; width: 900px; height: 520px; translate: -50% 0; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 38%, transparent), color-mix(in srgb, var(--ember) 12%, transparent) 55%, transparent); }
.cta h2 { position: relative; font-size: clamp(48px, 8vw, 120px); letter-spacing: -.045em; margin-bottom: 18px; }
.cta p { position: relative; color: var(--text-2); font-size: 20px; margin-bottom: 34px; }
.cta .hero-cta { justify-content: center; position: relative; }

/* ---------------------------------------------------------------- inner pages */
.page-hero { padding: calc(var(--header-h) + clamp(50px, 8vw, 100px)) 0 clamp(30px, 5vw, 60px); position: relative; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 300px at 20% 0, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); pointer-events: none; }
.page-hero h1 { font-size: clamp(42px, 6vw, 80px); letter-spacing: -.04em; position: relative; }
.page-hero .lede { position: relative; }
.eco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; padding-bottom: 120px; }
.eco-card { border-radius: var(--radius-xl); border: 1px solid var(--line); background: linear-gradient(170deg, color-mix(in srgb, var(--fa) 9%, var(--bg-2)), var(--bg-2) 55%); padding: 26px; scroll-margin-top: calc(var(--header-h) + 20px); transition: border-color .3s; }
.eco-card:hover, .eco-card:target { border-color: color-mix(in srgb, var(--fa) 50%, transparent); }
.eco-card:target { box-shadow: 0 0 0 1px color-mix(in srgb, var(--fa) 40%, transparent), 0 0 60px -20px var(--fa); }
.eco-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.eco-head svg { flex: none; padding: 8px; width: 64px; height: 64px; border-radius: 16px; background: color-mix(in srgb, var(--fa) 13%, var(--bg-3)); border: 1px solid color-mix(in srgb, var(--fa) 35%, transparent); }
.eco-head h2 { font-size: 30px; margin: 0; }
.eco-plain { margin: 2px 0 0; font: 500 13px var(--font-mono); color: var(--fa); }
:root[data-theme="light"] .eco-plain { color: var(--text-2); }
.eco-line { color: var(--text-2); }
.eco-links { display: flex; flex-wrap: wrap; gap: 16px; margin: 18px 0 0; font-weight: 600; font-size: 15px; }
.eco-links a { color: var(--ember); text-decoration: none; }
.eco-links a:hover { text-decoration: underline; }
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; padding-bottom: 120px; align-items: start; }
.form { display: grid; gap: 16px; padding: 28px; border-radius: var(--radius-xl); border: 1px solid var(--line-2); background: var(--bg-2); }
.form label { display: grid; gap: 7px; font-weight: 600; font-size: 15px; }
.form input, .form textarea { font: 400 16px var(--font-text); color: var(--text); background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ember) 25%, transparent); }
.form textarea { min-height: 170px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 14px 16px; border-radius: 12px; border: 1px solid; font-weight: 500; }
.notice.ok { color: #7fe07f; border-color: #7fe07f55; background: #7fe07f12; }
.notice.err { color: #ff8f7a; border-color: #ff8f7a55; background: #ff8f7a12; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- footer */
.footer { position: relative; border-top: 1px solid var(--line); padding: 70px 0 30px; overflow: hidden; }
.footer-glow { position: absolute; left: 50%; top: -1px; width: 60%; height: 1px; translate: -50% 0; background: linear-gradient(90deg, transparent, var(--ember), transparent); }
.footer-inner { width: min(var(--wrap), 100% - 40px); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 40px; }
.footer-brand p { color: var(--text-2); font-size: 15px; max-width: 380px; margin-top: 14px; }
.footer-meta { font: 500 12.5px var(--font-mono) !important; color: var(--text-3) !important; }
.footer-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; }
.footer-cols a { display: block; color: var(--text-2); text-decoration: none; font-size: 15px; padding: 4px 0; overflow-wrap: anywhere; }
.footer-cols a:hover { color: var(--text); }
.footer-fam { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
.footer-h { font: 600 11.5px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.footer-legal { width: min(var(--wrap), 100% - 40px); margin: 50px auto 0; padding-top: 24px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13.5px; }
.footer-legal a { color: var(--text-2); }
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr; } .footer-cols { grid-template-columns: 1fr 1fr; } .footer-cols > div:first-child { grid-column: 1 / -1; } }

/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 120px 20px; }
.notfound h1 { font-size: clamp(80px, 16vw, 200px); margin: 0; }

/* ---------------------------------------------------------------- small animations */
.chan-flow { animation: flow 1.4s linear infinite; animation-delay: var(--dl, 0s); }
@keyframes flow { to { stroke-dashoffset: -52; } }
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: lick 1.1s ease-in-out infinite alternate; animation-delay: var(--fd, 0s); }
@keyframes lick { 0% { transform: scaleY(.75) skewX(-4deg); opacity: .8; } 100% { transform: scaleY(1.15) skewX(5deg); opacity: 1; } }
.pour { stroke-dasharray: 10 6; animation: flow 1s linear infinite; }
.gate-bar { transition: opacity .3s, transform .3s var(--ease); transform-box: fill-box; }
.dash-log .dim { color: #7c6757; }
@media (prefers-reduced-motion: reduce) { .chan-flow, .flame, .pour, .hero-scroll i { animation: none; } }
.is-static .chan-flow, .is-static .flame, .is-static .pour { animation: none; }

/* ---------------------------------------------------------------- cheap-to-render pieces
   Rule of thumb for this site: things that move are only ever moved with transform / opacity, nothing that
   moves has a blur on it, and looping animations stop while their section is off screen. */
/* hero stack: a square holding the base drawing and one small SVG per block (stack.js) */
.stack-sq { position: absolute; top: 0; bottom: 0; left: 50%; aspect-ratio: 1 / 1; translate: -50% 0; }
.stack-sq > svg { position: absolute; overflow: visible; }
.stack-base { inset: 0; width: 100%; height: 100%; pointer-events: none; }
.forge-label { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; white-space: nowrap; font: 600 var(--label, 16px)/1 var(--font-pixel); opacity: .9; will-change: transform; }
.stack-layer { position: absolute; pointer-events: none; will-change: transform, opacity; }
.stack-layer > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.stack-layer .stack-block { pointer-events: auto; }
/* the watchfire flames: tiny SVGs that only scale and skew */
.flame-s { position: absolute; overflow: visible; pointer-events: none; transform-origin: 50% 100%; will-change: transform, opacity; animation: lick 1.1s ease-in-out var(--fd, 0s) infinite alternate; }
/* the molten channels: a strip per channel (in drawing units, scaled by stack.js) with a striped child that slides */
.stack-flows { position: absolute; left: 0; top: 0; width: 800px; height: 800px; transform-origin: 0 0; pointer-events: none; }
.flow { position: absolute; height: 3.2px; transform-origin: 0 50%; overflow: hidden; border-radius: 2px; background: linear-gradient(90deg, #ffd76a, #ff7a1a 45%, #ff3d14); }
.flow i { position: absolute; inset: 0 0 0 -32px; background: repeating-linear-gradient(90deg, #1a0f0a 0 14px, transparent 14px 32px); will-change: transform; animation: flow-x .9s linear var(--dl, 0s) infinite; }
@keyframes flow-x { to { transform: translateX(32px); } }
/* the pour: three overlays of bright dashes that fade in one after the other */
.stack-pour { pointer-events: none; opacity: 0; will-change: opacity; animation: pour-ph .48s linear infinite backwards; }
@keyframes pour-ph { 0%, 66.6%, 100% { opacity: 0; } 33.3% { opacity: 1; } }
.stack-flash { position: absolute; width: 56%; height: 30%; translate: -50% -50%; pointer-events: none; opacity: 0; background: radial-gradient(closest-side, rgb(255 170 70 / .55), rgb(255 80 20 / 0)); }
/* the request packet and the gates it passes: one shared 5.2 s loop */
.packet { animation: packet 5.2s linear infinite; }
@keyframes packet { to { transform: translateX(900px); } }
.gate-bar { animation: gate-hit 5.2s linear var(--gd, 0s) infinite backwards; }
@keyframes gate-hit { 0%, 12%, 100% { opacity: .35; transform: none; } 2%, 9% { opacity: 1; transform: translateY(-4px); } }
/* closing embers: small dots that rise; only transform and opacity change */
.embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.embers i { position: absolute; bottom: -10px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: rgb(255 var(--g) 50); opacity: 0; will-change: transform, opacity; animation: ember var(--t) linear var(--dl) infinite; }
@keyframes ember { 0% { transform: translate3d(0, 0, 0); opacity: 0; } 12% { opacity: .8; } 70% { opacity: .45; } 100% { transform: translate3d(var(--dx), var(--rise), 0); opacity: 0; } }
/* looping animations pause while their section is off screen (home.js toggles .live) */
[data-live]:not(.live) *, [data-live]:not(.live) *::before, [data-live]:not(.live) *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .packet, .gate-bar, .flow i, .stack-pour, .flame-s { animation: none; } .packet { transform: translateX(840px); } .stack-pour.first { opacity: 1; } }
.is-static .packet { animation: none; transform: translateX(840px); }
.is-static .gate-bar, .is-static .flow i, .is-static .stack-pour, .is-static .flame-s { animation: none; }
.is-static .stack-pour.first { opacity: 1; }
