/* ==========================================================================
   SNSMKNG — main stylesheet
   Layout: 12-column grid. One margin (--m) and one gutter (--g) are used
   everywhere, so every block lines up on the same columns in every version.
   ========================================================================== */

@font-face {
  font-family: "LT Superior";
  src: url("/assets/fonts/lt-superior-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ZT Bros Oskon 90s";
  src: url("/assets/fonts/zt-bros-oskon-90s-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f7f6f4;
  --ink: #121212;
  --red: #be2b1c;
  --red-hover: #a52416;
  --dark: #121212;
  --dark-2: #212121;
  --white: #ffffff;
  --muted: rgba(18, 18, 18, 0.55);

  --font-mono: "Red Hat Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-sans: "LT Superior", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "ZT Bros Oskon 90s", "Times New Roman", serif;

  --cols: 12;
  --m: 32px;          /* page margin */
  --g: 24px;          /* column gutter */
  /* --vw is the real page width without the scrollbar, set by main.js; 100vw is only the fallback */
  --col: calc((var(--vw, 100vw) - 2 * var(--m) - (var(--cols) - 1) * var(--g)) / var(--cols));
  --split: calc(var(--m) + 6 * var(--col) + 5 * var(--g)); /* edge of the 6th column — shared by every two-panel section */

  --fs-h1: clamp(28px, 3.125vw, 52px);   /* 40px at 1280 */
  --fs-h2: clamp(22px, 2.1875vw, 36px);  /* 28px at 1280 */
  --fs-label: 14px;
  --fs-body: 14px;

  --space-section: 80px;  /* gap between a section label and its content, and between cases */

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 1023px) {
  :root { --m: 24px; --g: 16px; --fs-label: 12px; --fs-body: 12px; --space-section: 56px; }
}
@media (max-width: 639px) {
  :root { --m: 16px; --g: 12px; --cols: 4; --fs-label: 12px; --fs-body: 14px; --fs-h1: 24px; --space-section: 48px; }
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1;
  letter-spacing: -0.03em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
body.is-locked { overflow: hidden; }
/* light animated film grain over the whole site: one layer darkens specks on light sections,
   the other lightens specks on dark ones; both jump to a new position ~12 times a second */
body::before, body::after {
  content: "";
  position: fixed; inset: -128px; z-index: 200;
  pointer-events: none;
  background: url("/assets/img/noise.png") repeat;
  background-size: 128px;
  animation: grain 0.8s steps(1) infinite;
  will-change: transform;
}
body::after { opacity: 0.045; mix-blend-mode: multiply; }
body::before { opacity: 0.04; mix-blend-mode: screen; animation-delay: -0.4s; }
@keyframes grain {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-37px, 21px); }
  20%  { transform: translate(52px, -44px); }
  30%  { transform: translate(-18px, 63px); }
  40%  { transform: translate(71px, 9px); }
  50%  { transform: translate(-60px, -27px); }
  60%  { transform: translate(14px, 48px); }
  70%  { transform: translate(-45px, -66px); }
  80%  { transform: translate(33px, 35px); }
  90%  { transform: translate(-9px, -53px); }
}
h1, h2, h3, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; left: var(--m); top: -100px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 8px 12px;
}
.skip-link:focus { top: var(--m); }
:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }

/* ---------- typography ---------- */
.t-h1, .t-h2, .t-label {
  font-family: var(--font-mono);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.t-h1 { font-size: var(--fs-h1); line-height: 1.1; }
.t-h2 { font-size: var(--fs-h2); line-height: 1; }
.t-label { font-size: var(--fs-label); line-height: 1; }
.t-body, .t-small { font-family: var(--font-sans); font-size: var(--fs-body); line-height: 1; letter-spacing: -0.03em; }
.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.32em;   /* 52.7px next to 40px caps, as in the layout */
  line-height: 0.8;
}
.logo { display: block; color: inherit; }
.logo svg { width: 100%; height: auto; }

