/* ============================================================
   BAGMUTSKIY · ГЛАВНАЯ — v1
   IA concept B: Selected Work + intent router.

   Fixes, each traceable to a measurement in research/:
   · H1 beside the photograph, not on it  (0 of 11 references overlay)
   · 6 header targets, was 12             (reference median 3)
   · no buttons above the fold            (0 of 11 references have any)
   · 9 colour tokens, was ~25             (incl. 2 limes and 2 blues)
   · lime/orange/blue retired             (white on #c4d602 is 1.61:1)
   · Literata, not Newsreader             (Newsreader has no Cyrillic)
   · weight 400 only                      (Source Sans 3 600 costs 67 KB)
   · zero icon fonts                      (261.6 KB of the 372.8 KB today)
   · unequal frame spans                  (today: 6 equal cards)
   ============================================================ */

:root {
  /* Ground and ink. Warm off-white after the landing system's --paper
     family and the references (Nadine Ijewere #fbfbf8, Heck #f7f5f0). */
  --paper: #f4f2ee;
  --paper-2: #eae6df;
  --paper-3: #fffdfa;
  --ink: #16130f;
  --muted: #5b564e;
  /* --muted-2 carries every eyebrow label and work caption, so it has to
     clear 4.5:1 on BOTH grounds. #756f65 measured 4.45 on --paper and
     4.00 on --paper-2 and failed; this is 5.16 and 4.64. */
  --muted-2: #6b655c;
  --line: #dcd6cb;

  /* One dark register, used twice: the author projects and the form. */
  --stage: #0d0b09;
  --on-stage: #f2eee7;
  --on-stage-muted: #a8a29a;
  --line-stage: rgba(255, 255, 255, 0.15);

  --cta: #16130f;
  --cta-hover: #383129;
  --focus: #1b4fd8;
  --focus-on-stage: #9dc0ff;

  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --shell: 1280px;
  --rail-w: min(var(--shell), 100% - 2rem);
  --measure: 36rem;
  --header-h: 56px;
  /* The mu-plugin editor bar overrides this; zero for visitors. */
  --admin-bar-h: 0px;

  --fs-display: clamp(1.875rem, 3.9vw, 3.25rem);
  --fs-h2: clamp(1.375rem, 2.4vw, 1.875rem);
  --fs-h3: clamp(1.0625rem, 1.5vw, 1.1875rem);
  --fs-route: clamp(1.5rem, 2.6vw, 2.375rem);
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;
  --fs-label: 0.6875rem;

  --gap: clamp(0.75rem, 1.6vw, 1.5rem);
  --sec-y: clamp(3.5rem, 7vw, 7rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--admin-bar-h) + 12px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-body)/1.55 var(--font-body);
  font-synthesis-weight: none;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.004em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-display); line-height: 1.08; }
h2 { font-size: var(--fs-h2); line-height: 1.18; }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
p { margin: 0; }

a { color: inherit; }

/* One focus treatment everywhere. Never outline:none. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.author :focus-visible,
.book :focus-visible { outline-color: var(--focus-on-stage); }

.rail { width: var(--rail-w); margin-inline: auto; }
.measure { max-width: var(--measure); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper-3);
  padding: 0.75rem 1rem;
  font-size: var(--fs-sm);
}
.skip-link:focus { left: 0; }

.label {
  margin: 0 0 0.6rem;
  font-size: var(--fs-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.label-on-stage { color: var(--on-stage-muted); }

.link-quiet { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.link-quiet:hover { color: var(--ink); border-bottom-color: currentColor; }

/* ---------- Buttons. One shape, used sparingly, never above the fold ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  background: var(--cta);
  color: var(--paper-3);
  border: 0;
  border-radius: 2px;
  font: 400 var(--fs-body)/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.12s var(--ease);
}
.btn:hover { background: var(--cta-hover); }
.btn-sm { min-height: 40px; padding: 0.45rem 0.95rem; font-size: var(--fs-sm); }

.book .btn {
  background: var(--on-stage);
  color: var(--stage);
}
.book .btn:hover { background: #ffffff; }

/* ============================================================
   HEADER — a hairline, not a filled bar.
   ============================================================ */
