/* ivaev.dev — «Барабан». Тёмная сцена, узкий гротеск, один кислотный акцент.
   Сцена тёмная намеренно в обеих темах: скриншоты работ читаются лучше всего на чёрном.
   Ритм страницы держат две светлые вставки (безопасность сделки) и лаймовая форма. */
:root {
  --bg: #0b0b0c; --bg-2: #131315; --bg-3: #1b1b1e; --ink: #f3f3ee; --mut: #8d8f93; --line: #26272a;
  --acc: #d7ff3d; --acc-ink: #0b0b0c;
  --paper: #ececE6; --paper-ink: #111112; --paper-mut: #5d5e60; --paper-line: #cfcfc8;
  --cond: 'Fira Sans Extra Condensed', 'Arial Narrow', sans-serif;
  --sans: 'Golos Text', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gut: clamp(16px, 3.4vw, 48px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  /* the stage stays dark; only the light inserts get a touch warmer contrast */
  :root { --paper: #f1f1ec; }
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--acc); color: var(--acc-ink); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--acc); color: var(--acc-ink); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--acc) 22%, transparent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--acc) 0%, transparent); } }

/* ---------- buttons, links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 13px 20px; border-radius: 12px; text-decoration: none; font-weight: 500; font-size: 15px; border: 1px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.btn span { transition: transform .25s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn--acc { background: var(--acc); color: var(--acc-ink); }
.btn--acc:hover { background: #fff; }
.btn--line { border-color: var(--line); background: color-mix(in srgb, var(--bg) 60%, transparent); }
.btn--line:hover { border-color: var(--ink); }
.btn--wide { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--acc); text-decoration: none; cursor: pointer; font-size: 14px; min-height: 24px; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.round { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, transparent); color: var(--ink); font-size: 18px; cursor: pointer; display: grid; place-items: center; transition: border-color .2s, color .2s; }
.round:hover { border-color: var(--acc); color: var(--acc); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent); color: var(--mut); font-size: 14px; cursor: pointer; transition: .2s; }
.chip sup { font: 500 10px/1 var(--mono); }
.chip:hover { color: var(--ink); border-color: var(--mut); }
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- header ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 28px; padding: 16px var(--gut); font-size: 14px; transition: background .3s, border-color .3s, padding .3s; border-bottom: 1px solid transparent; }
.bar.is-solid { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); padding-block: 11px; }
.logo { font: 500 13px/1 var(--mono); letter-spacing: .04em; text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.logo span { color: var(--acc); }
.nav { display: flex; gap: 24px; margin-left: auto; color: var(--mut); }
.nav a { text-decoration: none; padding: 6px 0; } .nav a:hover { color: var(--ink); }
.pill { display: inline-flex; gap: 9px; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; background: color-mix(in srgb, var(--bg) 60%, transparent); }
.pill:hover { border-color: var(--acc); }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: transparent; cursor: pointer; position: relative; }
.burger span:not(.visually-hidden) { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.burger span:nth-child(1) { top: 17px; } .burger span:nth-child(2) { top: 25px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 45; background: var(--bg); padding: 90px var(--gut) 32px; display: flex; flex-direction: column; justify-content: space-between; }
.menu[hidden] { display: none; }
.menu nav { display: grid; }
.menu nav a { font: 800 clamp(40px, 11vw, 64px)/1.05 var(--cond); text-transform: uppercase; text-decoration: none; padding: 4px 0; }
.menu__c { display: grid; gap: 10px; font-size: 15px; color: var(--mut); }
.menu__c a { text-decoration: none; min-height: 32px; }

/* ---------- hero: the drum ---------- */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; padding-top: 76px; overflow: hidden; isolation: isolate; }
.hero__stage { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.hero__stage.is-drag { cursor: grabbing; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, var(--bg) 0%, rgba(11,11,12,.9) 32%, rgba(11,11,12,0) 50%, rgba(11,11,12,0) 76%, rgba(11,11,12,.85) 92%, var(--bg) 100%); }
.hero__head { align-self: start; padding: clamp(10px, 3vh, 32px) var(--gut) 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: end; pointer-events: none; }
.hero__head > * { pointer-events: auto; }
.kicker { grid-column: 1 / -1; font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mut); display: flex; align-items: center; gap: 10px; }
.hero__title { font: 800 clamp(50px, 7vw, 124px)/0.87 var(--cond); text-transform: uppercase; letter-spacing: -0.005em; }
.hero__title .ln { display: block; }
.hero__title em { font-style: normal; color: var(--acc); }
.hero__side { max-width: 350px; padding-bottom: 6px; }
.hero__side p { color: var(--mut); font-size: 15px; }
.hero__side b { color: var(--ink); font-weight: 500; }
.cta-row { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero__filters { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hud { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 24px; align-items: end; padding: 0 var(--gut) 26px; }
.hud__num { font: 800 clamp(56px, 7vw, 108px)/0.8 var(--cond); font-variant-numeric: tabular-nums; }
.hud__num small { font: 500 13px/1 var(--mono); color: var(--mut); margin-left: 6px; vertical-align: top; }
.hud__meta { min-width: 0; border-left: 1px solid var(--line); padding-left: 20px; }
.hud__type { font: 400 12px/1 var(--mono); color: var(--mut); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }  /* one line: the HUD keeps its height while the drum turns */
.hud__name { font: 600 clamp(22px, 2.2vw, 32px)/1.1 var(--cond); margin-top: 8px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud__links { display: flex; gap: 18px; margin-top: 6px; white-space: nowrap; }
.hud__ctrl { display: flex; gap: 8px; align-items: center; }
.hud__hint { font: 400 12px/1 var(--mono); color: var(--mut); margin-right: 10px; }
.hud .is-swap { animation: swap .45s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } }
.hero__fallback { display: none; }
.no-gl .hero__fallback { display: flex; gap: 12px; overflow-x: auto; padding: 0 var(--gut) 20px; scroll-snap-type: x mandatory; grid-row: 1; align-self: end; }
.no-gl .hero__fallback button { flex: none; border: 0; padding: 0; background: none; cursor: pointer; scroll-snap-align: center; }
.no-gl .hero__fallback img { height: 46vh; aspect-ratio: 0.5; object-fit: cover; object-position: top; border-radius: 14px; }

/* ---------- sections ---------- */
.sec { padding: clamp(80px, 12vw, 160px) var(--gut) 0; position: relative; }
.sec__label { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mut); padding-bottom: 18px; margin-bottom: clamp(24px, 3vw, 40px); border-bottom: 1px solid var(--line); }
.h2 { font: 800 clamp(40px, 5.6vw, 92px)/0.9 var(--cond); text-transform: uppercase; letter-spacing: -0.003em; max-width: 16ch; text-wrap: balance; }
.h2 em { font-style: normal; color: var(--acc); }
.sub { color: var(--mut); max-width: 56ch; margin-top: 18px; font-size: clamp(15px, 1.15vw, 17px); }
.tag { font: 400 12px/1 var(--mono); color: var(--mut); text-transform: uppercase; letter-spacing: .05em; }
.note-row { margin-top: clamp(40px, 5vw, 64px); display: flex; gap: 20px 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 24px 0; border-top: 1px solid var(--line); }
.note-row p { color: var(--mut); max-width: 60ch; }

[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; transform: none; }

/* why */
.why__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.why__i { padding: 8px 24px 8px 0; border-right: 1px solid var(--line); margin-right: 24px; }
.why__i:last-child { border: 0; margin: 0; }
.why__i b { display: block; font: 800 clamp(72px, 9vw, 150px)/0.85 var(--cond); text-transform: uppercase; color: var(--acc); margin: 22px 0 14px; letter-spacing: -0.01em; }
.why__i p { color: var(--mut); max-width: 26ch; }

/* scenes */
.scenes__row { margin-top: clamp(32px, 4vw, 56px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.scene { background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 14px; min-height: 380px; position: relative; overflow: hidden; }
.scene header { display: flex; justify-content: space-between; align-items: baseline; font: 400 12px/1 var(--mono); color: var(--mut); text-transform: uppercase; letter-spacing: .06em; }
.scene time { font: 800 clamp(30px, 2.8vw, 44px)/1 var(--cond); color: var(--ink); letter-spacing: 0; }
.scene h3 { font: 800 clamp(30px, 2.6vw, 40px)/0.95 var(--cond); text-transform: uppercase; margin-top: auto; }
.scene > p:last-child { color: var(--mut); font-size: 15px; }
.bubble { align-self: flex-start; background: var(--bg-3); border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 15px; position: relative; }
.bubble::after { content: '1'; position: absolute; right: -8px; top: -8px; width: 20px; height: 20px; border-radius: 50%; background: #ff4a3d; color: #fff; font: 600 11px/20px var(--sans); text-align: center; }
.bubble--2 { margin-left: 22px; margin-top: -6px; }
.bubble--2::after { content: '29'; width: 26px; border-radius: 10px; }
.sheet-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; font: 400 11px/1 var(--mono); }
.sheet-mini i { font-style: normal; padding: 9px 8px; background: var(--bg-3); border-radius: 4px; color: var(--mut); }
.sheet-mini .miss { color: #ff6b5e; background: color-mix(in srgb, #ff4a3d 14%, transparent); }
.fix { margin-top: 14px; background: var(--acc); color: var(--acc-ink); border-radius: 20px; padding: clamp(22px, 3vw, 40px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px 48px; align-items: center; }
.fix__text { font-size: clamp(16px, 1.3vw, 19px); }
.fix .btn--acc { background: var(--acc-ink); color: var(--acc); justify-self: start; }
.fix .btn--acc:hover { background: #000; }
.flow { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; counter-reset: f; }
.flow li { background: color-mix(in srgb, var(--acc-ink) 8%, transparent); border-radius: 12px; padding: 14px; position: relative; }
.flow li b { display: block; font: 800 22px/1 var(--cond); text-transform: uppercase; }
.flow li span { font-size: 13px; opacity: .75; }

/* services */
.services__head, .works__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 24px 48px; align-items: end; }
.svc { margin-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line); }
.svc__i { border-bottom: 1px solid var(--line); }
.svc__i summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 70px minmax(0, 1fr) auto 44px; gap: 20px; align-items: center; padding: 22px 0; position: relative; }
.svc__i summary::-webkit-details-marker { display: none; }
.svc__i summary::before { content: ''; position: absolute; inset: 0 calc(var(--gut) * -1); background: var(--acc); transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease); z-index: -1; }
.svc__i summary:hover::before { transform: scaleY(1); }
.svc__i summary:hover { color: var(--acc-ink); }
.svc__i summary:hover .svc__n, .svc__i summary:hover .svc__flag { color: var(--acc-ink); }
.svc__n { font: 400 13px/1 var(--mono); color: var(--mut); }
.svc__t { font: 800 clamp(40px, 6.4vw, 104px)/0.9 var(--cond); text-transform: uppercase; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.svc__flag { font: 400 12px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--acc); font-style: normal; border: 1px solid currentColor; border-radius: 999px; padding: 6px 9px; }
.svc__p { font: 600 clamp(20px, 2vw, 30px)/1 var(--cond); white-space: nowrap; }
.svc__x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid currentColor; position: relative; opacity: .7; }
.svc__x::before, .svc__x::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); transition: transform .3s var(--ease); }
.svc__x::after { transform: translate(-50%, -50%) rotate(90deg); }
.svc__i[open] .svc__x::after { transform: translate(-50%, -50%) rotate(0); }
.svc__b { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; padding: 4px 0 34px 90px; }
.svc__b > p:first-child { grid-column: 1; font-size: clamp(16px, 1.25vw, 19px); }
.svc__b ul { grid-column: 2; grid-row: 1 / span 3; list-style: none; padding: 0; display: grid; gap: 0; align-content: start; }
.svc__b li { padding: 12px 0 12px 26px; border-bottom: 1px dashed var(--line); position: relative; color: var(--mut); }
.svc__b li::before { content: '→'; position: absolute; left: 0; color: var(--acc); }
.svc__res { color: var(--mut); }
.svc__res b { color: var(--ink); font-weight: 500; }

