/* АВТОПРАЙМ: the well-kept board. Tokens first; everything below references them. */
:root {
  --bg: #d6cfc3;
  --surface: #cac2b4;
  --surface-2: #bfb6a7;
  --ink: #1b1f23;
  --muted: #3e4247;
  --accent: #c9a76e;
  --accent-deep: #6e5530;
  --accent-ink: #1d2125;
  --paper: #efe9de;
  --paper-ink: #1b1f23;
  --graphite: #202428;

  --font: "Onest", system-ui, sans-serif;

  --step-small: 0.875rem;
  --step-body: 1.0625rem;
  --step-lead: 1.375rem;
  --step-head: clamp(2.25rem, 1.3rem + 3.2vw, 4rem);

  --gap: 12px;
  --margin: clamp(12px, 1.6vw, 24px);
  --section: clamp(7.5rem, 11vw, 12rem);
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;

  color-scheme: light;
}

/* graphite "studio" sections: the first screen, the service, the footer */
.dark {
  --bg: #202428;
  --surface: #2a2f34;
  --surface-2: #343a40;
  --ink: #f3f0ea;
  --muted: #aeb4ba;
  --paper: #f3f0ea;
  --paper-ink: #1d2125;
  background: var(--bg); color: var(--ink); color-scheme: dark;
}
/* a deeper stone for every other light section */
.tone {
  --bg: #c6bdae;
  --surface: #bab0a0;
  --surface-2: #afa595;
  background: var(--bg);
}
.section.tone { margin-top: var(--section); padding-bottom: var(--section); }
.section.tone + .section { padding-top: var(--section); }
.section.tone + .section.dark { margin-top: 0; }

