@import url('fonts.css');

/* ===========================================================================
   TIMBRENDER — design system
   minimal / editorial / architectural / premium / digital

   Two typefaces only: Roboto carries the headlines, Inter the interface and
   body copy. Both fall back to the system sans.
   =========================================================================== */

:root {
  --font-display: 'Roboto', system-ui, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, 'Segoe UI', sans-serif;

  /* Surfaces — warm off-white, per §21 */
  --bg: #f7f5f2;
  --bg-2: #efece7;
  --bg-3: #e6e2db;
  --ink: #14120f;
  --ink-2: #3b3630;
  --paper: #ffffff;

  /* Inverted blocks */
  --dark: #14120f;
  --dark-2: #1e1b17;

  /* Accent — the wood tone the Timbrender rings come from */
  --accent: #a5673a;
  --accent-soft: #c08c5d;

  --danger: #b4442e;

  --line: rgba(20, 18, 15, 0.14);
  --line-soft: rgba(20, 18, 15, 0.08);
  --line-dark: rgba(247, 245, 242, 0.16);

  /* The badge treatment burnt into the imagery, reused in running text */
  --chip-bg: rgba(20, 18, 15, 0.72);

  /* Rhythm */
  --pad: clamp(20px, 4.2vw, 76px);
  --gap: clamp(16px, 1.8vw, 28px);
  --section: clamp(88px, 12vw, 190px);
  --maxw: 1680px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --header-h: 76px;
}

/* --------------------------------------------------------------- reset --- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------------------------------------------------------- typography --- */

.display {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

/* Each source line of a headline is its own block, so the \n in the content
   actually breaks. Without this the lines run together. */
.display .line {
  display: block;
}

.d-xl {
  font-size: clamp(2.6rem, 7.4vw, 8rem);
  line-height: 1;
}

.d-lg {
  font-size: clamp(2.1rem, 5.4vw, 5.6rem);
}

.d-md {
  font-size: clamp(1.7rem, 3.4vw, 3.3rem);
  line-height: 1.06;
}

.d-sm {
  font-size: clamp(1.15rem, 1.7vw, 1.7rem);
  line-height: 1.15;
  font-weight: 400;
}

.label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.2;
}

.label--muted {
  color: color-mix(in srgb, var(--ink) 45%, transparent);
}

.lead {
  font-size: clamp(1rem, 1.2vw, 1.22rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 46ch;
  text-wrap: pretty;
}

/* Supporting paragraphs sit under a headline and are allowed to run as wide
   as the column that headline occupies, §6 of the revision brief. */
.lead--wide {
  max-width: 68ch;
}

.body {
  color: var(--ink-2);
  max-width: 62ch;
  text-wrap: pretty;
}

.num {
  font-variant-numeric: tabular-nums;
}

.accent {
  color: var(--accent);
}

/* -------------------------------------------------------------- layout --- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* 12-column desktop grid, §23 */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.section {
  padding-block: var(--section);
  position: relative;
}

.section--tight {
  padding-block: clamp(56px, 7vw, 110px);
}

.section--dark {
  background: var(--dark);
  color: var(--bg);
}

.section--dark .lead,
.section--dark .body {
  color: color-mix(in srgb, var(--bg) 66%, transparent);
}

.section--dark .label--muted {
  color: color-mix(in srgb, var(--bg) 45%, transparent);
}

.section--alt {
  background: var(--bg-2);
}

/* Two --alt sections in a row share one background, so the seam between them
   is invisible and their stacked padding reads as a hole rather than as a
   break. Only the section above keeps its padding. */
.section--alt + .section--alt {
  padding-top: 0;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.section--dark .rule {
  background: var(--line-dark);
}

/* Section opener: small index + label on the left, headline on the right */
.opener {
  align-items: start;
  margin-bottom: clamp(40px, 5vw, 84px);
}

.opener__meta {
  grid-column: 1 / 3;
  padding-top: 0.7em;
  border-top: 1px solid var(--line);
}

.section--dark .opener__meta {
  border-color: var(--line-dark);
}

.opener__title {
  grid-column: 3 / 13;
}

.opener__note {
  grid-column: 3 / 13;
  margin-top: 28px;
}

/* The note runs the full width of the headline column above it. */
.opener__note .lead {
  max-width: 78ch;
}

.opener__note--wide .lead,
.opener__note--wide .ba__note {
  max-width: none;
}

@media (max-width: 900px) {
  .opener__meta,
  .opener__title,
  .opener__note {
    grid-column: 1 / -1;
  }

  .opener__title {
    margin-top: 18px;
  }
}

/* --------------------------------------------------------------- links --- */

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  transition: gap 0.4s var(--ease), color 0.3s var(--ease);
}

.link:hover {
  gap: 1.1em;
  color: var(--accent);
}

.section--dark .link:hover {
  color: var(--accent-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  height: 52px;
  padding-inline: 30px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
    border-color 0.4s var(--ease);
}

.btn:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn--solid {
  background: var(--ink);
  color: var(--bg);
}

.btn--solid:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--lg {
  height: 64px;
  padding-inline: 44px;
  font-size: 13px;
}

.btn--sm {
  height: 42px;
  padding-inline: 22px;
  font-size: 11px;
}

.section--dark .btn {
  border-color: var(--line-dark);
  color: var(--bg);
}

.section--dark .btn:hover {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--bg);
}

.section--dark .btn--solid {
  background: var(--bg);
  color: var(--ink);
}

.section--dark .btn--solid:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* -------------------------------------------------------------- header ---
   No backdrop-filter: a blurred fixed bar re-filters the viewport on every
   scroll frame and was the single biggest source of scroll jank. */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.header.is-stuck {
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.brand__rings {
  width: 24px;
  height: 24px;
  flex: none;
}

.brand__rings circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1;
  padding-left: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 36px);
}

.nav a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  position: relative;
  padding-block: 6px;
  white-space: nowrap;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}

.nav a:hover::after,
.nav a[aria-current='page']::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* The number and its hours are one unit in the bar, stacked rather than laid
   out in a row: side by side they read as two separate links. The stack comes
   to about 39px, still under the 42px CTA beside it, so the bar keeps its
   height and nothing keyed to --header-h has to move. */
.header__contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header__contact .hours {
  margin-top: 0;
  font-size: 11px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 26px);
  flex: none;
}

.header__phone {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.3s var(--ease);
}

.header__phone:hover {
  color: var(--accent);
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.burger span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 1px;
  background: currentColor;
  transition: transform 0.4s var(--ease), opacity 0.25s var(--ease);
}

.burger span:nth-child(1) {
  top: 18px;
}

