/* ==========================================================
   Chatterbox I.T. — design tokens
   Palette is unchanged from the original site; each color has a job.
========================================================== */
:root {
  --ink: #2a2730;          /* dark bands, footer, text on lavender */
  --plum: #5c5470;         /* headlines, primary buttons, links */
  --orchid: #9772ac;       /* large accents, the page thread */
  --orchid-deep: #7b5d8b;  /* hover/pressed, accent words */
  --lavender: #c3acd0;     /* glows, borders, threads on dark */
  --blush: #ecd5fa;        /* selected states, chips, nav pill */
  --mist: #f5f4f6;         /* page ground */
  --paper: #f9f7fc;        /* cards and raised surfaces */
  --text: #2e2e2e;
  --muted: #6e6e73;
  --mint: #86efac;         /* success only */
  --white: #ffffff;
  --danger: #a3453b;

  --ink-raise: color-mix(in srgb, var(--ink) 92%, var(--lavender));
  --ink-line: color-mix(in srgb, var(--lavender) 18%, transparent);
  --on-ink: color-mix(in srgb, var(--paper) 86%, transparent);
  --on-ink-dim: color-mix(in srgb, var(--paper) 64%, transparent);
  --line: color-mix(in srgb, var(--plum) 16%, transparent);
  --dim: color-mix(in srgb, var(--plum) 30%, var(--mist));

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-accent: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --wrap: 1200px;
  --gutter: max(16px, 4vw);
}

/* ==========================================================
   Base
========================================================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.03em; line-height: 1.02; text-wrap: balance; color: var(--ink); }
p, figure, dl, dd, ol, ul { margin: 0; }
a { color: inherit; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orchid); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--blush); color: var(--ink); }

.wrap { position: relative; z-index: 2; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--font-mono); }
.em { font-family: var(--font-accent); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--paper); text-decoration: none; transition: top .2s; }
.skip:focus { top: 16px; }

section { padding-block: clamp(72px, 10vw, 128px); }
.eyebrow { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--orchid-deep); font-weight: 500; }
.section-head { display: grid; gap: 16px; max-width: 780px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(34px, 5vw, 60px); }
.section-head h2 .em { color: var(--orchid-deep); }
.lead { font-size: clamp(17px, 1.4vw, 19px); color: var(--muted); max-width: 62ch; }

.ink { background: var(--ink); color: var(--on-ink); }
.ink h2, .ink h3 { color: var(--paper); }
.ink .section-head h2 .em { color: var(--lavender); }
.ink .eyebrow { color: var(--lavender); }
.ink .lead { color: var(--on-ink-dim); }

/* ==========================================================
   Buttons
========================================================== */
.btn-primary {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 26px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--plum); color: var(--white); font-weight: 600; font-size: 16px; text-decoration: none;
  isolation: isolate; transition: transform .35s var(--ease), background .25s;
}
.btn-primary:hover { background: var(--orchid-deep); }
.btn-primary .mag-inner { display: inline-flex; align-items: center; gap: 10px; transition: transform .35s var(--ease); }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.trail {
  position: absolute; inset: -2px; border-radius: inherit; padding: 2px; z-index: -1; pointer-events: none;
  background: conic-gradient(from var(--a), transparent 0 62%, var(--lavender) 82%, var(--white) 88%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: spin 3.2s linear infinite;
}
@keyframes spin { to { --a: 360deg; } }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px; padding: 15px 22px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 70%, transparent);
  color: var(--plum); font-weight: 600; font-size: 16px; text-decoration: none; transition: background .25s, border-color .25s;
}
.btn-ghost:hover { background: var(--blush); border-color: transparent; }

/* ==========================================================
   Logo draw (SVG injected by main.js)
========================================================== */
.logo-draw svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ld-path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.logo-draw.pending .ld-path { stroke-dashoffset: 1; }
.drawing .ld-path { animation: draw 1.9s var(--ease-io) both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* ==========================================================
   Intro preloader (first visit per session) + page curtain
========================================================== */
.preloader {
  display: none; position: fixed; inset: 0; z-index: 200; background: var(--paper);
  place-content: center; justify-items: center; gap: 14px;
  clip-path: inset(0 0 0 0); transition: clip-path .85s var(--ease-io);
  animation: failsafe 0s 6s forwards;   /* never trap the page if a script fails */
}
.intro .preloader { display: grid; }
.preloader.leave { clip-path: inset(0 0 100% 0); }
.preloader .logo-draw { width: min(170px, 42vw); aspect-ratio: 270 / 320; }
.pre-word { font-weight: 700; font-size: 26px; letter-spacing: -.03em; color: var(--ink); opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.preloader.show-word .pre-word { opacity: 1; transform: none; }
.pre-count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.curtain {
  display: none; position: fixed; inset: 0; z-index: 150; background: var(--lavender); color: var(--ink);
  place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 24px;
  clip-path: inset(100% 0 0 0);
}
.curtain-in .curtain { display: grid; clip-path: inset(0 0 0 0); animation: failsafe 0s 4s forwards; }
.curtain.show { display: grid; }
.curtain b { font-size: clamp(44px, 9vw, 132px); letter-spacing: -.05em; line-height: .95; font-weight: 800; }
.curtain span { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--plum); }
@keyframes failsafe { to { visibility: hidden; } }


/* ==========================================================
   Nav
========================================================== */
.nav-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: calc(env(safe-area-inset-top, 0px) + 14px) 12px 0; display: flex; justify-content: center; pointer-events: none; }
.nav {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--line); box-shadow: 0 10px 34px -14px color-mix(in srgb, var(--plum) 45%, transparent);
  transition: padding .45s var(--ease), gap .45s var(--ease); max-width: 100%; min-width: 0;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; color: var(--ink); letter-spacing: -.02em; white-space: nowrap; flex: none; }