/* the first screen is set in the studio's own black, so the car photo needs no cut-out and stays sharp */
.studio {
  --bg: #0f1113;
  --surface: #1b1e21;
  --surface-2: #25292d;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--step-body); line-height: 1.5; letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; background: var(--surface); }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: inherit; }
:target { scroll-margin-top: 24px; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p { max-width: 62ch; text-wrap: pretty; }
.nums { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.head { font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.04em; }
.lead { font-size: var(--step-lead); line-height: 1.32; letter-spacing: -0.015em; }
.small { font-size: var(--step-small); line-height: 1.45; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* one treatment for every picture on the page */
.photo { filter: brightness(0.9) contrast(1.04); }

/* ---------- controls ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.4rem; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font-weight: 500; text-decoration: none; white-space: nowrap;
  user-select: none; -webkit-user-select: none;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
.button--ink { background: var(--paper-ink); color: var(--paper); }
.link {
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.22em; text-decoration-thickness: 0.07em;
  transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease;
}
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: #d8ba86; }
  .button--ink:hover { background: #343a40; }
  .link:hover { text-decoration-color: currentColor; }
}

/* ================= BAR: wordmark, links, phone, one action ================= */
.bar {
  display: flex; align-items: center; gap: 32px; padding: 16px var(--margin);
}
.bar__mark { display: inline-flex; align-items: center; gap: 12px; font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.03em; text-decoration: none; margin-right: auto; }
.logo { width: 36px; height: 36px; flex: none; }
.footer__brand { display: inline-flex; align-items: center; gap: 10px; }
.footer__brand .logo { width: 28px; height: 28px; }
.bar__nav { display: flex; gap: 28px; font-size: var(--step-body); }
.bar__tel { font-size: var(--step-body); font-weight: 500; text-decoration: none; white-space: nowrap; }
@media (max-width: 1080px) { .bar__nav { display: none; } }
@media (max-width: 620px) { .bar { gap: 16px; } .bar .button { display: none; } }

/* ================= HERO: the promise, the pains it closes, one picture ================= */
.hero {
  display: grid; grid-template-columns: minmax(0, 13fr) minmax(0, 11fr); gap: 8px; align-items: stretch;
  min-height: calc(100svh - 80px); padding: 0 var(--margin);
}
.hero__text { display: flex; flex-direction: column; padding: clamp(32px, 6vh, 72px) 0 40px clamp(0px, 6.5vw, 120px); }
.hero__h { font-size: clamp(2.25rem, 0.4rem + 3.7vw, 4rem); line-height: 0.98; letter-spacing: -0.045em; }
.only-wide { display: inline; }
.hero__lead { margin-top: 28px; max-width: 40ch; }
.hero__actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.button--big { min-height: 60px; padding: 0 2rem; font-size: var(--step-body); }
.hero__tel { font-size: var(--step-body); }
.pains { position: relative; z-index: 1; margin-top: auto; padding-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pains li { background: var(--surface); padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 6px; font-size: var(--step-body); line-height: 1.45; }
.pains strong { font-weight: 600; line-height: 1.3; }
/* the car is blended onto the page ground in tools/images.py, so it needs no frame or fill */
.hero__pic { align-self: center; margin-right: calc(var(--margin) * -1); }
.hero__pic img { width: 100%; height: auto; background: none; }
@media (min-width: 1081px) {
  .hero { overflow: hidden; }
  .hero__pic img { width: 118%; max-width: none; margin-left: -12%; }
}
@media (max-width: 1080px) {
  /* phone and tablet: headline, offer and action first, then the car, then the three answers */
  .hero { display: flex; flex-direction: column; min-height: 0; padding: 24px var(--margin) 32px; }
  .hero__text { display: contents; }
  .hero__pic { order: 4; margin: 24px calc(var(--margin) * -1) 0; }
  .pains { order: 5; }
  .pains { grid-template-columns: minmax(0, 1fr); padding-top: 36px; }
}
@media (max-width: 620px) {
  .hero__h { font-size: 2.25rem; }
  .only-wide { display: none; }
  .hero__lead { font-size: var(--step-body); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .button--big { width: 100%; }
}

/* ================= shared section frame ================= */
.section { padding: var(--section) var(--margin) 0; }
.section.dark { margin-top: var(--section); padding-bottom: var(--section); }
.section.dark + .section { padding-top: var(--section); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head .head { max-width: 14ch; }
.soft { color: var(--muted); }

/* ================= PRICES: tabs and banded list ================= */
.prices__note { margin-top: 24px; max-width: 56ch; }
.prices__season { color: var(--accent-deep); }
.prices__body { margin-top: 56px; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 40px; align-items: start; }
.tabs { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 16px; }
.tab {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left;
  min-height: 64px; padding: 10px 16px; background: var(--surface); border-radius: var(--radius);
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.tab:active { transform: scale(0.98); }
.tab__name { font-size: var(--step-body); font-weight: 500; line-height: 1.2; }
.tab__count { font-size: var(--step-small); color: var(--muted); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.tab[aria-selected="true"] .tab__count { color: #c9cdd1; }
@media (hover: hover) and (pointer: fine) { .tab:hover:not([aria-selected="true"]) { background: var(--surface-2); } }
.no-js .tabs { display: none; }

.cat + .cat { margin-top: 40px; }
.cat__title { font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.015em; margin-bottom: 16px; }
.js .cat__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.js .cat[hidden] { display: none; }
.js .cat + .cat { margin-top: 0; }
.js .is-all .cat + .cat { margin-top: 32px; }
.js .is-all .cat__title { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
.season-link { color: var(--accent-deep); font-weight: 500; text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 0.07em; }
.bands { display: flex; flex-direction: column; gap: 4px; }
.band {
  display: grid; grid-template-columns: 22% minmax(0, 1fr) auto; align-items: center; column-gap: 24px;
  min-height: 76px; padding: 12px 12px 12px 20px; background: var(--surface);
}
.band:nth-child(even) { background: var(--surface-2); }
.band__title { font-size: var(--step-body); font-weight: 500; line-height: 1.3; }
.band__link { color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .band__link:hover { text-decoration: underline; text-decoration-color: var(--accent-deep); text-underline-offset: 0.2em; } }
.band__note { display: block; font-size: var(--step-small); color: var(--muted); font-weight: 400; margin-top: 2px; }
.band__price { font-size: var(--step-body); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.add {
  display: none; min-height: 44px; min-width: 116px; padding: 0 14px; background: var(--ink); color: var(--bg); font-size: var(--step-small); font-weight: 500;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.js .add { display: inline-flex; align-items: center; justify-content: center; }
.add:active { transform: scale(0.96); }
.add[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .add:hover:not([aria-pressed="true"]) { background: #343a40; } }

.order {
  display: none; margin-top: 12px; position: static; bottom: 12px; z-index: 2;
  background: var(--graphite); color: #f3f0ea; padding: 18px 20px;
  grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center;
}
.js .order { display: grid; }
.js .order[data-empty="false"] { position: sticky; }
.order__sum { font-size: var(--step-body); font-weight: 500; font-variant-numeric: tabular-nums; }
.order__hint { font-size: var(--step-small); color: #c9cdd1; margin-top: 2px; }
.order .button { background: var(--accent); color: var(--accent-ink); }
.order[data-empty="true"] .button { display: none; }
.order__clear { font-size: var(--step-small); text-decoration: underline; text-underline-offset: 0.2em; margin-left: 4px; }

@media (max-width: 1080px) {
  .band { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title title" "price add"; row-gap: 8px; padding: 16px; }
  .band__title { grid-area: title; }
  .band__price { grid-area: price; }
  .add { grid-area: add; }
}
@media (max-width: 760px) {
  .prices__body { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 32px; }
  .tabs { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .tab { min-height: 60px; padding: 10px 12px; }
  .band { grid-template-areas: "title title" "price add"; }
  .order { grid-template-columns: minmax(0, 1fr); bottom: 8px; }
  .order .button { width: 100%; }
}

/* ================= HOW: three real documents of one visit ================= */
.how__intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.how__intro > * { grid-column: 1 / span 6; }
.how__intro p { margin-top: 24px; }
.steps { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 0; }
.step { background: var(--surface); padding: 24px; display: flex; flex-direction: column; }
.step h3 { margin-top: 28px; font-size: var(--step-lead); letter-spacing: -0.015em; }
.step p { margin-top: 8px; }
.how__note { margin-top: 16px; }
@media (min-width: 1081px) {
  .step { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
}

/* the documents are the service's own paper, so they keep their own lines */
[data-ui].doc { background: var(--paper); color: var(--paper-ink); padding: 18px 18px 20px; min-height: 236px; font-size: var(--step-small); line-height: 1.4; }
[data-ui] .doc__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding-bottom: 10px; border-bottom: 2px solid #2a241f; font-weight: 600; font-size: var(--step-body); max-width: none; }
[data-ui] .doc__meta { font-weight: 400; font-size: var(--step-small); color: #6b6157; text-align: right; }
[data-ui] .doc__list { margin: 0; padding: 0; list-style: none; }
[data-ui] .doc__list li { padding: 10px 0; border-bottom: 1px solid #d8ccb9; }
[data-ui] .doc__list--status li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: baseline; }
[data-ui] .st { font-weight: 600; white-space: nowrap; }
[data-ui] .st::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; }
[data-ui] .st--red { color: #b3261e; }
[data-ui] .st--red::before { background: #b3261e; }
[data-ui] .st--amber { color: #8a5a00; }
[data-ui] .st--amber::before { background: #c98a00; }
[data-ui] .st--green { color: #2e6b34; }
[data-ui] .st--green::before { background: #2e7d32; }
[data-ui] .doc__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
[data-ui] .doc__table td { padding: 10px 0; border-bottom: 1px solid #d8ccb9; vertical-align: baseline; }
[data-ui] .doc__table td + td { text-align: right; white-space: nowrap; padding-left: 12px; }
[data-ui] .doc__table tfoot td { border-bottom: 0; font-weight: 600; font-size: var(--step-body); padding-top: 12px; }
[data-ui] .doc__stamp { display: inline-block; margin-top: 12px; padding: 6px 10px; border: 2px solid #8c7656; color: #7a6548; font-weight: 600; transform: rotate(-2deg); }
@media (max-width: 1080px) {
  .how__intro > * { grid-column: 1 / span 10; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .step { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 24px; align-items: start; }
  .step .doc { grid-row: span 2; }
  .step h3 { margin-top: 0; }
}
@media (max-width: 760px) {
  .how__intro > * { grid-column: 1 / -1; }
  .step { display: flex; padding: 16px; }
  .step h3 { margin-top: 20px; }
}

/* ================= ABOUT: wide photo, colour tile, facts ================= */
.about__lead { margin-top: 24px; max-width: 40ch; }
.about__tiles { margin-top: 72px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.about__photo { grid-column: 1 / span 5; aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__side { grid-column: 6 / -1; display: flex; flex-direction: column; gap: 16px; }
.about__card { background: var(--paper); color: var(--paper-ink); padding: 24px; max-width: none; font-size: var(--step-lead); line-height: 1.35; }
.about__card a { font-weight: 500; }
.plate-tile { background: var(--accent-deep); aspect-ratio: 16 / 7; display: grid; place-items: center; padding: 6% 12%; }
.plate-tile svg { width: 100%; height: auto; }
.facts { margin-top: 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; font-size: var(--step-body); }
.facts dt { color: var(--muted); font-size: var(--step-small); }
.facts dd { margin-top: 2px; font-weight: 500; }
@media (max-width: 900px) {
  .about__tiles { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
  .about__photo, .about__side { grid-column: 1 / -1; }
  .about__card { font-size: var(--step-body); }
  .plate-tile { aspect-ratio: 3 / 2; }
}

/* ================= FAQ: accordion of filled tiles ================= */
.faq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
.faq__head { grid-column: 1 / span 4; position: sticky; top: 96px; }
.faq__head .head { max-width: 8ch; }
.faq__head p { margin-top: 20px; max-width: 28ch; }
.faq__list { grid-column: 5 / -1; display: flex; flex-direction: column; gap: 8px; }
.qa { background: var(--surface); transition: background-color var(--t-ui) ease, color var(--t-ui) ease; }
.qa summary {
  list-style: none; cursor: pointer; min-height: 72px; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  font-size: var(--step-lead); font-weight: 500; line-height: 1.3; letter-spacing: -0.01em;
}
.qa summary::-webkit-details-marker { display: none; }
.plus { position: relative; width: 16px; height: 16px; flex: none; }
.plus::before, .plus::after { content: ""; position: absolute; left: 0; top: 6.5px; width: 16px; height: 3px; background: currentColor; transition: transform var(--t-ui) var(--ease-out); }
.plus::after { transform: rotate(90deg); }
.qa[open] { background: var(--accent); color: var(--accent-ink); }
.qa[open] .plus::after { transform: rotate(0deg); }
.qa__a { padding: 0 24px 24px; }
.qa__a p { max-width: 52ch; }
@media (hover: hover) and (pointer: fine) { .qa:not([open]):hover { background: var(--surface-2); } }
@media (max-width: 900px) {
  .faq__head, .faq__list { grid-column: 1 / -1; }
  .faq__head { position: static; margin-bottom: 32px; }
  .faq__list { gap: 6px; }
  .qa summary { min-height: 64px; padding: 16px 20px; }
  .qa__a { padding: 0 20px 20px; }
}

/* ================= HISTORY: every generation of one model, running past ================= */
.history { overflow: hidden; }
.history__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end; }
.history__head .head { grid-column: 1 / span 7; }
.history__head p { grid-column: 8 / -1; max-width: 44ch; }
.models { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 6px; }
.model {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 9px 16px;
  background: var(--surface); color: var(--ink); text-align: left; font-weight: 500; font-size: var(--step-body); line-height: 1.2;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.model span { font-size: var(--step-small); font-weight: 400; color: var(--muted); }
.model:active { transform: scale(0.97); }
.model[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.model[aria-selected="true"] span { color: #4a3a22; }
@media (hover: hover) and (pointer: fine) { .model:hover:not([aria-selected="true"]) { background: var(--surface-2); } }
.timelines { margin: 32px calc(var(--margin) * -1) 0; }
.timeline + .timeline { margin-top: 40px; }
.timeline__name { padding: 0 var(--margin); margin-bottom: 16px; font-size: var(--step-lead); }
.track { display: flex; gap: 8px; width: max-content; padding: 0 var(--margin); list-style: none; margin: 0; }
.gen { flex: none; width: clamp(260px, 26vw, 400px); background: var(--surface); }
.gen img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--surface-2); }
.gen__cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 18px 16px; max-width: none; }
.gen__code { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.015em; }
.gen__years { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.js .timeline:not(.is-on) { display: none; }
.js .timeline + .timeline { margin-top: 0; }
.js .timeline__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.no-js .timelines, .js .timeline.is-static { overflow-x: auto; }
@media (max-width: 900px) {
  .history__head .head, .history__head p { grid-column: 1 / -1; }
  .history__head p { margin-top: 20px; }
}
@media (max-width: 620px) {
  .models { flex-wrap: nowrap; overflow-x: auto; margin-right: calc(var(--margin) * -1); padding-right: var(--margin); scrollbar-width: none; overscroll-behavior-x: contain; }
  .models::-webkit-scrollbar { display: none; }
  .model { flex: none; }
}

/* ================= CONTACT: photo strip, three-cell bar ================= */
.contact { margin-top: 0; background: var(--accent); color: var(--accent-ink); min-height: 80svh; padding: 48px 0 72px; overflow: hidden; }
.contact__body { padding: 24px var(--margin) 0; }
.contact__body .head { max-width: 12ch; }
.contact__lead { margin-top: 20px; max-width: 48ch; }
.lead-form { margin-top: 40px; }
.cells { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }
.cell.cell--text { text-align: left; padding: 14px 18px; resize: none; line-height: 1.35; font-size: var(--step-body); }
.cell {
  height: 96px; width: 100%; border: 0; border-radius: var(--radius); background: #e6d4b4; color: var(--paper-ink);
  font-size: var(--step-lead); text-align: center; padding: 0 16px; outline-offset: -4px;
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.cell::placeholder { color: #4f4537; opacity: 1; }
.cell:focus { background: #fbf7f0; }
.cell--submit { background: var(--graphite); color: #f3f0ea; font-weight: 500; }
.cell--submit:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .cell--submit:hover { background: #343a40; } }
.form-notes { margin-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); gap: 8px; font-size: var(--step-small); }
.form-notes .n3 { grid-column: 3 / span 2; }
@media (max-width: 1080px) and (min-width: 761px) {
  .cells, .form-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell--text, .cell--submit { grid-column: 1 / -1; }
  .form-notes .n3 { grid-column: 2; }
}
.form-notes a { font-weight: 500; }
.form-order { margin-top: 16px; max-width: 70ch; }
.form-order:empty { display: none; }
.form-status { margin-top: 16px; font-weight: 500; }
.form-status:empty { display: none; }
@media (max-width: 760px) {
  .contact { padding: 32px 0 48px; }
  .contact__body { padding-top: 16px; }
  .cells { grid-template-columns: 1fr; }
  .cell { height: 60px; }
  .cell--text { height: 120px; }
  .form-notes { grid-template-columns: 1fr; }
  .form-notes .n3 { grid-column: auto; }
}

/* ================= FOOTER: the mark, built large ================= */
.footer { margin-top: 0; padding: 72px var(--margin) calc(28px + env(safe-area-inset-bottom)); }
.mark svg { width: 100%; height: auto; }
.footer__grid { margin-top: 56px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; font-size: var(--step-small); }
.footer__links { grid-column: 1 / span 8; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.footer__links ul { display: flex; flex-direction: column; gap: 8px; }
.footer__contact { grid-column: 9 / -1; display: flex; flex-direction: column; gap: 8px; }
.footer__contact .big { font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.015em; text-decoration: none; }
.credits { margin-top: 56px; color: var(--muted); }
.credits summary { cursor: pointer; font-size: var(--step-small); }
.credits p { margin-top: 12px; max-width: 64ch; font-size: var(--step-body); }
.credits a { color: var(--muted); }
.footer__last { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: var(--step-small); }
.footer__last .button { min-height: 44px; padding: 0 1rem; }
@media (max-width: 760px) {
  .footer { padding-top: 48px; }
  .footer__grid { grid-template-columns: 1fr; margin-top: 40px; }
  .footer__links { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__contact { grid-column: 1 / -1; }
}

/* ================= motion ================= */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__h, .js .hero__lead, .js .hero__actions, .js .pains li { transform: translateY(22px); animation: rise 800ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 80ms + 100ms); }
  .js .hero__pic img { transform: translateX(48px) scale(1.03); animation: drive-in 1400ms var(--ease-out) 200ms forwards; }
  .js [data-reveal] { transform: translateY(24px); transition: transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 75ms); }
  .js [data-reveal].is-in { transform: none; }
  .js .step[data-reveal] .doc li, .js .step[data-reveal] .doc tr { transform: translateX(-10px); transition: transform 600ms var(--ease-out); }
  .js .step[data-reveal].is-in .doc li, .js .step[data-reveal].is-in .doc tr { transform: none; }
  .js .step .doc li:nth-child(2), .js .step .doc tr:nth-child(2) { transition-delay: 120ms; }
  .js .step .doc li:nth-child(3), .js .step .doc tr:nth-child(3) { transition-delay: 240ms; }
  .js .step .doc li:nth-child(4) { transition-delay: 360ms; }
  .js .step[data-reveal] .doc__stamp { transform: rotate(-2deg) scale(1.3); transition: transform 400ms var(--ease-out) 700ms; }
  .js .step[data-reveal].is-in .doc__stamp { transform: rotate(-2deg); }
  .band { transition: background-color var(--t-hover) ease; }
  .js .cat:not([hidden]) .band { animation: band-in 520ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes drive-in { to { opacity: 1; transform: none; } }
@keyframes band-in { from { transform: translateX(-12px); } to { transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: no-preference) {
  .js .timeline.is-on .track.is-running { animation: marquee var(--run, 60s) linear infinite; }
  .js .timeline.is-on .track.is-running:hover, .js .timeline.is-on .track.is-paused { animation-play-state: paused; }
  .js .timeline.is-on .gen { animation: gen-in 600ms var(--ease-out) both; animation-delay: calc(var(--n, 0) * 70ms); }
}
@keyframes gen-in { from { transform: translateX(32px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .timeline.is-on { overflow-x: auto; } }

/* footer mark: one row on wide screens, two rows on a phone */
.mark .mark--tall { display: none; }
@media (max-width: 620px) { .mark .mark--wide { display: none; } .mark .mark--tall { display: block; } }

/* ================= INNER PAGES: services, journal, 404 ================= */
.page-hero { padding: 24px var(--margin) clamp(48px, 7vw, 96px); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: var(--step-small); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 10px; color: var(--muted); }
.crumbs a { color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { text-decoration: underline; text-underline-offset: 0.2em; } }
.page-hero__h { margin-top: clamp(28px, 4vw, 56px); font-size: clamp(2.25rem, 1rem + 4vw, 4.25rem); line-height: 0.98; letter-spacing: -0.04em; max-width: 18ch; }
.page-hero__h--article { max-width: 22ch; font-size: clamp(2rem, 1rem + 3.2vw, 3.75rem); }
.page-hero__lead { margin-top: 24px; max-width: 46ch; }
.page-hero__meta { margin-top: clamp(28px, 4vw, 56px); color: var(--muted); }
.page-hero__meta a { color: var(--accent); }
.page-hero__meta + .page-hero__h { margin-top: 16px; }
.page-hero__row { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.page-hero__price { font-size: var(--step-lead); font-weight: 600; display: flex; flex-direction: column; }
.page-hero__price span { font-size: var(--step-small); font-weight: 400; color: var(--muted); }
.page-hero__tel { font-size: var(--step-body); }

.page-body { padding: clamp(48px, 7vw, 96px) var(--margin); display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 80px); align-items: start; }
.page-body--article { grid-template-columns: 260px minmax(0, 1fr); }
.prose { max-width: 70ch; font-size: 1.125rem; line-height: 1.6; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.1; letter-spacing: -0.03em; scroll-margin-top: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; font-size: var(--step-lead); letter-spacing: -0.015em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--accent-deep); }
.prose strong { font-weight: 600; }
.link-in { color: inherit; text-decoration: underline; text-decoration-color: var(--accent-deep); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
@media (hover: hover) and (pointer: fine) { .link-in:hover { text-decoration-color: currentColor; } }

.page-aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.aside-card { background: var(--graphite); color: #f3f0ea; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.aside-card__price { font-size: var(--step-lead); font-weight: 600; }
.aside-card__note { font-size: var(--step-small); color: #c9cdd1; }
.aside-card .button { align-self: stretch; }
.aside-card__facts { display: grid; gap: 10px; margin: 6px 0 0; font-size: var(--step-small); }
.aside-card__facts dt { color: #aeb4ba; }
.aside-card__facts dd { margin: 0; }
.toc { background: var(--surface); padding: 20px 22px; }
.toc__title { font-weight: 600; }
.toc ol { margin: 10px 0 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: var(--step-small); }
.toc a { color: inherit; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .toc a:hover { text-decoration: underline; text-underline-offset: 0.2em; } }

.page-faq { padding: clamp(48px, 7vw, 96px) var(--margin); background: #c6bdae; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
.page-faq .head { grid-column: 1 / span 4; }
.page-faq .faq__list { grid-column: 5 / -1; }
.page-faq .qa { background: #bab0a0; }
.page-faq .qa[open] { background: var(--accent); }

.page-more { padding: clamp(48px, 7vw, 96px) var(--margin); }
.page-more__h2 { margin-top: clamp(48px, 6vw, 80px); }
.tiles { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.tile a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 22px; background: var(--surface); color: inherit; text-decoration: none; transition: background-color var(--t-hover) ease; }
.tile__name { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.tile__note { color: var(--muted); }
.tile__price { margin-top: auto; padding-top: 12px; font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .tile a:hover { background: var(--surface-2); } }
.posts { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.post a { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 24px; background: var(--paper); color: inherit; text-decoration: none; transition: background-color var(--t-hover) ease; }
.post__meta { font-size: var(--step-small); color: var(--muted); }
.post__title { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.post__excerpt { color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .post a:hover { background: #f8f4ec; } }

.page-cta { padding: clamp(48px, 7vw, 96px) var(--margin); background: var(--accent); color: var(--accent-ink); }
.page-cta p { margin-top: 20px; max-width: 52ch; }
.page-cta__actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.page-cta__tel { font-size: var(--step-lead); font-weight: 600; color: inherit; text-decoration: none; }

.svc-index { padding: clamp(48px, 7vw, 96px) var(--margin); display: grid; gap: clamp(40px, 5vw, 72px); }
.svc-group__h { font-size: clamp(1.75rem, 1.2rem + 1.4vw, 2.25rem); letter-spacing: -0.03em; margin-bottom: 20px; }
.band--link { padding: 0; }
.band--link a { display: grid; grid-template-columns: 22% minmax(0, 1fr) auto; align-items: center; column-gap: 24px; min-height: 76px; padding: 12px 20px; color: inherit; text-decoration: none; }
.band__go { font-size: var(--step-lead); color: var(--accent-deep); transition: transform var(--t-hover) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .band--link a:hover .band__go { transform: translateX(4px); } }

.rubrics { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 6px; }
.rubric { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; transition: background-color var(--t-hover) ease; }
.rubric.is-on { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .rubric:not(.is-on):hover { background: var(--surface-2); } }
.journal { padding: clamp(40px, 6vw, 80px) var(--margin) clamp(48px, 7vw, 96px); }
.posts--grid { margin-top: 0; }
.pager { margin-top: 32px; display: flex; gap: 6px; }
.pager a, .pager span { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; background: var(--surface); color: inherit; text-decoration: none; font-weight: 500; }
.pager span { background: var(--ink); color: var(--bg); }

@media (max-width: 960px) {
  .page-body, .page-body--article { grid-template-columns: minmax(0, 1fr); }
  .page-aside { position: static; order: 2; }
  .page-aside--left { order: 0; }
  .page-faq .head, .page-faq .faq__list { grid-column: 1 / -1; }
  .page-faq .head { margin-bottom: 24px; }
}
@media (max-width: 620px) {
  .prose { font-size: var(--step-body); }
  .band--link a { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title go" "price go"; row-gap: 6px; padding: 16px; }
  .band--link .band__title { grid-area: title; }
  .band--link .band__price { grid-area: price; }
  .band--link .band__go { grid-area: go; }
}