.site-header {
  position: sticky;
  top: var(--admin-bar-h);
  z-index: 30;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--paper); }
}

.header-row {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding: 0.5rem 0;
}

.nav {
  display: none;
  margin-inline-start: auto;
  gap: clamp(0.9rem, 1.8vw, 1.7rem);
}
.nav a {
  font-size: var(--fs-sm);
  color: var(--muted);
  text-decoration: none;
  padding: 0.85rem 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }

.header-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nav ~ .header-actions { margin-inline-start: 0; }

.nav-toggle {
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.5rem;
  background: none;
  border: 0;
  color: var(--ink);
  font: 400 var(--fs-sm)/1 var(--font-body);
  cursor: pointer;
}
/* Below 960px the header has no room for a filled button beside the
   brand and the menu toggle — but hiding it outright would put contact
   behind a menu tap, which §127 forbids. So the same link stays,
   demoted to a quiet underlined one. */
.header-actions .btn-sm {
  min-height: 44px;
  padding-inline: 0;
  background: none;
  color: var(--ink);
  border-radius: 0;
  border-bottom: 1px solid var(--ink);
  align-self: center;
  font-size: var(--fs-sm);
}
.header-actions .btn-sm:hover { background: none; color: var(--ink); border-bottom-width: 2px; }

.nav-panel {
  position: fixed;
  inset: calc(var(--header-h) + var(--admin-bar-h)) 0 0;
  z-index: 29;
  background: var(--paper);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-panel[hidden] { display: none; }
.nav-panel-inner { width: var(--rail-w); margin-inline: auto; padding: 1.25rem 0 2.5rem; }
.nav-panel nav { display: grid; }
.nav-panel nav a {
  display: flex;
  align-items: center;
  min-height: 56px;
  font-family: var(--font-display);
  font-size: 1.3125rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.nav-panel-direct { margin-top: 1.5rem; font-size: var(--fs-sm); color: var(--muted); }
.nav-panel-direct a { color: var(--ink); }

/* ============================================================
   1. COVER
   ============================================================ */
.cover { padding: clamp(1.75rem, 4vw, 3.5rem) 0 var(--sec-y); }
.cover-row { display: grid; gap: clamp(1.25rem, 3vw, 2.75rem); }

.cover-copy { display: grid; align-content: center; gap: clamp(0.9rem, 1.8vw, 1.35rem); }
.cover-lede { max-width: 30rem; color: var(--muted); }

.cover-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: var(--fs-xs);
  color: var(--muted-2);
  letter-spacing: 0.01em;
}
.cover-facts span { display: inline-flex; align-items: center; }
/* The dot trails its own fact rather than leading the next one. A leading
   dot lands at the start of a wrapped line and reads as a typo; a trailing
   one lands at the end of a line and reads as a continuation. */
.cover-facts span:not(:last-child)::after {
  content: "";
  width: 3px; height: 3px;
  margin-inline-start: 1rem;
  border-radius: 50%;
  background: var(--line);
  /* the dot belongs to the gap, so pull it into the space after */
  margin-inline-end: -0.675rem;
}
.cover-facts a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.cover-facts a:hover { color: var(--ink); }
/* Below 620px the four facts always wrap, and a separator at a line end
   reads as a stray mark whichever side of the fact it sits on. So the row
   becomes a two-column block and the dots go away entirely. */
@media (max-width: 619px) {
  .cover-facts { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 0.3rem 1.35rem; }
  .cover-facts span:not(:last-child)::after { display: none; }
}
@media (max-width: 359px) {
  .cover-facts { grid-template-columns: auto; }
}

.cover-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.35rem; }
.cover-links > a:first-child {
  font-size: var(--fs-body);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.cover-links > a:first-child:hover { border-bottom-width: 2px; }
.cover-links .link-quiet { min-height: 44px; display: inline-flex; align-items: center; }

.cover-figure img { width: 100%; }

/* ============================================================
   2. INTENT ROUTER
   ============================================================ */
.routes {
  padding: var(--sec-y) 0;
  border-top: 1px solid var(--line);
}
.routes-lede { margin: 0.75rem 0 0; color: var(--muted); }

.route-list {
  list-style: none;
  margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.route-list > li { border-bottom: 1px solid var(--line); }
.route-list > li > a {
  display: grid;
  gap: 0.3rem;
  padding: clamp(0.95rem, 1.8vw, 1.35rem) 0;
  min-height: 56px;
  text-decoration: none;
  transition: padding-inline-start 0.16s var(--ease);
}
.route-list > li > a:hover { padding-inline-start: 0.5rem; }
.route-name {
  font-family: var(--font-display);
  font-size: var(--fs-route);
  line-height: 1.1;
}
.route-note { font-size: var(--fs-sm); color: var(--muted); max-width: 34rem; }
.route-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.route-note a:hover { color: var(--ink); }

/* ============================================================
   3. SELECTED WORK — unequal spans, no card grid
   ============================================================ */
.work { padding: var(--sec-y) 0; border-top: 1px solid var(--line); }

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 3.5vw, 3rem) var(--gap);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.w a { display: block; text-decoration: none; }
.w img {
  width: 100%;
  transition: opacity 0.2s var(--ease);
}
.w a:hover img { opacity: 0.9; }

.w figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.6rem;
  margin-top: 0.6rem;
  font-size: var(--fs-xs);
}
.w-name { color: var(--ink); }
.w-ctx { color: var(--muted-2); }
.w a:hover .w-name { border-bottom: 1px solid var(--ink); }