.brand img { width: 30px; height: 30px; }
.brand span { display: inline-block; max-width: 150px; overflow: hidden; transition: max-width .45s var(--ease), opacity .3s; }
.nav.compact { padding: 6px 6px 6px 8px; gap: 4px; }
.nav.compact .brand span { max-width: 0; opacity: 0; }
.nav-links { position: relative; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { position: relative; z-index: 1; padding: 8px 13px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--plum); text-decoration: none; white-space: nowrap; transition: color .25s; }
.nav-links a.on { color: var(--ink); }
.nav-pill { position: absolute; z-index: 0; top: 0; left: 0; height: 100%; width: 0; border-radius: 999px; background: var(--blush); opacity: 0; transition: transform .45s var(--ease), width .45s var(--ease), opacity .3s; }
.nav-cta { flex: none; padding: 9px 16px; border-radius: 999px; background: var(--plum); color: var(--white); text-decoration: none; font-size: 14.5px; font-weight: 600; white-space: nowrap; transition: background .25s; }
.nav-cta:hover { background: var(--orchid-deep); }
@media (max-width: 720px) { .brand span, .nav-cta { display: none; } .nav-links a { padding: 8px 11px; font-size: 14px; } }

/* ==========================================================
   Hero
========================================================== */
.hero { position: relative; padding-block: 0; }
.hero-pin { position: relative; overflow: hidden; padding-top: clamp(124px, 14vw, 176px); padding-bottom: clamp(64px, 8vw, 104px); }
.hero.is-pinned { height: calc(var(--pin-h, 100vh) + 170vh); }
.hero.is-pinned .hero-pin { position: sticky; top: var(--pin-top, 0px); height: 100vh; display: flex; align-items: center; padding-block: 96px 64px; }
/* Phones: the stage keeps its natural height and sticks once the chat is fully in view (home.js sets --pin-top). */
@media (max-width: 900px) {
  .hero.is-pinned .hero-pin { height: auto; display: block; padding-top: clamp(124px, 14vw, 176px); padding-bottom: 72px; }
  .hero.is-pinned .chat-body { height: clamp(220px, calc(100svh - 280px), 360px); }
}
@media (max-width: 420px) { .chat .chat-body .m.wide { width: 100%; max-width: 100%; } .chat .steps4 li { font-size: 10.5px; } }
@media (max-width: 360px) { .chat .steps4 li { font-size: 9.5px; hyphens: auto; } }
.hero.is-pinned .hero-grid { width: 100%; }
.hero-pin::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--plum) 24%, transparent) 1px, transparent 1.3px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 80%); mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 80%);
}

