/* NB Nábytok Badinka, návrh 1 webu */
@import url("./tokens.css");
@import url("./base.css");

:root {
  --bar-h: 76px;
  /* ľavá hrana antracitových dverí: začiatok 8. stĺpca mriežky */
  --door-x: calc(max(0px, (100% - var(--container)) / 2) + var(--gutter) + (min(100%, var(--container)) - 2 * var(--gutter) + var(--gap-columns)) * 7 / 12 - var(--gap-columns) / 2);
  --bg: var(--color-paper); --bg-2: var(--color-paper-2); --fg: var(--color-ink); --fg-2: var(--color-ink-2); --fg-muted: var(--color-muted); --line: var(--color-rule);
}
.t-dark {
  --bg: var(--color-coal); --bg-2: var(--color-coal-2); --fg: var(--color-on-coal); --fg-2: var(--color-on-coal-2); --fg-muted: var(--color-on-coal-muted); --line: var(--color-coal-rule);
  --color-focus: var(--color-on-coal);
  background: var(--bg); color: var(--fg-2);
}

body { color: var(--fg-2); line-height: 1.6; }
h1, h2 { font-weight: var(--display-weight); color: var(--fg); }
h2 { line-height: 1.04; }
h3 { font-weight: var(--serif-small); color: var(--fg); }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
figcaption { font-size: var(--text-sm); color: var(--fg-muted); }
section { position: relative; }
[data-slot] > img { outline: 1px solid var(--photo-edge); outline-offset: -1px; }

/* skip link */
.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: var(--space-md); outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* controls */
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 var(--space-lg); border: var(--rule-hair) solid var(--fg); border-radius: var(--radius-pill); background: var(--fg); color: var(--bg); font: 500 var(--text-md) / 1 var(--font-body); white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.btn:hover { background: transparent; color: var(--fg); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.btn:disabled, button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.link { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; white-space: nowrap; transition: text-underline-offset var(--dur-short) var(--ease-out); }
.link:hover { text-underline-offset: 0.45em; }
.link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .btn, .link { transition: none; } .btn:active { transform: none; } }

/* bar: an anthracite row with light type. On a wide screen at the top of the page it is clear instead (rule below) */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-sticky-nav); background: var(--color-coal); color: var(--color-on-coal); box-shadow: 0 1px 0 var(--color-coal-rule); transition: transform var(--dur-long) var(--ease-out); }
.top.is-away { transform: translateY(-100%); }
.top__layer--over { display: none; }
.top__in { display: flex; align-items: center; gap: var(--space-xl); min-height: var(--bar-h); }
.wordmark { margin-right: auto; font-family: var(--font-display); font-weight: var(--serif-small); font-size: var(--text-xl); line-height: 1; letter-spacing: var(--tracking-display); color: inherit; text-decoration: none; white-space: nowrap; }
.wordmark span { display: inline-block; line-height: 1; }
.top__links { display: flex; gap: var(--space-xl); }
.top__links a, .top__tel { position: relative; display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; white-space: nowrap; }
.top__links a::after, .top__tel::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform var(--dur-long) var(--ease-out); }
.top__links a:hover::after, .top__tel::after { transform: scaleX(1); transform-origin: left; }
.top__tel { font-weight: 500; font-variant-numeric: tabular-nums; }
.top :focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
/* clear bar over the hero: its type is set twice, anthracite left of the door's edge and light right of it.
   --edge follows the door (app.js); past the hero (.is-solid) and with keyboard focus inside (.is-keys) the bar is the plain anthracite row */
@media (min-width: 60.01rem) {
  .js .top:not(.is-solid):not(.is-keys) { background: transparent; color: var(--color-ink); box-shadow: none; }
  .js .top:not(.is-solid):not(.is-keys) .top__layer { clip-path: inset(0 calc(100% - var(--edge, var(--door-x))) 0 0); }
  .js .top:not(.is-solid):not(.is-keys) .top__layer--over { display: block; position: absolute; inset: 0; color: var(--color-on-coal); clip-path: inset(0 0 0 var(--edge, var(--door-x))); }
}
@media (prefers-reduced-motion: reduce) { .top, .top.is-away, .top__links a::after { transition: none; } }