/* works index */
.works__list { margin-top: clamp(32px, 4vw, 56px); }
.works__grp { font: 400 12px/1 var(--mono); color: var(--mut); text-transform: uppercase; letter-spacing: .08em; padding: 28px 0 12px; display: flex; justify-content: space-between; }
.work { width: 100%; display: grid; grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; transition: padding .35s var(--ease), color .2s; }
.work:last-child { border-bottom: 1px solid var(--line); }
.work__n { font: 400 13px/1 var(--mono); color: var(--mut); }
.work__name { font: 800 clamp(28px, 3.4vw, 54px)/0.95 var(--cond); text-transform: uppercase; }
.work__type { color: var(--mut); font-size: 14px; }
.work__go { font: 400 13px/1 var(--mono); color: var(--mut); transition: color .2s, transform .3s var(--ease); }
.work:hover { padding-left: 14px; }
.work:hover .work__name, .work:hover .work__go { color: var(--acc); }
.work:hover .work__go { transform: translateX(4px); }
.works__peek { position: fixed; left: 0; top: 0; z-index: 30; width: 180px; aspect-ratio: 0.5; object-fit: cover; object-position: top; border-radius: 14px; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.85) rotate(-4deg); transition: opacity .25s, transform .35s var(--ease); box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); }
.works__peek.on { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-4deg); }
.reviews { margin-top: clamp(48px, 6vw, 88px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.review { border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 22px; }
.review q { font: 600 clamp(22px, 1.9vw, 30px)/1.08 var(--cond); text-transform: uppercase; quotes: '«' '»'; }
.review span { margin-top: auto; color: var(--mut); font-size: 14px; }

/* demo chat */
.demo__grid { margin-top: clamp(32px, 4vw, 56px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px 56px; align-items: start; }
.chat { background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto auto; height: 560px; }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat__head b { display: block; font-weight: 500; }
.chat__head i { font-style: normal; font-size: 13px; color: var(--mut); display: flex; align-items: center; gap: 8px; }
.chat__ava { width: 40px; height: 40px; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; font: 600 14px/1 var(--mono); }
.chat__tag { margin-left: auto; font: 400 11px/1 var(--mono); text-transform: uppercase; border: 1px solid var(--line); padding: 5px 8px; border-radius: 6px; color: var(--mut); }
.chat__log { padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; animation: swap .35s var(--ease); white-space: pre-line; }
.msg.bot { background: var(--bg-3); border-bottom-left-radius: 5px; }
.msg.me { align-self: flex-end; background: var(--acc); color: var(--acc-ink); border-bottom-right-radius: 5px; }
.msg.op { background: color-mix(in srgb, var(--acc) 12%, var(--bg-3)); border-bottom-left-radius: 5px; }
.msg.op b { display: block; font: 500 11px/1.4 var(--mono); color: var(--acc); }
.typing { display: inline-flex; gap: 4px; padding: 14px; background: var(--bg-3); border-radius: 18px; align-self: flex-start; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--mut); animation: tp 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tp { 50% { transform: translateY(-3px); background: var(--ink); } }
.chat__quick { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 12px; }
.chat__quick button { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--acc); background: transparent; color: var(--acc); cursor: pointer; font-size: 14px; }
.chat__quick button:hover { background: var(--acc); color: var(--acc-ink); }
.chat__in { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat__in input { flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }
.chat__in button { min-height: 46px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--ink); color: var(--bg); cursor: pointer; font-weight: 500; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.facts div { padding: 18px 12px 18px 0; }
.facts b { display: block; font: 800 clamp(36px, 3.6vw, 56px)/1 var(--cond); color: var(--acc); }
.facts span { font-size: 13px; color: var(--mut); }
.demo__side p { color: var(--mut); margin-bottom: 22px; }

/* process */
.steps { list-style: none; padding: 0; margin: clamp(32px, 4vw, 56px) 0 36px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; position: relative; }
.steps::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--line); }
.steps::after { content: ''; position: absolute; left: 0; top: 0; height: 2px; width: calc(var(--p, 0) * 100%); background: var(--acc); transition: width .2s linear; }
.step { padding-top: 28px; position: relative; }
.step::before { content: ''; position: absolute; left: 0; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); transition: .3s; }
.step.on::before { background: var(--acc); border-color: var(--acc); }
.step__n { font: 400 12px/1 var(--mono); color: var(--mut); text-transform: uppercase; letter-spacing: .06em; }
.step h3 { font: 800 clamp(28px, 2.6vw, 42px)/0.95 var(--cond); text-transform: uppercase; margin: 14px 0 12px; }
.step p { color: var(--mut); font-size: 15px; }