/* Halo: a soft ring in the palette that opens as the hero conversation plays */
@property --ha { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.halo { position: absolute; z-index: 1; left: 50%; top: 62%; width: max(1100px, 100vw); aspect-ratio: 1; translate: -50% -50%; scale: var(--hs, .86); opacity: var(--ho, .9); pointer-events: none; }
.halo i { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from var(--ha), var(--lavender), var(--orchid) 22%, var(--blush) 45%, var(--plum) 62%, var(--lavender) 80%, var(--blush)); -webkit-mask: radial-gradient(closest-side, transparent 92.5%, #000 96.5%, transparent 100%); mask: radial-gradient(closest-side, transparent 92.5%, #000 96.5%, transparent 100%); filter: blur(10px); animation: halo-spin 30s linear infinite; }
.halo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(closest-side, transparent 78%, color-mix(in srgb, var(--lavender) 34%, transparent) 95%, transparent 100%); filter: blur(28px); }
@keyframes halo-spin { to { --ha: 360deg; } }
@media (max-width: 900px) { .halo { width: 170vw; top: 70%; } }
.aurora {
  position: absolute; inset: -10%; z-index: -1; pointer-events: none; filter: blur(26px);
  background:
    radial-gradient(28% 36% at 12% 88%, color-mix(in srgb, var(--blush) 95%, transparent), transparent 72%),
    radial-gradient(20% 26% at 90% 92%, color-mix(in srgb, var(--orchid) 28%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(36px, 5vw, 72px); align-items: center; }
.hero-eyebrow { display: flex; align-items: center; gap: 12px; }
.hero-mark { width: 38px; height: 45px; flex: none; }
.hero h1 { font-size: clamp(44px, 7.4vw, 104px); line-height: .96; letter-spacing: -.045em; margin-top: 18px; }
.loop { display: inline-block; position: relative; white-space: nowrap; vertical-align: baseline; transition: width .6s var(--ease); }
.loop-word { display: inline-block; font-family: var(--font-accent); font-style: italic; font-weight: 400; letter-spacing: -.01em; padding-right: .04em; background: linear-gradient(95deg, var(--plum), var(--orchid) 75%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.loop-word.out { position: absolute; left: 0; top: 0; }
.hero .lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 46ch; margin-top: 24px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; align-items: center; }

/* chat card */
.chat { background: color-mix(in srgb, var(--paper) 62%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 40px 80px -42px color-mix(in srgb, var(--plum) 60%, transparent); overflow: hidden; min-width: 0; }
.chat-head, .cf-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-head img, .cf-head img { width: 36px; height: 36px; border-radius: 50%; background: var(--blush); padding: 3px; flex: none; }
.chat-head b, .cf-head b { display: block; font-size: 15px; color: var(--ink); line-height: 1.2; }
.online { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 35%, transparent); }
.chat-meta { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.chat-body { height: 410px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 18px; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 16%); mask-image: linear-gradient(transparent, #000 16%); }
.msg { max-width: 86%; padding: 11px 15px; border-radius: 20px; font-size: 15px; line-height: 1.45; flex: none; }
.msg.anim { animation: pop .45s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
.msg.them, .msg.bot { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 6px; color: var(--text); }
.msg.us, .msg.user { align-self: flex-end; background: var(--plum); color: var(--white); border-bottom-right-radius: 6px; }
.typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--blush); animation: dots 1.1s infinite; }
.msg.bot.typing span { background: var(--lavender); }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 60%, 100% { transform: translateY(0); opacity: .55; } 30% { transform: translateY(-5px); opacity: 1; } }
.msg.card { background: var(--ink); color: var(--paper); padding: 14px; width: 86%; }
.chat-body .m { display: flex; flex-direction: column; gap: 4px; flex: none; max-width: 86%; }
.chat-body .m.them { align-self: flex-start; }
.chat-body .m.us { align-self: flex-end; align-items: flex-end; }
.chat-body .m.wide { width: 86%; }
.chat-body .m .msg { max-width: 100%; }
.chat-body .m .msg.card { width: 100%; }
.chat-body .m.anim { animation: pop .45s var(--ease) both; }
.chat-body .m:not(.latest) .msg { opacity: .78; transition: opacity .4s; }
.chat-body .typing-row { align-self: flex-end; }
.chat-body .typing-row.them { align-self: flex-start; }
.chat-body .typing-row .msg { opacity: 1; background: var(--plum); border-radius: 20px 20px 6px 20px; }
.chat-body .typing-row.them .msg { background: var(--white); border: 1px solid var(--line); border-radius: 20px 20px 20px 6px; }
.chat-body .typing-row.them .typing span { background: var(--lavender); }
.meta { display: flex; gap: 10px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-inline: 4px; }
.m.latest .meta .when { color: var(--orchid-deep); font-weight: 600; }
.chat-hint { display: none; margin-top: 14px; text-align: center; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); transition: opacity .4s; }
.hero.is-pinned .chat-hint { display: block; }
.hero-skip { display: none; position: absolute; right: var(--gutter); bottom: 22px; z-index: 3; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 70%, transparent); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--plum); text-decoration: none; transition: background .25s, opacity .4s; }
.hero-skip:hover { background: var(--blush); }
.hero.is-pinned .hero-skip { display: block; }
.mc-top { display: flex; justify-content: space-between; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; color: var(--lavender); }
.mc-title { font-weight: 600; margin: 6px 0 12px; color: var(--paper); }
.steps4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; list-style: none; padding: 0; }
.steps4 li { font-size: 11px; line-height: 1.3; padding-top: 8px; border-top: 3px solid color-mix(in srgb, var(--lavender) 22%, transparent); color: var(--on-ink-dim); }
.steps4 li.done { border-color: var(--lavender); color: var(--paper); }
.steps4 li.now { border-color: var(--mint); color: var(--paper); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .chat-body { height: 360px; } }

/* ==========================================================
   Industries marquee
========================================================== */
.band { background: var(--ink); padding-block: 30px; position: relative; z-index: 2; }
.band::before, .band::after { content: ""; position: absolute; left: 0; right: 0; border-top: 2px dashed color-mix(in srgb, var(--lavender) 45%, transparent); }
.band::before { top: 10px; }
.band::after { bottom: 10px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; gap: 28px; padding-right: 28px; flex: none; }
.marquee-group span { font-size: clamp(22px, 2.6vw, 34px); font-weight: 600; letter-spacing: -.025em; color: var(--paper); white-space: nowrap; }
.marquee-group span.em { color: var(--lavender); font-weight: 400; }
.marquee-group i { font-style: normal; color: var(--orchid); font-size: 22px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================
   Services bento
========================================================== */
.services { padding-top: clamp(64px, 8vw, 104px); }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; padding: 22px;
  border-radius: 22px; background: var(--ink-raise); border: 1px solid var(--ink-line); overflow: hidden; min-width: 0;
  transition: transform .5s var(--ease), border-color .3s; --x: 50%; --y: 50%;
}
.tile::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(380px circle at var(--x) var(--y), color-mix(in srgb, var(--lavender) 16%, transparent), transparent 60%); }
.tile::after {
  content: ""; position: absolute; inset: 10px; pointer-events: none; opacity: 0; transition: opacity .3s, inset .4s var(--ease);
  background:
    linear-gradient(var(--lavender), var(--lavender)) top left / 14px 1.5px no-repeat, linear-gradient(var(--lavender), var(--lavender)) top left / 1.5px 14px no-repeat,
    linear-gradient(var(--lavender), var(--lavender)) top right / 14px 1.5px no-repeat, linear-gradient(var(--lavender), var(--lavender)) top right / 1.5px 14px no-repeat,
    linear-gradient(var(--lavender), var(--lavender)) bottom left / 14px 1.5px no-repeat, linear-gradient(var(--lavender), var(--lavender)) bottom left / 1.5px 14px no-repeat,
    linear-gradient(var(--lavender), var(--lavender)) bottom right / 14px 1.5px no-repeat, linear-gradient(var(--lavender), var(--lavender)) bottom right / 1.5px 14px no-repeat;
}
.tile:hover { border-color: color-mix(in srgb, var(--lavender) 34%, transparent); }
.tile:hover::before { opacity: 1; }
.tile:hover::after { opacity: 1; inset: 7px; }
.tile > * { position: relative; }
.t-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--lavender); }
.tile h3 { font-size: clamp(20px, 1.8vw, 25px); color: var(--paper); margin-top: 6px; letter-spacing: -.02em; line-height: 1.12; }
.t-desc { font-size: 15px; color: var(--on-ink); margin-top: 8px; max-width: 46ch; }
.t-say { font-size: 14px; color: var(--on-ink-dim); margin-top: 10px; line-height: 1.5; }
.t-say span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--blush); margin-right: 8px; }
.surface { background: color-mix(in srgb, var(--paper) 5%, transparent); border: 1px solid var(--ink-line); border-radius: 14px; }
.tile-erp { grid-column: span 2; grid-row: span 2; }
.tile-platform, .tile-web, .tile-soft { grid-column: span 2; }
@media (max-width: 960px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile-erp { grid-row: auto; } }
@media (max-width: 600px) { .bento { grid-template-columns: minmax(0, 1fr); } .tile-erp, .tile-platform, .tile-web, .tile-soft { grid-column: auto; } }