.burger span:nth-child(2) {
  top: 25px;
}

body.menu-open .burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.menu-open .burger span:nth-child(2) {
  transform: translateY(0) rotate(-45deg);
}

@media (max-width: 1180px) {
  /* The wrapper, not the anchor: hiding the number on its own would leave the
     opening hours sitting in the bar with nothing above them. */
  .header__contact {
    display: none;
  }
}

@media (max-width: 1040px) {
  .nav,
  .header__actions {
    display: none;
  }

  .burger {
    display: block;
  }
}

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  padding: calc(var(--header-h) + 28px) var(--pad) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease-out);
  overflow-y: auto;
  visibility: hidden;
}

body.menu-open .drawer {
  transform: translateY(0);
  visibility: visible;
}

.drawer a.drawer__link {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.9rem, 8.4vw, 3rem);
  line-height: 1.2;
  padding-block: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.drawer__services {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.drawer__services a {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.drawer__phone {
  display: inline-block;
  margin-top: 26px;
  font-size: 20px;
  font-weight: 500;
}

.drawer__foot {
  margin-top: 40px;
}

/* ---------------------------------------------------------------- hero --- */

.hero {
  padding-top: calc(var(--header-h) + clamp(48px, 9vh, 118px));
  padding-bottom: clamp(40px, 6vw, 80px);
}

.hero__head {
  align-items: end;
}

.hero__title {
  grid-column: 1 / 10;
}

/* The reveal clips each line to its own box, so the box has to be taller than
   the glyphs or descenders and digits get shaved off. */
.hero__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}

.hero__title .line > span {
  display: block;
  transform: translateY(100%);
  animation: rise 1.1s var(--ease-out) forwards;
}

.hero__title .line:nth-child(2) > span {
  animation-delay: 0.09s;
}

.hero__title .line:nth-child(3) > span {
  animation-delay: 0.18s;
}

@keyframes rise {
  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__title .line > span {
    animation: none;
    transform: none;
  }
}

.hero__aside {
  grid-column: 10 / 13;
  padding-bottom: 0.6em;
}

@media (max-width: 1100px) {
  .hero__title {
    grid-column: 1 / -1;
  }

  .hero__aside {
    grid-column: 1 / -1;
    margin-top: 26px;
    padding-bottom: 0;
  }
}

.hero__meta {
  margin-top: clamp(34px, 4vw, 56px);
  align-items: center;
  row-gap: 20px;
}

.hero__meta-l {
  grid-column: 1 / 7;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.hero__meta-r {
  grid-column: 8 / 13;
  text-align: right;
}

.hero__meta-r .tags {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .hero__meta-l,
  .hero__meta-r {
    grid-column: 1 / -1;
    text-align: left;
  }

  .hero__meta-r .tags {
    justify-content: flex-start;
  }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  white-space: nowrap;
}

a.tag {
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

a.tag:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.section--dark .tag {
  border-color: var(--line-dark);
  color: color-mix(in srgb, var(--bg) 70%, transparent);
}

.section--dark a.tag:hover {
  border-color: var(--bg);
  color: var(--bg);
}

/* ------------------------------------------------- hero stream (§05/06) ---
   Everything inside the track is kept cheap to composite: no blend modes, no
   backdrop blur, no filters. Those forced a full re-composite of the strip on
   every animation frame and made the marquee stutter. */

.stream {
  margin-top: clamp(34px, 4.5vw, 64px);
  position: relative;
  overflow: hidden;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
}

.stream.is-dragging {
  cursor: grabbing;
}

.stream::before,
.stream::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(24px, 5vw, 90px);
  z-index: 3;
  pointer-events: none;
}

.stream::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}

.stream::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg), transparent);
}

.stream__track {
  display: flex;
  gap: var(--gap);
  width: max-content;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.stream__item {
  flex: none;
  width: clamp(320px, 46vw, 720px);
  display: block;
}

.stream__pair {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-3);
  contain: paint;
}

.stream__half {
  position: relative;
  overflow: hidden;
}

.stream__half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}

.stream__seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.85);
  z-index: 2;
}

.stream__badge {
  position: absolute;
  bottom: 12px;
  z-index: 2;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 9px;
  background: var(--chip-bg);
  color: #fff;
}

.stream__badge--l {
  left: 12px;
}

.stream__badge--r {
  right: 12px;
}

.stream__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.stream__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(0.95rem, 1.2vw, 1.2rem);
}

.stream__cat {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 45%, transparent);
  white-space: nowrap;
}

.stream__hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------ services --- */

.svc {
  border-top: 1px solid var(--line);
}

.svc__row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  padding-block: clamp(28px, 3.4vw, 54px);
  border-bottom: 1px solid var(--line);
  align-items: start;
  position: relative;
  transition: background 0.5s var(--ease);
}

.svc__row:hover {
  background: color-mix(in srgb, var(--bg-2) 70%, transparent);
}

.svc__idx {
  grid-column: 1 / 2;
}

.svc__title {
  grid-column: 2 / 6;
}

.svc__title h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.6rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.svc__head {
  transition: color 0.3s var(--ease);
}

.svc__head:hover {
  color: var(--accent);
}

.svc__list {
  grid-column: 6 / 8;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13.5px;
  color: var(--ink-2);
}

/* These items are the shortest path into the service pages, so they read as
   links rather than as a spec list. */
.svc__link {
  display: inline-block;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.svc__link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.svc__plain {
  color: color-mix(in srgb, var(--ink) 50%, transparent);
}

.svc__text {
  grid-column: 8 / 11;
  font-size: 14px;
  color: var(--ink-2);
}

.svc__media {
  grid-column: 11 / 13;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-3);
  display: block;
}

.svc__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

.svc__row:hover .svc__media img {
  transform: scale(1.05);
}

.svc__go {
  margin-top: 20px;
}

@media (max-width: 1100px) {
  .svc__idx {
    grid-column: 1 / -1;
  }

  .svc__title,
  .svc__list,
  .svc__text {
    grid-column: 1 / -1;
  }

  .svc__title {
    margin-top: 10px;
  }

  .svc__list,
  .svc__text {
    margin-top: 16px;
  }

  .svc__media {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
    margin-top: 20px;
    order: 9;
  }
}

/* ------------------------------------------------- before / after (§14) --- */

/* The two halves are named in running text exactly the way they are named
   inside the image, so the sentence and the picture agree. */
.ba__note {
  font-size: clamp(1rem, 1.2vw, 1.22rem);
  line-height: 2;
  color: var(--ink-2);
  max-width: none;
}