/* ---------- links: the underline grows under the word only ---------- */
.link, .link-text {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 100% 100%;
  background-size: 0% 1px;
  transition: background-size 0.45s var(--ease);
  padding-bottom: 2px;
}
.link:hover, .link:focus-visible,
.has-link:hover .link-text, .has-link:focus-visible .link-text {
  background-size: 100% 1px;
  background-position: 0% 100%;
}

/* ---------- button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 32px; padding: 9px 15px;
  background: var(--red); color: var(--white);
  font-family: var(--font-sans); font-size: 14px; line-height: 1; letter-spacing: -0.03em;
  white-space: nowrap;
  transition: background-color 0.3s var(--ease);
}
.btn:hover { background: var(--red-hover); }
.btn:disabled { opacity: 0.6; cursor: progress; }

/* ---------- layout helpers ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: var(--g);
}
.span-11 { grid-column: 1 / span 11; }
@media (max-width: 1023px) { .br-lg { display: none; } }
@media (max-width: 639px) { .span-11 { grid-column: 1 / -1; } }

.section { position: relative; padding: var(--m); }
.section--red { background: var(--red); color: var(--white); }
.section--dark { background: var(--dark-2); color: var(--white); }
.section__label { margin-bottom: var(--space-section); }

/* lines draw from 0 to full width when they enter the viewport */
.line {
  display: block;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.2s var(--ease);
}
.line.is-in { transform: scaleX(1); }

/* two-panel sections share one split line (edge of column 6) */
.split { display: grid; grid-template-columns: var(--split) 1fr; }
.split--reverse { grid-template-columns: 1fr calc(var(--vw, 100vw) - var(--split)); }
.split__media { position: relative; overflow: hidden; }
.split__media > img, .split__media > video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.split__content { position: relative; padding: var(--m) var(--m) var(--m) var(--g); }
.split--reverse .split__content { padding: var(--m) var(--g) var(--m) var(--m); }

@media (max-width: 767px) {
  .split, .split--reverse { grid-template-columns: 1fr; }
  .split__content, .split--reverse .split__content { padding: var(--m); }
}

/* ==========================================================================
   HERO — exactly one screen tall, everything visible without scrolling
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: var(--split) 1fr;
  height: 100svh;
  min-height: 560px;
}
.hero__media { grid-column: 1; grid-row: 1; position: relative; overflow: hidden; background: #e9e6e1; }
.hero__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__content {
  grid-column: 2; grid-row: 1;
  display: flex; flex-direction: column;
  min-height: 0;
  padding: var(--m) var(--m) var(--m) var(--g);
}
.hero__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
}
.hero__nav { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hero__logo { width: clamp(120px, 11.95vw, 200px); margin-top: 2px; }
.hero__city { justify-self: end; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.hero__mark {
  flex: 1 1 0;
  min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding-block: clamp(8px, 1.5svh, 20px) clamp(32px, 7svh, 80px);  /* sits a little above the middle */
}
.pixel-mark { height: 100%; max-height: clamp(120px, 15.5vw, 240px); width: auto; aspect-ratio: 1; overflow: visible; }
.hero__title { text-align: center; margin-bottom: clamp(20px, 3svh, 32px); }
.hero__bottom {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--g);
}
.hero__lead { max-width: calc(3 * var(--col) + 2 * var(--g)); min-width: 260px; }