/* erp */
.erp-demo { display: grid; gap: 10px; }
.order { padding: 16px; }
.order-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-top .mono { font-size: 12px; color: var(--lavender); }
.chip { font-family: var(--font-mono); font-size: 11px; padding: 5px 9px; border-radius: 999px; background: var(--blush); color: var(--ink); transition: background .3s; white-space: nowrap; }
.chip.ok { background: var(--mint); }
.order-title { color: var(--paper); font-weight: 600; margin: 10px 0 14px; font-size: 16px; }
.order-title small { display: block; font-weight: 400; color: var(--on-ink-dim); font-size: 13px; }
.stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; list-style: none; padding: 0; }
.stages li { font-size: 11.5px; line-height: 1.25; color: var(--on-ink-dim); position: relative; padding-top: 18px; transition: color .3s; }
.stages li::before { content: ""; position: absolute; top: 0; left: 0; width: 11px; height: 11px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--lavender) 45%, transparent); transition: background .3s, border-color .3s, box-shadow .3s; }
.stages li.done { color: var(--paper); }
.stages li.done::before { background: var(--lavender); border-color: var(--lavender); }
.stages li.now { color: var(--paper); }
.stages li.now::before { border-color: var(--mint); background: var(--mint); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mint) 25%, transparent); }
.bar { height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--lavender) 18%, transparent); margin-top: 14px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 50%; background: linear-gradient(90deg, var(--lavender), var(--blush)); border-radius: inherit; transition: width .7s var(--ease); }
.order-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; font-size: 14px; color: var(--on-ink); }
.order-row .mono { font-size: 11.5px; color: var(--lavender); margin-right: 8px; }
.order-row .chip { background: color-mix(in srgb, var(--lavender) 22%, transparent); color: var(--paper); }
.order-row .chip.ok { background: var(--mint); color: var(--ink); }

/* platform */
.hub { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: 1fr 1fr; align-items: center; gap: 18px 12px; height: 170px; padding: 6px; }
.hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.hub-lines path { fill: none; stroke: var(--lavender); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 4 6; animation: flow 1.1s linear infinite; }
.hub-lines path.rev { animation-direction: reverse; }
@keyframes flow { to { stroke-dashoffset: -20; } }
.node { position: relative; justify-self: start; font-size: 13px; padding: 8px 12px; border-radius: 999px; background: var(--ink); border: 1px solid var(--ink-line); color: var(--on-ink); white-space: nowrap; }
.node.r { justify-self: end; }
.node::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--lavender); margin-right: 8px; vertical-align: middle; animation: blink 2.4s infinite; }
.node.n2::before { animation-delay: .6s; }
.node.n3::before { animation-delay: 1.2s; }
.node.n4::before { animation-delay: 1.8s; }
@keyframes blink { 0%, 70%, 100% { opacity: .35; } 35% { opacity: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--lavender) 25%, transparent); } }
.hub-core { position: relative; grid-row: 1 / 3; grid-column: 2; font-weight: 700; font-size: 15px; color: var(--ink); background: var(--lavender); padding: 14px 18px; border-radius: 16px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--lavender) 18%, transparent), 0 0 40px color-mix(in srgb, var(--lavender) 35%, transparent); }
@media (max-width: 480px) {
  .node { white-space: normal; font-size: 12px; padding: 6px 9px; text-align: center; }
  .node::before { display: none; }
  .hub { gap: 14px 8px; }
  .hub-core { padding: 10px 12px; font-size: 14px; }
  .stages li { font-size: 10.5px; overflow-wrap: anywhere; }
}

/* trackers */
.bars { display: flex; align-items: flex-end; gap: 7px; height: 110px; padding: 14px 14px 0; }
.bars span { flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--lavender), color-mix(in srgb, var(--lavender) 30%, transparent)); transition: height .8s var(--ease); }
.bars span:last-child { background: linear-gradient(180deg, var(--blush), var(--orchid)); }
.bars-x { display: flex; justify-content: space-between; padding: 6px 16px 12px; font-size: 10.5px; color: var(--on-ink-dim); }
.kpi { font-size: 13px; color: var(--on-ink-dim); padding: 0 14px 14px; }
.kpi b { color: var(--mint); font-family: var(--font-mono); font-weight: 500; margin-right: 6px; }