.work-more {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.5rem;
  align-items: center;
  margin-top: clamp(1.75rem, 3.5vw, 3rem);
}
.work-more > a:first-child {
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-block: 0.5rem;
}
.work-more .link-quiet { padding-block: 0.5rem; }

/* ============================================================
   4. PRICE — plain numbers, no table, no badges
   ============================================================ */
.price { padding: var(--sec-y) 0; border-top: 1px solid var(--line); background: var(--paper-2); }
.price-lede { margin: 0.75rem 0 0; color: var(--muted); }

.price-list {
  list-style: none;
  margin: clamp(1.25rem, 2.5vw, 2rem) 0 0;
  padding: 0;
  max-width: 40rem;
}
.price-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}
.price-what { flex: 1 1 12rem; }
.price-num { font-family: var(--font-display); white-space: nowrap; }

.price-more {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.5rem;
  align-items: center;
  margin-top: 1.35rem;
}
.price-more > a:first-child {
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-block: 0.5rem;
}
.price-more .link-quiet { padding-block: 0.5rem; }

/* ============================================================
   5. AUTHORITY
   ============================================================ */
.authority { padding: var(--sec-y) 0; border-top: 1px solid var(--line); }
.authority-list {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  margin: clamp(1.25rem, 2.5vw, 2rem) 0 0;
}
.authority-list dt {
  font-size: var(--fs-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 0.45rem;
}
.authority-list dd { margin: 0; max-width: 26rem; }
.authority-list a { text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   6. AUTHOR PROJECTS — the one dark register
   ============================================================ */
.author {
  padding: var(--sec-y) 0;
  background: var(--stage);
  color: var(--on-stage);
}
.author-row { display: grid; gap: clamp(1.5rem, 3vw, 3rem); align-items: center; }
.author-copy { display: grid; gap: 0.9rem; max-width: 34rem; }
.author-copy h2 { color: var(--on-stage); }
.author-copy p { color: var(--on-stage-muted); }
.author-copy a { color: var(--on-stage); text-decoration: underline; text-underline-offset: 3px; }
.author-note { border-top: 1px solid var(--line-stage); padding-top: 0.9rem; }
.author-figure figcaption {
  margin-top: 0.6rem;
  font-size: var(--fs-xs);
  color: var(--on-stage-muted);
}

/* ============================================================
   7. APPROACH — three steps
   ============================================================ */
.approach { padding: var(--sec-y) 0; }
.steps {
  list-style: none;
  counter-reset: none;
  margin: clamp(1.25rem, 2.5vw, 2rem) 0 0;
  padding: 0;
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}
.steps li { display: grid; grid-template-columns: 1.75rem 1fr; gap: 0.75rem; align-items: start; }
.step-n {
  font-family: var(--font-display);
  color: var(--muted-2);
  line-height: 1.55;
}
.step-b { max-width: 36rem; color: var(--muted); }
.step-b strong { font-weight: 400; color: var(--ink); }

.approach-note {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.approach-more { display: flex; flex-wrap: wrap; gap: 0.7rem 1.5rem; margin-top: 1.1rem; }
.approach-more a { padding-block: 0.5rem; }

/* ============================================================
   8. ABOUT
   ============================================================ */
.about { padding: var(--sec-y) 0; border-top: 1px solid var(--line); }
.about-row { display: grid; gap: clamp(1.5rem, 3vw, 2.75rem); align-items: center; }
.about-copy { display: grid; gap: 0.85rem; max-width: 34rem; }
.about-copy p { color: var(--muted); }
.about-more a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-block: 0.4rem; }
.about-figure figcaption { margin-top: 0.6rem; font-size: var(--fs-xs); color: var(--muted-2); }

/* ============================================================
   9. SERVICE INDEX — compact, typographic, all 30 services
   ============================================================ */
.index { padding: var(--sec-y) 0; border-top: 1px solid var(--line); background: var(--paper-2); }
.index-cols {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
}
.index-cols h3 {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 0.5rem;
}
.index-cols ul { list-style: none; margin: 0; padding: 0; }
.index-cols li { border-bottom: 1px solid var(--line); }
.index-cols a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--fs-sm);
  text-decoration: none;
  color: var(--muted);
}
.index-cols a:hover { color: var(--ink); }

