/* Hallmark · macrostructure: Portfolio with project index · pre-emit critique: P4 H4 E4 S4 R4 V4 */
@font-face {
  font-family: Onest;
  src: url('assets/fonts/onest-cyrillic.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Onest;
  src: url('assets/fonts/onest-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2190-2199;
}
@font-face {
  font-family: Golos;
  src: url('assets/fonts/golos-cyrillic.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Golos;
  src: url('assets/fonts/golos-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF,U+2000-206F,U+20AC,U+2190-2199;
}


:root {
  --paper: #f1eee7;
  --warm-white: #f6f3ed;
  --wash: #e8e3da;
  --sand: #e1d9cd;
  --ink: #292723;
  --muted: #5d584f;
  --earth: #744838;
  --line: #cdc5b9;
  --line-strong: #a79c8d;
  --white: #fffdf7;
  --dark: #343129;
  --reel: #d9d3c8;
  --route: #e4e3d9;
  --warm-ink: #33332c;
  --light-ink: #e2dccf;
  --dark-rule: #777063;
  --green-chip: #667058;
  --grey-chip: #797c7a;
  --berry-chip: #806674;
  --display: Onest, Arial, sans-serif;
  --body: Golos, Arial, sans-serif;
  --note: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --gutter: clamp(18px, 5.4vw, 94px);
  --section: clamp(63px, 8.4vw, 137px);
  --ease: cubic-bezier(.22, .72, .23, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.56 var(--body); }
h1, h2, h3, p, figure, ol { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -.055em; line-height: 1; }
img, video { display: block; width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--earth); outline-offset: 4px; }
::selection { background: var(--sand); color: var(--ink); }
.shell { width: min(100%, 1680px); padding-inline: var(--gutter); margin-inline: auto; }
.eyebrow { font-size: 12px; color: var(--muted); }
.skip { position: fixed; z-index: 10; top: 10px; left: 10px; padding: 12px 16px; background: var(--white); transform: translateY(-170%); }
.skip:focus { transform: none; }
.mast { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 15px; min-height: clamp(66px, 6.1vw, 91px); position: relative; }
.mast::after { position: absolute; content: ''; height: 1px; background: var(--line); inset: auto var(--gutter) 0; }
.wordmark { display: inline-flex; align-items: baseline; width: fit-content; font: 680 clamp(29px,3.1vw,43px)/.85 var(--display); letter-spacing: -.09em; }
.wordmark span, .headline-stop { color: var(--earth); }
.mast nav { display: flex; gap: clamp(15px, 3.2vw, 48px); }
.mast nav a, .mast-contact { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.mast a:hover, .text-link:hover { color: var(--earth); }
.mast-contact { justify-self: end; gap: 12px; }
.mast-contact span { color: var(--earth); }

.hero { display: grid; grid-template-columns: minmax(0,1.23fr) minmax(0,1fr); align-items: center; gap: clamp(24px, 3.4vw, 52px); min-height: clamp(560px, 78svh, 780px); padding-block: clamp(52px, 6.8vw, 104px); }
.hero h1 { font-size: clamp(54px, 7.3vw, 123px); line-height: .97; }
.hero h1 > span { display: block; width: fit-content; }
.hero h1 > span:last-child { font-size: .70em; letter-spacing: -.062em; margin-top: .06em; }
.hero h1 > span > span { display: inline-block; }
.hero-lead { max-width: 39ch; margin-top: clamp(20px, 2.2vw, 34px); color: var(--muted); font-size: clamp(16px, 1.39vw, 21px); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px clamp(16px, 2.1vw, 36px); margin-top: clamp(20px, 2.6vw, 40px); }
.button, .text-link { width: fit-content; display: inline-flex; align-items: center; gap: 13px; justify-content: space-between; min-height: 48px; font-size: 14px; font-weight: 550; }
.button { padding: 9px 14px 9px 16px; border: 1px solid transparent; border-radius: 3px; transition: color 190ms ease, background-color 190ms ease, border-color 190ms ease; }
.button span, .text-link span:last-child { font-size: 16px; transition: transform 240ms var(--ease); }
.button:hover span, .text-link:hover span:last-child { transform: translate(2px,-2px); }
.button-dark { background: var(--dark); color: var(--white); }
.button-dark:hover { background: var(--earth); }
.button-light { background: var(--ink); color: var(--white); }
.button-light:hover { background: var(--earth); }
.text-link { min-height: 45px; border-bottom: 1px solid var(--line-strong); }
.text-link span:last-child { color: var(--earth); }

.reel { min-width: 0; margin-top: clamp(5px, 1.7vw, 26px); }
.reel-image { position: relative; isolation: isolate; aspect-ratio: 4 / 3; overflow: hidden; background: var(--reel); }
.reel-image img, .reel-image video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-image img, .reel-image video { filter: saturate(.76); }
.reel-image video { opacity: 0; transition: opacity 340ms var(--ease); }
.reel-image.is-playing video, .reel-image.has-played video { opacity: 1; }
.reel-caption { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; color: var(--muted); font-size: 13px; }
.reel-caption span:first-child { color: var(--ink); }
.reel-toggle { position: absolute; z-index: 1; inset: auto 9px 9px auto; display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 2px; background: var(--warm-white); font-size: 12px; }
.reel-toggle:hover { background: var(--sand); }
.reel-icon { width: 9px; height: 11px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.reel-image.is-playing .reel-icon { clip-path: polygon(0 0, 31% 0, 31% 100%, 0 100%, 0 0, 69% 0, 100% 0, 100% 100%, 69% 100%, 69% 0); }
.motion-ready .hero h1 > span { overflow: hidden; padding-block: .06em .12em; }
.motion-ready .hero h1 > span > span { animation: headline-lift 630ms var(--ease) both; }
.motion-ready .hero h1 > span:last-child > span { animation-delay: 90ms; }
@keyframes headline-lift { from { opacity: .5; transform: translateY(.78em); } to { opacity: 1; transform: none; } }


.work { padding-block: clamp(43px,6.5vw,104px) var(--section); }
.work-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 27px; margin-bottom: clamp(16px,3.3vw,57px); padding-top: clamp(23px,4vw,59px); border-top: 1px solid var(--line); }
.work h2 { font-size: clamp(62px,11vw,182px); line-height: .85; }
.work h2 span, .system h2 span, .proof h2 span { color: var(--earth); }
.work-views { display: flex; align-items: end; gap: 19px; }
.work-views button, .demo-tabs button { min-height: 44px; padding: 5px 0; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted); font-size: 14px; }
.work-views button[aria-pressed='true'], .demo-tabs button[aria-pressed='true'] { border-color: var(--earth); color: var(--ink); }
.work-views button:hover, .demo-tabs button:hover { color: var(--earth); }
.gallery { display: grid; grid-template-columns: minmax(0,.87fr) minmax(0,1fr); align-items: start; column-gap: clamp(38px,10.2vw,170px); row-gap: clamp(58px,9.9vw,158px); }
.case { min-width: 0; scroll-margin-top: 25px; }
.case[data-chapter='tish'] { grid-column: 1 / -1; }
.case[data-chapter='entro'] { margin-right: clamp(0px,3.35vw,54px); }
.case[data-chapter='shok'] { margin-top: clamp(32px,10vw,160px); }
.case-picture { background: var(--reel); }
.case-frame { display: block; position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 2.4; }
.case-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 54%; filter: saturate(.78); transition: transform 620ms var(--ease); }
.case-frame:hover img, .case-frame:focus-visible img { transform: scale(1.035); }
.case[data-chapter='entro'] .case-frame { aspect-ratio: .86; }
.case[data-chapter='shok'] .case-frame { aspect-ratio: 1.14; }
.case-open { position: absolute; inset: auto 13px 13px auto; display: inline-flex; align-items: center; gap: 10px; padding: 9px 11px; background: var(--warm-white); color: var(--ink); font-size: 13px; }
.case-open span { color: var(--earth); }
.case-copy { display: grid; gap: 8px 20px; padding-top: clamp(12px,1.9vw,28px); }
.case[data-chapter='tish'] .case-copy { grid-template-columns: minmax(0,1fr) minmax(0,.51fr); align-items: end; }
.case-type { color: var(--earth); font-size: 13px; }
.case-copy h3 { margin-top: 5px; font-size: clamp(33px,5.25vw,88px); }
.case-copy > p { max-width: 37ch; color: var(--muted); font-size: clamp(15px,1.2vw,19px); }
.motion-ready .gallery[data-view='gallery'] .case-picture.has-entered img { animation: case-enter 710ms var(--ease) both; }
@keyframes case-enter { from { clip-path: inset(0 0 12%); opacity: .72; scale: 1.05; } to { clip-path: inset(0); opacity: 1; scale: 1; } }

.gallery[data-view='index'] { display: block; }
.gallery[data-view='index'] .case { display: grid; grid-template-columns: minmax(100px,.34fr) minmax(0,1fr); align-items: center; gap: clamp(12px,3.2vw,50px); margin: 0; padding-block: clamp(10px,1.3vw,19px); border-top: 1px solid var(--line); }
.gallery[data-view='index'] .case:last-child { border-bottom: 1px solid var(--line); }
.gallery[data-view='index'] .case-frame { aspect-ratio: 2.25; }
.gallery[data-view='index'] .case-open { inset: auto 5px 5px auto; padding: 3px 5px; font-size: 11px; }
.gallery[data-view='index'] .case-copy { grid-template-columns: minmax(0,.8fr) minmax(0,1fr); align-items: center; padding-top: 0; }
.gallery[data-view='index'] .case-copy h3 { font-size: clamp(24px,3.2vw,55px); }

.services { background: var(--wash); }
.services-layout { padding-block: clamp(55px,7.8vw,115px); }
.services h2, .system h2, .proof h2, .contact h2 { font-size: clamp(43px,7.1vw,115px); }
.services-heading { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr); align-items: end; gap: 13px 36px; }
.services-heading p, .system-heading > p, .proof-copy > p:not(.eyebrow), .contact-copy p { max-width: 40ch; color: var(--muted); font-size: clamp(16px,1.3vw,21px); }
.services-flow { position: relative; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: clamp(15px,3.3vw,58px); padding: 0; margin-top: clamp(29px,5.3vw,79px); list-style: none; border-top: 1px solid var(--line-strong); }
.services-flow li { position: relative; min-width: 0; padding-top: 15px; }
.services-flow li::before { position: absolute; top: -5px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--earth); content: ''; }
.service-context { color: var(--earth); font-size: 13px; }
.services-flow h3 { margin-block: 6px 11px; font-size: clamp(24px,2.7vw,42px); }
.services-flow p { max-width: 27ch; color: var(--muted); }
.services-demo { margin-top: clamp(19px,3.5vw,51px); }

@supports (animation-timeline: view()) {
  @media (min-width: 981px) {
    .services-flow::after { position: absolute; inset: -1px 0 auto; height: 1px; background: var(--earth); content: ''; transform: scaleX(0); transform-origin: left; animation: service-route linear both; animation-timeline: view(); animation-range: entry 10% entry 100%; }
  }
}
@keyframes service-route { to { transform: scaleX(1); } }

.system { padding-block: var(--section); background: var(--route); }
.system-heading { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,.64fr); align-items: end; gap: 14px 28px; margin-bottom: clamp(23px,3.5vw,53px); }
.demo-tabs { display: flex; flex-wrap: wrap; gap: 2px clamp(14px,3vw,44px); }
.demo-top { margin-bottom: clamp(18px,3vw,41px); border-bottom: 1px solid var(--line-strong); }
.demo-main { display: grid; grid-template-columns: minmax(175px,.76fr) minmax(0,1.8fr); gap: clamp(14px,5.1vw,78px); align-items: stretch; }
.demo-steps { position: relative; align-self: stretch; display: grid; grid-template-rows: repeat(4,1fr); list-style: none; padding: 0; }
.demo-steps::before, .demo-steps::after { position: absolute; z-index: 0; top: 12.5%; bottom: 12.5%; left: 11px; width: 1px; content: ''; }
.demo-steps::before { background: var(--line-strong); }
.demo-steps::after { background: var(--earth); transform: scaleY(var(--route-position,0)); transform-origin: top; transition: transform 560ms var(--ease); }
.demo-steps li { z-index: 1; }
.demo-steps button { display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: center; width: 100%; height: 100%; min-height: 53px; padding: 6px 0; gap: clamp(8px,1.8vw,22px); border: 0; background: transparent; text-align: left; }
.demo-steps button strong { font: 520 clamp(15px,1.9vw,26px)/1.13 var(--display); letter-spacing: -.045em; }
.demo-steps button span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--route); color: var(--muted); font: 400 10px/1 var(--note); }
.demo-steps button:hover strong, .demo-steps button[aria-current='step'] strong { color: var(--earth); }
.demo-steps button[aria-current='step'] span { border-color: var(--earth); background: var(--earth); color: var(--white); }
.demo-output { min-width: 0; min-height: clamp(265px,27vw,390px); display: flex; flex-direction: column; justify-content: center; padding: clamp(20px,4vw,66px); border-top: 1px solid var(--line-strong); background: var(--warm-white); }
.demo-origin { color: var(--earth); font-size: 13px; }
.demo-output h3 { margin-block: 9px 13px; font-size: clamp(30px,4.25vw,67px); }
#demo-copy { max-width: 46ch; color: var(--muted); }
.demo-event { width: fit-content; display: grid; grid-template-columns: 7px minmax(0,1fr); gap: 3px 9px; max-width: 100%; margin-top: clamp(16px,3vw,38px); padding-top: 10px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.demo-event-mark { align-self: center; grid-area: 1 / 1; width: 6px; height: 6px; border-radius: 50%; background: var(--earth); }
#demo-event-label { grid-area: 1 / 2; color: var(--muted); font-size: 12px; }
#demo-event-value { grid-area: 2 / 2; font-size: clamp(14px,1.3vw,19px); font-weight: 580; }
.demo-bottom { display: flex; margin-top: clamp(13px,2.3vw,32px); }
.demo-noscript { color: var(--muted); margin-top: 6px; font-size: 13px; }
.demo-output.is-updating > * { animation: stage-in 290ms var(--ease) both; }
@keyframes stage-in { from { opacity: .45; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.proof { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,.73fr); align-items: center; gap: clamp(21px,7.8vw,129px); padding-block: var(--section); }
.proof-media { min-width: 0; }
.proof-media > img { aspect-ratio: 1.52; object-fit: cover; }
.proof-copy .eyebrow { margin-bottom: 12px; }
.proof h2 { font-size: clamp(40px,5.65vw,95px); }
.proof-copy > p:not(.eyebrow) { margin-block: 18px clamp(14px,2.8vw,44px); }
.bot-links { display: grid; width: fit-content; }
.bot-links a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; gap: 16px; border-bottom: 1px solid var(--line-strong); font-size: 14px; }
.bot-links a:hover { color: var(--earth); }
.proof-palette { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 14px; min-width: 0; margin: 12px 0 0; padding: 0; border: 0; }
.proof-palette legend { padding: 0; color: var(--muted); font-size: 13px; }
.proof-colors { display: flex; gap: 3px; }
.proof-colors label { position: relative; display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.proof-colors label > span:nth-child(2) { width: 28px; height: 28px; border-radius: 50%; background: var(--swatch); }
.proof-colors input:checked + span { outline: 1px solid var(--earth); outline-offset: 4px; }
.proof-colors input:focus-visible + span { outline-width: 2px; }
.swatch-green { --swatch: var(--green-chip); }
.swatch-grey { --swatch: var(--grey-chip); }
.swatch-berry { --swatch: var(--berry-chip); }
.sr-only, .proof-colors input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#proof-color-label { color: var(--muted); font-size: 13px; }

.contact { padding-block: var(--section); background: var(--warm-ink); color: var(--white); }
.contact-in { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.75fr); align-items: end; gap: clamp(31px,7.4vw,122px); }
.contact-copy h2 { max-width: 9ch; }
.contact h2 span { color: var(--light-ink); }
.contact-copy p { margin-top: clamp(16px,2.4vw,34px); color: var(--light-ink); }
.contact-form { display: grid; justify-items: start; gap: 16px; min-width: 0; padding-top: 18px; border-top: 1px solid var(--dark-rule); }
.contact :focus-visible, .footer :focus-visible { outline-color: var(--light-ink); }
.contact-form fieldset { width: 100%; min-width: 0; margin: 0; padding: 0; border: 0; }
.contact-form legend, .brief-note > span { margin-bottom: 9px; color: var(--light-ink); font-size: 13px; }
.contact-options { display: flex; flex-wrap: wrap; gap: 6px; }
.contact-options label { position: relative; cursor: pointer; }
.contact-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.contact-options span { display: grid; place-items: center; min-height: 44px; padding: 5px 10px; border: 1px solid var(--dark-rule); font-size: 14px; }
.contact-options label:hover span { border-color: var(--light-ink); }
.contact-options input:checked + span { border-color: var(--light-ink); background: var(--light-ink); color: var(--ink); }
.contact-options input:focus-visible + span { outline: 2px solid var(--light-ink); outline-offset: 2px; }
.brief-note { display: grid; width: 100%; }
.brief-note textarea { display: block; width: 100%; min-height: 88px; padding: 8px 0; resize: vertical; border: 0; border-bottom: 1px solid var(--dark-rule); border-radius: 0; background: transparent; color: var(--white); font-size: 16px; line-height: 1.35; }
.brief-note textarea::placeholder { color: var(--light-ink); }
.contact .button-light { background: var(--white); color: var(--ink); }
.contact .button-light:hover { background: var(--sand); }
.footer { background: var(--warm-ink); color: var(--white); }
.footer-in { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 8px 18px; padding-block: 16px; border-top: 1px solid var(--dark-rule); }
.footer .wordmark { font-size: 31px; }
.footer .wordmark span { color: var(--light-ink); }
.footer-in > span, .footer-in > a:last-child { font-size: 13px; color: var(--light-ink); }
.footer-in > a:last-child { display: flex; align-items: center; min-height: 44px; gap: 9px; }

@media (max-width: 980px) {
  .services-flow { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 23px; border: 0; }
  .services-flow li { border-top: 1px solid var(--line-strong); }
  .services-flow h3 { font-size: clamp(26px,4vw,42px); }
  .hero { min-height: 0; gap: 18px; }
  .hero h1 { font-size: clamp(53px,7.5vw,82px); }
}
@media (max-width: 720px) {
  .mast { grid-template-columns: 1fr auto; column-gap: 10px; padding-block: 8px 0; }
  .mast nav { grid-column: 1 / -1; grid-row: 2; }
  .mast-contact { grid-column: 2; grid-row: 1; }
  .mast nav a, .mast-contact { font-size: 13px; }
  .hero { grid-template-columns: minmax(0,1fr); gap: 28px; padding-block: 35px 23px; }
  .hero h1 { font-size: clamp(50px, 10vw, 75px); }
  .hero h1 > span:last-child { font-size: .75em; }
  .hero-lead { margin-top: 12px; }
  .hero-actions { margin-top: 17px; }
  .reel { margin-top: 0; }
  .reel-image { aspect-ratio: 1.58; }
  .reel-image img, .reel-image video { object-position: center 61%; }
  .gallery, .case[data-chapter='tish'] .case-copy { grid-template-columns: minmax(0,1fr); }
  .case[data-chapter='tish'], .case[data-chapter='entro'], .case[data-chapter='shok'] { grid-column: 1; margin: 0; }
  .case .case-frame, .case[data-chapter='shok'] .case-frame { aspect-ratio: 1.48; }
  .case[data-chapter='entro'] .case-frame { aspect-ratio: 1.27; }
  .gallery[data-view='index'] .case-copy { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .gallery[data-view='index'] .case-open { inset: auto 4px 4px auto; font-size: 10px; }
  .services-heading, .system-heading, .proof, .contact-in { grid-template-columns: minmax(0,1fr); }
  .services h2, .system h2, .proof h2, .contact h2 { font-size: clamp(41px,10vw,71px); }
  .services-heading br { display: none; }
  .demo-main { grid-template-columns: minmax(0,1fr); }
  .demo-steps { grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: auto; column-gap: 8px; }
  .demo-steps::before, .demo-steps::after { display: none; }
  .demo-steps button { gap: 6px; }
  .demo-output { justify-content: flex-start; min-height: 235px; }
  .proof-media { grid-row: 2; }
  .proof-copy { grid-row: 1; }
  .proof-copy > p:not(.eyebrow) { margin-block: 10px 12px; }
  .contact-copy h2 { max-width: none; }
  .contact-form { max-width: 475px; }
}
@media (max-width: 420px) {
  .work-views { gap: 10px; }
  .gallery[data-view='index'] .case-copy > p { grid-column: 1; }
  .services-flow { grid-template-columns: minmax(0,1fr); }
  .services-flow p { max-width: 40ch; }
  .footer-in { grid-template-columns: 1fr auto; }
  .footer-in > span { grid-area: 2 / 1 / 3 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