/* data */
.search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-family: var(--font-mono); font-size: 13px; color: var(--paper); border-bottom: 1px solid var(--ink-line); min-height: 42px; }
.search svg { width: 14px; height: 14px; flex: none; color: var(--lavender); }
.caret { width: 1.5px; height: 15px; background: var(--lavender); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.files { list-style: none; padding: 6px; min-height: 164px; } /* room for all rows, so filtering never moves the page */
.files li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--on-ink); padding: 6px; border-radius: 8px; max-height: 40px; overflow: hidden; transition: opacity .35s, max-height .45s var(--ease), padding .45s var(--ease); }
.files li.hide { opacity: 0; max-height: 0; padding-block: 0; }
.files li i { width: 26px; height: 26px; border-radius: 7px; flex: none; background: var(--sw); }
.files li .mono { font-size: 11px; color: var(--lavender); }
.files li span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* web */
.browser { overflow: hidden; }
.browser-bar { display: flex; gap: 6px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--ink-line); }
.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--lavender) 35%, transparent); }
.browser-bar span { margin-left: 8px; flex: 1; height: 14px; border-radius: 7px; background: color-mix(in srgb, var(--paper) 6%, transparent); }
.site { padding: 14px; display: grid; gap: 9px; }
.b { opacity: .12; transform: translateY(8px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.b.in { opacity: 1; transform: none; }
.b-nav { display: flex; justify-content: space-between; align-items: center; }
.b-nav i { width: 18px; height: 18px; border-radius: 50%; background: var(--lavender); }
.b-nav span { display: flex; gap: 6px; }
.b-nav span em { width: 28px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--paper) 25%, transparent); }
.b-h1 { height: 14px; width: 78%; border-radius: 4px; background: var(--paper); }
.b-h2 { height: 14px; width: 52%; border-radius: 4px; background: var(--lavender); }
.b-btn { height: 20px; width: 84px; border-radius: 999px; background: var(--plum); border: 1px solid var(--lavender); }
.b-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.b-cards i { height: 38px; border-radius: 8px; background: color-mix(in srgb, var(--paper) 8%, transparent); border: 1px solid var(--ink-line); }

/* complex software */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: end; }
.checks { list-style: none; padding: 14px; display: grid; gap: 9px; font-family: var(--font-mono); font-size: 12.5px; color: var(--on-ink-dim); }
.checks li { display: flex; gap: 10px; align-items: center; transition: color .3s; }
.checks li::before { content: ""; width: 15px; height: 15px; border-radius: 5px; border: 1.5px solid color-mix(in srgb, var(--lavender) 45%, transparent); flex: none; transition: background .3s, border-color .3s; background-repeat: no-repeat; background-position: center; }
.checks li.ok { color: var(--paper); }
.checks li.ok::before { background-color: var(--mint); border-color: var(--mint); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-4.9' fill='none' stroke='%232a2730' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@media (max-width: 600px) { .split { grid-template-columns: 1fr; } }

/* ==========================================================
   About
========================================================== */
.statement { font-size: clamp(28px, 4vw, 52px); font-weight: 600; letter-spacing: -.032em; line-height: 1.14; max-width: 18em; margin-top: 22px; color: var(--ink); }
.statement .w { color: var(--dim); transition: color .35s; }
.statement .w.lit { color: var(--ink); }
.statement .w.accent { font-family: var(--font-accent); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.statement .w.accent.lit { color: var(--orchid-deep); }
/* Our story: cards with stories-style progress bars, slid along by scroll (swiped on phones) */
.story { position: relative; margin-top: clamp(48px, 7vw, 88px); }
.story.is-pinned { height: calc(100vh + 200vh); }
.story-pin { overflow: hidden; }
.story.is-pinned .story-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; }
.story-track { position: relative; z-index: 2; display: flex; gap: 20px; padding: 8px var(--gutter); --b0: 0; --b1: 0; --b2: 0; --b3: 0; }
.story.is-pinned .story-track { will-change: transform; touch-action: pan-y; }
.story:not(.is-pinned) .story-track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.story:not(.is-pinned) .story-track::-webkit-scrollbar { display: none; }
.story-card { flex: none; width: min(360px, 80vw); min-height: min(500px, 74vh); border-radius: 22px; padding: 22px; background: var(--sc-bg); color: var(--sc-fg); display: flex; flex-direction: column; gap: 18px; scroll-snap-align: center; box-shadow: 0 30px 60px -36px color-mix(in srgb, var(--ink) 60%, transparent); }
.story.is-pinned .story-card { scale: calc(.92 + .08 * var(--near, 0)); opacity: calc(.45 + .55 * var(--near, 0)); }
.sc-top { display: grid; gap: 12px; }
.sc-chip { justify-self: start; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px; border-radius: 6px; background: color-mix(in srgb, currentColor 12%, transparent); }
.sc-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; list-style: none; padding: 0; }
.sc-bars li { position: relative; height: 3px; border-radius: 2px; overflow: hidden; background: color-mix(in srgb, currentColor 22%, transparent); }
.sc-bars li::after { content: ""; position: absolute; inset: 0; background: currentColor; transform-origin: left; transform: scaleX(var(--f, 0)); }
.sc-bars li:nth-child(1)::after { --f: var(--b0); }
.sc-bars li:nth-child(2)::after { --f: var(--b1); }
.sc-bars li:nth-child(3)::after { --f: var(--b2); }
.sc-bars li:nth-child(4)::after { --f: var(--b3); }
.sc-title { font-family: var(--font-accent); font-weight: 400; font-size: clamp(32px, 3vw, 42px); line-height: 1.02; letter-spacing: -.01em; color: inherit; }
.sc-art { position: relative; flex: 1; min-height: 120px; }
.sc-body { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; line-height: 1.55; }
.art-dots { display: flex; align-items: center; justify-content: center; gap: 14px; }
.art-dots i { width: 22px; height: 22px; border-radius: 50%; background: var(--lavender); animation: dots 1.4s infinite; }
.art-dots i:nth-child(2) { background: var(--blush); animation-delay: .18s; }
.art-dots i:nth-child(3) { background: var(--orchid); animation-delay: .36s; }
.art-stitch { margin-inline: -22px; background: repeating-linear-gradient(-35deg, transparent 0 16px, color-mix(in srgb, var(--plum) 55%, transparent) 16px 18px); -webkit-mask: repeating-linear-gradient(55deg, #000 0 9px, transparent 9px 14px); mask: repeating-linear-gradient(55deg, #000 0 9px, transparent 9px 14px); }
.art-orb::before { content: ""; position: absolute; left: 50%; top: 50%; width: min(70%, 190px); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--paper) 0%, var(--blush) 30%, var(--orchid) 70%, var(--plum) 100%); }
.art-track { display: flex; align-items: center; justify-content: space-between; margin-inline: 6px; }
.art-track::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: color-mix(in srgb, currentColor 30%, transparent); }
.art-track i { position: relative; width: 18px; height: 18px; border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 55%, transparent); background: var(--sc-bg); }
.art-track i.done { background: var(--lavender); border-color: var(--lavender); }
.art-track i.now { background: var(--mint); border-color: var(--mint); box-shadow: 0 0 0 6px color-mix(in srgb, var(--mint) 25%, transparent); animation: pulse-now 1.8s ease-in-out infinite; }
@keyframes pulse-now { 50% { box-shadow: 0 0 0 11px color-mix(in srgb, var(--mint) 10%, transparent); } }