/* ============================================================
   10. JOURNAL — subordinate to the photography
   ============================================================ */
.journal { padding: var(--sec-y) 0; border-top: 1px solid var(--line); }
.journal-list {
  list-style: none;
  margin: clamp(1rem, 2vw, 1.5rem) 0 0;
  padding: 0;
  max-width: 40rem;
  border-top: 1px solid var(--line);
}
.journal-list li { border-bottom: 1px solid var(--line); }
.journal-list a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0.7rem 0;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  text-decoration: none;
}
.journal-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.journal-more { margin-top: 1.1rem; }
.journal-more a { padding-block: 0.5rem; }

/* ============================================================
   11. CONTACT
   ============================================================ */
.book { padding: var(--sec-y) 0; background: var(--stage); color: var(--on-stage); }
.book-copy { max-width: 46rem; }
.book h2 { color: var(--on-stage); }
.book-sub { margin-top: 0.7rem; color: var(--on-stage-muted); max-width: 32rem; }

.lead-form { margin-top: clamp(1.25rem, 2.5vw, 2rem); }
.lead-fields { display: grid; gap: 0.9rem; }
.lead-form label { display: grid; gap: 0.35rem; }
.lead-form label > span {
  font-size: var(--fs-xs);
  color: var(--on-stage-muted);
  letter-spacing: 0.02em;
}
/* An explicit colour, not opacity: 0.7 on --on-stage-muted composited to
   #7a756f = 4.30:1 and was the page's last contrast failure. */