@media (max-width: 767px) {
  .hero { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .hero__content { grid-column: 1; grid-row: 1; height: 100svh; min-height: 560px; padding: var(--m); }
  .hero__media { grid-column: 1; grid-row: 2; height: 125vw; max-height: 100svh; }

  /* menu, small logo and city on one row; everything below is centred */
  .hero__nav, .hero__city { gap: 8px; }
  .hero__logo { width: 76px; margin-top: 0; }
  .pixel-mark { max-height: 150px; }
  .hero__title { text-align: center; }
  .hero__bottom { flex-direction: column; align-items: center; gap: 20px; text-align: center; }
  .hero__lead { min-width: 0; max-width: 320px; }
}

/* ==========================================================================
   APPROACH
   ========================================================================== */
.approach { padding-bottom: 64px; }
.approach__title { margin-bottom: 40px; }
.step { position: relative; align-items: center; padding-block: 40px; }
.step > .line { position: absolute; left: 0; right: 0; top: 0; }
.step > .line--bottom { top: auto; bottom: 0; }
.step__num  { grid-column: 1 / span 2; }
.step__name { grid-column: 3 / span 4; }
.step__text { grid-column: 8 / span 5; }

@media (max-width: 639px) {
  .approach { padding-bottom: 48px; }
  .approach__title { margin-bottom: 32px; }
  .step { padding-block: 20px; row-gap: 10px; align-items: start; }
  .step__num  { grid-column: 1 / span 1; }
  .step__name { grid-column: 2 / span 3; }
  .step__text { grid-column: 2 / span 3; line-height: 1.2; }
}

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services__media { background: var(--dark); color: var(--white); }
.services__media .section__label { position: relative; z-index: 2; padding: var(--m); margin: 0; }
.services__images { position: absolute; inset: 0; }
.services__images img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.03);
  transition: opacity 0.6s var(--ease), transform 1.2s var(--ease);
}
.services__images img.is-active { opacity: 1; transform: scale(1); }

.services__content { padding-bottom: 50px; }
.services__title { max-width: calc(5 * var(--col) + 4 * var(--g)); margin-bottom: 50px; }
.service {
  position: relative;
  display: grid;
  grid-template-columns: calc(2 * var(--col) + var(--g)) calc(3 * var(--col) + 2 * var(--g)) 1fr;
  column-gap: var(--g);
  align-items: center;
  min-height: 80px;
  padding-block: 16px;
}
.service > .line { position: absolute; left: 0; right: 0; top: 0; }
.service > .line--bottom { top: auto; bottom: 0; }
.service__name { transition: transform 0.4s var(--ease); }
.service__more { justify-self: end; white-space: nowrap; }

@media (max-width: 1023px) {
  .services__title { max-width: none; }
}
@media (min-width: 640px) and (max-width: 1279px) {
  .service { align-items: start; }
}
@media (max-width: 767px) {
  .services__media { height: 110vw; max-height: 80svh; }
  .services__title { max-width: none; }
}
@media (max-width: 639px) {
  .service { grid-template-columns: 1fr auto; row-gap: 10px; padding-block: 16px; min-height: 0; }
  .service__name { grid-column: 1; grid-row: 1; }
  .service__more { grid-column: 2; grid-row: 1; }
  .service__text { grid-column: 1; grid-row: 2; max-width: calc(3 * var(--col) + 2 * var(--g)); line-height: 1.2; }
}

/* ---------- service panel ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(18, 18, 18, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.overlay.is-open { opacity: 1; }

.panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: calc(4 * var(--col) + 4 * var(--g) + var(--m));
  min-width: 420px;
  background: var(--red); color: var(--white);
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform 0.6s var(--ease);
}
.panel.is-open { transform: translateX(0); }
.panel__close { position: absolute; top: var(--m); right: var(--m); z-index: 1; padding: 4px 0; }
.panel__body { padding: var(--m); }
.panel__title {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: clamp(40px, 4vw, 56px); line-height: 0.9; letter-spacing: 0;
  text-transform: lowercase;
  margin-bottom: 48px;
  padding-right: 96px;
}
.panel__block { margin-bottom: 32px; }
.panel__block h3 { margin-bottom: 14px; }
.panel__block p, .panel__block li { font-size: var(--fs-body); line-height: 1.15; }
.panel__process li + li, .panel__included li + li { margin-top: 3px; }
.panel__included li { position: relative; padding-left: 18px; }
.panel__included li::before { content: "⊹"; position: absolute; left: 0; top: 0; font-family: var(--font-mono); }
.panel__meta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--g); }

@media (max-width: 639px) {
  .panel { width: 100%; min-width: 0; }
}

/* ==========================================================================
   WORK — each case pins; its 8 frames scroll sideways, then the page moves on
   ========================================================================== */