.ba__chip {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 10px;
  background: var(--chip-bg);
  color: #fff;
  white-space: nowrap;
}

.ba {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-3);
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  contain: paint;
}

/* The divider drifts on its own so the block reads as comparable at a glance
   rather than looking like a static image someone has to discover is draggable.

   Animating --split directly, rather than nudging it from a rAF loop, keeps
   the whole thing off the main thread — the property is registered from
   app.js, which is also what adds .ba--drift, so a browser that cannot
   interpolate a custom property never gets the class and simply sits still
   instead of jumping between keyframes.

   Small on purpose: it is a hint that the divider moves, not a slideshow. */
@keyframes ba-drift {
  0%,
  100% {
    --split: 45%;
  }
  50% {
    --split: 55%;
  }
}

.ba--drift {
  animation: ba-drift 2s ease-in-out infinite;
}

/* The moment anyone drags or arrows the handle the drift is done for good:
   animations outrank inline styles in the cascade, so leaving it running would
   have it fight whatever the visitor sets. */
.ba--drift.is-manual {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .ba--drift {
    animation: none;
  }
}

@media (max-width: 700px) {
  .ba {
    aspect-ratio: 4 / 3;
  }
}

.ba img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
}

.ba__clip {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0);
}

.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split, 50%);
  width: 1px;
  background: #fff;
  z-index: 3;
  box-shadow: 0 0 0 1px rgba(20, 18, 15, 0.15);
}

.ba__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  gap: 4px;
  grid-auto-flow: column;
  box-shadow: 0 8px 30px rgba(20, 18, 15, 0.18);
}

/* A line of instruction above the frame. The block looks like a photograph
   until you know it is draggable, and nobody drags a photograph. */
.ba__hint {
  margin-bottom: 12px;
  /* Same typography as .cfg__hint in the configurator: the two blocks ask for
     the same gesture, so they should say it in the same voice. Only the
     positioning differs — that one is pinned inside the 3D stage, this one
     sits in the flow above the frame. */
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 38%, transparent);
}

/* Arrows and pulsing dots flanking the grip, saying which way it goes. They
   sit outside the 56px circle and never take pointer events — the drag is
   handled on .ba itself, and a decorative span swallowing the pointerdown is
   exactly the sort of thing that makes a slider feel broken. */
.ba__cue {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 3;
}

.ba__cue--l {
  right: 34px;
}

.ba__cue--r {
  left: 34px;
}

/* White on an unknown photograph, so everything carries its own shadow rather
   than trusting the image behind it to be dark. */
.ba__arrow {
  font-size: 16px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 6px rgba(20, 18, 15, 0.6);
}

.ba__dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 18, 15, 0.55);
  animation: ba-cue 1.6s ease-in-out infinite;
}

/* Delays run outward from the grip, so each side reads as travelling away from
   the handle rather than blinking in unison. */
.ba__cue--l .ba__dot:nth-child(2) {
  animation-delay: 0.16s;
}

.ba__cue--l .ba__dot:nth-child(1) {
  animation-delay: 0.32s;
}

.ba__cue--r .ba__dot:nth-child(2) {
  animation-delay: 0.16s;
}

.ba__cue--r .ba__dot:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes ba-cue {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Once the visitor has taken hold, the prompt has done its job. The arrows
   stay as a permanent affordance; only the pulsing stops. */
.ba.is-manual .ba__dot {
  animation: none;
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
  .ba__dot {
    animation: none;
  }
}

.ba__grip i {
  width: 1px;
  height: 14px;
  background: var(--ink);
  display: block;
}

.ba__tag {
  position: absolute;
  top: 16px;
  z-index: 2;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 11px;
  background: var(--chip-bg);
  color: #fff;
}

.ba__tag--l {
  left: 16px;
}

.ba__tag--r {
  right: 16px;
}

/* -------------------------------------------------- configurator (§08) --- */

.cfg {
  align-items: stretch;
  row-gap: 24px;
}

.cfg__stage {
  grid-column: 1 / 9;
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-3));
  overflow: hidden;
}

.section--dark .cfg__stage {
  background: linear-gradient(180deg, #201d19, #171410);
}

.cfg__stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
  cursor: grab;
}

.cfg__stage canvas:active {
  cursor: grabbing;
}

.cfg__loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 40%, transparent);
  transition: opacity 0.6s var(--ease);
}

.section--dark .cfg__loading {
  color: color-mix(in srgb, var(--bg) 40%, transparent);
}

.cfg__loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.cfg__hint {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 38%, transparent);
  pointer-events: none;
}

.section--dark .cfg__hint {
  color: color-mix(in srgb, var(--bg) 38%, transparent);
}

.cfg__panel {
  grid-column: 9 / 13;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: clamp(20px, 2vw, 34px);
  background: var(--paper);
  border: 1px solid var(--line);
}

.section--dark .cfg__panel {
  background: var(--dark-2);
  border-color: var(--line-dark);
}

@media (max-width: 1000px) {
  .cfg__stage,
  .cfg__panel {
    grid-column: 1 / -1;
  }

  .cfg__stage {
    aspect-ratio: 1;
  }

  .cfg__panel {
    /* compact parameter panel on mobile, §27 */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .cfg__panel > .cfg__group:last-of-type,
  .cfg__panel > .btn {
    grid-column: 1 / -1;
  }
}

.cfg__group h4 {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 45%, transparent);
  margin-bottom: 12px;
}

.section--dark .cfg__group h4 {
  color: color-mix(in srgb, var(--bg) 45%, transparent);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.swatch {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--sw, #ccc);
  cursor: pointer;
  padding: 0;
  transition: transform 0.35s var(--ease);
}

.swatch::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: border-color 0.35s var(--ease);
}

.swatch:hover {
  transform: scale(1.06);
}

.swatch[aria-pressed='true']::after {
  border-color: var(--ink);
}

.section--dark .swatch[aria-pressed='true']::after {
  border-color: var(--bg);
}

.cfg__value {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-2);
}

.section--dark .cfg__value {
  color: color-mix(in srgb, var(--bg) 62%, transparent);
}

