@font-face {
  font-family: "Onest";
  src: url("../fonts/onest-cyrillic.woff2") format("woff2");
  font-weight: 400 500;
  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("../fonts/onest-latin.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #1c1c1c;
  --surface: #262626;
  --ink: #f1f1ef;
  --muted: #b4b5af;
  --accent: #8fa68e;
  --accent-ink: #1c1c1c;
  --field-1: #c8c5ba;
  --field-1-ink: #1c1c1c;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(1.75rem, 1.2rem + 2.4vw, 3.5rem);
  --step-display: clamp(2.5rem, 0.9rem + 6vw, 6.5rem);

  --margin: clamp(16px, 3vw, 40px);
  --gap: clamp(16px, 2vw, 28px);
  --section: clamp(96px, 14vw, 200px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--step-body);
  line-height: 1.55;
  letter-spacing: 0.003em;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.025em; line-height: 1.02; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--margin); top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; }
.skip:focus { top: 10px; }

/* Buttons and links: one square button shape for the whole page */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 0;
  font: inherit; font-size: var(--step-small); font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease);
}
.btn:hover { background: #a3b8a2; }
.btn:active { transform: scale(.97); }
.btn--dark { background: var(--bg); color: var(--ink); }
.btn--dark:hover { background: #333; }
.link { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; transition: text-decoration-color .2s, color .2s; }
.link:hover { color: var(--accent); }

/* Bar */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; gap: 32px;
  padding: 20px var(--margin);
  font-size: var(--step-small);
}
.wordmark { font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.02em; text-decoration: none; margin-right: auto; }
.bar__nav { display: flex; gap: 28px; }
.bar__nav a, .bar__action { text-decoration: none; transition: color .2s; }
.bar__nav a:hover { color: var(--accent); }
.bar__action { padding: 10px 16px; background: var(--ink); color: var(--bg); font-weight: 500; transition: background-color .2s, transform .18s var(--ease); }
.bar__action:hover { background: var(--accent); }
.bar__action:active { transform: scale(.97); }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: 96px var(--margin) 56px; overflow: hidden; }
.hero__room { position: absolute; inset: 0; }
.hero__room img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; filter: brightness(.62) contrast(1.05); transform-origin: 50% 70%; animation: drift 24s var(--ease) infinite alternate; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.09) translateY(-1%); } }
.hero__card {
  position: relative; width: min(100%, 58vw); min-height: 60svh;
  display: flex; flex-direction: column; gap: 32px;
  padding: clamp(24px, 3vw, 44px);
  background: var(--surface);
}
.hero__title { font-size: var(--step-display); max-width: 11ch; }
.hero__facts { font-size: var(--step-lead); line-height: 1.25; display: grid; gap: 6px; }
.hero__lead { max-width: 40ch; color: var(--ink); }
.hero__foot { margin-top: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.hero__credit { font-size: var(--step-small); color: var(--muted); max-width: 26ch; line-height: 1.35; }
.hero__foot .link { justify-self: end; font-size: var(--step-small); }

/* What we do */
.what { padding: var(--section) var(--margin); }
.what__title { font-size: var(--step-head); margin-bottom: clamp(48px, 6vw, 96px); }
.what__cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); position: relative; }
.what__col { grid-column: span 3; }
.what__col:nth-child(1) { grid-column: 1 / span 3; }
.what__col:nth-child(2) { grid-column: 4 / span 3; }
.what__col:nth-child(3) { grid-column: 7 / span 3; }
.what__col h3 { font-size: var(--step-body); font-weight: 500; letter-spacing: 0; line-height: 1.3; margin-bottom: 1.3em; }
.what__col li { color: var(--muted); line-height: 1.3; padding: 5px 0; cursor: default; transition: color .2s, transform .2s var(--ease); }
.what__col li:hover, .what__col li:focus-visible, .what__col li.is-on { color: var(--ink); transform: translateX(4px); }
.what__sum { display: none; color: var(--muted); margin-top: 14px; }
.what__desc { grid-column: 10 / span 3; grid-row: 1; align-self: start; font-size: var(--step-lead); line-height: 1.3; color: var(--ink); min-height: 4em; }