.work { position: relative; }
/* the whole list of cases pins as one stage: cases sit right under each other, the frames of the
   case in focus slide sideways first, then the list moves on to the next case */
.work__stage { position: sticky; top: 0; height: var(--stage-h, 100svh); overflow: hidden; }
.work__list { padding-top: var(--m); padding-bottom: var(--space-section); will-change: transform; }
.work__label { padding-inline: var(--m); }
.case { position: relative; }
.case + .case { margin-top: var(--space-section); }
.case__sticky { display: flex; flex-direction: column; gap: 20px; }
/* frames are clipped at the page margins, so exactly four are visible */
.case__viewport { margin-inline: var(--m); overflow: hidden; container-type: inline-size; }
.case__track {
  /* four frames fill exactly the width the text grid below uses */
  --item: calc((100cqw - 3 * var(--g)) / 4);
  display: flex; gap: var(--g);
  width: max-content;
  will-change: transform;
}
.case__item {
  flex: 0 0 var(--item);
  width: var(--item);
  aspect-ratio: 286 / 382;
  background: #e9e6e1;
  overflow: hidden;
}
.case__item img, .case__item video { width: 100%; height: 100%; object-fit: cover; }
.case__item video { transform: scale(1.02); }

.case__info { padding-inline: var(--m); align-items: start; }
.case__name { grid-column: 1 / span 3; }
.case__tags { grid-column: 4 / span 3; }
.case__text { grid-column: 7 / span 3; }
.case__link { grid-column: 10 / span 3; justify-self: end; }

@media (max-width: 1023px) {
  .case__text { font-size: 12px; }
}
@media (max-width: 639px) {
  .case__track { --item: 66vw; }
  .case__info { row-gap: 16px; }
  .case__name { grid-column: 1 / span 2; grid-row: 1; }
  .case__tags { grid-column: 3 / span 2; grid-row: 1; justify-self: end; text-align: right; }
  .case__text { grid-column: 1 / -1; grid-row: 2; font-size: 14px; line-height: 1.2; }
  .case__link { grid-column: 1 / -1; grid-row: 3; justify-self: start; }
  .case + .case { margin-top: 56px; }
  .case__viewport { margin-right: 0; }  /* the next frame peeks in at the edge */
  .case__track { padding-right: var(--m); }  /* …and the last one stops on the text edge */
}
/* fallback without JS / reduced motion: frames scroll by swipe */
.no-pin .work__stage { position: relative; height: auto; overflow: visible; }
.no-pin .case__viewport { overflow-x: auto; scrollbar-width: none; }
.no-pin .case__viewport::-webkit-scrollbar { display: none; }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about { display: flex; flex-direction: column; }
.about__top { display: flex; justify-content: space-between; margin-bottom: var(--space-section); }
.about__text { text-align: center; margin-bottom: 100px; }
.about__copy { grid-column: 3 / span 8; }
.about__copy p + p { margin-top: 28px; }
.about__copy .serif { font-size: 1.29em; }
.about__words { align-items: start; }
.about__word { display: flex; flex-direction: column; gap: 8px; }
.about__word img {
  width: 100%;
  aspect-ratio: 158 / 204;
  object-fit: cover;
}
/* image width: 1.5 columns, as in the layout (158px at 1280) */
.about__word { width: calc(1.5 * (var(--col) + var(--g))); }
.about__word--1 { grid-column: 1 / span 3; justify-self: start; }
.about__word--2 { grid-column: 4 / span 3; justify-self: end; }
.about__word--3 { grid-column: 7 / span 3; justify-self: start; text-align: right; }
.about__word--4 { grid-column: 10 / span 3; justify-self: end; text-align: right; }