.seg {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.section--dark .seg {
  border-color: var(--line-dark);
}

.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 11px 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  cursor: pointer;
  color: var(--ink-2);
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

.seg button.is-active {
  background: var(--ink);
  color: var(--bg);
}

.section--dark .seg button {
  color: color-mix(in srgb, var(--bg) 62%, transparent);
}

.section--dark .seg button.is-active {
  background: var(--bg);
  color: var(--ink);
}

.cfg__foot {
  /* -1, not 13: on the 6-column mobile grid a hard 13 would spawn implicit
     tracks and squeeze every sibling in this grid. */
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(26px, 3vw, 44px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.section--dark .cfg__foot {
  border-color: var(--line-dark);
}

/* --------------------------------------------------- viewer stage (§09) --- */

.viewer {
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 380px;
  background: radial-gradient(120% 120% at 50% 20%, #262119, #131110 70%);
  overflow: hidden;
}

@media (max-width: 800px) {
  .viewer {
    aspect-ratio: 3 / 4;
    min-height: 0;
  }
}

.viewer canvas {
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  cursor: grab;
}

.viewer canvas:active {
  cursor: grabbing;
}

.viewer__ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: clamp(16px, 2vw, 28px);
  pointer-events: none;
}

.viewer__ui > * {
  pointer-events: auto;
}

/* ------------------------------------------------------ animation (§11) --- */

.reel {
  position: relative;
  height: clamp(420px, 76vh, 860px);
  overflow: hidden;
  background: var(--dark);
}

.reel__media {
  position: absolute;
  inset: -8% 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  background: var(--dark);
}

/* Sits between the clip and the scrim: it darkens the footage without ever
   touching the legibility of the copy on top. Same colour as the section
   background, so at full opacity the seam in the loop has nothing to show. */
.reel__fade {
  position: absolute;
  inset: 0;
  background: var(--dark);
  opacity: 0;
  pointer-events: none;
}

.reel__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(20, 18, 15, 0.55) 0%,
    rgba(20, 18, 15, 0.2) 40%,
    rgba(20, 18, 15, 0.82) 100%
  );
}

.reel__body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 64px);
  color: var(--bg);
}

.reel__row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.reel__caps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 620px;
}

.reel .tag {
  border-color: var(--line-dark);
  color: color-mix(in srgb, var(--bg) 72%, transparent);
}

/* -------------------------------------------------------------- AR (§12) --- */

.ar {
  align-items: center;
  row-gap: 40px;
}

.ar__text {
  grid-column: 1 / 6;
}

.ar__phone {
  grid-column: 7 / 13;
  display: flex;
  justify-content: center;
}

@media (max-width: 900px) {
  .ar__text,
  .ar__phone {
    grid-column: 1 / -1;
  }
}

.phone {
  position: relative;
  width: min(330px, 82vw);
  aspect-ratio: 9 / 19.5;
  border-radius: 44px;
  padding: 11px;
  background: linear-gradient(160deg, #2c2822, #14120f);
  box-shadow: 0 40px 80px -30px rgba(20, 18, 15, 0.5);
}

.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: #000;
}

.phone__room {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone__notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 22px;
  border-radius: 999px;
  background: #14120f;
  z-index: 3;
}

/* The placement ring marks the floor. Its centre is exactly 20% up from the
   bottom of the screen, and the chair is anchored to that same line. */
.phone__reticle {
  position: absolute;
  left: 50%;
  bottom: 20%;
  transform: translate(-50%, 50%) rotateX(66deg);
  width: 91%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  z-index: 1;
  animation: reticle 3.6s ease-in-out infinite;
}

@keyframes reticle {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

/* ar-chair.webp is a genuinely transparent cut of the chair on a square canvas,
   with the feet at 78% and its cast shadow below them, so anchoring the element
   to the ring would leave the chair hovering. `bottom` places the feet on the
   reticle, whose centre is 20% up from the screen bottom: measured on the
   phone, 9.5% lands the feet exactly on that line.

   Both the transparency and the shadow are baked into the asset by
   build/ar-cutout.mjs, and both composite normally. Nothing here relies on
   `mix-blend-mode`, which is what used to leave a grey box on some mobile
   GPUs. */
/* Before placing, the object hovers and is semi-transparent — the way an AR
   preview reads before you commit it. Placing drops it to the bottom of that
   travel, which is exactly the ring, and makes it solid. */
.phone__object {
  position: absolute;
  left: 50%;
  bottom: 9.5%;
  width: 91%;
  z-index: 2;
  opacity: 0.55;
  animation: float 3.6s ease-in-out infinite;
  transition: opacity 0.5s var(--ease);
}

/* Percentages here are of the object's own height, which is 1.75x what it
   originally was, so the travel is scaled down to keep the hover the same
   distance on screen — a proportional 9% would read as a bounce. */
@keyframes float {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, -5.1%);
  }
}

.phone.is-placed .phone__object {
  animation: none;
  transform: translate(-50%, 0);
  opacity: 1;
  transition: transform 0.55s var(--ease), opacity 0.45s var(--ease);
}

.phone.is-placed .phone__reticle {
  animation: none;
  opacity: 0.85;
  border-color: rgba(255, 255, 255, 0.85);
}

@media (prefers-reduced-motion: reduce) {
  .phone__reticle,
  .phone__object {
    animation: none;
    transform: translateX(-50%);
  }
}

.phone__bar {
  position: absolute;
  left: 50%;
  bottom: 5.5%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

.phone__bar:hover {
  background: #fff;
}

.phone.is-placed .phone__bar {
  background: rgba(20, 18, 15, 0.82);
  color: var(--bg);
}

/* ------------------------------------------------------- cases (§13) --- */

.case {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  padding-block: clamp(30px, 3.6vw, 60px);
  border-top: 1px solid var(--line);
  align-items: start;
}

.case:last-of-type {
  border-bottom: 1px solid var(--line);
}

.case__media {
  grid-column: 1 / 8;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-3);
}

.case:nth-child(even) .case__media {
  grid-column: 6 / 13;
  order: 2;
}

.case__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.3s var(--ease);
}

.case:hover .case__media img {
  transform: scale(1.04);
}

.case__body {
  grid-column: 9 / 13;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.case:nth-child(even) .case__body {
  grid-column: 1 / 5;
  order: 1;
}

@media (max-width: 900px) {
  .case__media,
  .case:nth-child(even) .case__media {
    grid-column: 1 / -1;
    order: 0;
    aspect-ratio: 4 / 3;
  }

  .case__body,
  .case:nth-child(even) .case__body {
    grid-column: 1 / -1;
    order: 1;
  }
}

.case__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.3vw, 2.4rem);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 20px;
  font-size: 12.5px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.meta dt {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 42%, transparent);
  padding-top: 2px;
}

.meta dd {
  margin: 0;
  color: var(--ink-2);
}

/* Case-study credits: a four-up strip on desktop, stacked pairs on mobile. */
.meta--case {
  width: 100%;
  column-gap: clamp(16px, 3vw, 48px);
}