/* hero: type on cashmere, one job photo on the anthracite door */
.hero { display: grid; min-height: 100svh; overflow: clip; isolation: isolate; background: var(--color-paper); }
.door { position: absolute; z-index: 1; top: 0; bottom: 0; left: var(--door-x); width: 100%; pointer-events: none; }
.door__leaf { position: absolute; inset: 0; background: var(--color-coal); box-shadow: var(--shadow-door); }
.hero__in { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); align-items: center; padding-block: calc(var(--bar-h) + var(--space-lg)) var(--space-2xl); }
/* the anthracite type lies under the door. The same words in the light colour lie over it (.hero__over) and show only right of the door's edge */
.hero__text { position: relative; z-index: 0; grid-column: 1 / 7; }
.hero h1, .hero__title { max-width: 12ch; line-height: 1.02; }
.hero__title { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-display); font-synthesis: none; letter-spacing: var(--tracking-display); overflow-wrap: break-word; min-width: 0; text-wrap: balance; color: var(--fg); }
.hero .lead { margin-top: var(--space-lg); max-width: 34ch; }
.hero__over { position: absolute; inset: 0; z-index: 2; display: grid; background: transparent; clip-path: inset(0 0 0 var(--edge, var(--door-x))); pointer-events: none; }
.hero__over a { pointer-events: auto; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md) var(--space-lg); margin-top: var(--space-xl); }
.hero__fig { position: relative; z-index: 3; grid-column: 7 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: var(--space-lg); }
.hero__photo { height: clamp(360px, 64svh, 620px); aspect-ratio: 640 / 873; box-shadow: var(--shadow-photo); }
.hero__cap { display: grid; gap: var(--space-3xs); padding-bottom: var(--space-2xs); color: var(--color-on-coal-muted); }
.hero__cap-name { margin-bottom: var(--space-2xs); text-wrap: balance; font-family: var(--font-display); font-weight: var(--serif-small); font-size: var(--text-lg); line-height: 1.25; color: var(--color-on-coal); }

/* case: one flat in Lučenec, three rooms stepping down */
.case { padding-block: var(--section-gap) var(--section-gap-l); overflow: clip; }
.case__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-3xl) var(--gap-columns); align-items: start; }
.case__head { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); align-items: end; }
.case__head h2 { grid-column: 1 / 7; max-width: 11ch; }
.case__side { grid-column: 8 / -1; }
.decors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg); margin: var(--space-xl) 0 0; padding-top: var(--space-lg); border-top: var(--rule-hair) solid var(--line); }
.decors dt { display: grid; gap: var(--space-sm); color: var(--fg); }
.decors dd { margin: var(--space-2xs) 0 0; font-size: var(--text-sm); color: var(--fg-muted); }
.chip { width: 56px; height: 56px; background-size: 600%; }
.chip--harbor { background-image: url("img/chodba-byt.jpg"); background-position: 66% 45%; }
.chip--white { background-image: url("img/chodba-byt.jpg"); background-position: 62% 84%; background-size: 700%; }
.shot { display: grid; gap: var(--space-sm); }
.shot figcaption { font-family: var(--font-display); font-size: var(--text-lg); color: var(--fg); }
.shot__photo { aspect-ratio: 3 / 4; }
.case__lead { grid-column: 1 / 6; }
.case__a { grid-column: 6 / 10; margin-top: var(--space-4xl); }
.case__b { grid-column: 10 / -1; margin-top: var(--space-2xl); }

/* what we make: five boards, light and anthracite, that stack on each other */
.work { padding-block: var(--section-gap) var(--section-gap-s); background: var(--color-paper); }
.work h2 { margin-bottom: var(--space-2xl); }
.boards { display: grid; gap: var(--space-lg); }
.board { --bg: var(--color-paper-2); display: grid; grid-template-columns: minmax(0, 1fr) clamp(220px, 30%, 400px); background: var(--bg); color: var(--fg-2); }
.board.t-dark { --bg: var(--color-coal); }
.board__text { display: grid; align-content: space-between; gap: var(--space-xl); padding: var(--space-xl) var(--space-2xl) var(--space-2xl); }
.board h3 { max-width: 13ch; font-size: var(--text-board); font-weight: var(--display-weight); line-height: 1.06; }
.board p { max-width: 36ch; font-size: var(--text-lead); line-height: 1.45; }
.board__photo { margin: var(--space-lg); aspect-ratio: 640 / 873; }
@media (min-width: 60.01rem) {
  .gs .boards { padding-bottom: var(--space-3xl); }
  .gs .board + .board { box-shadow: var(--shadow-board); }
}