/* Colour chapters */
.chapter { position: relative; min-height: 100svh; padding: 0; }
.chapter__panel {
  position: relative; min-height: 100svh;
  display: grid; grid-template-columns: 1fr minmax(0, 506px) 1fr; grid-template-rows: auto 1fr auto;
  gap: 24px; padding: 32px var(--margin);
  background: var(--field);
  margin: 0 20px; transition: margin .8s var(--ease);
}
.chapter.is-in .chapter__panel { margin: 0; }
.chapter__title { grid-column: 1 / -1; grid-row: 1; font-size: var(--step-head); max-width: 14ch; }
.chapter__pic { grid-column: 2; grid-row: 1 / span 3; align-self: center; margin-top: 80px; }
.chapter__pic img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transform: scale(.94); transition: transform .9s var(--ease); }
.chapter.is-in .chapter__pic img { transform: scale(1); }
.chapter__text { grid-column: 1; grid-row: 3; align-self: end; max-width: 32ch; }
.chapter__link { grid-column: 3; grid-row: 3; align-self: end; justify-self: end; font-size: var(--step-small); }

.chapter--calc .chapter__panel { grid-template-columns: 1fr minmax(0, 620px) 1fr; }
.calc { grid-column: 2; grid-row: 2; align-self: center; display: grid; gap: 22px; }
.calc__label { font-size: var(--step-lead); line-height: 1.25; }
.calc__label output { font-weight: 500; font-variant-numeric: tabular-nums; }
.calc__range { width: 100%; height: 44px; accent-color: var(--accent); cursor: pointer; }
.calc__presets { display: flex; flex-wrap: wrap; gap: 8px; }
.calc__presets button {
  font: inherit; font-size: var(--step-small); color: var(--ink); background: #2e2b27;
  border: 0; border-radius: 0; padding: 10px 14px; min-height: 44px; cursor: pointer;
  transition: background-color .2s, transform .18s var(--ease);
}
.calc__presets button:hover { background: #3a3631; }
.calc__presets button:active { transform: scale(.97); }
.calc__presets button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.calc__rows { display: grid; gap: 18px; }
.calc__row dt { font-size: var(--step-small); color: var(--muted); margin-bottom: 6px; }
.calc__row dd { display: flex; align-items: center; gap: 14px; }
.calc__bar { display: block; height: 18px; width: var(--w); min-width: 6px; max-width: calc(100% - 9em); background: #5b554d; transition: width .5s var(--ease); }
.calc__bar--u1 { background: var(--accent); }
.calc__row b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: var(--step-lead); }
.calc__note { color: var(--ink); }

/* Work index */
.work { padding: var(--section) var(--margin); }
.work__title { font-size: var(--step-head); margin-bottom: 48px; }
.work__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.work__list { grid-column: 1 / span 8; }
.work__item { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 18px; padding: 10px 0; }
.work__mpic { display: none; }
.work__name { font-size: var(--step-display); line-height: 1; letter-spacing: -0.035em; text-decoration: none; color: var(--muted); transition: color .2s, transform .3s var(--ease); }
.work__item.is-active .work__name { color: var(--ink); }
.work__name:hover { transform: translateX(6px); }
.work__meta { display: block; font-size: var(--step-small); color: var(--muted); margin-bottom: 4px; }
.work__about { flex-basis: 100%; max-width: 46ch; display: none; }
.work__item.is-active .work__about { display: block; margin-top: 12px; animation: about-in .35s var(--ease); }
@keyframes about-in { from { opacity: 0; transform: translateY(8px); } }
.work__frame { grid-column: 9 / span 4; position: sticky; top: 15vh; align-self: start; aspect-ratio: 4 / 5; background: #111; }
.work__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.work__frame img.is-contain { object-fit: contain; background: #1d2026; }
.work__frame img.is-active { opacity: 1; }
.work__caption { display: none; }

/* Steps: one verb per step */
.steps { padding: clamp(24px, 3vw, 48px) var(--margin) var(--section); }
.steps__title { font-size: var(--step-head); margin-bottom: clamp(48px, 6vw, 96px); }
.steps__list { display: grid; gap: clamp(72px, 9vw, 140px); }
.step { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: end; }
.step__words { grid-column: 1 / span 5; display: grid; gap: 20px; padding-bottom: 8px; }
.step__word { font-size: var(--step-display); line-height: 1; letter-spacing: -0.04em; }
.step__text { max-width: 34ch; }
.step__media { grid-column: 6 / span 7; display: grid; gap: 10px; }
.step__media img, .step__video { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: #1d2026; filter: brightness(.9); transition: transform .9s var(--ease); }
.step__media img.is-contain { object-fit: contain; }
.step__media:hover img, .step__media:hover video { transform: scale(1.015); }
.step__media figcaption { font-size: var(--step-small); color: var(--muted); }
.step:nth-child(even) .step__words { grid-column: 8 / span 5; grid-row: 1; }
.step:nth-child(even) .step__media { grid-column: 1 / span 7; grid-row: 1; }

/* FAQ */
.faq { padding: 0 var(--margin) var(--section); display: grid; gap: clamp(56px, 6vw, 84px); }
.faq__row { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: baseline; }
.faq__q { grid-column: 1 / span 6; font-size: var(--step-head); line-height: 1.08; letter-spacing: -0.025em; }
.faq__q--head { color: var(--muted); }
.faq__a { grid-column: 8 / span 5; max-width: 42ch; }

/* Order */
.order {
  background: var(--field-1); color: var(--field-1-ink); color-scheme: light;
  min-height: 100svh; padding: clamp(72px, 9vw, 128px) var(--margin) 40px;
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-content: start;
}
.order a { color: var(--field-1-ink); }
.order__top { grid-column: 1 / span 5; }
.form { grid-column: 6 / span 7; }
.order__title { font-size: var(--step-head); margin-bottom: 20px; }
.order__lead { font-size: var(--step-lead); line-height: 1.3; max-width: 22ch; }
.form { grid-column: 7 / span 6; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: grid; gap: 6px; align-content: start; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: var(--step-small); font-weight: 500; }
.field small { font-size: var(--step-small); color: #45443f; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--field-1-ink); background: #dedbd1;
  border: 0; border-bottom: 2px solid #8d8a80; border-radius: 0; padding: 12px 12px;
  transition: border-color .2s, background-color .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--field-1-ink); background: #e8e5dc; }
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #6a685f; }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* taste-skill-ignore: hidden honeypot */
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; font-size: var(--step-small); line-height: 1.4; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--field-1-ink); flex: none; }
.form__send { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 24px; }
.form__status { font-size: var(--step-small); }
.form__status.is-error { color: #8a1f12; font-weight: 500; }
.order__mail {
  grid-column: 1 / -1; margin-top: clamp(64px, 10vw, 140px);
  font-size: clamp(1.75rem, 0.6rem + 6.4vw, 7.25rem); line-height: 1; letter-spacing: -0.045em;
  text-decoration: none; overflow-wrap: anywhere; transition: color .2s;
}
.order__mail:hover { color: #4f6a4e; }
.order__corners { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: var(--step-small); margin-top: 24px; }

/* Footer: one quiet line */
.foot {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px 24px; align-items: baseline;
  padding: 30svh var(--margin) 30px; font-size: var(--step-small);
}
.foot__what, .foot__legal { color: var(--muted); }
.foot__legal { justify-self: end; }
.foot__links { display: flex; gap: 24px; }
.foot a { color: var(--ink); text-underline-offset: 3px; }
.foot__credits { grid-column: 1 / -1; color: var(--muted); max-width: 90ch; margin-top: 8px; }

/* Chat */
.chat-open {
  position: fixed; right: var(--margin); bottom: var(--margin); z-index: 30;
  min-height: 52px; padding: 0 22px; border: 0; border-radius: 0;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 500; cursor: pointer;
  transition: transform .18s var(--ease), background-color .2s;
}
.chat-open:hover { background: #a3b8a2; }
.chat-open:active { transform: scale(.96); }
.chat-open[aria-expanded="true"] { display: none; }
.chat {
  position: fixed; right: var(--margin); bottom: var(--margin); z-index: 31;
  width: min(400px, calc(100vw - 2 * var(--margin))); height: min(620px, calc(100svh - 2 * var(--margin)));
  display: flex; flex-direction: column; background: #f1f1ef; color: #1c1c1c; color-scheme: light;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55); /* taste-skill-ignore: floating dialog */
  animation: chat-in .28s var(--ease);
}
.chat[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(16px); } }
.chat a { color: #1c1c1c; }
.chat__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #262626; color: var(--ink); }
.chat__title { font-size: var(--step-body); letter-spacing: 0; }
.chat__close { background: none; border: 0; color: var(--ink); font: inherit; font-size: var(--step-small); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; padding: 0 4px; }
.chat__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; font-size: var(--step-body); line-height: 1.45; }
.msg { max-width: 88%; padding: 10px 12px; white-space: pre-wrap; }
.msg--bot { background: #dedbd1; align-self: flex-start; }
.msg--me { background: #262626; color: var(--ink); align-self: flex-end; }
.msg--wait { color: #55544e; background: none; padding-left: 0; }
.chat__form, .chat__lead { display: grid; gap: 8px; padding: 12px 16px; background: #e4e1d8; }
.chat__form { grid-template-columns: 1fr auto; align-items: end; }
.chat__form textarea, .chat__lead input { font: inherit; font-size: var(--step-body); width: 100%; border: 0; border-radius: 0; padding: 10px; background: #fff; color: #1c1c1c; resize: none; }
.chat__lead label { font-size: var(--step-small); font-weight: 500; }
.chat__lead-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.chat__lead[hidden] { display: none; }
.consent--small { margin-top: 2px; }
.chat__handoff { background: #e4e1d8; border: 0; font: inherit; font-size: var(--step-small); color: #1c1c1c; padding: 0 16px 14px; text-align: left; cursor: pointer; }

/* Entrances (content stays visible without script) */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Tablet */
@media (max-width: 1100px) {
  .hero__card { width: min(100%, 78vw); }
  .what__col:nth-child(1) { grid-column: 1 / span 4; }
  .what__col:nth-child(2) { grid-column: 5 / span 4; }
  .what__col:nth-child(3) { grid-column: 9 / span 4; }
  .what__desc { grid-column: 1 / -1; grid-row: auto; min-height: 0; margin-top: 24px; }
}

/* Phone */
@media (max-width: 700px) {
  .bar { gap: 16px; }
  .bar__nav { display: none; }
  .hero { padding: 76px 16px 24px; }
  .hero__card { width: 100%; min-height: 72svh; gap: 22px; padding: 22px; }
  .hero__title { font-size: var(--step-display); }
  .hero__facts { font-size: var(--step-body); }
  .hero__foot { grid-template-columns: 1fr; gap: 14px; }
  .hero__foot .btn { width: 100%; order: -1; }
  .hero__foot .link { justify-self: start; }
  .what__cols { display: grid; grid-template-columns: 1fr; gap: 40px; }
  .what__col:nth-child(n) { grid-column: 1; }
  .what__col li { line-height: 1.4; padding: 3px 0; }
  .what__sum { display: block; }
  .what__desc { display: none; }
  .chapter__panel { margin: 0 8px; grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; padding: 24px 16px 32px; gap: 20px; }
  .chapter__pic { grid-column: 1; grid-row: 2; margin: 0 auto; width: 80%; }
  .chapter__text { grid-column: 1; grid-row: 3; }
  .chapter__link { grid-column: 1; grid-row: 4; justify-self: start; }
  .chapter--calc .chapter__panel { grid-template-columns: 1fr; }
  .calc { grid-column: 1; grid-row: 2; }
  .chapter--calc .chapter__text { grid-row: 3; }
  .work__list { grid-column: 1 / -1; }
  .work__frame { display: none; }
  .work__item { padding: 0 0 40px; }
  .work__mpic { display: block; flex-basis: 100%; margin-bottom: 14px; }
  .work__mpic img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #1d2026; }
  .work__name { font-size: var(--step-head); color: var(--ink); }
  .work__about { display: block; margin-top: 10px; }
  .step { grid-template-columns: 1fr; gap: 16px; }
  .step .step__words, .step:nth-child(even) .step__words { grid-column: 1; grid-row: 2; }
  .step .step__media, .step:nth-child(even) .step__media { grid-column: 1; grid-row: 1; }
  .step__word { font-size: var(--step-head); }
  .step__media figcaption, .chapter__link { display: none; }
  .faq__row { grid-template-columns: 1fr; gap: 12px; }
  .faq__q, .faq__a { grid-column: 1; }
  .order { grid-template-columns: 1fr; padding-top: 96px; }
  .order__top, .form, .order__mail, .order__corners { grid-column: 1; }
  .form__grid { grid-template-columns: 1fr; }
  .order__mail { font-size: var(--step-head); }
  .order__corners { flex-direction: column; }
  .foot { grid-template-columns: 1fr; padding-top: 20svh; padding-bottom: 96px; gap: 8px; }
  .foot__legal { justify-self: start; }
  .chat { right: 8px; left: 8px; bottom: 8px; width: auto; height: calc(100svh - 16px); }
  .chat-open { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__room img { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .chapter__panel, .chapter__pic img, .calc__bar { transition: none; }
  .work__item.is-active .work__about { animation: none; }
  .chapter__panel { margin: 0; }
  .chapter__pic img { transform: none; }
  .chat { animation: none; }
}