@media (min-width: 761px) {
  .meta--case {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .meta--case dt {
    grid-row: 1;
  }

  .meta--case dd {
    grid-row: 2;
  }

  .meta--case dt:nth-of-type(1),
  .meta--case dd:nth-of-type(1) {
    grid-column: 1;
  }

  .meta--case dt:nth-of-type(2),
  .meta--case dd:nth-of-type(2) {
    grid-column: 2;
  }

  .meta--case dt:nth-of-type(3),
  .meta--case dd:nth-of-type(3) {
    grid-column: 3;
  }

  .meta--case dt:nth-of-type(4),
  .meta--case dd:nth-of-type(4) {
    grid-column: 4;
  }
}

/* Case-study chapter */
.chapter {
  row-gap: 26px;
  padding-block: clamp(30px, 4vw, 68px);
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------- process (§15) --- */

.step {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  padding-block: clamp(24px, 2.8vw, 46px);
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.step:last-child {
  border-bottom: 1px solid var(--line);
}

.section--dark .step {
  border-color: var(--line-dark);
}

.step__n {
  grid-column: 1 / 2;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  line-height: 1;
  color: color-mix(in srgb, var(--ink) 30%, transparent);
}

.section--dark .step__n {
  color: color-mix(in srgb, var(--bg) 35%, transparent);
}

.step__t {
  grid-column: 2 / 6;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 2rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.step__d {
  grid-column: 7 / 13;
  color: var(--ink-2);
  font-size: 15px;
}

.section--dark .step__d {
  color: color-mix(in srgb, var(--bg) 66%, transparent);
}

@media (max-width: 900px) {
  .step__n,
  .step__t,
  .step__d {
    grid-column: 1 / -1;
  }

  .step__d {
    margin-top: 10px;
  }
}

/* ------------------------------------------------------------ CTA (§19) --- */

.cta__title {
  grid-column: 1 / 9;
}

.cta__side {
  grid-column: 9 / 13;
  align-self: end;
  padding-bottom: 0.4em;
}

@media (max-width: 900px) {
  .cta__title,
  .cta__side {
    grid-column: 1 / -1;
  }

  .cta__side {
    margin-top: 30px;
    padding-bottom: 0;
  }
}

/* -------------------------------------------------------- form (§20) --- */

.form {
  row-gap: 30px;
}

.form__intro {
  grid-column: 1 / 5;
}

.form__fields {
  grid-column: 6 / 13;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 24px;
}

@media (max-width: 900px) {
  .form__intro,
  .form__fields {
    grid-column: 1 / -1;
  }

  .form__fields {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

.field > label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 45%, transparent);
}

.field input[type='text'],
.field input[type='email'],
.field input[type='tel'],
.field textarea {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 0;
  font-size: 15px;
  border-radius: 0;
  transition: border-color 0.35s var(--ease);
}

.field input::placeholder,
.field textarea::placeholder {
  color: color-mix(in srgb, var(--ink) 28%, transparent);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip span {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease);
}

.chip input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.chip input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.file {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.file input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.file__btn {
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink-2);
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease);
}

.file__btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.file__name {
  font-size: 12.5px;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
}

.form__note {
  font-size: 12px;
  color: color-mix(in srgb, var(--ink) 46%, transparent);
  max-width: 46ch;
}

.form__status {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  display: none;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  max-width: 60ch;
}

.form__status.is-visible {
  display: flex;
  animation: status-in 0.35s var(--ease-out) both;
}

/* Opening hours, set under the phone number. Deliberately quiet: the line
   qualifies the number above it, it is not a second thing to read. Kept on one
   line, because "Пн–Пт," stranded above the times reads as two facts.

   60% and not the 45% the muted labels use. At 12px those labels already sit
   near 3:1, and this line carries a fact someone acts on — when to ring — so
   it has to survive a phone screen outdoors. 60% measures 4.75:1 here and
   6.68:1 in the footer, clearing the 4.5:1 floor for small text while staying
   far enough under the number above it to read as an aside. */
.hours {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: color-mix(in srgb, var(--ink) 60%, transparent);
  white-space: nowrap;
}

/* The footer runs light-on-dark, so the mix has to come out of the page
   background rather than the ink, or the line disappears into the panel. */
.hours--dark {
  color: color-mix(in srgb, var(--bg) 60%, transparent);
}

/* ------------------------------------------------------------ footer --- */

.footer {
  background: var(--dark);
  color: var(--bg);
  padding-block: clamp(56px, 6vw, 96px) 32px;
}

.footer a:hover {
  color: var(--accent-soft);
}

.footer__top {
  row-gap: 34px;
  padding-bottom: 46px;
  border-bottom: 1px solid var(--line-dark);
}

.footer__brand {
  grid-column: 1 / 5;
}

.footer__col {
  grid-column: span 2;
}

.footer__col--wide {
  grid-column: span 3;
}

@media (max-width: 900px) {
  .footer__brand {
    grid-column: 1 / -1;
  }

  .footer__col,
  .footer__col--wide {
    grid-column: span 3;
  }
}

.footer__col h4 {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bg) 42%, transparent);
  margin-bottom: 16px;
}

.footer__col li {
  margin-bottom: 8px;
}

.footer__col a {
  font-size: 13.5px;
  color: color-mix(in srgb, var(--bg) 78%, transparent);
  transition: color 0.3s var(--ease);
}

.footer__col a.footer__phone {
  font-size: 17px;
  font-weight: 500;
  color: var(--bg);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 26px;
  font-size: 11.5px;
  color: color-mix(in srgb, var(--bg) 45%, transparent);
}

/* ------------------------------------------------------------- prices --- */

/* One price component, used in the services list on the home page and in the
   hero of every landing page. Both places put it directly under the prose that
   explains the service, so the figure is read in context rather than as a
   detached number. Only the spacing above it differs per context. */
.price {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price__row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.price dt {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.2;
  color: color-mix(in srgb, var(--ink) 45%, transparent);
}

.price dd {
  font-size: 15px;
  color: var(--ink);
}

.price dd b {
  font-weight: 500;
}

/* "от 15 000 ₽" carries the weight; the unit it is measured in should read as
   a qualifier, not compete with the figure. */
.price__unit {
  color: var(--ink-2);
}

.price__note {
  display: block;
  margin-top: 1px;
  font-size: 12.5px;
  color: color-mix(in srgb, var(--ink) 45%, transparent);
}

/* Services quoted per project keep the slot, so a row of three does not read
   as one of them having been left unfinished. */
.price--quote {
  font-size: 15px;
  color: var(--ink-2);
}

/* In the services list the price follows the description paragraph. */
.price--svc {
  margin-top: 18px;
}

/* In a landing hero it follows the lead, which is set larger, so it needs more
   air above it and a rule to separate it from the sentence. */
.price--hero {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------- price list --- */

/* The table on the home page and at the foot of every service landing.

   A row is one line on a wide screen: what it is · what is included · the
   figure · how long it takes. Those four things are a single statement, and
   keeping them on one line is also what keeps sixteen rows down to a screen
   rather than a chapter — the list has to stay scannable next to the work it
   is pricing.

   The two right-hand columns are fixed and right-aligned so the figures stack
   into a column the eye can run down; only the two text columns give way when
   the viewport narrows. */
.tariffs {
  margin-top: clamp(30px, 3.4vw, 52px);
  display: flex;
  flex-direction: column;
  gap: clamp(30px, 3.2vw, 52px);
}

.tariff__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 10px;
}

.tariff__t {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.5vw, 21px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}

/* A floor price is a condition of the group, not a row in it. */
.tariff__min {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.tariff__list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.tariff__row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 150px 130px;
  gap: 6px 22px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.tariff__row:last-child {
  border-bottom: 1px solid var(--line);
}

.tariff__for {
  font-size: 15px;
  color: var(--ink);
}

.tariff__inc,
.tariff__term {
  margin: 0;
  font-size: 13px;
  color: color-mix(in srgb, var(--ink) 52%, transparent);
}

.tariff__from {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
  text-align: right;
}

.tariff__from b {
  font-weight: 500;
}

.tariff__term {
  text-align: right;
}

.tariff__foot {
  margin: clamp(22px, 2.4vw, 34px) 0 0;
  max-width: 62ch;
  font-size: 13px;
  color: var(--ink-2);
}

/* Inverted context — the section can be set dark like any other. */
.section--dark .tariff__list,
.section--dark .tariff__row:last-child {
  border-color: var(--line-dark);
}

.section--dark .tariff__row {
  border-bottom-color: rgba(247, 245, 242, 0.08);
}

.section--dark .tariff__for,
.section--dark .tariff__from {
  color: var(--bg);
}

.section--dark .tariff__inc,
.section--dark .tariff__term,
.section--dark .tariff__foot {
  color: color-mix(in srgb, var(--bg) 55%, transparent);
}

@media (max-width: 1100px) {
  .tariff__row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 130px 110px;
    gap: 6px 16px;
  }
}

/* Below this the four columns stop being readable as columns. The row folds
   into two lines instead of shrinking: name over term, figure over scope,
   with the figures still aligned right so the column survives the fold. */
@media (max-width: 860px) {
  .tariff__row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 3px;
    padding: 14px 0;
  }

  .tariff__for {
    grid-column: 1;
    grid-row: 1;
  }

  .tariff__from {
    grid-column: 2;
    grid-row: 1;
    white-space: nowrap;
  }

  .tariff__inc {
    grid-column: 1;
    grid-row: 2;
  }

  .tariff__term {
    grid-column: 2;
    grid-row: 2;
    white-space: nowrap;
  }
}

/* ------------------------------------------------------ reveal on scroll --- */

/* The hidden start state is gated on `html.js`: without JavaScript the content
   is simply visible. `html.reveal-fallback`, armed inline in <head>, forces
   everything visible after a few seconds if the reveal script is late or never
   arrives — so a slow or failed app.js can never leave the page blank. app.js
   cancels that timer from inside its first observer callback, so the net is
   only cut once the observer has proved it delivers.

   Note for anyone tuning performance here: `content-visibility: auto` used to
   sit on .svc__row, .case, .chapter and .step. It has to stay off anything
   holding a .reveal or .reveal-img. Skipped subtrees have no layout boxes, so
   a reveal target inside one measures zero and reads as not intersecting; it
   then keeps the start state below — invisible, or clipped away entirely —
   which is a blank section in exchange for a few milliseconds of layout. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.js .reveal.is-in,
.reveal-fallback .reveal {
  opacity: 1;
  transform: none;
}

.js .reveal-img {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1s var(--ease-out);
}

.js .reveal-img.is-in,
.reveal-fallback .reveal-img {
  clip-path: inset(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-img {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }
}

/* --------------------------------------------------------- utilities --- */

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.mt-s {
  margin-top: 18px;
}

.mt-m {
  margin-top: 30px;
}

.mt-l {
  margin-top: clamp(34px, 4vw, 60px);
}

.media {
  overflow: hidden;
  background: var(--bg-3);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ratio-32 {
  aspect-ratio: 3 / 2;
}

.ratio-11 {
  aspect-ratio: 1;
}

.ratio-43 {
  aspect-ratio: 4 / 3;
}

.ratio-169 {
  aspect-ratio: 16 / 9;
}

.col-full {
  grid-column: 1 / -1;
}

.col-half {
  grid-column: span 6;
}

.col-4 {
  grid-column: span 4;
}

.col-8 {
  grid-column: span 8;
}

@media (max-width: 900px) {
  .col-half,
  .col-4,
  .col-8 {
    grid-column: 1 / -1;
  }
}

/* ------------------------------------------------- manifesto reel --- */

/* The fly-through under the manifesto paragraph. Full content width, 16:9, and
   the frame reserved by aspect-ratio so nothing below it moves when the video
   loads. The fade layer is the same trick the showreel uses: at full opacity it
   is the flat dark the section can wear, so the loop's seam has nothing to
   show. */

.manifesto__reel {
  position: relative;
  margin: clamp(38px, 4.4vw, 72px) 0 0;
  overflow: hidden;
  background: var(--dark);
  aspect-ratio: 16 / 9;
}

.manifesto__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.manifesto__fade {
  position: absolute;
  inset: 0;
  background: var(--dark);
  opacity: 0;
  pointer-events: none;
}

/* The caption belongs to the figure but must not stretch its ratio box, so it
   rides under the frame rather than inside it. */
.manifesto__reel figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 14px 18px;
  color: color-mix(in srgb, var(--bg) 72%, transparent);
  background: linear-gradient(0deg, rgba(20, 18, 15, 0.62), rgba(20, 18, 15, 0));
  width: 100%;
}

/* 16:9 at every width — the master is 16:9 and `cover` would crop the sides
   off a narrower frame, which is the one thing a fly-through cannot spare. */

/* ------------------------------------------------- justified gallery --- */

/* §03 on the landing pages. Each row is a flex line; every item grows in
   proportion to its own aspect ratio and is given that same ratio as its box,
   so a row's items come out exactly the same height and nothing is cropped.
   `--a` is written on the figure by build/partials.mjs from the intrinsic size
   in the image manifest — the layout follows the pictures, not the reverse. */

.gal {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* `--fill` is 1 on every row but the last, which is capped to the share of the
   width that keeps its height equal to the rows above rather than letting one
   or two leftovers blow up to full bleed. */
.gal__row {
  display: flex;
  gap: var(--gap);
  max-width: calc(var(--fill, 1) * 100%);
}

.gal__item {
  /* grow in proportion to width, start from zero so the gaps come out of the
     free space first and the heights still match */
  flex: var(--a) 1 0;
  min-width: 0;
  aspect-ratio: var(--a);
}

/* One column on phones: a three-up row of 4:3 renders is 90px tall there, which
   shows nothing. Each picture keeps its own ratio instead. */
@media (max-width: 900px) {
  .gal__row {
    flex-direction: column;
  }

  .gal__item {
    flex: none;
    width: 100%;
  }

  .gal__row {
    max-width: none;
  }
}

/* -------------------------------------------------------- hero backdrop --- */

/* A landing hero can sit on its own render. The wrapper also carries
   `section--dark`, so every inverted rule already written for dark blocks —
   leads, labels, tags, buttons, links — applies here without a second set. */

.hero-shot {
  position: relative;
  isolation: isolate;
}

/* Stacked, not sent behind: `section--dark` paints the wrapper solid, so a
   negative z-index would put the picture underneath its own backdrop. It stays
   in flow at 0 and the hero is lifted over it instead. */
.hero-shot__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-shot__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The tint. Heavier at the very top, where the fixed header runs over it, and
   at the very bottom, under the buttons and tags; lightest across the middle,
   where the picture has the least text on it. Nothing in the hero drops below
   about 6:1 against the darkest thing the photograph can be. */
.hero-shot__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
      180deg,
      rgba(20, 18, 15, 0.78) 0%,
      rgba(20, 18, 15, 0.54) 46%,
      rgba(20, 18, 15, 0.74) 100%
    ),
    linear-gradient(90deg, rgba(20, 18, 15, 0.5), rgba(20, 18, 15, 0) 68%);
}