/* ==========================================================
   Work chapters (home) and case studies (portfolio)
========================================================== */
.work { background: var(--paper); border-top: 1px solid var(--line); }
.chapters { display: grid; gap: clamp(28px, 5vh, 56px); }
/* --stick is set by home.js when a card is taller than the space below its slot, so it sticks once its bottom is in view. */
.chapter { position: sticky; top: var(--stick, calc(env(safe-area-inset-top, 0px) + 86px + var(--i) * 14px)); }
html:not(.js) .chapter { position: relative; top: auto; }
.ch, .case {
  position: relative; border-radius: 30px; background: var(--bg); color: var(--tx); padding: clamp(22px, 3.4vw, 44px); overflow: hidden;
  display: flex; flex-direction: column; gap: clamp(18px, 2.4vw, 28px);
}
.ch { transform-origin: 50% 0; min-height: min(600px, calc(100vh - 130px)); box-shadow: 0 -10px 40px -24px color-mix(in srgb, var(--ink) 60%, transparent); will-change: transform; }
.ch::after { content: ""; position: absolute; inset: 0; background: var(--ink); opacity: var(--shade, 0); pointer-events: none; border-radius: inherit; }
.ch-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; }
.ch-kind { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; border: 1px solid currentColor; opacity: .9; }
.ch-name { position: relative; font-size: clamp(42px, 9vw, 132px); line-height: .92; letter-spacing: -.055em; color: var(--fg); font-weight: 800; overflow-wrap: anywhere; isolation: isolate; }
.ch-word { position: relative; z-index: 1; }
.weave { position: absolute; left: -3%; width: 106%; top: 8%; height: 90%; overflow: visible; pointer-events: none; }
.weave.back { z-index: 0; }
.weave.front { z-index: 2; }
.weave path { fill: none; stroke: var(--thread); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s var(--ease-io); }
.undrawn .weave path { stroke-dashoffset: 1; }
.ch-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(20px, 3vw, 40px); align-items: end; margin-top: auto; }
.ch-copy { display: grid; gap: 18px; align-content: end; }
.ch-copy p { font-size: clamp(16px, 1.3vw, 18px); max-width: 46ch; }
.ch-open { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.ch-open:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.soon { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--blush); padding: 5px 9px; border-radius: 999px; vertical-align: middle; }
.work-more { display: flex; justify-content: center; margin-top: clamp(32px, 5vw, 56px); }
@media (max-width: 820px) { .ch-grid { grid-template-columns: 1fr; } .ch { min-height: 0; } }
@media (max-height: 760px) { .ch { min-height: 0; } }