/* showcase: the attic */
.show { padding-block: var(--section-gap-l) var(--section-gap); }
.show__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap-columns); align-items: end; margin-bottom: var(--space-2xl); }
.show__head h2 { grid-column: 1 / 7; }
.show__note { grid-column: 8 / 13; font-size: var(--text-lead); line-height: 1.45; }
.show__stage { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.show__photo { aspect-ratio: 16 / 9; max-height: 760px; width: 100%; }
@media (min-width: 60.01rem) {
  .gs .show { height: 100svh; min-height: 560px; padding: 0; overflow: hidden; }
  .gs .show__head { position: relative; z-index: 1; margin-bottom: 0; padding-top: calc(var(--bar-h) + var(--space-xl)); }
  .gs .show__stage { position: absolute; inset: 0; z-index: 2; width: auto; margin: 0; }
  .gs .show__photo { position: absolute; inset: 0; max-height: none; aspect-ratio: auto; }
}

/* gallery: three columns that drift at different speeds */
.gallery { padding-block: var(--section-gap); overflow: clip; background: var(--color-paper); }
.gallery__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-md) var(--space-xl); margin-bottom: var(--space-3xl); }
.gallery__hint { max-width: 32ch; }
.gallery__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2xl) var(--gap-columns); align-items: start; }
.gcol { display: grid; gap: var(--space-2xl); }
.gcol:nth-child(2) { margin-top: var(--space-4xl); }
.gshot { display: grid; gap: var(--space-sm); }
.gshot__link { position: relative; display: block; overflow: hidden; aspect-ratio: 640 / 873; background: var(--bg-2); cursor: zoom-in; }
.gshot__link img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo-filter); }
.gshot__link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.gshot figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3xs) var(--space-md); }
.gshot__t { font-family: var(--font-display); font-weight: var(--serif-small); font-size: var(--text-md); color: var(--fg); }
@media (hover: hover) and (pointer: fine) { .gshot__link:hover { outline: 1px solid var(--fg); outline-offset: 5px; } }

/* decors: each sample is a close crop of a real job photo; it pulls back to the whole piece */
.decor { padding-block: var(--section-gap); overflow: clip; }
.decor__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-md) var(--space-xl); margin-bottom: var(--space-3xl); }
.decor__head h2 { max-width: 14ch; }
.decor__hint { max-width: 34ch; }
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-2xl) var(--gap-columns); }
.tile { display: grid; align-content: start; gap: var(--space-2xs); }
.tile__btn { display: block; width: 100%; aspect-ratio: 2 / 3; margin-bottom: var(--space-sm); padding: 0; border: 0; overflow: hidden; background: var(--bg-2); cursor: pointer; }
.tile__btn img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo-filter); transform-origin: var(--pos, 50% 50%); transform: scale(2.8); transition: transform var(--dur-zoom) var(--ease-out); }
.tile__btn[aria-pressed="true"] img { transform: none; }
.tile__btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.tile__btn:active img { transform: scale(2.6); }
.tile h3 { font-family: var(--font-body); font-size: var(--text-md); font-weight: 500; line-height: 1.35; letter-spacing: 0; }
.tile p { font-size: var(--text-sm); color: var(--fg-muted); }
@media (hover: hover) and (pointer: fine) { .tile__btn:hover img { transform: none; } }
@media (prefers-reduced-motion: reduce) { .tile__btn img { transition: none; } }

/* close: the phone number and a form that goes to e-mail */
.close { padding-block: var(--section-gap); background: var(--color-paper); }
.close__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-2xl) var(--gap-columns); align-items: start; }
.close__text { grid-column: 1 / 7; }
.close__phone { display: inline-block; margin-top: var(--space-xl); font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-phone); line-height: 1; letter-spacing: var(--tracking-statement); color: var(--fg); text-decoration: none; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.close__phone:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; }
.close__phone:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 6px; }
.close__lines { display: grid; gap: var(--space-2xs); margin-top: var(--space-xl); }
.close__lines a { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; text-underline-offset: 0.3em; overflow-wrap: anywhere; }
.close__lines a:hover { text-decoration-color: currentColor; }
.close__lines a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.form { grid-column: 8 / -1; display: grid; gap: var(--space-md); }
.form__lead { margin-bottom: var(--space-xs); font-size: var(--text-lead); line-height: 1.45; color: var(--fg); }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.field { display: grid; gap: var(--space-2xs); }
.field label { font-size: var(--text-sm); font-weight: 500; color: var(--fg); }
.field label span { font-weight: 400; color: var(--fg-muted); }
.field input, .field textarea { width: 100%; min-height: 52px; padding: var(--space-sm) var(--space-md); border: var(--rule-hair) solid var(--line); border-radius: var(--radius-pill); background: var(--color-card); color: var(--fg); transition: border-color var(--dur-short) var(--ease-out); }
.field textarea { display: block; min-height: 7.5rem; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--fg-muted); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-color: var(--fg); }
.field [aria-invalid="true"] { border-color: var(--color-error); box-shadow: inset 0 0 0 1px var(--color-error); }
.field__err { font-size: var(--text-sm); color: var(--color-error); }
.form__trap { position: absolute; left: -200rem; width: 1px; height: 1px; overflow: hidden; }
.form__end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-lg); margin-top: var(--space-xs); }
.form__legal, .form__status { max-width: 30ch; font-size: var(--text-sm); color: var(--fg-muted); }
.form__status:empty { display: none; }
.form__status { font-weight: 500; color: var(--fg); }
.form__status.is-bad { color: var(--color-error); }
.form__end:has(.form__status:not(:empty)) .form__legal { display: none; }
.form.is-busy .btn { opacity: 0.6; pointer-events: none; }
.form__static { display: none; font-weight: 500; color: var(--fg); }
.form__static:target { display: block; }
.form__static--bad { color: var(--color-error); }
@media (prefers-reduced-motion: reduce) { .field input, .field textarea { transition: none; } }