/* The hero's own bottom padding is what separates the tags from the edge of
   the picture; without a little more the row sits on the seam. */
.hero--shot {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(56px, 7vw, 104px);
}

/* The case credits are the one block that reaches this backdrop without an
   inverted rule of its own — .meta lives outside the .section--dark set. */
.hero-shot .meta {
  border-top-color: var(--line-dark);
}

.hero-shot .meta dt {
  color: color-mix(in srgb, var(--bg) 50%, transparent);
}

.hero-shot .meta dd {
  color: color-mix(in srgb, var(--bg) 82%, transparent);
}

.hero-shot .price--hero {
  border-top-color: var(--line-dark);
}

.hero-shot .price dt,
.hero-shot .price__note {
  color: color-mix(in srgb, var(--bg) 50%, transparent);
}

.hero-shot .price dd,
.hero-shot .price--quote {
  color: var(--bg);
}

.hero-shot .price__unit {
  color: color-mix(in srgb, var(--bg) 66%, transparent);
}

/* The header is transparent until it sticks, so on these pages it spends its
   first screen over a dark picture and has to be inverted for that stretch. */
.has-shot .header:not(.is-stuck) {
  color: var(--bg);
}

.has-shot .header:not(.is-stuck) .hours {
  color: color-mix(in srgb, var(--bg) 60%, transparent);
}