.lead-form label > span i { font-style: normal; color: #858077; }

.lead-form input[type="text"],
.lead-form select {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-stage);
  border-radius: 2px;
  color: var(--on-stage);
  font: 400 var(--fs-body)/1.3 var(--font-body);
  appearance: none;
}
.lead-form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--on-stage-muted) 50%),
                    linear-gradient(135deg, var(--on-stage-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 13px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-end: 2.25rem;
}
.lead-form input::placeholder { color: rgba(242, 238, 231, 0.45); }
.lead-form input:focus,
.lead-form select:focus { background: rgba(255, 255, 255, 0.1); }

.lead-form .btn { margin-top: 1.1rem; }

.form-bait { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note {
  margin-top: 0.9rem;
  font-size: var(--fs-xs);
  color: var(--on-stage-muted);
  max-width: 34rem;
}
.form-note a { color: var(--on-stage); }
.form-status {
  margin-top: 0.9rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-stage);
  border-radius: 2px;
  font-size: var(--fs-sm);
}
.form-status[data-state="ok"] { border-color: rgba(157, 192, 255, 0.5); }
.form-status[data-state="err"] { border-color: rgba(255, 170, 150, 0.55); }

.book-direct { margin-top: 1.6rem; font-size: var(--fs-sm); }
.book-direct-lead { color: var(--on-stage-muted); margin-bottom: 0.35rem; }
.book-direct-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.book-direct-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.85rem;
  color: var(--on-stage);
  text-decoration: none;
  border: 1px solid var(--line-stage);
  border-radius: 2px;
}
.book-direct-list a:hover { border-color: var(--on-stage); }
.book-direct-list a:first-child { padding-inline-start: 0.85rem; }

/* ============================================================
   FOOTER — grouped, crawlable, no JS disclosure
   ============================================================ */