.mock { border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--ink) 70%, transparent); }
.mock-thread { background: var(--paper); color: var(--text); padding: 16px; display: grid; gap: 10px; }
.mt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.mt-head b { color: var(--ink); }
.pill-ok { font-family: var(--font-mono); font-size: 11px; padding: 5px 9px; border-radius: 999px; background: var(--mint); color: var(--ink); }
.mt-msg { padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; max-width: 92%; }
.mt-msg i { display: block; font-style: normal; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--plum); margin-bottom: 2px; }
.mt-msg.buyer { background: var(--blush); }
.mt-msg.factory { background: var(--white); border: 1px solid var(--line); justify-self: end; }
.mt-msg.admin { background: color-mix(in srgb, var(--lavender) 45%, var(--paper)); }
.mock-lib { background: var(--white); padding: 14px; display: grid; gap: 12px; }
.ml-search { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--mist); color: var(--ink); }
.ml-search > span:first-child { display: flex; align-items: center; gap: 8px; }
.ml-search > span:last-child { font-size: 11px; color: var(--muted); }
.ml-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ml-grid figure { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); transition: opacity .3s; }
.ml-grid figure.dim { opacity: .38; }
.ml-grid figure.hit { outline: 2px solid var(--orchid); outline-offset: 2px; }
.ml-grid .fab { aspect-ratio: 16 / 9; background: var(--sw); }
.ml-grid figcaption { padding: 6px 8px; font-size: 11.5px; color: var(--text); display: flex; justify-content: space-between; gap: 4px; }
.ml-grid figcaption span { font-family: var(--font-mono); color: var(--muted); }
.mock-browser { background: var(--paper); }
.mb-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.mb-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--lavender); }
.mb-bar span { margin-left: 8px; }
.mb-hero { min-height: 220px; display: grid; place-content: center; gap: 10px; text-align: center; padding: 24px; color: var(--paper); background: repeating-linear-gradient(115deg, color-mix(in srgb, var(--paper) 4%, transparent) 0 2px, transparent 2px 9px), linear-gradient(160deg, var(--ink), color-mix(in srgb, var(--plum) 70%, var(--ink))); }
.mb-hero p { font-family: var(--font-mono); font-weight: 600; font-size: clamp(15px, 1.5vw, 19px); line-height: 1.3; }
.mb-hero span { font-size: 13px; color: var(--on-ink-dim); }
.mb-hero b { justify-self: center; font-size: 13px; padding: 8px 16px; border-radius: 999px; background: var(--lavender); color: var(--ink); }
.mock-phone { justify-self: center; width: min(250px, 100%); background: var(--paper); border: 8px solid var(--ink); border-radius: 34px; padding: 16px 16px 20px; display: grid; gap: 10px; color: var(--text); }
.mp-notch { justify-self: center; width: 70px; height: 6px; border-radius: 6px; background: var(--ink); }
.mp-title { font-weight: 800; font-size: 22px; color: var(--plum); letter-spacing: -.03em; }
.mp-sub { font-size: 12.5px; color: var(--muted); margin-top: -8px; }
.mock-phone ul { list-style: none; padding: 0; display: grid; gap: 7px; }
.mock-phone li { display: flex; gap: 9px; align-items: center; font-size: 13.5px; padding: 9px 10px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); }
.mock-phone li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--lavender); flex: none; }
.mock-phone li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--lavender); }
.mock-phone li.done::before { background: var(--orchid); border-color: var(--orchid); }
.mp-theme { justify-self: start; font-size: 10.5px; padding: 5px 9px; border-radius: 999px; background: var(--blush); color: var(--plum); }
.mp-kind { font-size: 12.5px; line-height: 1.4; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--lavender) 40%, var(--paper)); }
.mp-kind i { display: block; font-style: normal; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--plum); margin-bottom: 3px; }
.mock-inv { background: var(--white); color: var(--text); padding: 16px; display: grid; gap: 12px; }
.mi-head { display: flex; align-items: center; gap: 12px; }
.mi-av { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--plum); color: var(--paper); font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.mi-who { display: grid; min-width: 0; margin-right: auto; line-height: 1.35; }
.mi-who b { color: var(--ink); font-size: 15px; }
.mi-who span { font-size: 12.5px; color: var(--muted); }
.mi-sum { display: grid; gap: 8px; padding-block: 12px; border-block: 1px solid var(--line); font-size: 14px; }
.mi-sum div { display: flex; justify-content: space-between; gap: 12px; }
.mi-sum dt { color: var(--muted); }
.mi-sum dd { font-family: var(--font-mono); color: var(--ink); }
.mi-sum .mi-total { padding-top: 8px; border-top: 1px solid var(--line); font-weight: 600; }
.mi-sum .mi-total dt { color: var(--ink); }
.mi-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.mi-foot .mono { color: var(--plum); }

