/* somniabunt: quiet machinery, dreamy and post-industrial. Readable first. */

@font-face { font-family: "Inter Tight"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-tight-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-tight-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2190-2193; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url(/fonts/jetbrains-mono-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1E9F; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 500;
  src: url(/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+2190-2193; }

:root {
  --paper: #eeece6;
  --paper-2: #e5e2da;
  --ink: #17161c;
  --muted: #625f69;
  --line: #d3cfc5;
  --dream: #5b48ff;   /* violet: the one accent */
  --oxide: #b4532e;   /* rust: tiny industrial detail only */
  --night: #21142f;   /* deep aubergine for icon tiles */
  --night-2: #2c1b3e;
  --gutter: clamp(18px, 4vw, 56px);
  --max: 1240px;
  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 clamp(17px, 0.35vw + 15.5px, 19px)/1.62 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
/* very fine paper grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.05;
  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'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); font-size: 0.78em; letter-spacing: 0.01em; }
.dim { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 200; background: var(--ink); color: var(--paper); padding: 8px 12px; }
:focus-visible { outline: 2px solid var(--dream); outline-offset: 3px; }

.link { border-bottom: 1.5px solid currentColor; }
.link:hover { color: var(--dream); }
.btn { display: inline-block; background: var(--ink); color: var(--paper); padding: 0.75em 1.3em; border-radius: 999px; font-weight: 500; transition: background 0.2s; }
.btn:hover { background: var(--dream); }
.tag { display: inline-block; font-family: var(--mono); font-size: 0.72rem; border: 1px solid currentColor; border-radius: 999px; padding: 0.05em 0.6em; color: var(--muted); }
.tag.live { color: var(--dream); }

/* ---------- header ---------- */
.top {
  max-width: var(--max); margin: 0 auto; padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark svg { width: 40px; height: 40px; display: block; }
.brand-name { font-family: var(--mono); font-size: 17px; letter-spacing: 0.06em; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; font-family: var(--mono); font-size: 14px; background: rgba(255,255,255,0.45); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.tabs a { padding: 7px 14px; border-radius: 999px; transition: background 0.2s, color 0.2s; }
.tabs a:hover { background: rgba(23,22,28,0.06); }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.tabs .tab-cta { color: var(--dream); }
.tabs .tab-cta[aria-current="page"] { background: var(--dream); color: #fff; }

main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px clamp(24px, 5vw, 72px); align-items: center;
  padding: clamp(28px, 6vw, 80px) 0 clamp(48px, 7vw, 96px);
}
.hero h1 { font-size: clamp(40px, 5.6vw, 80px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; max-width: 13ch; margin-bottom: 0.45em; }
.lede { font-size: clamp(18px, 1.25vw, 21px); color: #33313a; max-width: 56ch; }
.hero-actions { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-top: 1.6em; }
.hero-art { position: relative; aspect-ratio: 1; max-width: 460px; justify-self: center; width: 100%; }
.haze {
  position: absolute; inset: 4% 2% 10% 18%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(123,92,255,0.62), rgba(123,92,255,0.24) 55%, transparent 75%);
  filter: blur(22px); animation: drift 12s ease-in-out infinite alternate, glow-in 2.2s ease-out both;
}
.haze-2 {
  inset: 0 0 34% 40%;
  background: radial-gradient(closest-side, rgba(236,79,210,0.48), rgba(162,77,255,0.18) 60%, transparent 76%);
  animation: drift2 9s ease-in-out infinite alternate, glow-in 2.6s ease-out both;
}
.big-mark { position: relative; color: var(--ink); }
.big-mark svg { width: 100%; height: auto; display: block; overflow: visible; }
/* 1. the factory draws itself in, once */
.hm-draw { stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; animation: draw 1.1s cubic-bezier(.6,0,.2,1) forwards; }
.hm-ground { animation-duration: .7s; }
.hm-roof { animation-delay: .35s; animation-duration: 1.3s; }
.hm-chimney { animation-delay: 1.05s; animation-duration: .8s; }
/* 2. moon and star arrive, then keep a slow rhythm */
.hm-moon { transform-box: fill-box; transform-origin: center; opacity: 0; animation: rise-in 1.2s ease-out 1.4s forwards, float 7s ease-in-out 2.6s infinite; }
.hm-star { transform-box: fill-box; transform-origin: center; opacity: 0; animation: twinkle 4.2s ease-in-out 1.9s infinite; }
/* 3. the night shift: smoke breathes out of the chimney, forever */
.hm-smoke { stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0; animation: smoke 4.8s ease-in-out 1.8s infinite; }
.hm-puff { transform-box: fill-box; transform-origin: center; opacity: 0; animation: puff 4.8s ease-out infinite; }
.hm-puff1 { animation-delay: 2.9s; }
.hm-puff2 { animation-delay: 3.3s; }
@keyframes draw { 0% { stroke-dashoffset: 1; opacity: 0; } 8% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(3px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-1.1px) rotate(-4deg); } }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.8); } 45% { opacity: 1; transform: scale(1.35); } 60% { opacity: .9; transform: scale(1); } }
@keyframes smoke { 0% { stroke-dashoffset: 1; opacity: 0; } 6% { opacity: 1; } 45% { stroke-dashoffset: 0; opacity: 1; } 80% { stroke-dashoffset: -.7; opacity: .6; } 100% { stroke-dashoffset: -1; opacity: 0; } }
@keyframes puff { 0% { opacity: 0; transform: translateY(2px) scale(.6); } 25% { opacity: 1; transform: translateY(0) scale(1); } 70% { opacity: .7; transform: translateY(-2.2px) scale(1.15); } 100% { opacity: 0; transform: translateY(-3.6px) scale(.8); } }
@keyframes glow-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drift { from { transform: translate(-5%, 4%) scale(0.94); } to { transform: translate(5%, -4%) scale(1.08); } }
@keyframes drift2 { from { transform: translate(4%, -2%) scale(1.05); } to { transform: translate(-6%, 5%) scale(0.92); } }

.sys {
  grid-column: 1 / -1; margin: 8px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 28px;
}
.sys div { display: grid; gap: 2px; }
.sys dt { color: var(--muted); font-size: 0.85em; letter-spacing: 0.08em; }
.sys dd { margin: 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2fae6b; margin-right: 8px; box-shadow: 0 0 0 4px rgba(47,174,107,0.15); vertical-align: 1px; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 112px) 0; border-top: 1px solid var(--line); }
.label { font-family: var(--mono); font-size: 14px; color: var(--ink); margin-bottom: 10px; }
.label .prompt { color: var(--dream); }
.section > h2 { font-size: clamp(32px, 3.6vw, 52px); font-weight: 500; letter-spacing: -0.03em; margin-bottom: clamp(28px, 3vw, 44px); }
.note { color: var(--muted); margin-top: 28px; }

/* work grid: modular tiles with symbol-logos */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(18px, 2.2vw, 28px); }
.card a { display: flex; flex-direction: column; height: 100%; background: rgba(255,255,255,0.35); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: transform 0.25s, border-color 0.25s, background 0.25s; }
.card a:hover { transform: translateY(-3px); border-color: var(--ink); background: rgba(255,255,255,0.6); }
.tile { aspect-ratio: 16 / 10; display: grid; place-items: center; background: var(--night); transition: background 0.3s; }
.tile svg, .case-symbol svg, .service-ico svg { stroke: url(#sbg); }
.tile svg { width: 34%; max-width: 120px; height: auto; transition: transform 0.4s ease; }
.card a:hover .tile { background: var(--night-2); }
.card a:hover .tile svg { transform: scale(1.06); }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.code { font-family: var(--mono); font-size: 14px; color: var(--dream); margin: 0; }
.card h3 { font-size: 1.25em; font-weight: 600; }
.summary { color: #3a3842; margin: 0; }
.card .meta { color: var(--muted); margin: auto 0 0; padding-top: 10px; }

/* services */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(28px, 4vw, 56px) clamp(28px, 5vw, 72px); }
.service { display: grid; grid-template-columns: 76px 1fr; gap: 22px; align-items: start; }
.service-ico { width: 76px; height: 76px; border-radius: 18px; background: var(--night); display: grid; place-items: center; }
.service-ico svg { width: 46px; height: 46px; }
.service .n { color: var(--dream); margin-bottom: 6px; }
.service h3 { font-size: clamp(22px, 1.8vw, 28px); font-weight: 500; margin-bottom: 0.5em; }
.service p { color: #33313a; max-width: 58ch; }
.chips { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-family: var(--mono); font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: rgba(255,255,255,0.35); }

/* tools table */
.tools { width: 100%; border-collapse: collapse; }
.tools thead th { text-align: left; font-weight: 500; color: var(--muted); padding: 0 16px 12px 0; border-bottom: 1px solid var(--ink); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.tools tbody th, .tools td { text-align: left; vertical-align: top; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.tools tbody th { white-space: nowrap; }
.tool-ico { display: inline-block; width: 28px; height: 28px; vertical-align: -8px; margin-right: 10px; color: var(--dream); }
.tool-ico svg { width: 100%; height: 100%; }
.tools td:nth-child(2) { max-width: 52ch; }

/* print relic */
.print-inner { display: block; }
.print h2 { font-size: clamp(30px, 3.2vw, 46px); font-weight: 500; letter-spacing: -0.03em; margin-bottom: 0.6em; }
.print p { max-width: 58ch; color: #33313a; }
.spread { max-width: 300px; justify-self: center; width: 100%; aspect-ratio: 1; border-radius: 22px; }
.spread svg { width: 50%; }

/* about + contact */
.about-text { columns: 2 320px; column-gap: clamp(28px, 5vw, 72px); max-width: 1000px; }
.about-text p { break-inside: avoid; color: #33313a; }
.contact h2 { font-size: clamp(32px, 4.2vw, 60px); font-weight: 500; letter-spacing: -0.03em; max-width: 18ch; margin-bottom: 0.6em; }
.contact-mail a { font-size: clamp(22px, 2.6vw, 38px); border-bottom: 2px solid var(--dream); }
.contact-mail a:hover { color: var(--dream); }

/* ---------- case study ---------- */
.case { padding-top: clamp(20px, 3vw, 40px); padding-bottom: clamp(56px, 8vw, 112px); }
.crumbs { color: var(--muted); margin-bottom: clamp(24px, 3vw, 40px); }
.crumbs a:hover { color: var(--dream); }
.case-head { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.case-symbol { aspect-ratio: 1; background: var(--night); border-radius: 22px; display: grid; place-items: center; }
.case-symbol svg { width: 60%; height: auto; }
.case h1 { font-size: clamp(34px, 4.4vw, 62px); font-weight: 500; letter-spacing: -0.03em; margin: 6px 0 0.45em; max-width: 20ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 24px; margin: clamp(28px, 4vw, 48px) 0 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 0.85em; letter-spacing: 0.08em; text-transform: uppercase; }
.facts dd { margin: 2px 0 0; }
.facts a { color: var(--dream); }
.case-flow { margin: clamp(36px, 5vw, 64px) 0 0; }
.flow { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 0; }
.flow li { display: flex; align-items: center; }
.flow li + li::before { content: ""; width: clamp(18px, 3vw, 40px); height: 0; border-top: 1.5px dashed var(--muted); margin: 0 10px; }
.flow .node { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--dream); color: var(--dream); margin-right: 10px; font-size: 12px; }
.flow .step { background: rgba(255,255,255,0.5); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-size: 0.92em; }
.case-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: clamp(28px, 4vw, 48px) clamp(28px, 5vw, 72px); margin-top: clamp(40px, 5vw, 72px); }
.case-body h2 { font-size: 1.3em; font-weight: 600; margin-bottom: 0.5em; }
.case-body p { color: #33313a; max-width: 60ch; }
.case-tags { margin-top: clamp(32px, 4vw, 56px); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: clamp(40px, 5vw, 72px); padding-top: 20px; border-top: 1px solid var(--line); }
.pager a:hover { color: var(--dream); }

/* ---------- tab pages ---------- */
.page-head { padding: clamp(28px, 5vw, 72px) 0 clamp(20px, 3vw, 40px); }
.page-head h1 { font-size: clamp(40px, 5.2vw, 76px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.04; max-width: 16ch; margin-bottom: 0.4em; }
.section.flush { border-top: 0; padding-top: 8px; }
.next-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 18px; margin-top: clamp(40px, 5vw, 72px); }
.next { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.35); font-size: 1.15em; font-weight: 500; transition: border-color 0.2s, background 0.2s; }
.next:hover { border-color: var(--ink); background: rgba(255,255,255,0.6); }
.next .mono { font-size: 13px; font-weight: 400; }
.tool-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 18px; }
.tool { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.35); }
.tile.small { aspect-ratio: 1; border-radius: 14px; }
.tile.small svg { width: 58%; }
.tool-what { margin: 4px 0 6px; color: #33313a; }
.tool .meta { margin: 0; }
/* stack */
.stack-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stack-group { padding: 22px 22px 8px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.35); }
.stack-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.stack-head h2 { font-size: 1.05rem; margin: 0; letter-spacing: -0.01em; }
.stack-head .tag { white-space: nowrap; }
.stack-group dl { margin: 0; }
.stack-group dl > div { padding: 12px 0; border-top: 1px solid var(--line); }
.stack-group dl > div:first-child { border-top: 0; }
.stack-group dt { font-family: var(--mono); font-size: 14px; color: var(--ink); margin-bottom: 3px; }
.stack-group dd { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.45; }
@media (max-width: 980px) { .stack-grid { grid-template-columns: 1fr; } }
.case-body.single { grid-template-columns: 1fr; margin-top: 0; }
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.about-text { columns: auto; }
.about-sys { grid-column: auto; grid-template-columns: 1fr; margin: 0; border-top: 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.35); }
.contact { padding-bottom: clamp(56px, 8vw, 112px); }

/* ---------- case visuals: diagrams + end-product plates ---------- */
.case-visual { margin-top: clamp(48px, 6vw, 88px); }
.diagram-wrap { background: var(--night); border-radius: 22px; padding: clamp(14px, 2.5vw, 32px); overflow-x: auto; margin-top: 14px; }
.diagram { display: block; width: 100%; min-width: 640px; height: auto; font-family: var(--sans); }
.dg-edge { fill: none; stroke: var(--g); stroke-width: 1.8; }
.dg-edge.soft { stroke: #7a6698; }
.dg-node rect { fill: var(--night-2); stroke: var(--g); stroke-width: 1.6; }
.dg-band rect { fill: rgba(255,255,255,0.025); stroke: rgba(205,179,255,0.10); }
.dg-band.alt rect { fill: rgba(255,255,255,0.05); }
.dg-band text { fill: #9d8cbc; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-anchor: middle; text-transform: uppercase; }
.dg-node.accent rect { fill: #3a1f55; stroke-width: 2.4; }
.dg-node.muted rect { stroke: #6d5a8a; fill: #251733; }
.dg-label { fill: #f4efff; font-size: 14px; font-weight: 600; text-anchor: middle; letter-spacing: -.01em; }
.dg-sub { fill: #b9a9d6; font-size: 11px; font-family: var(--mono); text-anchor: middle; }
.dg-loop { fill: #b9a9d6; font-size: 11px; font-family: var(--mono); text-anchor: middle; letter-spacing: .02em; }
.case-visual .flow { display: none; }
.plates { display: grid; gap: clamp(20px, 3vw, 36px); margin-top: 14px; }
.plate { margin: 0; }
.plate img, .plate .mock { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 1px 0 var(--line), 0 24px 60px -30px rgba(33,20,47,0.45); }
.plate figcaption { color: var(--muted); margin-top: 12px; }
.mock { background: #fbfaf7; font-family: var(--sans); }
.m-frame { fill: #fbfaf7; stroke: var(--line); }
.m-line, .m-gutter { stroke: var(--line); fill: none; }
.m-dot { fill: #ddd8cd; } .m-url { fill: #efece5; } .m-urltext { font: 11px var(--mono); fill: var(--muted); text-anchor: middle; }
.m-h { font-size: 22px; font-weight: 600; fill: var(--ink); letter-spacing: -0.02em; }
.m-b { font-size: 14px; font-weight: 600; fill: var(--ink); } .m-small { font-size: 12px; fill: var(--muted); } .m-small.on { fill: var(--dream); font-weight: 600; }
.m-mono { font: 12px var(--mono); fill: var(--ink); } .m-mono.dim { fill: var(--muted); } .ok { fill: #2fae6b; }
.m-tab { font: 13px var(--mono); fill: var(--muted); } .m-tab.on { fill: var(--ink); font-weight: 600; text-decoration: underline; }
.m-txt { fill: #e3dfd6; }
.m-card { fill: #fff; stroke: var(--line); } .m-card.warn { stroke: #e9a37c; fill: #fff8f3; }
.m-input { fill: #fff; stroke: #cfcac0; } .m-btn { fill: #fff; stroke: var(--ink); } .m-btntext { font-size: 12px; fill: var(--ink); text-anchor: middle; }
.m-primary { fill: var(--ink); } .m-primarytext { font-size: 13px; font-weight: 600; fill: #fff; text-anchor: middle; }
.m-spark { fill: none; stroke: var(--dream); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.m-thumb { fill: #f1eee7; stroke: var(--line); } .m-art { fill: none; stroke: #2b2233; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } .m-file { font: 11px var(--mono); fill: var(--muted); } .m-small.end { text-anchor: end; }
.m-ok { fill: #2fae6b; } .m-up { fill: #9fdcb9; } .m-up.dip { fill: #f0b48f; }
.m-page { fill: #fff; stroke: var(--line); } .m-panel { fill: none; stroke: var(--ink); stroke-width: 2; }
.m-ink { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; } .m-bubble { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }
.m-folio { font: 11px var(--mono); fill: var(--muted); text-anchor: middle; }
.grow path, .grow circle { fill: none; stroke: url(#sbg); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: grow 5s ease-out forwards infinite alternate; }
@keyframes grow { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .grow path, .grow circle { animation: none; stroke-dashoffset: 0; } }
@media (max-width: 640px) {
  .diagram-wrap { overflow: visible; background: none; padding: 0; }
  .diagram { display: none; }
  .case-visual .flow { display: flex; }
}

/* ---------- footer ---------- */
.bottom { width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto; padding: 40px 0 56px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.foot-mark svg { width: 34px; height: 34px; color: var(--muted); }
.bottom p { margin: 0; }
.bottom a:hover { color: var(--dream); }

/* ---------- reveal on scroll (JS adds .in) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; order: 3; }
  .lang { order: 2; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 280px; justify-self: start; order: -1; }
  .print-inner { grid-template-columns: 1fr; }
  .spread { max-width: 180px; justify-self: start; }
  .case-head { grid-template-columns: 1fr; }
  .case-symbol { max-width: 140px; }
  .tools thead { display: none; }
  .tools, .tools tbody, .tools tr, .tools th, .tools td { display: block; width: 100%; }
  .tools tr { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .tools tbody th, .tools td { border: 0; padding: 4px 0; }
}
@media (max-width: 520px) {
  .tabs { font-size: 13px; }
  .tabs a { padding: 7px 10px; }
  .service { grid-template-columns: 1fr; gap: 14px; }
  .tool { grid-template-columns: 72px 1fr; }
  .flow { flex-direction: column; align-items: flex-start; }
  .flow li + li::before { width: 0; height: 18px; border-top: 0; border-left: 1.5px dashed var(--muted); margin: 0 0 0 14px; position: absolute; transform: translateY(-24px); }
  .flow li { position: relative; padding-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .haze, .big-mark svg * { animation: none !important; }
  .hm-draw, .hm-smoke { stroke-dashoffset: 0 !important; }
  .hm-moon, .hm-star, .hm-puff { opacity: 1 !important; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card a, .tile { transition: none; }
}

/* ---------- SIGNAL_GARDEN illustration ---------- */
.sg-art { background: #2a1d47; }
.sg-far { fill: #b6a1d8; opacity: .55; }
.sg-farwin { stroke: #fff; stroke-width: 3; opacity: .18; }
.sg-crane { fill: none; stroke: #b6a1d8; stroke-width: 3; opacity: .5; stroke-linecap: round; }
.sg-mid { fill: #5d4a72; }
.sg-win { fill: #3b2d4f; }
.sg-lit { fill: #ffd6a0; animation: lit 7s ease-in-out infinite; }
.sg-lit1 { animation-delay: 1.8s; } .sg-lit2 { animation-delay: 3.6s; }
.sg-hall { fill: #4a3a5f; }
.sg-glass { stroke: #e9d7ff; stroke-width: 7; opacity: .55; stroke-linecap: round; }
.sg-glass.broken { stroke-dasharray: 14 10 8 30; }
.sg-rib { stroke: #3a2c4d; stroke-width: 3; }
.sg-door { fill: #241a33; }
.sg-brick { fill: none; stroke: #3c2e50; stroke-width: 2; stroke-linecap: round; opacity: .8; }
.sg-moss { fill: none; stroke: #5d9a62; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 18 26 40 14; opacity: .9; }
.sg-px { transform: translateY(calc(var(--p, 0) * var(--d))); transition: transform .2s linear; }
.sg-chim { fill: #3e3052; } .sg-band { stroke: #2b2040; stroke-width: 4; }
.sg-trunk { fill: none; stroke: #3a2a26; stroke-width: 9; stroke-linecap: round; }
.sg-trunk.thin { stroke-width: 4; }
.sg-leaf-a { fill: #2f5e47; } .sg-leaf-b { fill: #4a8a5e; } .sg-leaf-c { fill: #73b07c; } .sg-leaf-hi { fill: #a6d896; opacity: .4; }
.sg-tree { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 9s ease-in-out infinite; }
.sg-tuft { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 6s ease-in-out infinite reverse; }
.sg-vine { fill: none; stroke: #4f9a62; stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: vine 6s ease-out forwards; }
.sg-v1 { animation-delay: .8s; } .sg-v3 { animation-delay: 2s; stroke-width: 2.6; } .sg-v2 { animation-delay: 1.4s; animation-duration: 7s; }
.sg-ivy { fill: #6fbf7e; transform-box: fill-box; transform-origin: 0 100%; transform: scale(0); animation: pop .6s cubic-bezier(.3,1.6,.5,1) forwards; }
.sg-ground { fill: url(#sg-ground); }
.sg-road { fill: url(#sg-road); opacity: .75; }
.sg-crack { fill: none; stroke: #4a3c56; stroke-width: 2.5; stroke-linecap: round; }
.sg-grass { fill: none; stroke: #6fb37a; stroke-width: 2.2; stroke-linecap: round; opacity: .9; }
.sg-fg1 { fill: #18301f; } .sg-fg2 { fill: #24472f; }
.sg-sway { transform-box: fill-box; animation: sway 7s ease-in-out infinite; }
.sg-sway-l { transform-origin: 0 100%; } .sg-sway-r { transform-origin: 100% 100%; animation-delay: -3s; }
.sg-stem { fill: none; stroke: #3d7a4c; stroke-width: 2; }
.sg-bloom { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: pop .9s cubic-bezier(.3,1.5,.5,1) forwards; }
.sg-pet-p { fill: #ec4fd2; } .sg-pet-v { fill: #9a7bff; } .sg-pistil { fill: #ffe7a8; }
.sg-mist ellipse { fill: #fff; opacity: .28; filter: url(#sg-blur); }
.sg-mist-1 { animation: mist 26s ease-in-out infinite alternate; }
.sg-mist-2 { animation: mist 18s ease-in-out infinite alternate-reverse; }
.sg-rays path { fill: #ffe9f4; opacity: .05; animation: ray 9s ease-in-out infinite; }
.sg-moonglow { animation: glowpulse 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sg-stars circle { fill: #fff; animation: twinkle-s 4s ease-in-out infinite; }
.sg-fly { fill: #fff3b0; animation-name: fly; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.sg-wing { fill: none; stroke: #2a1d47; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; animation: flap .6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sg-ui text { font-family: var(--mono); }
.sg-brand { fill: #fff; font-size: 18px; }
.sg-nav { fill: #fff; opacity: .8; font-size: 15px; }
.sg-title { fill: #fff; font-family: var(--sans) !important; font-size: 44px; font-weight: 600; letter-spacing: -.02em; }
.sg-scroll rect { fill: rgba(255,255,255,.14); stroke: rgba(255,255,255,.55); }
.sg-scroll text { fill: #fff; font-size: 13px; }
.sg-scroll { animation: nudge 2.4s ease-in-out infinite; }
@keyframes lit { 0%, 40%, 100% { opacity: 1; } 50% { opacity: .25; } 60% { opacity: 1; } }
@keyframes sway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
@keyframes vine { to { stroke-dashoffset: 0; } }
@keyframes pop { to { transform: scale(1); } }
@keyframes mist { from { transform: translateX(-40px); } to { transform: translateX(50px); } }
@keyframes ray { 0%, 100% { opacity: .03; } 50% { opacity: .09; } }
@keyframes glowpulse { 0%, 100% { opacity: .75; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes twinkle-s { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes fly { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: 1; } 50% { transform: translate(14px, -26px); opacity: .5; } 80% { opacity: 1; } 100% { transform: translate(-8px, -52px); opacity: 0; } }
@keyframes flap { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(-.6); } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) {
  .sg-art * { animation: none !important; }
  .sg-vine { stroke-dashoffset: 0; } .sg-ivy, .sg-bloom { transform: none; }
}
.js .sg-art:not(.play) * { animation-play-state: paused; }

/* case-study targets */
.case-specs { margin: clamp(24px, 4vw, 44px) 0 0; }
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 14px 0 0; border-top: 1px solid var(--ink); }
.specs > div { padding: 18px 18px 6px 0; border-right: 1px solid var(--line); }
.specs > div + div { padding-left: 18px; }
.specs > div:last-child { border-right: 0; }
.specs dt { font-size: clamp(28px, 3.2vw, 44px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; background: linear-gradient(90deg, #6a4dff, #a24dff 55%, #ec4fd2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.specs dd { margin: 6px 0 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specs > div { border-right: 0; padding-left: 0 !important; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
}

/* ---------- language switch ---------- */
.lang { font-size: 13px; letter-spacing: .08em; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.45); }
.lang:hover { background: var(--ink); color: var(--paper); }
.top .tabs { margin-left: auto; }

/* ---------- dreamy terminal scenes ---------- */
.scene { margin: 0 0 clamp(28px, 4vw, 52px); border-radius: 16px; overflow: hidden; background: var(--night); box-shadow: 0 1px 0 var(--line), 0 30px 70px -40px rgba(33,20,47,.6); }
.term-bar { display: flex; align-items: center; justify-content: center; position: relative; height: 34px; background: var(--night-2); color: #cdb3ff; font: 13px var(--mono); }
.term-btns { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; gap: 8px; }
.term-btns i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.term-btns i:nth-child(1) { background: #7b5cff; } .term-btns i:nth-child(2) { background: #a24dff; } .term-btns i.x { background: #ec4fd2; }
.scene-art { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 380; }
.term-line { padding: 12px 18px 14px; color: #f1eafa; font-size: 14px; line-height: 1.6; background: var(--night); border-top: 1px solid rgba(205,179,255,.08); }
.term-line p { margin: 0; }
.term-line .tu { color: #b48cff; font-weight: 500; } .term-line .td { color: #ec4fd2; }
.term-out { color: #b9a9d6; white-space: pre-wrap; opacity: 0; animation: termout .4s ease forwards; animation-delay: calc(var(--n, 10) * 0.07s + 1s); }
.typed { display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; width: 0; animation: type calc(var(--n) * 0.07s) steps(var(--n)) .5s forwards; }
.term-line p:first-child .typed + .cursor { display: inline-block; width: .6em; height: 1.1em; vertical-align: -0.2em; background: linear-gradient(#a24dff, #ec4fd2); margin-left: 2px; animation: blink 1s step-end infinite; }
@keyframes type { to { width: calc(var(--n) * 1ch); } }
@keyframes termout { to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }
.sc-fog { animation: fogdrift 22s ease-in-out infinite alternate; }
.sc-f2 { animation-duration: 16s; animation-direction: alternate-reverse; }
@keyframes fogdrift { from { transform: translateX(-50px); } to { transform: translateX(60px); } }
.sc-flicker { animation: flick 6s ease-in-out infinite; } .sc-flicker.d2 { animation-delay: 2.4s; }
@keyframes flick { 0%, 46%, 54%, 100% { opacity: 1; } 50% { opacity: .35; } 52% { opacity: .85; } }
.sc-glow { animation: scglow 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes scglow { 0%, 100% { opacity: .7; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
.sc-sway { animation: scsway 8s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0; }
@keyframes scsway { 0%, 100% { transform: rotate(-.6deg); } 50% { transform: rotate(.6deg); } }
.sc-wires { animation: scwire 7s ease-in-out infinite; }
@keyframes scwire { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
.sc-wing { animation: scflap .55s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes scflap { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(-.6); } }
.sc-led { animation: scled 2s steps(2) infinite; }
@keyframes scled { 50% { opacity: .15; } }
.sc-rays path, .sc-ray1 { animation: scray 9s ease-in-out infinite; }
@keyframes scray { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.sc-fly { animation-name: scfly; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
@keyframes scfly { 0% { transform: translate(0,0); opacity: 0; } 25% { opacity: 1; } 50% { transform: translate(10px,-18px); opacity: .4; } 75% { opacity: 1; } 100% { transform: translate(-6px,-36px); opacity: 0; } }
.sc-spin { animation: scspin 1.2s linear infinite; } .sc-spin-slow { animation: scspin 30s linear infinite; }
@keyframes scspin { to { transform: rotate(360deg); } }
.sc-cursor { animation: blink 1s step-end infinite; }
.sc-crt { font: 11px var(--mono); fill: #9dffb8; } .sc-crt.dim { fill: #5fa877; }
.sc-rain path { animation: scrain 1.4s linear infinite; }
@keyframes scrain { from { transform: translate(0,-6px); } to { transform: translate(-3px,10px); } }
.sc-rings circle { transform-box: fill-box; transform-origin: center; animation: ring 4.8s ease-out infinite; opacity: 0; }
@keyframes ring { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(6); opacity: 0; } }
.sc-blink { animation: blink 1.6s step-end infinite; }
.sc-smoke { animation: scsmoke 5s ease-in-out infinite; }
@keyframes scsmoke { 0%, 100% { opacity: .2; transform: translateY(4px); } 50% { opacity: .75; transform: translateY(-3px); } }

/* ---------- the shelf: imaginary books ---------- */
.shelf-lede { margin-bottom: clamp(22px, 3vw, 40px); }
.books { display: grid; gap: clamp(40px, 6vw, 80px); }
.book { display: grid; gap: 18px; }
.book-art { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 4.5fr); gap: clamp(16px, 3vw, 36px); align-items: end; }
.book-cover svg, .book-spread svg { display: block; width: 100%; height: auto; }
.book-cover svg { border-radius: 3px 8px 8px 3px; box-shadow: 0 2px 0 rgba(0,0,0,.05), 18px 26px 40px -24px rgba(33,20,47,.55); }
.book-spread svg { border-radius: 4px; box-shadow: 0 30px 60px -36px rgba(33,20,47,.55); }
.book-cap { display: grid; grid-template-columns: 160px 1fr; column-gap: 24px; max-width: 900px; }
.book-cap .code { grid-row: span 3; margin: 6px 0 0; }
.book-cap h3 { margin: 0; font-size: 1.15rem; letter-spacing: .02em; }
.book-cap .meta { margin: 4px 0 8px; color: var(--muted); font-size: 13px; }
.book-cap p:last-child { margin: 0; color: #33313a; }
.bk-t1 { font: 600 40px var(--sans); letter-spacing: .06em; fill: #1f2620; text-anchor: middle; }
.bk-author { font: 500 15px var(--sans); letter-spacing: .3em; fill: #e9ecdf; text-anchor: middle; }
.bk-imprint { font: 11px var(--mono); fill: #c9cfbd; text-anchor: middle; letter-spacing: .12em; }
.bk-kicker { font: 11px var(--mono); letter-spacing: .2em; fill: #6d6577; }
.bk-num { font: 300 84px var(--sans); fill: #21142f; letter-spacing: -.04em; }
.bk-h { font: 500 30px var(--sans); fill: #21142f; letter-spacing: -.02em; }
.bk-drop { font: 500 62px var(--sans); fill: #d39a3a; }
.bk-body { font-family: Georgia, 'Times New Roman', serif; fill: #2a2830; }
.bk-folio { font: 11px var(--mono); fill: #6d6577; }
.bk-glow { animation: scglow 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.bk-px { font: 700 36px var(--mono); fill: #f3efe4; letter-spacing: .08em; }
.bk-px-sm { font: 500 12px var(--mono); fill: #d2cba6; letter-spacing: .14em; }
.bk-letter { font: 700 11px var(--mono); fill: #151a16; letter-spacing: .04em; }
.bk-at1 { font: 600 38px var(--sans); fill: #f4eefc; letter-spacing: .02em; }
.bk-at1.grad { fill: #cdb3ff; }
.bk-at2 { font: 13px var(--mono); fill: #b9a9d6; }
.bk-arc { fill: none; stroke: #ec4fd2; stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; animation: arcdraw 3s ease-in-out infinite alternate; opacity: .9; }
@keyframes arcdraw { to { stroke-dashoffset: 0; } }
.bk-node { fill: #ec4fd2; animation: scled 2.4s ease-in-out infinite; }
.bk-pin { font: 600 11px var(--sans); fill: #21142f; text-anchor: middle; }
.bk-h2 { font: 500 20px var(--sans); fill: #21142f; letter-spacing: -.01em; }
.bk-h3 { font: 500 15px var(--sans); fill: #21142f; }
.bk-big { font: 300 86px var(--sans); fill: #a24dff; letter-spacing: -.04em; }
.bk-cap { font: 12px var(--sans); fill: #4b4655; }
.bk-num-sm { font: 600 12px var(--mono); fill: #a24dff; }
.bk-bar { fill: #a24dff; transform-box: fill-box; transform-origin: 0 50%; transform: scaleX(0); animation: barw 1.2s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes barw { to { transform: scaleX(1); } }
@media (max-width: 760px) {
  .book-art { grid-template-columns: 1fr; }
  .book-cover { max-width: 260px; }
  .book-cap { grid-template-columns: 1fr; }
  .book-cap .code { grid-row: auto; }
  .term-line { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .scene *, .books * { animation: none !important; }
  .typed { width: auto; } .term-out { opacity: 1; } .bk-arc { stroke-dashoffset: 0; } .bk-bar { transform: none; }
}
.scene.plain { background: none; }
.pr-cloud { animation: prcloud linear infinite alternate; }
@keyframes prcloud { from { transform: translateX(-30px); } to { transform: translateX(40px); } }
.pr-lite { animation: scled 3s ease-in-out infinite; }

/* ---------- man page for the name ---------- */
.man { background: var(--night); color: #eee; border-radius: 16px; padding: clamp(20px, 3.5vw, 44px); margin-top: 14px; box-shadow: 0 30px 70px -40px rgba(33,20,47,.6); }
.man-head, .man-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: #cbb7d6; margin: 0; }
.man-foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); }
.man-word { font-size: clamp(38px, 6vw, 84px); font-weight: 500; letter-spacing: -0.03em; margin: 22px 0 4px; background: linear-gradient(90deg, #9b85ff, #c77dff 50%, #ff7fe0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.man-pron { color: #b48cff; margin: 0 0 18px; font-size: 14px; }
.man-sec { display: grid; grid-template-columns: 190px 1fr; gap: 6px 24px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.08); }
.man-sec h3 { margin: 2px 0 0; font-size: 13px; letter-spacing: .14em; color: #ec4fd2; font-weight: 500; }
.man-sec p { margin: 0 0 8px; color: #e8e2ee; max-width: 66ch; line-height: 1.6; }
.man-sec code { font-family: var(--mono); color: #b48cff; }
.man-sec .link { color: #cdb3ff; }
.man-quote { font-family: Georgia, serif; font-style: italic; font-size: clamp(20px, 2.4vw, 28px); color: #fff !important; }
@media (max-width: 640px) { .man-sec { grid-template-columns: 1fr; } .man-head span:nth-child(2) { display: none; } }

/* hand-made finish */
.hf-grain { mix-blend-mode: multiply; pointer-events: none; }
.hf-paper { mix-blend-mode: soft-light; pointer-events: none; }
/* book layout details */
.bk-guides rect, .bk-guides path { fill: none; stroke: #ec4fd2; stroke-width: .6; opacity: .28; }
.book-art:hover .bk-guides rect, .book-art:hover .bk-guides path { opacity: .6; }
.bk-marks path { stroke: #151a16; stroke-width: .8; fill: none; }
.bk-rh { font: 500 9px var(--mono); letter-spacing: .18em; fill: #6d6577; }
.bk-t2 { font: italic 13px Georgia, serif; fill: #2a3329; text-anchor: middle; }
.bk-sc { font-size: .86em; letter-spacing: .08em; }
.bk-sfx { font: 800 26px var(--mono); fill: #ffcf6b; stroke: #151a16; stroke-width: 1.5; paint-order: stroke; letter-spacing: .06em; transform-box: fill-box; transform-origin: center; animation: sfx 2.4s ease-in-out infinite; }
@keyframes sfx { 0%, 100% { transform: rotate(-6deg) scale(1); } 50% { transform: rotate(-4deg) scale(1.06); } }
.bk-note { font: 9px var(--mono); fill: #8a8394; }
.bk-at3 { font: 10px var(--mono); letter-spacing: .14em; fill: #9d8cbc; }
.bk-cap.b { font-weight: 600; fill: #21142f; }
.bk-pin.light { fill: #f5f2eb; }
.bk-lit { animation: flick 7s ease-in-out infinite; }
.bk-ray { animation: scray 9s ease-in-out infinite; }
.bk-t2.light { fill: #dfe4d4; }
.bk-col { font: 500 10px var(--mono); letter-spacing: .2em; fill: #1d2420; }
.bk-ct { font: 500 44px var(--sans); letter-spacing: -.025em; fill: #1d2420; }
.bk-ca { font: 500 12px var(--sans); letter-spacing: .24em; fill: #1d2420; }
.bk-t2.r { text-anchor: end; fill: #1d2420; }

/* ---------- riso zine ---------- */
.zine, .zine-imp { background: #f3eee2; }
.zn-title { font: 800 46px var(--sans); letter-spacing: -.035em; fill: #f3eee2; }
.zn-title.dark { fill: #22140f; }
.zn-type { font: 11px var(--mono); fill: #1d2a4a; }
.zn-small { font: 500 9.5px var(--mono); letter-spacing: .14em; fill: #2f6fc4; }
.zn-quote { font: italic 26px Georgia, serif; fill: #ff6c5c; }
.zn-folio { font: 700 13px var(--mono); fill: #2f6fc4; }
.zn-folio.light { fill: #f3eee2; }
.zn-pg { font: 600 44px var(--sans); fill: #c9c1ae; text-anchor: middle; }
.zn-reg circle, .zn-reg path { fill: none; stroke: #1d2420; stroke-width: 1; }
.zn-ember { animation: zember 3.5s ease-in-out infinite; }
@keyframes zember { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .zn-ember { animation: none; } }

/* InDesign spec + spot illustrations */
.bk-spec { margin-top: 12px; }
.bk-spec summary { cursor: pointer; font-size: 13px; color: var(--dream); list-style: none; }
.bk-spec summary::before { content: '▸ '; } .bk-spec[open] summary::before { content: '▾ '; }
.bk-spec dl { margin: 10px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.bk-spec dl > div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bk-spec dt { color: var(--muted); } .bk-spec dd { margin: 0; color: #2a2830; }
.spots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); margin-top: 8px; }
.spot-fig { margin: 0; } .spot { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 18px 40px -26px rgba(33,20,47,.5); }
.spot-fig figcaption { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.influences { margin-top: 28px; max-width: 80ch; }
.sp-water { animation: spwater 9s ease-in-out infinite alternate; }
@keyframes spwater { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
.sp-lit { animation: flick 6s ease-in-out infinite; } .sp-refl { animation: scglow 3s ease-in-out infinite; transform-box: fill-box; transform-origin: top; }
.sp-bob { animation: spbob 4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes spbob { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(3px) rotate(1deg); } }
.sp-beam { animation: spbeam 6s ease-in-out infinite; }
@keyframes spbeam { 0%, 100% { transform: rotate(-8deg); opacity: .6; } 50% { transform: rotate(10deg); opacity: 1; } }
.sp-smoke { animation: scsmoke 5s ease-in-out infinite; }
@media (max-width: 760px) { .spots { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bk-spec dl > div { grid-template-columns: 1fr; gap: 2px; } }
@media (prefers-reduced-motion: reduce) { .spots * { animation: none !important; } }