.site-footer {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.footer-cols {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.footer-cols h2 {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 0.5rem;
}
.footer-cols h2 + ul { margin-bottom: 1.5rem; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: var(--fs-sm);
  color: var(--muted);
  text-decoration: none;
}
/* The legal row is dense and secondary; 44px only where a thumb is used. */
@media (pointer: coarse) {
  .footer-legal a { min-height: 44px; }
  .footer-base { gap: 0.2rem; }
}
@media (pointer: fine) {
  .footer-legal a { min-height: 32px; display: inline-flex; align-items: center; }
}
.footer-cols a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

.footer-base {
  display: grid;
  gap: 0.6rem;
  margin-top: clamp(1.75rem, 3.5vw, 3rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.footer-base a { color: var(--muted); display: inline-flex; align-items: center; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }

/* ============================================================
   TAP TARGET FLOOR
   Every link that stands on its own line as a navigation
   affordance gets 44px. Links inside running prose are
   deliberately left at their line height — WCAG 2.5.8 exempts
   inline targets, and padding them would break the text block.
   The exempted set is listed in HOME-W2-REPORT §a11y.
   ============================================================ */
.brand,
.work-more > a,
.price-more > a,
.approach-more a,
.about-more a,
.journal-more a,
.footer-cols a,
.footer-base a,
.index-cols a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
/* the two "more" rows sit on one line, so they need their own gap */
.work-more, .price-more, .approach-more { row-gap: 0; }

/* ============================================================
   BREAKPOINTS
   QA order from the traffic distribution: 430 → 390 → 1440 → 1920
   → 360 → 320 → 768. 391–430 px is the largest single bucket
   (26.43%); 1024–1279 is 1.78%.
   ============================================================ */

@media (min-width: 480px) {
  .lead-fields { grid-template-columns: 1fr 1fr; }
  .lead-wide { grid-column: 1 / -1; }
  .footer-base { grid-template-columns: 1fr auto; align-items: center; }
  .footer-legal { justify-content: flex-end; }
}

@media (min-width: 620px) {
  .authority-list { grid-template-columns: repeat(3, 1fr); }
  .index-cols { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  :root { --rail-w: min(var(--shell), 100% - 3rem); }
  .index-cols { grid-template-columns: repeat(3, 1fr); }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); align-items: start; }
}

@media (min-width: 960px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
  .nav-panel { display: none !important; }

  /* restore the filled button once there is room for it */
  .header-actions .btn-sm {
    min-height: 44px;
    padding: 0.45rem 0.95rem;
    background: var(--cta);
    color: var(--paper-3);
    border-radius: 2px;
    border-bottom: 0;
  }
  .header-actions .btn-sm:hover { background: var(--cta-hover); color: var(--paper-3); border-bottom: 0; }

  .cover { padding-top: clamp(2.5rem, 5vw, 4.5rem); }
  .cover-row { grid-template-columns: 1fr 0.9fr; align-items: center; gap: clamp(2rem, 4vw, 4rem); }

  .author-row { grid-template-columns: 1fr 0.62fr; }
  .about-row { grid-template-columns: 0.52fr 1fr; }

  /* Unequal spans. Six distinct column widths (3, 4, 5, 7, 8, 10 of 12)
     across ten frames, so no two consecutive rows share a width. */
  .work-grid { grid-template-columns: repeat(12, 1fr); align-items: start; }
  .w-a { grid-column: 1 / span 5; }
  .w-b { grid-column: 6 / span 7; }
  .w-c { grid-column: 2 / span 10; }
  .w-d { grid-column: 1 / span 7; }
  .w-e { grid-column: 9 / span 4; align-self: end; }
  .w-f { grid-column: 4 / span 8; }
  .w-g { grid-column: 1 / span 5; align-self: end; }
  .w-h { grid-column: 7 / span 4; }
  .w-i { grid-column: 1 / span 5; }
  .w-j { grid-column: 7 / span 3; }
}

@media (min-width: 1120px) {
  :root { --shell: 1280px; }
  .index-cols { grid-template-columns: repeat(5, 1fr); }
  .footer-cols { grid-template-columns: repeat(5, 1fr); }
}

/* 1920 is a real traffic band (~187 visits / 180d). 1280px of type in a
   1920 canvas reads as a small site floating in the middle; 1440 keeps
   the measure and the work grid without becoming a marketplace. */
@media (min-width: 1600px) {
  :root { --shell: 1440px; }
}

/* Very narrow: 320–359 px. Tighten the rail, never the tap targets. */
@media (max-width: 359px) {
  :root {
    --rail-w: min(var(--shell), 100% - 1.5rem);
    --fs-body: 1rem;
  }
  .cover-facts { font-size: 0.75rem; }
}

/* ============================================================
   WP Social Reviews chat — homepage only.
   Plugin: WP Social Reviews / WP Social Ninja Pro
   Live node: #wpsr-chat-widget-68991 (bottom-right bubble, WhatsApp /
   Telegram / phone). Injected in wp_footer.

   Full-bleed render.php never calls wp_footer, so this block is inert
   on the local prototype. It is written against the live DOM so that
   if Wave 4 injects the existing widget into `/`, the bubble matches
   paper/ink instead of the default electric channel colours.
   Do not copy these selectors onto other landings.
   ============================================================ */
body.home-page .wpsr-fm-chat-wrapper .wpsr-fm-chat-bubble .wpsr-fm-bubble-btn {
  background: #16130f !important;
  background-color: #16130f !important;
  box-shadow: none !important;
  width: 48px;
  height: 48px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
}
body.home-page .wpsr-fm-chat-wrapper .wpsr-fm-chat-bubble .wpsr-fm-bubble-btn img {
  filter: brightness(0) invert(1);
}
body.home-page #wpsr-chat-widget-68991 .wpsr-fm-chat-box {
  background: #fffdfa;
  color: #16130f;
  border: 1px solid #dcd6cb;
  border-radius: 2px;
  box-shadow: none;
}
body.home-page #wpsr-chat-widget-68991 #wpsr-chat-active-status {
  background: #0d0b09 !important;
  color: #f2eee7;
}
body.home-page .wpsr-fm-chat-wrapper .wpsr-channels .wpsr-channel-btn {
  background: #16130f !important;
  background-color: #16130f !important;
  box-shadow: none !important;
}
body.home-page .wpsr-fm-chat-wrapper .wpsr-channels .wpsr-channel-btn img {
  filter: brightness(0) invert(1);
}

/* ============================================================
   REDUCED MOTION — remove all of it
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .route-list > li > a:hover { padding-inline-start: 0; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .nav-panel, .journal, .index { display: none; }
  body { background: #fff; color: #000; }
}