/* footer: three columns on anthracite */
.foot { overflow: clip; }
.foot__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-2xl) var(--gap-columns); padding-block: var(--space-3xl) var(--space-xl); }
.foot__brand { grid-column: 1 / 7; display: grid; align-content: start; gap: var(--space-xs); color: var(--fg-muted); }
.foot__word { font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-2xl); line-height: 1.1; letter-spacing: var(--tracking-statement); color: var(--fg); overflow-wrap: break-word; min-width: 0; }
.foot__links { grid-column: span 3; display: grid; align-content: start; }
.foot__links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--fg); text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: 0.3em; overflow-wrap: anywhere; transition: text-decoration-color var(--dur-short) var(--ease-out); }
.foot__links a:hover { text-decoration-color: currentColor; }
.foot__links a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.foot__legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xs) var(--space-md); padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--line); font-size: var(--text-sm); color: var(--fg-muted); }

/* motion runs in app.js (GSAP); CSS holds only the pieces it moves and their resting states */

/* intro: the name is set twice, anthracite and light; --e (app.js) is the door's edge between the two */
.intro { display: none; }
.motion .intro { display: block; }
.intro__plane { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--color-coal); box-shadow: 0 1px 0 var(--color-coal-rule); }
.intro__name { position: fixed; inset: 0; z-index: calc(var(--z-modal) + 1); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; column-gap: clamp(1.25rem, 3.4vw, 3.5rem); margin: 0; max-width: none; color: var(--color-ink); clip-path: inset(0 calc(100% - var(--e, 0px)) 0 0); font: var(--serif-small) var(--text-entry) / 1 var(--font-display); letter-spacing: var(--tracking-display); white-space: nowrap; pointer-events: none; visibility: hidden; }
.intro__name--cream { color: var(--color-on-coal); clip-path: inset(0 0 0 var(--e, 0px)); }
.intro__name span { display: inline-block; line-height: 1; }
.intro__name span:first-child { justify-self: end; }
.intro__name span:last-child { justify-self: start; }
.intro__skip { position: fixed; right: var(--gutter); bottom: var(--gutter); z-index: calc(var(--z-modal) + 2); min-height: 44px; padding: 0 var(--space-md); border: var(--rule-hair) solid var(--color-coal-rule); border-radius: var(--radius-pill); background: var(--color-coal-2); color: var(--color-on-coal); font: 400 var(--text-sm) / 1 var(--font-body); cursor: pointer; }
.intro__skip:hover { background: var(--color-coal-3); }
.intro__skip:focus-visible { outline: 2px solid var(--color-on-coal); outline-offset: 2px; }
/* room for descenders while a masked line rises */
.ln-mask { padding-bottom: 0.14em; margin-bottom: -0.14em; }