@media (max-width: 1023px) {
  .about__copy { grid-column: 1 / -1; }
}
.about__phrase { display: none; }
@media (max-width: 639px) {
  /* the text sits in the middle, small images around it on the 4-column grid */
  .about {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: var(--g);
    align-items: start;
    padding-block: 32px 40px;
  }
  .about__top { grid-column: 1 / -1; grid-row: 1; margin-bottom: 38px; }
  .about__words { display: contents; }
  .about__word { width: 100%; }
  .about__word figcaption { display: none; }
  .about__word--3 { grid-column: 4; grid-row: 2; }
  .about__word--1 { grid-column: 1; grid-row: 2; margin-top: 50px; }
  .about__text { grid-column: 1 / -1; grid-row: 3; margin: 40px 0 0; font-size: 15px; line-height: 1.1; }
  .about__copy p + p { margin-top: 18px; }
  .about__word--2 { grid-column: 2; grid-row: 4; margin-top: 44px; }
  .about__word--4 { grid-column: 4; grid-row: 4; margin-top: 86px; }
  .about__phrase { display: block; grid-column: 1 / -1; grid-row: 5; margin-top: 48px; text-align: center; }
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact__content { display: flex; flex-direction: column; min-height: 560px; }
.contact__body { margin-top: auto; position: relative; z-index: 1; }
.contact__content .section__label { position: relative; z-index: 1; }
.contact__title { max-width: calc(3 * var(--col) + 2 * var(--g)); margin-bottom: 24px; }
.contact__cols {
  display: grid;
  grid-template-columns: repeat(2, calc(3 * var(--col) + 2 * var(--g)));
  column-gap: var(--g);
  margin-bottom: 24px;
}
.contact__mail { display: inline-block; margin-top: 14px; }
.contact__pixels { position: absolute; inset: 0; pointer-events: none; }
.contact__pixels i {
  position: absolute; left: var(--x); top: var(--y);
  width: 18px; height: 18px; background: var(--c);
  opacity: 0; transform: scale(0.4);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.contact__pixels.is-in i { opacity: 1; transform: none; }
.contact__pixels.is-in i:nth-child(2) { transition-delay: 0.1s; }
.contact__pixels.is-in i:nth-child(3) { transition-delay: 0.2s; }
.contact__pixels.is-in i:nth-child(4) { transition-delay: 0.3s; }
.contact__pixels.is-in i:nth-child(5) { transition-delay: 0.4s; }
.contact__pixels.is-in i:nth-child(6) { transition-delay: 0.5s; }
.contact__pixels.is-in i:nth-child(7) { transition-delay: 0.6s; }

@media (max-width: 1023px) {
  .contact__title { max-width: none; }
  .contact__cols { grid-template-columns: 1fr; row-gap: 20px; }
}
.contact__pixels--m { display: none; }
@media (max-width: 767px) {
  /* phones: the squares are placed as in the mobile layout, each one a piece of the texture */
  .contact__pixels:not(.contact__pixels--m) { display: none; }
  .contact__pixels--m { display: block; inset: var(--m) var(--m) auto; aspect-ratio: 338 / 502; }
  .contact .contact__content { min-height: calc((var(--vw, 100vw) - 2 * var(--m)) * 502 / 338 + 2 * var(--m)); }
  .contact__pixels--m i {
    width: 2.7%; height: auto; aspect-ratio: 1;
    background: url("/assets/img/contact-squares.webp") calc(var(--i) * 100% / 9) 0 / 1000% 100% no-repeat;
  }
  .contact__content { min-height: 0; }
  .contact__body { margin-top: auto; padding-top: 160px; }
  .contact__media { display: none; }
  .contact__cols p { line-height: 1.2; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  min-height: 560px;
  display: flex; flex-direction: column;
  color: var(--white);
  background: #0d0503 url("/assets/img/footer-glow.webp") center top / cover no-repeat;
}
.footer::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.1) 45%, rgba(0, 0, 0, 0.25));
  pointer-events: none;
}
.footer > * { position: relative; }
.footer__top { align-items: start; row-gap: 40px; }
.footer__top > * { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
/* links and plain lines get the same line box, so the columns stay level row by row */
.footer__top a, .footer__top p, .footer__bottom a, .footer__bottom p { display: block; line-height: 1.15; padding-bottom: 0; }
.footer__nav { grid-column: 1 / span 2; }
.footer__info { grid-column: 3 / span 4; }
.footer__contacts { grid-column: 9 / span 2; }
.footer__social { grid-column: 11 / span 2; }
.footer__brand {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-block: 80px;
  text-align: center;
}
.footer__logo { width: clamp(150px, 15.7vw, 260px); }
.footer__brand { align-items: center; }
.footer__brand > * { width: clamp(150px, 15.7vw, 260px); }
.footer__bottom { align-items: end; }
.footer__copy { grid-column: 1 / span 2; }
.footer__rights { grid-column: 3 / span 4; }
.footer__privacy { grid-column: 9 / span 2; justify-self: start; }

@media (max-width: 1023px) {
  .footer__nav { grid-column: 1 / span 3; }
  .footer__info { grid-column: 4 / span 4; }
  .footer__contacts { grid-column: 8 / span 3; }
  .footer__social { grid-column: 11 / span 2; }
  .footer__copy { grid-column: 1 / span 3; }
  .footer__rights { grid-column: 4 / span 4; }
  .footer__privacy { grid-column: 8 / span 3; }
}
@media (max-width: 639px) {
  .footer { min-height: 100svh; padding-bottom: calc(var(--m) * 2); }
  .footer::before { background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.2) 40%, rgba(0, 0, 0, 0.5)); }
  .footer__top { row-gap: 48px; }
  .footer__top > * { gap: 12px; }
  .footer__top a, .footer__top p { line-height: 1.15; }
  /* two columns: the second one sits on the right edge */
  .footer__top, .footer__bottom { grid-template-columns: 1fr 1fr; column-gap: var(--g); }
  .footer__nav, .footer__contacts, .footer__copy, .footer__rights { grid-column: 1; }
  .footer__info, .footer__social, .footer__privacy { grid-column: 2; }
  .footer__info, .footer__social { align-items: flex-end; text-align: right; }
  .footer__privacy { grid-row: 1; justify-self: end; align-self: start; text-align: right; }
  .footer__copy { white-space: nowrap; }
  .footer__bottom { row-gap: 6px; }
  .footer__bottom { order: 2; margin-top: auto; margin-bottom: 48px; }
  .footer__copy { line-height: 1.2; }
  /* logo goes to the very bottom, across the full width */
  .footer__brand { order: 3; flex: 0 0 auto; padding: 0; align-items: stretch; }
  .footer__logo { width: 100%; }
  .footer__brand > * { width: 100%; }
}

