/* Fonts are served from this website (fonts/ folder), trimmed to the characters the site uses. */
@font-face { font-family: "Sora"; src: url("../fonts/sora.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

/* =========================================================
   SpiderWebX — base system
   Palette: Silk black, Paper, Venom red, Blood, Ash
   Type: Tektur (display, variable width) + Instrument Sans (text)
   ========================================================= */
:root {
  --silk: #000000;
  --paper: #f4f4f1;
  --venom: #e10a0f;
  --venom-hot: #ff2a30;
  --blood: #6e0005;
  --ash: #9a9a9f;

  --font-display: "Tektur", "Arial Narrow", system-ui, sans-serif;
  --font-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --fs-lead: clamp(1.15rem, 1.02rem + 0.55vw, 1.5rem);
  --fs-h3: clamp(1.375rem, 1.12rem + 1vw, 2.125rem);
  --fs-h2: clamp(2.125rem, 1.35rem + 3.3vw, 4.75rem);
  --fs-h1: clamp(2.5rem, 0.9rem + 7.6vw, 9rem);

  --gutter: 30px;          /* left lane that carries the thread */
  --pad: 20px;             /* right/outer padding */
  --maxw: 1380px;
  --nav-h: 64px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-silk: cubic-bezier(0.34, 1.4, 0.64, 1);

  --x-end: #1c0000; /* tip colour of the red X gradient */
}
@media (min-width: 700px) {
  :root { --gutter: 72px; --pad: 40px; --nav-h: 76px; }
}
@media (min-width: 1100px) {
  :root { --gutter: 120px; --pad: 64px; }
}

/* theme tokens live on body and animate as chapters change */
body {
  --bg: var(--silk);
  --fg: #f4f4f1;
  --muted: #a3a3a8;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.32);
  --accent: var(--venom-hot);
  --surface: rgba(255, 255, 255, 0.04);
}
body[data-theme="light"] {
  --bg: var(--paper);
  --fg: #000;
  --muted: #55555b;
  --line: rgba(0, 0, 0, 0.13);
  --line-strong: rgba(0, 0, 0, 0.32);
  --accent: #c2000a;
  --surface: rgba(0, 0, 0, 0.035);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
html:not(.rm) { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.8s var(--ease-out), color 0.8s var(--ease-out);
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.02; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--venom); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 300; background: var(--venom); color: #fff; padding: 10px 16px; border-radius: 8px; transition: top 0.3s; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--pad); }

/* ---------- logo sprite usage ---------- */
.logo-svg { width: auto; height: 100%; overflow: visible; color: var(--fg); transition: color 0.8s var(--ease-out); }

/* ---------- buttons ---------- */
.btn {
  --h: 52px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 26px;
  border-radius: 999px;
  font-weight: 600; font-size: var(--fs-sm); letter-spacing: 0.01em;
  overflow: hidden; isolation: isolate;
  transition: transform 0.5s var(--ease-out), background-color 0.4s, color 0.4s, border-color 0.4s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:active { transform: scale(0.96); }
.btn-red { background: var(--venom); color: #fff; }
.btn-red::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--silk);
  border-radius: inherit;
  transform: translateY(101%); transition: transform 0.55s var(--ease-out);
}
body[data-theme="dark"] .btn-red::before { background: #fff; }
.btn-red:hover::before { transform: translateY(0); }
body[data-theme="dark"] .btn-red:hover { color: #000; }
.btn-line { border: 1px solid var(--line-strong); color: var(--fg); }
.btn-line:hover { border-color: var(--fg); }
/* rolling label micro-interaction */
.roll { display: inline-grid; overflow: hidden; height: 1.3em; line-height: 1.3em; }
.roll > span { grid-area: 1 / 1; transition: transform 0.55s var(--ease-out); }
.roll > span + span { transform: translateY(110%); }
a:hover > .roll > span:first-child, button:hover > .roll > span:first-child,
a:focus-visible > .roll > span:first-child { transform: translateY(-110%); }
a:hover > .roll > span + span, button:hover > .roll > span + span,
a:focus-visible > .roll > span + span { transform: translateY(0); }
.magnetic { will-change: transform; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 120;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 var(--pad) 0 max(var(--pad), 14px);
  transition: transform 0.6s var(--ease-out), background-color 0.6s, backdrop-filter 0.6s;
  padding-top: env(safe-area-inset-top);
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav-logo { height: 40px; display: block; flex: none; margin-right: auto; }
@media (min-width: 700px) { .nav-logo { height: 48px; } }
.nav-links { display: none; gap: 30px; font-size: var(--fs-sm); font-weight: 500; }
.nav-links a { position: relative; padding: 6px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease-out); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; --h: 44px; padding: 0 20px; }
@media (min-width: 900px) { .nav-links { display: flex; } }
@media (min-width: 600px) { .nav-cta { display: inline-flex; } }

.menu-btn {
  position: relative; width: 48px; height: 48px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.menu-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.menu-ring circle { fill: none; stroke-width: 1.5; }
.menu-ring .track { stroke: var(--line); }
.menu-ring .prog { stroke: var(--venom); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.menu-lines { width: 18px; height: 8px; position: relative; }
.menu-lines i { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform 0.5s var(--ease-out), top 0.5s var(--ease-out); }
.menu-lines i:first-child { top: 0; }
.menu-lines i:last-child { top: 6.5px; }
.menu-open .menu-lines i:first-child { top: 3.25px; transform: rotate(45deg); }
.menu-open .menu-lines i:last-child { top: 3.25px; transform: rotate(-45deg); }
.menu-open .nav { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; }
.menu-open .nav .logo-svg { color: #fff; }
.menu-open .nav-cta, .menu-open .nav-links { opacity: 0; pointer-events: none; }

/* ---------- full-screen menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 110;
  background: var(--silk); color: #fff;
  clip-path: circle(0px at var(--mx, 92%) var(--my, 40px));
  transition: clip-path 0.9s var(--ease-in-out);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--nav-h) + 28px) var(--pad) calc(28px + env(safe-area-inset-bottom)) max(var(--pad), 22px);
  visibility: hidden;
  overflow-y: auto;
  --bg: var(--silk); --fg: #fff; --muted: #a3a3a8; --line: rgba(255,255,255,.14);
}
.menu-open .menu { clip-path: circle(150vmax at var(--mx, 92%) var(--my, 40px)); visibility: visible; }
.menu-web { position: absolute; inset: 0; z-index: -1; opacity: 0.5; pointer-events: none; }
.menu-list { counter-reset: m; display: grid; gap: 2px; }
.menu-list a {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 8.5vw, 5.25rem); line-height: 1.08;
  font-variation-settings: "wdth" 100;
  transition: color 0.3s, font-variation-settings 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.menu-list a small { font-family: var(--font-text); font-size: var(--fs-xs); color: var(--muted); font-weight: 500; min-width: 1.6em; }
.menu-list a:hover { color: var(--venom-hot); font-variation-settings: "wdth" 80; }
.menu-list li { overflow: hidden; }
.menu-list li > a { transform: translateY(105%); }
.menu-open .menu-list li > a { transform: none; transition-delay: calc(0.25s + var(--i) * 0.05s); }
.menu-foot { display: grid; gap: 18px; color: var(--muted); font-size: var(--fs-sm); margin-top: 40px; opacity: 0; transition: opacity 0.6s 0.5s; }
.menu-open .menu-foot { opacity: 1; }
.menu-foot a { color: #fff; }
.menu-foot .row { display: flex; flex-wrap: wrap; gap: 10px 26px; }
@media (min-width: 900px) {
  .menu { flex-direction: row; align-items: flex-end; }
  .menu-foot { text-align: right; justify-items: end; }
}
.menu-open body, body.menu-open { overflow: hidden; }

/* ---------- reveal primitives ---------- */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.js [data-split] .wi { display: inline-block; transform: translateY(110%) rotate(4deg); transform-origin: 0 100%; transition: transform 1.1s var(--ease-out); transition-delay: calc(var(--i) * 45ms + var(--d, 0ms)); }
.js [data-split].in .wi { transform: none; }
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal="fade"] { transform: none; }
.rm [data-split] .wi, .rm [data-reveal] { transform: none !important; opacity: 1 !important; transition: none !important; }

/* ---------- cursor (fine pointers only) ---------- */
.cursor, .cursor-ring { position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none; border-radius: 50%; }
.cursor { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--venom); }
.cursor-ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: #fff;
  transition: width 0.45s var(--ease-out), height 0.45s var(--ease-out), margin 0.45s var(--ease-out), background-color 0.35s, border-color 0.35s;
}
.cursor-ring span { opacity: 0; transition: opacity 0.3s; }
.cursor-ring.is-link { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--venom); }
.cursor-ring.is-label { width: 88px; height: 88px; margin: -44px 0 0 -44px; background: var(--venom); border-color: var(--venom); }
.cursor-ring.is-label span { opacity: 1; }
.cursor-ring.is-hidden, .cursor.is-hidden { opacity: 0; }
html.fine.has-cursor, html.fine.has-cursor a, html.fine.has-cursor button { cursor: none; }
html.fine.has-cursor input, html.fine.has-cursor textarea { cursor: text; }

/* ---------- page transition / preloader ---------- */
.pt { position: fixed; inset: 0; z-index: 500; pointer-events: none; }
.pt-layer { position: absolute; inset: 0; transform: scaleY(0); transform-origin: 50% 100%; }
.pt-red { background: var(--venom); }
.pt-ink { background: var(--silk); }
.pt-mark { position: absolute; left: 50%; top: 50%; width: 64px; transform: translate(-50%, -50%) scale(0.6); opacity: 0; color: #fff; transition: opacity 0.4s, transform 0.8s var(--ease-out); }
.pt-count { position: absolute; left: max(var(--pad), 22px); bottom: calc(26px + env(safe-area-inset-bottom)); color: #fff; font-family: var(--font-display); font-size: clamp(3rem, 12vw, 9rem); font-weight: 600; line-height: 1; opacity: 0; font-variant-numeric: tabular-nums; }
.pt-note { position: absolute; right: var(--pad); bottom: calc(34px + env(safe-area-inset-bottom)); color: var(--ash); font-size: var(--fs-xs); opacity: 0; }
/* covered state (set before paint by inline head script) */
html.pt-cover .pt { pointer-events: all; animation: ptSafe 0.01s 6s forwards; }
@keyframes ptSafe { to { visibility: hidden; pointer-events: none; } }
html.pt-cover .pt-layer { transform: scaleY(1); }
html.pt-cover .pt-mark { opacity: 1; transform: translate(-50%, -50%) scale(1); }
html.pt-first .pt-count, html.pt-first .pt-note { opacity: 1; }
/* leaving the page */
html.pt-go .pt { pointer-events: all; }
html.pt-go .pt-layer { transform: scaleY(1); transition: transform 0.7s var(--ease-in-out); }
html.pt-go .pt-ink { transition-delay: 0.12s; }
html.pt-go .pt-mark { opacity: 1; transform: translate(-50%, -50%) scale(1); transition-delay: 0.45s; }
/* arriving: wipe upward */
html.pt-reveal .pt-layer { transform: scaleY(0); transform-origin: 50% 0; transition: transform 0.9s var(--ease-in-out); }
html.pt-reveal .pt-red { transition-delay: 0.1s; }
html.pt-reveal .pt-mark, html.pt-reveal .pt-count, html.pt-reveal .pt-note { opacity: 0; transition: opacity 0.3s; }
.pt-mark .draw { stroke: #fff; }

/* ---------- mobile dock (quick contact) ---------- */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 100;
  display: flex; gap: 8px; padding: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, #111 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.12);
  transform: translateY(140%); transition: transform 0.7s var(--ease-out);
}
.dock.is-on { transform: none; }
.dock .btn { --h: 48px; flex: 1; }
.dock .btn-wa { flex: none; width: 48px; padding: 0; background: #1f1f22; color: #fff; }
@media (min-width: 900px) { .dock { display: none; } }

/* ---------- footer ---------- */
.footer { position: relative; padding: 80px 0 calc(110px + env(safe-area-inset-bottom)); overflow: hidden; }
@media (min-width: 900px) { .footer { padding-bottom: 48px; } }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; font-size: var(--fs-sm); }
.footer-grid h4 { font-family: var(--font-text); font-size: var(--fs-xs); font-weight: 500; color: var(--muted); margin-bottom: 14px; letter-spacing: 0.02em; }
.footer-grid li + li { margin-top: 8px; }
.footer-grid a { position: relative; }
.footer-grid a:hover { color: var(--accent); }
.footer-lead { grid-column: 1 / -1; max-width: 30ch; font-size: var(--fs-lead); line-height: 1.35; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-lead { grid-column: auto; }
}
.footer-mark { margin-top: 72px; overflow: hidden; }
.footer-mark svg { width: 100%; height: auto; color: var(--fg); transform: translateY(40%); transition: transform 1.6s var(--ease-out); }
.footer-mark.in svg { transform: none; }
.footer-base { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-xs); }

/* ---------- shared bits ---------- */
.tag { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; }
.dot-red { width: 7px; height: 7px; border-radius: 50%; background: var(--venom); flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* pages without the story thread use a symmetric layout */
body[data-page="blog"], body[data-page="article"] { --gutter: var(--pad); }
body[data-theme="dark"] { --x-end: #4a0000; }
body[data-theme="light"] { --x-end: #1a0000; }

/* ---------- floating WhatsApp (desktop) ---------- */
.wa-float {
  position: fixed; right: 26px; bottom: 26px; z-index: 105;
  display: none; align-items: center; gap: 0;
  height: 58px; padding: 0 17px; border-radius: 999px;
  background: #25d366; color: #052e16; font-weight: 600; font-size: var(--fs-sm);
  box-shadow: 0 14px 40px -12px rgba(37,211,102,.6);
  transform: translateY(160%); transition: transform 0.7s var(--ease-out), gap 0.45s var(--ease-out), padding 0.45s var(--ease-out);
}
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid #25d366; animation: waRing 2.6s infinite var(--ease-out); pointer-events: none; }
@keyframes waRing { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.35); opacity: 0; } }
.wa-float svg { width: 24px; height: 24px; flex: none; }
.wa-float span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width 0.5s var(--ease-out); }
.wa-float:hover, .wa-float:focus-visible { gap: 10px; padding: 0 22px; }
.wa-float:hover span, .wa-float:focus-visible span { max-width: 180px; }
.wa-float.is-on { transform: none; }
@media (min-width: 900px) { .wa-float { display: inline-flex; } }

/* ===== Update 3 — Sora headings, faster transitions, calmer details ===== */
:root { --font-display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2, h3, h4 { letter-spacing: -0.025em; }

/* faster page transitions (about 0.4s) */
html.pt-go .pt-layer { transition-duration: 0.38s; }
html.pt-go .pt-ink { transition-delay: 0.05s; }
html.pt-go .pt-mark { transition-delay: 0.2s; }
html.pt-reveal .pt-layer { transition-duration: 0.5s; }
html.pt-reveal .pt-red { transition-delay: 0.04s; }

/* WhatsApp button: one pulse when it appears, then stays still */
.wa-float::before { animation: none; opacity: 0; }
.wa-float.is-on::before { animation: waRing 1.4s 0.5s 1 var(--ease-out) both; }

/* normal cursor on reading pages (blog, articles, legal, 404) */
body:is([data-page="blog"], [data-page="article"], [data-page="legal"], [data-page="404"]) :is(.cursor, .cursor-ring) { display: none; }
html.has-cursor body:is([data-page="blog"], [data-page="article"], [data-page="legal"], [data-page="404"]) { cursor: auto; }
html.has-cursor body:is([data-page="blog"], [data-page="article"], [data-page="legal"], [data-page="404"]) :is(a, button, label) { cursor: pointer; }
html.has-cursor body:is([data-page="blog"], [data-page="article"], [data-page="legal"], [data-page="404"]) :is(input, textarea) { cursor: text; }

/* Privacy Policy & Terms links in the footer */
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-legal a:hover { color: var(--fg); }

/* 404 page */
.nf { position: relative; isolation: isolate; overflow: hidden; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 40px) 0 80px; }
.nf canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.nf .nf-code { font-family: var(--font-display); font-weight: 700; font-size: clamp(5rem, 2rem + 16vw, 14rem); line-height: 0.9; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1.5px var(--line-strong); }
.nf h1 { font-size: clamp(2rem, 1rem + 4vw, 4.5rem); max-width: 14ch; margin: 18px 0 16px; }
.nf p { color: var(--muted); font-size: var(--fs-lead); line-height: 1.45; max-width: 42ch; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }

/* ===== Update 4 — clean outlined 404 number ===== */
.nf .nf-code { color: var(--bg); -webkit-text-stroke: 3px var(--line-strong); paint-order: stroke fill; }

/* ===== Update 5 — opening logo animation ===== */
html.intro::before { content: ""; position: fixed; inset: 0; z-index: 600; background: #000; animation: introSafe 0.01s 3.5s forwards; }
@keyframes introSafe { to { visibility: hidden; } }
.intro-ov { position: fixed; inset: 0; z-index: 610; pointer-events: none; }
.intro-ov i { position: absolute; left: 0; right: 0; height: 50.5%; background: #000; transition: transform 0.7s cubic-bezier(.76,0,.24,1); }
.intro-ov .io-top { top: 0; }
.intro-ov .io-bot { bottom: 0; }
.intro-ov.open .io-top { transform: translateY(-100%); }
.intro-ov.open .io-bot { transform: translateY(100%); }
.intro-ov .io-logo { position: fixed; left: 50%; top: 50%; color: #fff; opacity: 0; transform-origin: 50% 50%; will-change: transform; filter: drop-shadow(0 0 26px rgba(225,10,15,.4)); transition: opacity 0.5s ease, transform 0.55s cubic-bezier(.16,1,.3,1); }
.intro-ov .io-logo.show { opacity: 1; }
.intro-ov .io-logo svg { position: absolute; display: block; max-width: none; overflow: visible; }
.intro-ov .io-word { opacity: 0; transform: translateX(28%); transition: opacity 0.45s ease, transform 0.6s cubic-bezier(.16,1,.3,1); }
.intro-ov .io-logo.word .io-word { opacity: 1; transform: none; }
html.intro-fly .nav-logo { opacity: 0; }

/* ===== Update 5 — glow that follows the cursor (desktop) ===== */
@media (hover: hover) and (pointer: fine) {
  .sw-card, .lead-form, .a-cta { background-image: radial-gradient(460px circle at var(--gx, -999px) var(--gy, -999px), rgba(225,10,15,.13), transparent 62%); }
  .post-card .cover { transition: transform 0.6s cubic-bezier(.16,1,.3,1); will-change: transform; }
  .post-card .cover::before, .a-cover::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; background: radial-gradient(340px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.13), rgba(225,10,15,.10) 38%, transparent 66%); opacity: 0; transition: opacity 0.4s; }
  .post-card:hover .cover::before, .a-cover:hover::before { opacity: 1; }
}
.a-cover { position: relative; }

/* ===== Update 5 — red underline on key phrases ===== */
.mark-line { background: linear-gradient(var(--venom), var(--venom)) 0 100% / 0% 2px no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone; padding-bottom: 2px; color: var(--fg); transition: background-size 1.2s cubic-bezier(.16,1,.3,1) 0.25s, color 0.8s; }
.mark-line.in { background-size: 100% 2px; }

/* ===== Update 5 — the spider drops onto the footer logo ===== */
.footer-mark .fm-drop { transform: translateY(-480px); transition: transform 1.5s cubic-bezier(.34,1.4,.64,1) 0.55s; }
.footer-mark.in .fm-drop { transform: none; }
.footer-mark .fm-thread { stroke: var(--venom); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rm .footer-mark .fm-drop { transform: none; transition: none; }

/* ===== Update 5 — items pop in one by one (to remove: delete this block and its JS block) ===== */
.pop-in:not(.popped) > * { opacity: 0; transform: translateY(12px) scale(.96); }
.pop-in > * { transition: opacity 0.5s ease, transform 0.6s cubic-bezier(.34,1.4,.64,1); transition-delay: calc(var(--pi, 0) * 70ms); }

/* ===== Update 5 — illustrated blog covers ===== */
.js:not(.cv-ready) .cover > svg, .js:not(.cv-ready) .a-cover > svg { visibility: hidden; }
.cv { display: block; width: 100%; height: 100%; }
.cv .cv-needle { transform-box: view-box; transform-origin: 420px 300px; transition: transform 1s cubic-bezier(.34,1.4,.64,1); }
.cv .cv-load { transform-box: fill-box; transform-origin: left center; transition: transform 1s cubic-bezier(.16,1,.3,1); }
.cv .cv-pop, .cv .cv-float, .cv .cv-cell { transform-box: fill-box; transform-origin: center; transition: transform 0.7s cubic-bezier(.34,1.4,.64,1); transition-delay: var(--d, 0ms); }
.cv .cv-spin { transform-box: fill-box; transform-origin: center; transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.cv .cv-split { transition: stroke-width 0.4s; }
.post-card:hover .cv .cv-needle, .a-cover:hover .cv .cv-needle { transform: rotate(118deg); }
.post-card:hover .cv .cv-load { transform: scaleX(1.62); }
.post-card:hover .cv .cv-pop, .a-cover:hover .cv .cv-pop { transform: translateY(-8px) scale(1.06); }
.post-card:hover .cv .cv-float { transform: translate(40px, -20px); }
.post-card:hover .cv .cv-cell { transform: scale(1.12); }
.post-card:hover .cv .cv-spin, .a-cover:hover .cv .cv-spin { transform: rotate(180deg) scale(1.2); }
.post-card:hover .cv .cv-split { stroke-width: 6; }

/* ===== Update 13 — tighter footer on phones: one set of links (the Services column only
   pointed at the services section, which "Explore → Services" already does) ===== */
@media (max-width: 699px) {
  .footer { padding-top: 56px; }
  .footer-grid { gap: 32px; }
  .footer-grid > div:nth-of-type(2) { display: none; }
  .footer-mark { margin-top: 44px; }
}

/* ===== Update 23 — The Lab: link in the header (build.py). The footer strip is Update 24. ===== */

/* ===== Update 24 — "Taste of the Lab": a mini Lab at the top of every footer that plays five real effects by itself.
   Remove it by setting LAB_TEASER = False in build.py (this CSS and the Update 24 JS then do nothing). ===== */
.lab-tease { position: relative; overflow: hidden; display: grid; gap: 32px; margin-bottom: 64px; padding: 26px 22px; border-radius: 28px; background: linear-gradient(135deg, #151517, #0a0a0b); border: 1px solid var(--line); }
.lab-tease::before { content: ""; position: absolute; right: -15%; top: -45%; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(225, 10, 15, 0.3), transparent); pointer-events: none; }
body[data-page="lab"] .lab-tease { display: none; }
.lt-copy, .lt-demo { position: relative; }
.lt-kick { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lt-new { padding: 3px 8px; border-radius: 6px; background: var(--venom); color: #fff; font-size: 0.6875rem; }
.lt-h { margin-top: 14px; font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 1.2rem + 3.6vw, 4rem); line-height: 1; letter-spacing: -0.04em; }
.lt-p { margin-top: 14px; max-width: 40ch; color: var(--muted); font-size: var(--fs-body, 1rem); line-height: 1.5; }
.lt-steps { display: grid; gap: 14px; margin-top: 24px; counter-reset: none; }
.lt-steps li { display: flex; gap: 14px; align-items: flex-start; }
.lt-steps b { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 42, 48, 0.55); color: var(--venom-hot); font-family: var(--font-display); font-size: 0.875rem; }
.lt-steps span { display: grid; gap: 2px; font-size: var(--fs-sm); color: var(--muted); line-height: 1.4; }
.lt-steps strong { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.lt-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 28px; }
.lt-dice { font-size: var(--fs-sm); font-weight: 600; padding-bottom: 2px; border-bottom: 1px solid var(--venom-hot); }
.lt-dice:hover { color: var(--venom-hot); }
.lt-demo { display: block; align-self: center; }
.lt-win { display: block; border-radius: 16px; overflow: hidden; background: #1b1b1e; border: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 40px 80px -40px rgba(225, 10, 15, 0.55), 0 20px 50px -30px rgba(0, 0, 0, 0.8); transition: transform 0.6s var(--ease-out); }
.lt-demo:hover .lt-win { transform: translateY(-4px); }
.lt-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.lt-bar i { width: 8px; height: 8px; border-radius: 50%; background: #3a3a3f; }
.lt-bar i:first-child { background: var(--venom); }
.lt-bar span { margin: 0 auto; padding: 2px 12px; border-radius: 999px; background: #0d0d0f; color: #8b8b92; font-size: 0.6875rem; }
.lt-screen { position: relative; display: block; aspect-ratio: 16 / 11; overflow: hidden; background: #f7efe5; color: #2b1a10; container-type: inline-size; }
.lt-cap { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 16px; }
.lt-cap > span:first-child { display: grid; }
.lt-name { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; }
.lt-cat { font-size: var(--fs-xs); color: var(--muted); }
.lt-of { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lt-prog { display: block; height: 2px; margin-top: 10px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.lt-prog b { display: block; height: 100%; background: var(--venom); transform: scaleX(0); transform-origin: 0 50%; }
.lt-prog.run b { animation: ltProg 3.2s linear forwards; }
@keyframes ltProg { to { transform: none; } }
.lt-try { position: absolute; right: 12px; top: 42px; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.75); color: #fff; font-size: 0.75rem; font-weight: 600; opacity: 0; transform: translateY(-4px); transition: opacity 0.3s, transform 0.4s var(--ease-out); pointer-events: none; }
.lt-demo:hover .lt-try, .lt-demo:focus-visible .lt-try { opacity: 1; transform: none; }
.lab-tease.lt-off * { animation-play-state: paused !important; }
@media (max-width: 899px) {
  /* phones: the moving preview comes right after the heading, before the steps */
  .lab-tease { gap: 0; }
  .lt-copy { display: contents; }
  .lt-kick { order: 1; } .lt-h { order: 2; } .lt-p { order: 3; } .lt-demo { order: 4; margin-top: 24px; } .lt-steps { order: 5; } .lt-acts { order: 6; }
}
@media (min-width: 900px) {
  .lab-tease { grid-template-columns: 1fr 1.05fr; gap: 56px; padding: 56px; margin-bottom: 88px; align-items: center; }
}

/* the mini sample website inside the window (sizes follow the window width: cqi) */
.lt-sc { position: absolute; inset: 0; display: none; }
.lt-sc.on { display: block; }
.lt-sc p { margin: 0; }
.m-nav { display: flex; align-items: center; gap: 3cqi; height: 12cqi; padding: 0 5cqi; }
.m-logo { width: 14cqi; height: 2.6cqi; border-radius: 2cqi; background: #2b1a10; margin-right: auto; position: relative; padding-left: 0; }
.m-logo::before { content: ""; position: absolute; left: -3.4cqi; top: 50%; width: 2.4cqi; height: 2.4cqi; margin-top: -1.2cqi; border-radius: 50%; background: #c2410c; }
.m-nav .m-logo { margin-left: 3.4cqi; }
.m-l { width: 7cqi; height: 1.6cqi; border-radius: 2cqi; background: rgba(43, 26, 16, 0.3); }
.m-btn { width: 14cqi; height: 5.4cqi; border-radius: 3cqi; background: #c2410c; }
.m-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 5cqi; align-items: center; padding: 3cqi 5cqi; }
.m-k { font-size: 2.3cqi; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #c2410c; }
.m-h { margin-top: 1.6cqi !important; font-family: var(--font-display); font-weight: 700; font-size: 6.6cqi; line-height: 1.04; letter-spacing: -0.035em; }
.m-h > span { display: block; overflow: hidden; padding-bottom: 0.08em; }
.m-h > span > span { display: block; }
.m-pills { display: flex; gap: 2cqi; margin-top: 4cqi !important; }
.m-pill { width: 19cqi; height: 6.4cqi; border-radius: 4cqi; background: #c2410c; }
.m-ghost { background: none; box-shadow: inset 0 0 0 0.5cqi rgba(43, 26, 16, 0.35); }
.m-art { aspect-ratio: 1; border-radius: 4cqi; background: radial-gradient(circle at 75% 25%, #f08a4b 0 13%, transparent 13.5%), radial-gradient(circle at 20% 100%, #c2410c 0 40%, transparent 40.5%), linear-gradient(150deg, #ecd9c3, #e3b994); }
.lt-s1 .m-nav { animation: ltFade 0.6s var(--ease-out) both; }
.lt-s1 .m-k { animation: ltUp 0.7s 0.2s var(--ease-out) both; }
.lt-s1 .m-h > span > span { animation: ltRise 0.9s 0.3s cubic-bezier(.16, 1, .3, 1) both; }
.lt-s1 .m-h > span + span > span { animation-delay: 0.42s; }
.lt-s1 .m-pills { animation: ltUp 0.7s 0.7s var(--ease-out) both; }
.lt-s1 .m-art { animation: ltZoom 1.1s 0.4s cubic-bezier(.16, 1, .3, 1) both; }
.lt-s2 { display: none; place-items: center; padding: 6cqi; }
.lt-s2.on { display: grid; }
.m-card { width: 100%; padding: 5cqi; border-radius: 4cqi; background: #fff; box-shadow: 0 3cqi 8cqi -4cqi rgba(43, 26, 16, 0.25); animation: ltUp 0.6s var(--ease-out) both; }
.m-big { font-family: var(--font-display); font-weight: 700; font-size: 9cqi; letter-spacing: -0.03em; line-height: 1.1; }
.m-card svg { display: block; width: 100%; height: auto; margin-top: 2cqi; overflow: visible; }
.m-line { fill: none; stroke: #c2410c; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: ltDraw 1.6s 0.3s cubic-bezier(.65, 0, .35, 1) forwards; }
.m-area { fill: rgba(194, 65, 12, 0.14); animation: ltFade 0.9s 1.1s both; }
.lt-s3 .m-copy { opacity: 0.6; }
.m-burger { position: relative; z-index: 3; width: 7cqi; height: 7cqi; border-radius: 50%; background: rgba(43, 26, 16, 0.08); }
.m-burger i { position: absolute; left: 2cqi; right: 2cqi; height: 0.5cqi; background: #2b1a10; border-radius: 1cqi; top: 2.8cqi; animation: ltBar1 0.5s 0.5s both; }
.m-burger i + i { top: 3.8cqi; animation-name: ltBar2; }
.m-menu { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; gap: 1cqi; padding: 6cqi; background: #2b1a10; color: #f7efe5; clip-path: inset(0 0 100% 0); animation: ltDrop 0.7s 0.5s cubic-bezier(.76, 0, .24, 1) forwards; }
.m-menu > span { display: block; overflow: hidden; }
.m-menu > span > span { display: block; font-family: var(--font-display); font-weight: 700; font-size: 8cqi; line-height: 1.08; letter-spacing: -0.03em; animation: ltRise 0.7s cubic-bezier(.16, 1, .3, 1) both; }
.m-menu > span:nth-child(1) > span { animation-delay: 0.85s; }
.m-menu > span:nth-child(2) > span { animation-delay: 0.93s; }
.m-menu > span:nth-child(3) > span { animation-delay: 1.01s; }
.m-menu > span:nth-child(4) > span { animation-delay: 1.09s; }
.lt-s4 { background: #101014; overflow: hidden; }
.lt-s4.on { display: grid; place-items: center; }
.m-blob { position: absolute; width: 55%; aspect-ratio: 1; border-radius: 50%; }
.m-blob.b1 { left: -8%; top: -10%; background: radial-gradient(closest-side, #ff3b30, transparent); animation: ltDrift 5s ease-in-out infinite alternate; }
.m-blob.b2 { right: -12%; top: 20%; background: radial-gradient(closest-side, #7c5cff, transparent); animation: ltDrift 6s ease-in-out infinite alternate-reverse; }
.m-blob.b3 { left: 25%; bottom: -30%; background: radial-gradient(closest-side, #19c3b0, transparent); animation: ltDrift 7s ease-in-out infinite alternate; }
.m-glass { position: relative; width: 68%; padding: 5cqi; border-radius: 4cqi; color: #fff; background: rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.3); animation: ltUp 0.9s 0.2s cubic-bezier(.16, 1, .3, 1) both; }
.m-glass .m-k { color: #ff7a72; }
.m-gh { margin-top: 1.6cqi !important; font-family: var(--font-display); font-weight: 700; font-size: 5.6cqi; line-height: 1.08; letter-spacing: -0.03em; }
.m-glass .m-pill { background: #ff3b30; }
.m-glass .m-ghost { background: none; box-shadow: inset 0 0 0 0.5cqi rgba(255, 255, 255, 0.4); }
.lt-s5 .m-pa, .lt-s5 .m-pb { position: absolute; inset: 0; background: #f2f4ee; color: #13251a; }
.lt-s5 .m-logo, .lt-s5 .m-logo::before { background: #13251a; }
.lt-s5 .m-logo::before { background: #1f7a4d; }
.lt-s5 .m-copy { padding: 8cqi 5cqi; }
.m-hs { font-size: 8cqi; }
.lt-s5 .m-pb { animation: ltShow 0.01s 1.15s both; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqi; padding: 2cqi 5cqi; }
.m-grid i { aspect-ratio: 16 / 9; border-radius: 3cqi; background: linear-gradient(150deg, #d9e6d5, #9fcbb0); }
.m-grid i:nth-child(2) { background: linear-gradient(150deg, #1f7a4d, #9fcbb0); }
.m-grid i:nth-child(3) { background: linear-gradient(150deg, #cfe0c8, #1f7a4d); }
.m-w1, .m-w2 { position: absolute; inset: 0; transform: scaleY(0); transform-origin: 50% 100%; }
.m-w1 { background: #1f7a4d; animation: ltWipe 1.7s 0.35s cubic-bezier(.76, 0, .24, 1) both; }
.m-w2 { background: #13251a; color: #f2f4ee; display: grid; place-items: center; animation: ltWipe 1.7s 0.45s cubic-bezier(.76, 0, .24, 1) both; }
.m-w2 b { font-family: var(--font-display); font-weight: 700; font-size: 6cqi; letter-spacing: -0.02em; animation: ltFlash 1.7s 0.45s both; }
@keyframes ltFade { from { opacity: 0; } }
@keyframes ltUp { from { opacity: 0; transform: translateY(6cqi); } }
@keyframes ltRise { from { transform: translateY(110%); } }
@keyframes ltZoom { from { opacity: 0; transform: scale(0.82); } }
@keyframes ltDraw { to { stroke-dashoffset: 0; } }
@keyframes ltDrop { to { clip-path: inset(0 0 0% 0); } }
@keyframes ltBar1 { to { top: 3.3cqi; transform: rotate(45deg); background: #f7efe5; } }
@keyframes ltBar2 { to { top: 3.3cqi; transform: rotate(-45deg); background: #f7efe5; } }
@keyframes ltDrift { to { transform: translate(14%, 10%) scale(1.2); } }
@keyframes ltShow { from { visibility: hidden; } to { visibility: visible; } }
@keyframes ltWipe { 0% { transform: scaleY(0); transform-origin: 50% 100%; } 40%, 55% { transform: scaleY(1); transform-origin: 50% 100%; } 56% { transform-origin: 50% 0; } 100% { transform: scaleY(0); transform-origin: 50% 0; } }
@keyframes ltFlash { 0%, 30% { opacity: 0; } 42%, 58% { opacity: 1; } 70%, 100% { opacity: 0; } }

/* ===== Update 26 — less red (6 Nov 2026). Red now means "this matters": the spiders, the main Let's Talk buttons,
   the rotating hero word and a few story moments. Decoration turns moonlight silver on dark sections and black on light ones.
   --trim follows the section theme like --fg. To bring the old reds back, delete the Update 26 blocks in base.css, home.css and lab.css. ===== */
:root { --moon: #dfe3ea; }
body { --trim: var(--moon); --accent: var(--moon); }
body[data-theme="light"] { --trim: #111; --accent: #111; }
::selection { background: var(--moon); color: #000; }
.menu-ring .prog { stroke: var(--moon); }
.menu-list a:hover { color: var(--moon); }
.cursor-ring.is-link { border-color: var(--moon); }
.cursor-ring.is-label { background: #fff; border-color: #fff; color: #000; }
.pt-red { background: var(--moon); }
.mark-line { background-image: linear-gradient(var(--trim), var(--trim)); }
.footer-mark .fm-thread { stroke: var(--moon); }
.dock .btn-red { background: #fff; color: #000; }
.dock .btn-red::before { background: var(--venom); }
.dock .btn-red:hover { color: #fff; }
/* the Lab strip in the footer */
.lab-tease::before { background: radial-gradient(closest-side, rgba(223, 227, 234, 0.14), transparent); }
.lt-new { background: #fff; color: #000; }
.lt-steps b { border-color: rgba(223, 227, 234, 0.4); color: #fff; }
.lt-dice { border-bottom-color: var(--moon); }
.lt-dice:hover { color: #fff; }
.lt-win { box-shadow: 0 40px 80px -40px rgba(223, 227, 234, 0.25), 0 20px 50px -30px rgba(0, 0, 0, 0.8); }
.lt-bar i:first-child { background: #5a5a60; }
.lt-prog b { background: var(--moon); }
.lab-tease .btn-red { background: #fff; color: #000; }
.lab-tease .btn-red::before { background: var(--venom); }
.lab-tease .btn-red:hover { color: #fff; }