/* lightbox */
.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; background: transparent; color: var(--color-on-coal); }
.lb::backdrop { background: transparent; }
.lb__bg { position: absolute; inset: 0; background: var(--color-backdrop); }
.lb__stage { position: absolute; inset: clamp(4.5rem, 9vh, 6rem) clamp(1rem, 8vw, 8rem) clamp(6rem, 13vh, 8.5rem); display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; pointer-events: none; }
.lb__img { max-width: 100%; max-height: 100%; width: auto; height: auto; box-shadow: var(--shadow-photo); pointer-events: auto; touch-action: pan-y; }
.lb__bar { position: absolute; left: clamp(1rem, 8vw, 8rem); right: clamp(1rem, 8vw, 8rem); bottom: clamp(1.25rem, 4vh, 2.5rem); display: flex; justify-content: space-between; align-items: end; gap: var(--space-md); }
.lb__cap { display: grid; gap: var(--space-3xs); }
.lb__t { font-family: var(--font-display); font-weight: var(--serif-small); font-size: var(--text-lg); color: var(--color-on-coal); }
.lb__m, .lb__count { font-size: var(--text-sm); color: var(--color-on-coal-muted); font-variant-numeric: tabular-nums; }
.lb__btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border: var(--rule-hair) solid var(--color-coal-rule); border-radius: 50%; background: transparent; color: var(--color-on-coal); cursor: pointer; transition: background-color var(--dur-short) var(--ease-out); }
.lb__btn:hover { background: var(--color-coal-3); }
.lb__btn:focus-visible { outline: 2px solid var(--color-on-coal); outline-offset: 2px; }
.lb__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lb__close { top: clamp(1rem, 3vh, 1.75rem); right: clamp(1rem, 3vw, 1.75rem); }
.lb__prev, .lb__next { top: 50%; translate: 0 -50%; }
.lb__prev { left: clamp(0.5rem, 2.5vw, 2.5rem); }
.lb__next { right: clamp(0.5rem, 2.5vw, 2.5rem); }

@media (prefers-reduced-motion: no-preference) { html:not(.gs) { scroll-behavior: smooth; } }

/* tablet and phone */
@media (max-width: 60rem) {
  .top__links { display: none; }
  .hero { min-height: 0; }
  .door, .hero__over { display: none; }
  .hero__in { grid-template-columns: minmax(0, 1fr); padding-block: calc(var(--bar-h) + var(--space-xl)) 0; }
  .hero__text, .hero__fig { grid-column: 1 / -1; }
  .hero__fig { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; margin: var(--space-2xl) calc(-1 * var(--gutter)) 0; padding: var(--space-xl) var(--gutter); background: var(--color-coal); color: var(--color-on-coal-2); }
  .hero__photo { height: auto; width: 100%; aspect-ratio: 3 / 4; }
  .case__head h2, .case__side, .show__head h2, .show__note, .close__text, .form { grid-column: 1 / -1; }
  .case__side { margin-top: var(--space-xl); }
  .case__grid { row-gap: var(--space-2xl); }
  .case__lead { grid-column: 1 / 8; }
  .case__a { grid-column: 8 / -1; margin-top: var(--space-3xl); }
  .case__b { grid-column: 4 / 10; margin-top: 0; }
  .board__text { padding: var(--space-lg); }
  .show__photo { aspect-ratio: 4 / 3; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot__brand { grid-column: 1 / -1; }
  .foot__links { grid-column: span 6; }
  /* narrow screens: the two words stack and the anthracite plane draws up into the bar; --e is its lower edge */
  .intro__name { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; row-gap: var(--space-md); clip-path: inset(var(--e, 100%) 0 0 0); }
  .intro__name--cream { clip-path: inset(0 0 calc(100% - var(--e, 100%)) 0); }
  .intro__name span:first-child { justify-self: center; align-self: end; }
  .intro__name span:last-child { justify-self: center; align-self: start; }
}
@media (max-width: 40rem) {
  .top__in { gap: var(--space-md); }
  .wordmark { font-size: var(--text-lg); }
  .hero__fig { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  .decors { grid-template-columns: minmax(0, 1fr); }
  .case__lead, .case__a, .case__b { grid-column: 1 / -1; margin-top: 0; }
  .case__a { padding-left: 18%; }
  .case__b { padding-right: 18%; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .board__photo { order: -1; margin: var(--space-md) var(--space-md) 0; aspect-ratio: 4 / 3; }
  .board__text { gap: var(--space-md); }
  .gallery__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl) var(--space-md); }
  .gcol { display: contents; }
  .gshot figcaption { display: grid; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-xl) var(--space-md); }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .foot__links { grid-column: 1 / -1; }
  .lb__prev, .lb__next { top: auto; bottom: clamp(1.25rem, 4vh, 2.5rem); translate: none; }
  .lb__prev { left: auto; right: calc(52px + 1.5rem); }
  .lb__bar { right: calc(104px + 2.5rem); }
}