/* ==========================================================================
   BRIEF MODAL
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: var(--m); }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(18, 18, 18, 0.25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.5s var(--ease);
}
.modal__dialog {
  position: relative;
  width: min(100%, calc(8 * var(--col) + 7 * var(--g)));
  max-height: calc(100svh - 2 * var(--m));
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg);
  padding: var(--m);
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.modal.is-open .modal__backdrop { opacity: 1; }
.modal.is-open .modal__dialog { opacity: 1; transform: none; }
.modal__close { position: absolute; top: var(--m); right: var(--m); z-index: 1; padding: 4px 0; }

.brief__head { margin-bottom: 40px; padding-right: 96px; }
.brief__title { margin-bottom: 14px; }
.brief__sub { color: var(--muted); }
.brief__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--g); }
.field { display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; }
fieldset.field > legend { margin-bottom: 14px; padding: 0; }
.field__label-row { display: flex; justify-content: space-between; align-items: baseline; }
.field__input {
  width: 100%;
  font: inherit; font-size: 16px; letter-spacing: -0.02em; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid rgba(18, 18, 18, 0.3);
  border-radius: 0;
  padding: 8px 0;
  transition: border-color 0.3s var(--ease);
}
.field__input::placeholder { color: rgba(18, 18, 18, 0.4); }
.field__input:focus { outline: none; border-color: var(--ink); }
.field__textarea { resize: vertical; min-height: 48px; line-height: 1.3; }
.field.has-error .field__input { border-color: var(--red); }
.field__error, .consent .field__error { color: var(--red); font-size: 12px; }
.field__error:empty { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block;
  padding: 11px 14px 9px;  /* the font sits high in its line box, so a touch more on top */
  border: 1px solid rgba(18, 18, 18, 0.3);
  font-size: 14px; line-height: 1;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 1px solid var(--ink); outline-offset: 2px; }