/* calm — light insert */
.calm { background: var(--paper); color: var(--paper-ink); margin-top: clamp(80px, 12vw, 160px); padding-bottom: clamp(60px, 8vw, 110px); border-radius: 28px 28px 0 0; }
.calm .sec__label { color: var(--paper-mut); border-color: var(--paper-line); }
.calm .h2 em { color: var(--paper-ink); background: linear-gradient(transparent 56%, var(--acc) 56%, var(--acc) 90%, transparent 90%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0; }
.calm__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 32px 64px; align-items: start; }
.calm__list { margin-top: 32px; }
.calm__list div { display: grid; grid-template-columns: minmax(0, 0.45fr) minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--paper-line); }
.calm__list dt { font: 800 24px/1 var(--cond); text-transform: uppercase; }
.calm__list dd { color: var(--paper-mut); }
.term { position: sticky; top: 100px; background: #0d0d0f; color: #d6d6d0; border-radius: 18px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0,0,0,.6); }
.term__bar { display: flex; gap: 6px; align-items: center; padding: 12px 16px; border-bottom: 1px solid #222; }
.term__bar i { width: 10px; height: 10px; border-radius: 50%; background: #2c2c30; }
.term__bar span { margin-left: 10px; font: 400 12px/1 var(--mono); color: #7a7a80; }
.term pre { margin: 0; padding: 20px; font: 400 clamp(12px, 1vw, 14px)/1.95 var(--mono); white-space: pre-wrap; min-height: 380px; }
.term .k { color: #9a9aa0; } .term .v { color: var(--acc); }
.term .cur { display: inline-block; width: 8px; height: 15px; background: var(--acc); vertical-align: -2px; animation: cur 1s steps(1) infinite; }
@keyframes cur { 50% { opacity: 0; } }

/* build — continues the light insert */
.build { background: var(--paper); color: var(--paper-ink); padding-top: 0; padding-bottom: clamp(80px, 10vw, 140px); }
.build .sec__label { color: var(--paper-mut); border-color: var(--paper-line); padding-top: 0; }
.build .h2 em { color: var(--paper-ink); background: linear-gradient(transparent 56%, var(--acc) 56%, var(--acc) 90%, transparent 90%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0; }
.build .sub { color: var(--paper-mut); }
.build__grid { margin-top: clamp(32px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px 48px; align-items: start; }
.build__types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.btype { min-height: 84px; padding: 14px; border-radius: 14px; border: 1px solid var(--paper-line); background: transparent; text-align: left; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; transition: .2s; }
.btype b { font: 800 22px/1 var(--cond); text-transform: uppercase; }
.btype span { font-size: 13px; color: var(--paper-mut); }
.btype:hover { border-color: var(--paper-ink); }
.btype[aria-checked="true"] { background: var(--paper-ink); color: var(--paper); border-color: var(--paper-ink); }
.btype[aria-checked="true"] span { color: #a5a5a0; }
.build__opts { margin-top: 18px; display: grid; gap: 18px; }
.bgroup h4 { font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--paper-mut); margin-bottom: 8px; }
.bgroup div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.bopt { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 12px; border-radius: 12px; border: 1px solid var(--paper-line); cursor: pointer; transition: .2s; }
.bopt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.bopt i { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--paper-mut); display: grid; place-items: center; font-style: normal; font-size: 13px; }
.bopt b { font-weight: 500; font-size: 14px; line-height: 1.3; display: block; }
.bopt small { color: var(--paper-mut); font-size: 12.5px; }
.bopt em { font: 400 12px/1.6 var(--mono); font-style: normal; color: var(--paper-mut); white-space: nowrap; }
.bopt:hover { border-color: var(--paper-ink); }
.bopt:has(input:checked) { background: var(--acc); border-color: var(--acc); }
.bopt:has(input:checked) i { background: var(--paper-ink); border-color: var(--paper-ink); color: var(--acc); }
.bopt:has(input:checked) i::after { content: '✓'; }
.bopt:has(input:focus-visible) { outline: 2px solid var(--paper-ink); outline-offset: 2px; }
.build__out { position: sticky; top: 96px; background: var(--paper-ink); color: var(--paper); border-radius: 20px; padding: 24px; }
.bfig small { font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: #8f8f8a; }
.bfig b { display: block; font: 800 clamp(48px, 5vw, 76px)/0.95 var(--cond); color: var(--acc); margin-top: 10px; font-variant-numeric: tabular-nums; }
.bfig span { display: block; font: 600 22px/1.2 var(--cond); text-transform: uppercase; margin-top: 4px; }
.bbreak { list-style: none; padding: 0; margin: 20px 0; font-size: 14px; }
.bbreak li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #2a2a2c; color: #b9b9b3; }
.bbreak li b { font: 400 13px/1.5 var(--mono); color: var(--paper); white-space: nowrap; }
.bnote { font-size: 13px; color: #8f8f8a; margin-bottom: 16px; }

/* contact — acid insert */
.contact { background: var(--acc); color: var(--acc-ink); padding-bottom: clamp(60px, 8vw, 110px); }
.contact .sec__label { color: var(--acc-ink); border-color: color-mix(in srgb, var(--acc-ink) 25%, transparent); opacity: .75; }
.contact .h2 em { color: var(--acc-ink); text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .1em; }
.contact .sub { color: color-mix(in srgb, var(--acc-ink) 72%, transparent); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 64px; align-items: start; }
.contact__ch { list-style: none; padding: 0; margin-top: 32px; border-top: 1px solid color-mix(in srgb, var(--acc-ink) 25%, transparent); }
.contact__ch a { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid color-mix(in srgb, var(--acc-ink) 25%, transparent); text-decoration: none; flex-wrap: wrap; }
.contact__ch span { font-size: 14px; opacity: .75; }
.contact__ch b { font: 800 clamp(24px, 2.4vw, 36px)/1 var(--cond); text-transform: uppercase; }
.contact__ch a:hover b { text-decoration: underline; }
.formcard { background: var(--bg); color: var(--ink); border-radius: 22px; padding: clamp(20px, 2.6vw, 34px); }
.lead { display: grid; gap: 14px; }
.fld { display: grid; gap: 8px; font-size: 14px; color: var(--mut); }
.fld i { font-style: normal; opacity: .7; }
.fld input, .fld textarea { width: 100%; min-height: 52px; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font-size: 16px; resize: vertical; transition: border-color .2s; }
.fld input:focus, .fld textarea:focus { outline: 0; border-color: var(--acc); }
.fld .bad { border-color: #ff6b5e; }
.err { font-style: normal; color: #ff8a7e; font-size: 13px; }
.trap { position: absolute; left: -9999px; }
.fine { font-size: 12.5px; color: var(--mut); }
.fine a { color: var(--ink); display: inline-block; min-height: 24px; line-height: 24px; }
[hidden] { display: none !important; }
.lead__ok b { display: block; font: 800 44px/1 var(--cond); text-transform: uppercase; color: var(--acc); margin-bottom: 12px; }
.lead__ok p, .lead__err p { color: var(--mut); }
.lead__ok a, .lead__err a { color: var(--acc); }
.lead__err { margin-top: 14px; padding: 14px; border-radius: 12px; border: 1px solid #ff6b5e; }

/* about */
.about__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px 64px; align-items: end; }
.about__ph { position: relative; background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--acc) 30%, transparent), transparent 62%), var(--bg-2); border-radius: 24px; overflow: hidden; aspect-ratio: 0.8; display: flex; align-items: flex-end; justify-content: flex-end; }
.about__ph img { width: auto; height: 92%; max-width: 100%; object-fit: contain; object-position: right bottom; }
.about__ph figcaption { position: absolute; left: 16px; bottom: 16px; background: var(--bg); padding: 10px 14px; border-radius: 12px; font-size: 13px; color: var(--mut); }
.about__ph figcaption b { display: block; color: var(--ink); font: 800 22px/1 var(--cond); text-transform: uppercase; }
.about__lead { margin-top: 26px; font-size: clamp(17px, 1.5vw, 22px); max-width: 52ch; }
.trio { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.trio div { border-top: 1px solid var(--line); padding-top: 14px; }
.trio span { font: 400 12px/1 var(--mono); color: var(--acc); }
.trio b { display: block; font: 800 24px/1 var(--cond); text-transform: uppercase; margin: 10px 0 8px; }
.trio p { color: var(--mut); font-size: 14px; }

/* faq */
.faq__list { margin-top: clamp(32px, 4vw, 56px); border-top: 1px solid var(--line); }
.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px 0; font: 600 clamp(22px, 2.2vw, 34px)/1.05 var(--cond); text-transform: uppercase; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: '+'; font: 400 28px/1 var(--mono); color: var(--acc); transition: transform .3s var(--ease); flex: none; }
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list summary:hover { color: var(--acc); }
.faq__list p { color: var(--mut); max-width: 70ch; padding: 0 0 24px; }

/* final + footer */
.final { padding: clamp(100px, 14vw, 200px) var(--gut) clamp(60px, 8vw, 100px); text-align: center; }
.final__k { font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mut); }
.final__big { display: block; margin: 24px 0; font: 800 clamp(56px, 11vw, 200px)/0.86 var(--cond); text-transform: uppercase; text-decoration: none; color: var(--acc); transition: letter-spacing .5s var(--ease); }
.final__big:hover { letter-spacing: .01em; }
.final .sub { margin-inline: auto; }
.foot { border-top: 1px solid var(--line); padding: 40px var(--gut) calc(40px + env(safe-area-inset-bottom)); font-size: 14px; color: var(--mut); }
.foot__top { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: 28px 40px; align-items: start; }
.foot__top h2 { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mut); opacity: .7; margin-bottom: 14px; }
.foot__top nav, .foot__top > div { display: grid; gap: 4px; justify-items: start; }
.foot__top a:not(.logo) { text-decoration: none; min-height: 28px; display: inline-flex; align-items: center; } .foot__top a:not(.logo):hover { color: var(--ink); }
.foot__legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }

/* mobile dock CTA */
.dock { display: none; }

/* ---------- case sheet ---------- */
.case { margin: auto; border: 0; padding: 0; max-width: min(1080px, calc(100vw - 32px)); width: 100%; max-height: calc(100dvh - 32px); background: var(--bg-2); color: var(--ink); border-radius: 26px; overflow: hidden; }
.case::backdrop { background: rgba(5, 5, 6, .75); backdrop-filter: blur(6px); }
.case[open] { animation: caseIn .45s var(--ease); }
@keyframes caseIn { from { opacity: 0; transform: translateY(30px) scale(.97); } }
.case__in { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); min-height: min(640px, calc(100dvh - 32px)); }
.case__shot { background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--acc) 22%, transparent), transparent 65%), var(--bg-3); display: grid; place-items: center; padding: 28px; overflow: hidden; }
.case__phone { width: min(280px, 100%); aspect-ratio: 9 / 18.5; border-radius: 13.5% / 6.6%; padding: 3.2%; background: #000; box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px #2b2b2f; overflow: hidden; container-type: size; }
/* corners scale with the phone: a small phone keeps a phone shape, not a capsule */
.case__phone img { width: 100%; border-radius: 10.5cqw; animation: scrollShot 18s ease-in-out 1s infinite alternate; }
@keyframes scrollShot { to { transform: translateY(calc(-100% + var(--ph, 540px))); } }
.case__txt { padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.case__top { display: flex; justify-content: space-between; align-items: center; font: 400 13px/1 var(--mono); color: var(--mut); }
.case__type { font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--acc); margin-top: auto; }
.case__name { font: 800 clamp(40px, 5vw, 76px)/0.9 var(--cond); text-transform: uppercase; }
.case__res { color: var(--mut); font-size: clamp(15px, 1.2vw, 18px); max-width: 46ch; }
.case__nav { display: flex; gap: 8px; margin-top: auto; padding-top: 18px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .why__i:nth-child(2) { border: 0; margin-right: 0; }
  .fix { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); row-gap: 36px; }
  .steps::before { left: 5px; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto; }
  .steps::after { left: 5px; top: 6px; width: 2px; height: calc(var(--p, 0) * (100% - 12px)); transition: height .2s linear; }
  .step { padding: 0 0 0 36px; }
  .step::before { top: 2px; }
  .step h3 { margin-top: 10px; }
  .build__types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .pill { margin-left: auto; }
  .burger { display: block; }
  .hero__head { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hero__side { max-width: 460px; }
  .hud__hint { display: none; }
  .hud { grid-template-columns: auto minmax(0, 1fr) auto; }
  .hero__filters { grid-column: 1 / -1; order: -1; justify-content: flex-start; }
  .services__head, .works__head, .demo__grid, .calm__grid, .build__grid, .contact__grid, .about__grid { grid-template-columns: minmax(0, 1fr); }
  .scenes__row { grid-template-columns: minmax(0, 1fr); }
  .scene { min-height: 0; }
  .scene h3 { margin-top: 8px; }
  .svc__b { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
  .svc__b ul { grid-column: 1; grid-row: auto; }
  .reviews { grid-template-columns: minmax(0, 1fr); }
  .term, .build__out { position: static; }
  .about__ph { max-width: 420px; }
  .trio { grid-template-columns: minmax(0, 1fr); }
  .foot__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__top .logo { grid-column: 1 / -1; }
  .case__in { grid-template-columns: minmax(0, 1fr); }
  .case { overflow-y: auto; overscroll-behavior: contain; max-height: calc(100svh - 24px); }
  .case__in { min-height: 0; }
  .case__shot { padding: 14px 16px; height: 58svh; }
  .case__shot .case__phone { width: auto; height: 100%; }
  .case__phone { width: 170px; }
  .dock { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; justify-content: center; gap: 10px; min-height: 52px; align-items: center; border-radius: 14px; background: var(--acc); color: var(--acc-ink); font-weight: 600; text-decoration: none; box-shadow: 0 16px 40px -10px rgba(0,0,0,.7); transform: translateY(150%); transition: transform .4s var(--ease); }
  .dock.on { transform: none; }
  .foot { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  /* phones: text, then the drum in its own band, then the project line — nothing sits on the cards */
  /* svh, not dvh: Safari's toolbar hides and shows while scrolling, and a dvh hero would
     resize the drum band (and its WebGL canvas) on every scroll */
  .hero { min-height: 100svh; display: flex; flex-direction: column; padding-top: 68px; }
  .hero::after { display: none; }
  .hero__head { order: 0; } .hero__stage, .no-gl .hero__fallback { order: 1; } .hud { order: 2; }
  .hero__head { padding-top: 12px; gap: 12px; }
  .hero__title { font-size: clamp(36px, 10.6vw, 52px); }
  .hero__title em { white-space: normal; }
  .hero__side { padding-bottom: 0; }
  .hero__side p { font-size: 14px; line-height: 1.45; }
  .hero__side .btn--line { display: none; }
  .hero__side .cta-row { margin-top: 14px; }
  .hero__stage { position: relative; inset: auto; z-index: 0; flex: 1 1 0; min-height: 210px; width: 100%; }
  .hud { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 14px; padding-bottom: 14px; align-items: center; }
  .hero__filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(var(--gut) * -1); }
  .hero__filters .chip { flex: none; min-height: 36px; padding: 6px 12px; font-size: 13px; }
  .hud__num { font-size: 44px; }
  .hud__meta { padding-left: 14px; }
  /* up to two lines in a fixed box: the name never changes the HUD height */
  .hud__name { font-size: 20px; line-height: 1.05; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; height: 2.1em; margin-top: 6px; }
  .hud__ctrl { gap: 6px; }
  .hud__ctrl .round { width: 44px; height: 44px; }
  .why__grid { grid-template-columns: minmax(0, 1fr); }
  .why__i { border: 0; margin: 0; border-top: 1px solid var(--line); padding-top: 18px; }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .svc__i summary { grid-template-columns: minmax(0, 1fr) 44px; grid-template-rows: auto auto; gap: 8px 14px; }
  .svc__n { grid-column: 1; }
  .svc__t { grid-column: 1; grid-row: 2; }
  .svc__p { grid-column: 1; grid-row: 3; }
  .svc__x { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .work { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 4px 12px; }
  .work__type { grid-column: 2; grid-row: 2; font-size: 13px; }
  .work__go { grid-column: 3; grid-row: 1 / span 2; }
  .calm__list div { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  /* phones: options as compact two-column tiles — name and price, the tick in the corner */
  .build__opts { gap: 14px; }
  .btype { min-height: 66px; padding: 11px 12px; }
  .btype b { font-size: 19px; }
  .btype span { font-size: 12px; }
  .bgroup div { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .bopt { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 8px; padding: 10px 10px 11px; min-height: 76px; }
  .bopt i { position: absolute; top: 9px; right: 9px; width: 18px; height: 18px; border-radius: 5px; font-size: 11px; }
  .bopt b { font-size: 13.5px; line-height: 1.25; padding-right: 22px; }
  .bopt small { display: none; }
  .bopt em { font-size: 11.5px; line-height: 1; align-self: end; }
  .facts b { font-size: 34px; }
  .chat { height: 520px; }
  .calm { border-radius: 20px 20px 0 0; }
}
@media (max-width: 640px) and (max-height: 780px) {
  /* short phones: the lead line gives its room to the drum */
  .hero__side p { display: none; }
  .hero__side .cta-row { margin-top: 4px; }
}
@media (hover: none) { .works__peek { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .case__phone img { animation: none; }
}

/* ================= shared chrome: services drop-down, language switch ================= */
.drop { position: relative; }
.drop__btn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; background: none; border: 0; color: inherit; cursor: pointer; font-size: 14px; }
.drop__btn i { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .25s var(--ease); }
.drop__btn:hover, .drop__btn[aria-expanded="true"], .drop__btn[data-current] { color: var(--ink); }
.drop__btn[aria-expanded="true"] i { transform: translateY(1px) rotate(-135deg); }
.drop__menu { position: absolute; left: -18px; top: calc(100% + 14px); min-width: 300px; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 30px 60px -24px rgba(0,0,0,.8); display: grid; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s; }
.drop.is-open .drop__menu { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .25s var(--ease); }
.drop__menu a { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.drop__menu a b { font: 800 22px/1 var(--cond); text-transform: uppercase; }
.drop__menu a span { font: 400 12px/1 var(--mono); color: var(--mut); white-space: nowrap; }
.drop__menu a:hover { background: var(--acc); color: var(--acc-ink); }
.drop__menu a:hover span { color: var(--acc-ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.lang { font: 500 12px/1 var(--mono); letter-spacing: .06em; text-decoration: none; color: var(--mut); min-width: 40px; min-height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 999px; }
.lang:hover { color: var(--ink); border-color: var(--ink); }
.bar .lang + .pill { margin-left: -16px; }
.menu__svc summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; font: 800 clamp(40px, 11vw, 64px)/1.05 var(--cond); text-transform: uppercase; padding: 4px 0; }
.menu__svc summary::-webkit-details-marker { display: none; }
.menu__svc summary::after { content: '+'; font: 400 28px/1 var(--mono); color: var(--acc); transition: transform .3s var(--ease); }
.menu__svc[open] summary::after { transform: rotate(45deg); }
.menu__svc div { display: grid; padding: 4px 0 14px; border-left: 2px solid var(--acc); margin: 4px 0 6px 2px; }
.menu nav .menu__svc a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0 10px 16px; font: 600 24px/1.1 var(--cond); }
.menu__svc b { font-weight: 600; }
.menu__svc span { font: 400 12px/1 var(--mono); color: var(--mut); text-transform: none; }
.menu nav { align-content: start; }
.menu { overflow-y: auto; }

/* ================= inner pages ================= */
.pg { position: relative; padding: calc(76px + clamp(32px, 6vw, 88px)) var(--gut) 0; isolation: isolate; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font: 400 12px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--mut); margin-bottom: clamp(28px, 4vw, 48px); }
.crumbs a { text-decoration: none; min-height: 24px; display: inline-flex; align-items: center; }
.crumbs a:hover { color: var(--acc); }
.crumbs [aria-current] { color: var(--ink); }
.pg .kicker { margin-bottom: 18px; }
.pg .kicker a { color: var(--acc); text-decoration: none; min-height: 24px; display: inline-flex; align-items: center; }
.pg__h1 { font: 800 clamp(52px, 8.4vw, 150px)/0.86 var(--cond); text-transform: uppercase; letter-spacing: -0.005em; max-width: 14ch; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.pg__h1 .ln { display: block; }
.pg__h1 em { font-style: normal; color: var(--acc); }
.pg__h1--post { font-size: clamp(36px, 5.6vw, 88px); max-width: 20ch; line-height: .92; }
.pg__n { position: absolute; right: var(--gut); top: calc(76px + clamp(20px, 4vw, 56px)); z-index: -1; font: 800 clamp(160px, 26vw, 420px)/0.8 var(--cond); color: transparent; -webkit-text-stroke: 1px var(--line); pointer-events: none; user-select: none; }
.pg__foot { margin-top: clamp(28px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.pg__lead { font-size: clamp(17px, 1.45vw, 21px); max-width: 58ch; color: var(--ink); }
.pg__foot .cta-row { margin: 0; }
.pg__meta { margin-top: clamp(40px, 5vw, 72px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pg__meta div { padding: 20px 24px 22px 0; min-width: 0; }
.pg__meta div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.pg__meta dt { font: 400 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--mut); }
.pg__meta dd { margin-top: 12px; font: 800 clamp(24px, 2.4vw, 38px)/1 var(--cond); text-transform: uppercase; overflow-wrap: anywhere; }
.pg__meta dd.is-acc { color: var(--acc); font-size: clamp(32px, 3.4vw, 56px); }
.pg__meta dd a { color: inherit; text-decoration: none; border-bottom: 2px solid var(--acc); }
.pg__meta dd a:hover { color: var(--acc); }
.sec--tight { padding-top: clamp(32px, 5vw, 64px); }

/* who it's for */
.tiles { margin-top: clamp(32px, 4vw, 56px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 14px; min-height: 260px; transition: border-color .25s; }
.tile:hover { border-color: var(--mut); }
.tile h3 { font: 800 clamp(26px, 2.2vw, 34px)/0.95 var(--cond); text-transform: uppercase; margin-top: auto; }
.tile p { color: var(--mut); font-size: 15px; }

/* what's included */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 24px 64px; align-items: start; }
.split .sub { margin-top: 24px; }
.ticks { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.ticks li { padding: 16px 0 16px 34px; border-bottom: 1px solid var(--line); position: relative; font-size: clamp(15px, 1.15vw, 17px); }
.ticks li::before { content: '→'; position: absolute; left: 0; color: var(--acc); }

/* related works strip */
.wstrip { margin: clamp(32px, 4vw, 56px) calc(var(--gut) * -1) 24px; padding: 0 var(--gut) 8px; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(170px, 16vw, 230px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gut); scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.wcard { scroll-snap-align: start; display: grid; gap: 6px; align-content: start; text-decoration: none; }
.wcard img { width: 100%; height: auto; aspect-ratio: 0.5; object-fit: cover; object-position: top; border-radius: 16px; border: 1px solid var(--line); transition: transform .45s var(--ease), border-color .25s; }
.wcard .tag { margin-top: 8px; }
.wcard b { font: 800 24px/1 var(--cond); text-transform: uppercase; }
.wcard i { font: 400 12px/1 var(--mono); font-style: normal; color: var(--acc); }
.wcard:hover img { transform: translateY(-6px); border-color: var(--acc); }

/* other services */
.svc-links { border-top: 1px solid var(--line); }
.svc-links a { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; position: relative; isolation: isolate; }
.svc-links a::before { content: ''; position: absolute; inset: 0 calc(var(--gut) * -1); background: var(--acc); transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease); z-index: -1; }
.svc-links a:hover::before { transform: scaleY(1); }
.svc-links a:hover { color: var(--acc-ink); }
.svc-links__t { font: 800 clamp(34px, 4.6vw, 72px)/0.9 var(--cond); text-transform: uppercase; }
.svc-links__p { font: 600 clamp(18px, 1.6vw, 26px)/1 var(--cond); white-space: nowrap; }
.svc-links a > span:last-child { font-size: 22px; text-align: right; }
.pg--404 .svc-links { margin-top: clamp(48px, 6vw, 88px); }

/* case page */
.cs { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px 72px; align-items: start; }
.cs__shot { position: sticky; top: 100px; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--acc) 22%, transparent), transparent 65%), var(--bg-2); border: 1px solid var(--line); border-radius: 24px; display: grid; place-items: center; padding: clamp(24px, 4vw, 48px); }
.cs__shot .case__phone { width: min(300px, 100%); }
.cs__shot .case__phone img { animation-duration: 22s; }
.cs__txt { display: grid; gap: clamp(40px, 5vw, 64px); }
.cs__p { font-size: clamp(17px, 1.4vw, 21px); max-width: 60ch; }
.cs__p--res { font: 600 clamp(26px, 2.4vw, 38px)/1.08 var(--cond); text-transform: uppercase; }

/* cases hub */
.hub { display: grid; gap: 14px; }
.hub__i { display: grid; grid-template-columns: minmax(0, 0.3fr) minmax(0, 1fr); gap: 24px clamp(24px, 4vw, 64px); align-items: center; padding: clamp(16px, 2vw, 24px); border: 1px solid var(--line); border-radius: 24px; background: var(--bg-2); text-decoration: none; transition: border-color .25s; }
.hub__shot { overflow: hidden; border-radius: 16px; }
.hub__shot img { width: 100%; height: auto; aspect-ratio: 0.5; object-fit: cover; object-position: top; transition: transform .5s var(--ease); }
.hub__txt { display: grid; gap: 16px; justify-items: start; }
.hub__txt b { font: 800 clamp(48px, 6.4vw, 110px)/0.86 var(--cond); text-transform: uppercase; transition: color .2s; }
.hub__lead { color: var(--mut); font-size: clamp(15px, 1.2vw, 18px); max-width: 52ch; }
.hub__i:hover { border-color: var(--acc); }
.hub__i:hover .hub__shot img { transform: scale(1.04); }
.hub__i:hover b { color: var(--acc); }

/* blog index */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: clamp(24px, 3vw, 40px); }
.posts { border-top: 1px solid var(--line); }
.post { display: grid; grid-template-columns: 56px minmax(0, 1fr) 44px; gap: 20px; align-items: start; padding: 24px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .35s var(--ease); }
.post__n { font: 400 13px/1.6 var(--mono); color: var(--mut); }
.post__body { display: grid; gap: 10px; }
.post__t { font: 800 clamp(28px, 3vw, 48px)/0.95 var(--cond); text-transform: uppercase; max-width: 24ch; }
.post__ex { color: var(--mut); max-width: 70ch; }
.post__go { font-size: 22px; color: var(--mut); text-align: right; transition: color .2s, transform .3s var(--ease); }
.post:hover { padding-left: 14px; }
.post:hover .post__t, .post:hover .post__go { color: var(--acc); }
.post:hover .post__go { transform: translateX(4px); }

/* article */
.post-grid { padding: clamp(40px, 5vw, 72px) var(--gut) 0; display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 760px); gap: 32px clamp(32px, 6vw, 96px); }
.toc { position: sticky; top: 100px; align-self: start; display: grid; gap: 14px; }
.toc ol { list-style: none; padding: 0; counter-reset: t; border-top: 1px solid var(--line); }
.toc li { counter-increment: t; border-bottom: 1px solid var(--line); }
.toc a { display: grid; grid-template-columns: 28px minmax(0, 1fr); padding: 11px 0; font-size: 14px; line-height: 1.35; color: var(--mut); text-decoration: none; }
.toc a::before { content: counter(t, decimal-leading-zero); font: 400 11px/1.9 var(--mono); }
.toc a:hover, .toc a.is-on { color: var(--ink); }
.toc a.is-on::before { color: var(--acc); }
.prose { font-size: clamp(16px, 1.2vw, 18px); line-height: 1.65; min-width: 0; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font: 800 clamp(30px, 3vw, 46px)/0.95 var(--cond); text-transform: uppercase; margin-top: clamp(48px, 5vw, 72px); scroll-margin-top: 96px; }
.prose h2 + * { margin-top: 20px; }
.prose a { color: var(--acc); text-underline-offset: 3px; padding-block: 3px; }  /* inline links still get a 24px tap area */
.prose b, .prose strong { font-weight: 600; }
.prose ul, .prose ol { padding: 0; list-style: none; }
.prose li { padding: 10px 0 10px 28px; border-bottom: 1px dashed var(--line); position: relative; }
.prose li::before { content: '→'; position: absolute; left: 0; color: var(--acc); }
.tldr { background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 0 16px 16px 0; padding: 20px 22px; display: grid; gap: 10px; }
.tldr b { color: var(--acc); font-weight: 600; }
.post-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.post-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.post-table th, .post-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.post-table th { font: 500 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--mut); background: var(--bg-2); }
.post-table tr:last-child td { border-bottom: 0; }
.prose .related { display: grid; gap: 8px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: clamp(40px, 5vw, 56px); }
.related a { font: 800 clamp(22px, 2vw, 30px)/1 var(--cond); text-transform: uppercase; text-decoration: none; }
.prose .faq__list { margin-top: 20px; }
.prose .faq__list summary { font-size: clamp(20px, 1.8vw, 26px); }
.prose .post-cta { margin-top: clamp(48px, 5vw, 72px); background: var(--acc); color: var(--acc-ink); border-radius: 20px; padding: clamp(22px, 3vw, 34px); }
.post-cta p { font-size: clamp(16px, 1.3vw, 19px); }
.post-cta b { display: block; font: 800 clamp(28px, 2.6vw, 40px)/0.95 var(--cond); text-transform: uppercase; margin-bottom: 10px; }
.post-cta a { color: inherit; }
.post-cta .btn--acc { background: var(--acc-ink); color: var(--acc); }
.post-cta .btn--acc:hover { background: #000; }
.post-cta .btn--line { border-color: color-mix(in srgb, var(--acc-ink) 30%, transparent); background: transparent; color: var(--acc-ink); }
.post-cta .btn--line:hover { border-color: var(--acc-ink); }
.prose--legal { max-width: 760px; }
.prose--legal h2 { font-size: clamp(24px, 2.2vw, 32px); margin-top: 44px; }
.prose--legal .lead { font-size: clamp(17px, 1.4vw, 20px); }

/* ================= floating chat ================= */
.cw { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; display: grid; justify-items: end; gap: 12px; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
.cw > * { pointer-events: auto; }
.cw__fab { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--acc); color: var(--acc-ink); cursor: pointer; display: grid; place-items: center; box-shadow: 0 18px 40px -12px rgba(0,0,0,.75); transition: transform .3s var(--ease); }
.cw__fab:hover { transform: scale(1.06); }
.cw__fab svg { width: 24px; height: 24px; }
.cw__fab .cw__x { display: none; font-size: 20px; }
.cw.is-open .cw__fab svg { display: none; }
.cw.is-open .cw__fab .cw__x { display: block; }
.cw__badge { position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #ff4a3d; color: #fff; font: 600 12px/22px var(--sans); }
.cw__panel { width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100dvh - 120px)); transform-origin: bottom right; animation: cwIn .35s var(--ease); }
.cw__panel[hidden] { display: none; }
.cw__panel .chat { height: 100%; box-shadow: 0 40px 80px -30px rgba(0,0,0,.85); }
.cw__panel .chat__head .round { width: 40px; height: 40px; margin-left: auto; font-size: 15px; }
@keyframes cwIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
/* the home page's demo chat is right there: no floating copy while it is on screen */
.cw.is-away:not(.is-open) { opacity: 0; transform: translateY(20px); pointer-events: none; }
.cw.is-away:not(.is-open) > * { pointer-events: none; }

@media (max-width: 1100px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .bar .lang { margin-left: auto; }
  .bar .lang + .pill { margin-left: 0; }
  .pg__foot { grid-template-columns: minmax(0, 1fr); }
  .split, .cs { grid-template-columns: minmax(0, 1fr); }
  .cs__shot { position: static; }
  .hub__i { grid-template-columns: minmax(0, 1fr); }
  .hub__shot { max-width: 220px; }
  /* the dock CTA runs along the bottom on phones: the chat button sits above it */
  body:has(.dock) .cw { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  .pg__meta { grid-template-columns: minmax(0, 1fr); }
  .pg__meta div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .pg__n { font-size: 150px; top: 120px; }
  .bar .pill { display: none; }
  .post { grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
  .post__go { display: none; }
  .svc-links a { grid-template-columns: minmax(0, 1fr) auto; }
  .svc-links a > span:last-child { display: none; }
  .tile { min-height: 0; }
  .tile h3 { margin-top: 18px; }
  .cw__panel { height: min(520px, calc(100dvh - 170px)); }
}
/* a dark section right before the acid form needs room below it (the light configurator on the home page does not) */
.sec:not(.build) + .contact { margin-top: clamp(80px, 12vw, 160px); }
.case__txt:focus { outline: none; }

/* back to top: sits right above the chat button */
.totop { position: fixed; right: max(23px, calc(env(safe-area-inset-right) + 7px)); bottom: calc(16px + 58px + 12px + env(safe-area-inset-bottom)); z-index: 59; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--bg-2) 88%, transparent); color: var(--ink); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease), border-color .2s, color .2s; }
.totop svg { width: 20px; height: 20px; }
.totop.on { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { border-color: var(--acc); color: var(--acc); }
@media (max-width: 900px) { body:has(.dock) .totop { bottom: calc(76px + 58px + 12px + env(safe-area-inset-bottom)); } }