/* ==========================================================
   Contact
========================================================== */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact-grid .section-head { margin-bottom: 0; }
.cinfo { display: grid; gap: 14px; margin-top: 32px; }
.cinfo div { display: grid; gap: 2px; padding-top: 14px; border-top: 1px solid var(--ink-line); }
.cinfo dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--lavender); }
.cinfo dd { color: var(--paper); font-size: 16.5px; overflow-wrap: anywhere; }
.cinfo a { text-decoration: none; }
.cinfo a:hover { color: var(--lavender); text-decoration: underline; text-underline-offset: 4px; }
.cform { background: var(--paper); color: var(--text); border-radius: 26px; overflow: hidden; box-shadow: 0 40px 80px -40px color-mix(in srgb, var(--ink) 80%, transparent); display: flex; flex-direction: column; min-width: 0; }
.cf-switch { margin-left: auto; border: 0; background: none; color: var(--plum); font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--lavender); text-underline-offset: 4px; padding: 6px; }
.chat-ui { display: none; flex-direction: column; }
.js .chat-ui { display: flex; }
.js .classic { display: none; }
.js .cform.show-classic .chat-ui { display: none; }
.js .cform.show-classic .classic { display: grid; }
.no-js-hide { display: none; }
.js .no-js-hide { display: inline; }
.cf-log { height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 18px; scroll-behavior: smooth; }
.cf-log .msg:first-child { margin-top: auto; }
.cf-log .msg { animation: pop .4s var(--ease) both; }
.sum { display: grid; gap: 6px; margin-top: 8px; font-size: 14px; }
.sum div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
.sum dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.sum dd { overflow-wrap: anywhere; }
.cf-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.chip-btn { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 8px 13px; font-size: 14px; color: var(--plum); cursor: pointer; transition: background .2s, border-color .2s; }
.chip-btn:hover { background: var(--blush); border-color: transparent; }
.chip-btn.primary { background: var(--plum); color: var(--white); border-color: var(--plum); }
.chip-btn.primary:hover { background: var(--orchid-deep); }
.cf-form { position: relative; display: flex; gap: 8px; margin: 0 14px 14px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); isolation: isolate; }
.cf-form .trail { opacity: 0; transition: opacity .3s; }
.cf-form:focus-within .trail { opacity: 1; }
.cf-form:focus-within { border-color: transparent; }
.cf-form input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; color: var(--text); outline: none; }
.cf-form input::placeholder { color: var(--muted); }
.cf-form button { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--plum); color: var(--white); display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.cf-form button:hover { background: var(--orchid-deep); }
.cf-form button svg { width: 18px; height: 18px; }
.classic { gap: 14px; padding: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--white); padding: 12px 14px; font-size: 16px; color: var(--text); transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orchid); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lavender) 40%, transparent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 14.5px; min-height: 1.4em; }
.form-status.ok { color: #1f7a45; }
.form-status.err { color: var(--danger); }
.classic .btn-primary { justify-self: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ==========================================================
   Portfolio page
========================================================== */
.work-hero { position: relative; overflow: hidden; padding-top: clamp(124px, 14vw, 176px); padding-bottom: clamp(48px, 6vw, 80px); --mx: 70%; --my: 25%; }
.work-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background-image: radial-gradient(color-mix(in srgb, var(--plum) 24%, transparent) 1px, transparent 1.3px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(70% 70% at 50% 30%, #000, transparent 80%); mask-image: radial-gradient(70% 70% at 50% 30%, #000, transparent 80%); }
.work-hero h1 { font-size: clamp(44px, 7.4vw, 104px); line-height: .96; letter-spacing: -.045em; margin-top: 18px; max-width: 12em; }
.work-hero h1 .em { color: var(--orchid-deep); }
.work-hero .lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 46ch; margin-top: 24px; }
.case-index { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; padding: 0; list-style: none; }
.case-index a { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; font-weight: 600; color: var(--ink); transition: background .25s, transform .35s var(--ease); }
.case-index a:hover { background: var(--blush); transform: translateY(-2px); }
.case-index i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); border: 1px solid var(--line); }
.case-sec { padding-block: clamp(28px, 4vw, 48px); }
.case .ch-name { font-size: clamp(42px, 8.6vw, 132px); }
.case-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.case-copy { display: grid; gap: 16px; }
.case-copy .case-lede { font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; color: var(--fg); }
.case-copy p { font-size: 16.5px; }
.case-copy h3 { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; color: inherit; opacity: .8; margin-top: 8px; }
.case-copy ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.case-copy li { display: flex; gap: 10px; font-size: 15.5px; line-height: 1.45; }
.case-copy li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: .5em; border-radius: 50%; background: var(--thread); }
.case-media { display: grid; gap: 10px; }
.frame { border-radius: 16px; overflow: hidden; background: var(--white); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--ink) 70%, transparent); }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: var(--paper); border-bottom: 1px solid var(--line); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--lavender); }
.frame img, .frame video { width: 100%; height: auto; }
.case-media.is-phone { justify-items: center; text-align: center; }
.frame.phone { width: min(300px, 100%); border: 8px solid var(--ink); border-radius: 40px; }
.case-media figcaption { font-family: var(--font-mono); font-size: 12px; opacity: .8; }
.cta-band { text-align: center; }
.cta-band .section-head { margin-inline: auto; justify-items: center; }
.cta-band .lead { margin-inline: auto; }
@media (max-width: 900px) { .case-grid { grid-template-columns: 1fr; } }

/* ==========================================================
   Footer
========================================================== */
@property --fx { syntax: "<length-percentage>"; inherits: true; initial-value: 50%; }
@property --fy { syntax: "<length-percentage>"; inherits: true; initial-value: 55%; }
.foot { background: var(--ink); color: var(--on-ink); padding-top: clamp(56px, 7vw, 88px); overflow: hidden; position: relative; --fx: 50%; --fy: 55%; transition: --fx .35s var(--ease), --fy .35s var(--ease); }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; align-items: start; }
.foot-top img { width: 44px; height: 44px; filter: brightness(0) invert(1); opacity: .92; }
.foot-top p { margin-top: 12px; max-width: 34ch; color: var(--on-ink-dim); }
.foot-links { display: grid; gap: 6px; }
.foot-links a { text-decoration: none; color: var(--on-ink); width: fit-content; }
.foot-links a:hover { color: var(--lavender); }
.clock .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--lavender); }
.clock b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 28px; color: var(--paper); font-variant-numeric: tabular-nums; margin-top: 4px; }
.clock span { font-size: 14px; color: var(--on-ink-dim); }
.giant { position: relative; z-index: 2; display: grid; justify-items: center; margin-top: clamp(40px, 6vw, 72px); line-height: .86; user-select: none; }
.giant span { grid-area: 1 / 1; font-size: var(--gfs, 16vw); font-weight: 800; letter-spacing: -.055em; white-space: nowrap; padding-bottom: .04em; }
.giant-base { color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--lavender) 34%, transparent); }
.giant-lit { background: linear-gradient(90deg, var(--lavender), var(--blush) 45%, var(--orchid)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-mask-image: radial-gradient(260px circle at var(--fx) var(--fy), #000 15%, transparent 70%); mask-image: radial-gradient(260px circle at var(--fx) var(--fy), #000 15%, transparent 70%); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-block: 20px 28px; border-top: 1px solid var(--ink-line); font-size: 14px; color: var(--on-ink-dim); }
@media (max-width: 820px) { .foot-top { grid-template-columns: 1fr 1fr; } .foot-top > div:first-child { grid-column: 1 / -1; } }

/* ==========================================================
   Reduced motion
========================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .marquee-track { animation: none; }
}