.field.has-error .chip span { border-color: var(--red); }

.range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 24px; background: transparent; margin: 0;
  --p: 0%;
}
.range::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(90deg, var(--ink) var(--p), rgba(18, 18, 18, 0.25) var(--p));
}
.range::-moz-range-track { height: 1px; background: rgba(18, 18, 18, 0.25); }
.range::-moz-range-progress { height: 1px; background: var(--ink); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; margin-top: -7px;
  background: var(--red); border: 0; border-radius: 0;
}
.range::-moz-range-thumb { width: 14px; height: 14px; background: var(--red); border: 0; border-radius: 0; }
.range__scale { display: flex; justify-content: space-between; color: var(--muted); }
.budget__value { color: var(--muted); }
.budget__value.is-set { color: var(--ink); }

.consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; margin-bottom: 28px; cursor: pointer; }
.consent input { width: 14px; height: 14px; margin: 0; accent-color: var(--red); }
.consent .t-body { line-height: 1.15; }
.consent .field__error { grid-column: 2; }
.consent.has-error span.t-body { color: var(--red); }

.brief__actions { display: flex; align-items: center; gap: var(--g); flex-wrap: wrap; }
.brief__status { color: var(--muted); }
.brief__done { padding-block: 64px; }
.brief__done h2 { margin-bottom: 14px; }

@media (max-width: 639px) {
  .modal { padding: 0; align-items: stretch; }
  .modal__dialog { width: 100%; max-height: none; height: 100%; }
  .brief__row { grid-template-columns: 1fr; gap: 0; }
  .brief__head { padding-right: 0; margin-top: 40px; }
}

/* ==========================================================================
   ANIMATION STATES
   ========================================================================== */
/* typing: every character is revealed one after another */
html.js [data-type]:not(.is-ready) { visibility: hidden; }
[data-type] .tw { display: inline-block; white-space: nowrap; }
[data-type] .tc { opacity: 0; }
[data-type].is-typed .tc { opacity: 1; transition: opacity 0.05s linear; transition-delay: var(--d, 0s); }

/* small text just appears */
[data-fade] { opacity: 0; transform: translateY(8px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-fade].is-in { opacity: 1; transform: none; }

/* the hero mark assembles square by square from the centre: each square switches on instantly, no fade or scale */
.pixel-mark rect { visibility: hidden; transition: visibility 0s linear var(--d, 0s); }
.pixel-mark.is-in rect { visibility: visible; }

/* before JS runs (or without JS) nothing stays hidden */
html:not(.js) [data-fade] { opacity: 1; transform: none; }
html:not(.js) .pixel-mark rect { visibility: visible; }
html:not(.js) .line { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation: none !important; }
  [data-fade] { opacity: 1; transform: none; }
  .pixel-mark rect { visibility: visible; }
  [data-type] .tc { opacity: 1; }
  .line { transform: none; }
}