.has-shot .header:not(.is-stuck) .btn {
  border-color: var(--line-dark);
  color: var(--bg);
}

.has-shot .header:not(.is-stuck) .btn:hover {
  background: var(--bg);
  border-color: var(--bg);
  color: var(--ink);
}

.has-shot .header:not(.is-stuck) .header__phone:hover {
  color: var(--accent-soft);
}

/* ------------------------------------------------------- messengers --- */

.messengers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.messenger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-2);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.messenger svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.messenger--tg:hover {
  border-color: #229ed9;
  color: #229ed9;
}

.messenger--wa:hover {
  border-color: #25d366;
  color: #1da851;
}

/* Placeholder accent — a stand-in for MAX's own brand colour, not a checked
   value. Correct it against their brand page when convenient. */
.messenger--max:hover {
  border-color: #7c4dff;
  color: #6a3ff0;
}

.contact__phone a {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease);
}

.contact__phone a:hover {
  color: var(--accent);
}

.contact__mail {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-2);
}

.contact__mail a {
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.contact__mail a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* A secondary action next to the primary submit: same shape, far less pull. */
.btn--ghost {
  border-color: var(--line);
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

/* ------------------------------------------------- callback widget --- */

.cb {
  position: fixed;
  right: clamp(14px, 2vw, 28px);
  bottom: clamp(14px, 2vw, 28px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.cb > * {
  pointer-events: auto;
}

/* Nudge — three stages, each a little more present than the last. */
.cb__nudge {
  position: relative;
  max-width: min(280px, calc(100vw - 40px));
  padding: 16px 18px 16px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 44px -22px rgba(20, 18, 15, 0.4);
  animation: cb-in 0.55s var(--ease-out) both;
}

@keyframes cb-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.cb[data-stage='2'] .cb__nudge {
  max-width: min(320px, calc(100vw - 40px));
  box-shadow: 0 22px 50px -22px rgba(20, 18, 15, 0.5);
}

.cb[data-stage='3'] .cb__nudge {
  max-width: min(340px, calc(100vw - 40px));
  border-color: var(--accent);
  box-shadow: 0 24px 56px -22px rgba(165, 103, 58, 0.5);
}

.cb__nudge-text {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
  padding-right: 14px;
}

.cb__nudge-cta {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.cb__dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: color-mix(in srgb, var(--ink) 40%, transparent);
  cursor: pointer;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.cb__dismiss svg {
  width: 12px;
  height: 12px;
}

.cb__dismiss:hover {
  color: var(--ink);
  background: var(--bg-2);
}

/* Quick callback form */
.cb__panel {
  position: relative;
  width: min(300px, calc(100vw - 32px));
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 26px 60px -24px rgba(20, 18, 15, 0.5);
  animation: cb-in 0.45s var(--ease-out) both;
}

.cb__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cb__panel-head .cb__dismiss {
  position: static;
}

.cb__panel-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.cb__panel-note {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
}

.cb__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.cb__form input {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 11px 13px;
  font-size: 14px;
  transition: border-color 0.3s var(--ease);
}

.cb__form input:focus {
  outline: none;
  border-color: var(--ink);
}

.cb__form .btn {
  height: 46px;
  width: 100%;
}

.cb__status {
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-2);
  min-height: 1.2em;
}

/* Bell — always present, with a slow, small ring so it reads as available
   rather than as an alert. */
.cb__bell {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 14px 34px -16px rgba(20, 18, 15, 0.45);
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
    border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.cb__bell:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.cb__bell svg {
  width: 22px;
  height: 22px;
  transform-origin: 50% 15%;
  animation: cb-ring 7s var(--ease) infinite;
}

@keyframes cb-ring {
  0%,
  84%,
  100% {
    transform: rotate(0deg);
  }
  88% {
    transform: rotate(9deg);
  }
  92% {
    transform: rotate(-7deg);
  }
  96% {
    transform: rotate(4deg);
  }
}

.cb__bell-dot {
  position: absolute;
  top: 11px;
  right: 12px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.cb[data-stage] .cb__bell-dot {
  opacity: 1;
}

.cb[data-open] .cb__bell {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .cb__bell svg {
    animation: none;
  }

  .cb__nudge,
  .cb__panel {
    animation: none;
  }
}

/* --------------------------------------------------- required fields --- */

.req {
  color: var(--danger);
  padding-left: 2px;
}

.field.is-invalid input,
.field.is-invalid textarea {
  border-bottom-color: var(--danger);
}

.field.is-invalid > label,
.field.is-invalid > legend {
  color: var(--danger);
}

/* Email and phone are one requirement satisfied two ways. The asterisk sits on
   the group, and the pair is what gets outlined when neither is filled — an
   asterisk on each field would promise the opposite of what is on offer. */
.field--contact {
  gap: 0;
}

.contact-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 24px;
  margin-top: 18px;
}

@media (max-width: 900px) {
  .contact-pair {
    grid-template-columns: 1fr;
  }
}

/* The tick takes the asterisk's place the moment a requirement is satisfied, so
   it can be seen to be met without submitting. Written against .field rather
   than the contact pair, because every group that carries a tick wants the same
   behaviour — the contact pair and the project type both set .is-met. */
.req-met {
  display: none;
  padding-left: 4px;
  color: var(--accent);
}

.field.is-met > legend .req {
  display: none;
}

.field.is-met > legend .req-met {
  display: inline;
}

/* Only the pair is at fault when both are empty, so only the pair is marked.
   A field that is filled but malformed keeps its own outline from the rules
   further up — the two states can show at once and mean different things. */
/* The outline around the pair is drawn 12px outside it, so the default 8px
   above a hint puts the message inside the frame. Clear the offset and the
   stroke, then leave a little air under it. */
.field--contact > .field__hint {
  margin-top: 24px;
}

.field--contact.is-invalid .contact-pair {
  outline: 1px solid var(--danger);
  outline-offset: 12px;
  border-radius: 4px;
}


/* The chips are a group, so the hint has to sit around the group. */
.field.is-invalid .chips {
  outline: 1px solid var(--danger);
  outline-offset: 8px;
  border-radius: 4px;
}

.field__hint {
  font-size: 12px;
  color: var(--danger);
  margin-top: 8px;
}

/* ------------------------------------------------- mobile rhythm --- */
/* The desktop spacing scale is built for 1400px of width. Carried onto a
   375px screen the same gaps read as holes, so the vertical rhythm is
   compressed rather than merely scaled. */

@media (max-width: 760px) {
  :root {
    --section: 58px;
  }

  .section--tight {
    padding-block: 44px;
  }

  .opener {
    margin-bottom: 26px;
  }

  .opener__title {
    margin-top: 6px;
  }

  .opener__note {
    margin-top: 14px;
  }

  .mt-l {
    margin-top: 26px;
  }

  .mt-m {
    margin-top: 20px;
  }

  .hero {
    padding-top: calc(var(--header-h) + 40px);
    padding-bottom: 32px;
  }

  .hero__meta {
    margin-top: 26px;
  }

  .stream {
    margin-top: 26px;
  }

  .footer__top {
    padding-bottom: 30px;
  }

  .footer {
    padding-block: 46px 26px;
  }

  /* A square crop of the end-grain photograph wastes half a screen; a wide
     band says the same thing in a third of the height. */
  .about__grain {
    aspect-ratio: 3 / 1;
  }
}

/* ------------------------------------------------------ status lines --- */
/* Both forms answer through the same component: a spinner while it works,
   a coloured rail when it is done. Bigger and higher-contrast than the old
   grey caption, which people simply did not notice. */

@keyframes status-in {
  from { opacity: 0; transform: translateY(-6px); }
}

@keyframes status-spin {
  to { transform: rotate(360deg); }
}

.form__status::before,
.cb__status::before {
  content: '';
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, currentColor 25%, transparent);
  border-top-color: currentColor;
  animation: status-spin 0.75s linear infinite;
}

/* Only the busy state spins; the others show a static mark. */
.form__status:not(.is-busy)::before,
.cb__status:not(.is-busy)::before {
  animation: none;
  border: 0;
  border-radius: 0;
  width: 15px;
  height: 15px;
  background: currentColor;
  mask: var(--status-icon) center / contain no-repeat;
  -webkit-mask: var(--status-icon) center / contain no-repeat;
  --status-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1Zm0 3.4a.9.9 0 0 1 .9.9v3.4a.9.9 0 0 1-1.8 0V5.3a.9.9 0 0 1 .9-.9Zm0 6.2a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z'/%3E%3C/svg%3E");
}

.form__status.is-ok,
.cb__status.is-ok {
  color: #2f6b45;
  border-color: color-mix(in srgb, #2f6b45 35%, transparent);
  background: color-mix(in srgb, #2f6b45 7%, var(--paper));
}

.form__status.is-ok::before,
.cb__status.is-ok::before {
  --status-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1Zm3.5 5.2-4 4.2a.9.9 0 0 1-1.3 0L4.5 8.6a.9.9 0 1 1 1.3-1.2l1.1 1.2 3.3-3.5a.9.9 0 1 1 1.3 1.2Z'/%3E%3C/svg%3E");
}

.form__status.is-error,
.cb__status.is-error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
  background: color-mix(in srgb, var(--danger) 7%, var(--paper));
}

/* Callback panel: same component, tighter because the panel is 300px wide. */
.cb__status {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  min-height: 0;
}

.cb__status.is-visible {
  display: flex;
  animation: status-in 0.35s var(--ease-out) both;
}

.cb__form input.is-invalid {
  border-color: var(--danger);
}

@media (prefers-reduced-motion: reduce) {
  .form__status::before,
  .cb__status::before { animation: none; }
  .form__status.is-visible,
  .cb__status.is-visible { animation: none; }
}
