/* LTMS. Every section is one stripe of the woven band: flat fields, hard edges, one typeface. */

@font-face { font-family: "Cabinet Grotesk"; src: url("fonts/cabinet-grotesk-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url("fonts/cabinet-grotesk-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url("fonts/cabinet-grotesk-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --ink: #11150f;
  --paper: #ffffff;
  --green: #377d22;
  --yellow: #fdfd95;
  --red: #9e2a1f;
  --ochre: #c08a3e;
  --brown: #392b2a;
  --soft: #434a3e;
  --tone: #f1f2ec;

  --m: clamp(16px, 2vw, 28px);
  --gap-section: clamp(72px, 9vw, 136px);

  --step-small: clamp(0.9375rem, 0.91rem + 0.1vw, 1rem);
  --step-body: clamp(1.125rem, 1.07rem + 0.25vw, 1.25rem);
  --step-lead: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
  --step-head: clamp(2.5rem, 1.1rem + 4.4vw, 4.75rem);
  /* the longest hero line must fill the width: 17 capitals */
  --step-display: calc((100vw - 2 * var(--m)) / 9.2);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --seam: 50%;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Cabinet Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: break-word; /* old texts hold long URLs */
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.025em; line-height: 1.02; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
figure { margin: 0; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.skip { position: absolute; left: var(--m); top: -100px; z-index: 20; background: var(--ink); color: var(--paper); padding: 12px 16px; }
.skip:focus { top: 8px; }
.band { display: block; width: 100%; height: 100%; background: url("band.svg") center / 100% 100% no-repeat; }

/* Bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px var(--m); background: var(--paper); }
.bar__logo { flex: none; }
.bar__logo img { width: 138px; height: 60px; }
.bar__toggle, .bar__close { display: none; }
.bar__nav { display: flex; align-items: center; gap: clamp(16px, 2vw, 32px); position: static; inset: auto; margin: 0; padding: 0; border: 0; background: none; color: inherit; width: auto; height: auto; overflow: visible; }
.bar__menu, .bar__extra { display: flex; align-items: center; gap: clamp(12px, 1.5vw, 26px); }
.bar__nav a { display: block; padding: 10px 0; font-weight: 500; text-decoration: none; }
.bar__nav a:hover, .bar__nav .current-menu-item > a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.bar__extra a { font-weight: 800; }

/* Buttons */
.btn { display: inline-block; padding: 14px 24px; border: 0; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform 0.15s var(--ease), background-color 0.15s, color 0.15s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: var(--paper); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--brown); }

/* Hero: two fields meet in the middle of the second line */
.hero { position: relative; min-height: max(560px, calc(100svh - 84px)); overflow: hidden; background: var(--green); }
.hero__field { position: absolute; left: 0; right: 0; }
.hero__field--top { top: 0; height: var(--seam); background: var(--paper); }
.hero__field--bottom { top: var(--seam); bottom: 0; background: var(--green); }
.hero__title { position: absolute; left: var(--m); right: var(--m); top: var(--seam); margin: 0; transform: translateY(-75%); font-size: var(--step-display); font-weight: 800; line-height: 1; letter-spacing: -0.035em; text-transform: uppercase; white-space: nowrap; }
.hero__title--top { color: var(--green); clip-path: inset(-30% -5% 25% -5%); }
.hero__title--bottom { color: var(--yellow); clip-path: inset(75% -5% -30% -5%); pointer-events: none; }
.line { display: block; overflow: hidden; padding-block: 0.16em 0.1em; margin-block: -0.16em -0.1em; }
.line > span { display: block; animation: rise 0.9s var(--ease) both; }
.line:nth-child(2) > span { animation-delay: 0.11s; }
@keyframes rise { from { transform: translateY(112%); } to { transform: none; } }
.hero__foot { position: absolute; left: var(--m); right: var(--m); bottom: clamp(52px, 8svh, 84px); display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; color: var(--paper); animation: fade 0.6s 0.5s var(--ease) both; }
.hero__lead { max-width: 40ch; font-size: var(--step-lead); line-height: 1.2; font-weight: 500; }
.hero__foot .btn { flex: none; }
@keyframes fade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero__band { position: absolute; left: 0; right: 0; bottom: 0; height: clamp(22px, 3vw, 44px); }

/* Aktuāli: two objects, two fields */
.panels { display: grid; grid-template-columns: 1fr 1fr; }
.panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 24px; min-height: min(92svh, 860px); padding: var(--m); padding-top: clamp(32px, 4vw, 56px); }
.panel--yellow { background: var(--yellow); }
.panel--ochre { background: var(--ochre); }
.panel__head { font-size: var(--step-head); }
.panel__media { position: relative; display: block; min-height: 280px; overflow: hidden; text-decoration: none; }
.panel:not(:has(.panel__head)) .panel__media { grid-row: 1 / 3; }
.panel__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.6s var(--ease); }
.panel:hover .panel__media img { transform: scale(1.025); }
.panel__quote { display: block; font-size: var(--step-lead); font-weight: 500; line-height: 1.22; max-width: 28ch; }
.panel__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.panel__title { font-size: var(--step-lead); line-height: 1.1; }
.panel__title a { text-decoration: none; }
.panel__title a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.panel__date { flex: none; font-weight: 500; }

/* Pasākumi + Izstādes: two-column list with photo bullets */
.lists { padding: var(--gap-section) var(--m) 0; background: var(--paper); }
.lists__group { margin-bottom: var(--gap-section); }
.lists__head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.lists__title { font-size: var(--step-head); }
.lists__title a { text-decoration: none; }
.lists__title a:hover { color: var(--green); }
.lists__count { flex: none; font-weight: 800; text-underline-offset: 4px; }

.rows { display: grid; grid-template-columns: 1fr 1fr; gap: 36px clamp(32px, 4.5vw, 64px); }
.row__link { display: grid; grid-template-columns: 88px 1fr; gap: 20px; align-items: start; text-decoration: none; }
.row__img { width: 88px; height: 88px; object-fit: cover; transition: transform 0.3s var(--ease); }
.row__link:hover .row__img { transform: translateY(-3px); }
.row__img--empty { display: grid; place-items: center; background: var(--green); color: var(--yellow); font-weight: 800; font-size: 1.125rem; }
.row__body { display: block; min-width: 0; }
.row__title { display: block; font-weight: 800; line-height: 1.18; overflow-wrap: anywhere; }
.row__link:hover .row__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.row__date { display: block; margin-top: 4px; color: var(--green); font-size: var(--step-small); font-weight: 500; }
.row__text { display: block; margin-top: 4px; font-size: 1rem; line-height: 1.4; overflow-wrap: anywhere; }

.notice { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; margin-inline: calc(-1 * var(--m)); padding: clamp(40px, 5vw, 72px) var(--m); background: var(--tone); }
.notice__title { grid-column: span 4; font-size: var(--step-lead); }
.notice__text { grid-column: span 8; max-width: 58ch; font-size: var(--step-lead); line-height: 1.25; font-weight: 500; }
.notice__text a { overflow-wrap: anywhere; }

/* Amati: one frame, contents change */
.crafts { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: center; padding: var(--gap-section) var(--m); background: var(--red); color: var(--paper); }
.crafts__names { grid-column: 1 / span 6; }
.crafts__head { margin-bottom: 24px; font-size: var(--step-lead); color: var(--yellow); }
.crafts__name { display: inline-block; font-size: var(--step-head); font-weight: 800; line-height: 1.04; letter-spacing: -0.03em; text-decoration: none; transition: transform 0.25s var(--ease), color 0.15s; }
.crafts__name:hover, .crafts__name:focus-visible { transform: translateX(8px); }
.crafts__name.is-on { color: var(--yellow); }
.crafts__frame { grid-column: 7 / span 6; }
.crafts__pics { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--brown); }
.crafts__pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.45s; }
.crafts__pic.is-on { opacity: 1; animation: drift 16s ease-out both; }
@keyframes drift { from { transform: scale(1.06); } to { transform: none; } }
.crafts__cap { display: flex; justify-content: space-between; gap: 24px; margin-top: 16px; }
.crafts__capname { font-weight: 800; }
.crafts__cap a { text-underline-offset: 4px; text-align: right; }

/* Biedri: a wall of names set like a woven check */
.studios { background: var(--ochre); }
.studios__head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end; padding: var(--gap-section) var(--m) clamp(40px, 5vw, 64px); }
.studios__title { grid-column: span 4; font-size: var(--step-head); }
.studios__lead { grid-column: span 5; font-size: var(--step-lead); line-height: 1.2; font-weight: 500; }
.studios__head .btn { grid-column: 11 / span 2; justify-self: end; white-space: nowrap; }
.studios__wall { display: grid; grid-template-columns: repeat(6, 1fr); }
.tile a { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; height: 100%; min-height: clamp(128px, 12vw, 176px); padding: 16px; text-decoration: none; transition: background-color 0.15s, color 0.15s; }
.tile__name { font-size: var(--step-lead); font-weight: 800; line-height: 1.04; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.tile__lead { font-size: 1rem; line-height: 1.2; }
.tile--0 a { background: var(--red); color: var(--paper); }
.tile--1 a { background: var(--yellow); color: var(--ink); }
.tile--2 a { background: var(--green); color: var(--paper); }
.tile--3 a { background: var(--brown); color: var(--paper); }
.tile--4 a { background: var(--paper); color: var(--ink); }
.tile a:hover, .tile a:focus-visible { background: var(--ink); color: var(--yellow); }

/* Iestājies: the whole band is one link */
.join { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 60svh; padding: clamp(32px, 4vw, 56px) var(--m) 8px; overflow: hidden; background: var(--green); color: var(--yellow); text-decoration: none; }
.join:hover, .join:focus-visible { background: var(--yellow); color: var(--green); }
.join__top { display: flex; justify-content: space-between; gap: 32px; }
.join__text { max-width: 44ch; font-size: var(--step-lead); line-height: 1.2; font-weight: 500; color: var(--paper); }
.join:hover .join__text, .join:focus-visible .join__text { color: var(--ink); }
.join__arrow { flex: none; width: clamp(32px, 4vw, 48px); height: auto; transition: transform 0.25s var(--ease); }
.join:hover .join__arrow { transform: translate(4px, -4px); }
.join__word { display: block; font-size: calc((100vw - 2 * var(--m)) / 4.3); font-weight: 800; line-height: 1.1; letter-spacing: -0.035em; white-space: nowrap; }

/* Footer */
.foot { padding: 0 var(--m) 24px; background: var(--brown); color: var(--paper); }
.foot__band { height: clamp(22px, 3vw, 44px); margin-inline: calc(-1 * var(--m)); }
.foot__name { margin-top: clamp(40px, 5vw, 72px); font-size: calc((100vw - 2 * var(--m)) / 17.1); font-weight: 800; line-height: 1; letter-spacing: -0.035em; white-space: nowrap; }
.foot__row { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; margin-top: clamp(48px, 5vw, 72px); }
.foot__places { grid-column: span 7; color: var(--yellow); font-size: var(--step-lead); font-weight: 500; line-height: 1.3; }
.foot__places a { text-decoration: none; overflow-wrap: anywhere; }
.foot__places a:hover { text-decoration: underline; text-underline-offset: 5px; }
.foot__nav { grid-column: 8 / span 5; }
.foot__menu { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.foot__menu a { display: inline-block; padding: 4px 0; text-underline-offset: 4px; text-decoration: none; }
.foot__menu a:hover { text-decoration: underline; }
.foot__legal { max-width: 62ch; margin-top: clamp(48px, 6vw, 80px); font-size: var(--step-small); line-height: 1.4; }
.foot__end { display: flex; justify-content: space-between; gap: 24px; margin-top: 24px; font-size: var(--step-small); }

/* Inner pages */
.chapter { display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; min-height: 30svh; padding: clamp(40px, 6vw, 88px) var(--m) clamp(32px, 4vw, 56px); }
.chapter--green { background: var(--green); color: var(--paper); }
.chapter--red { background: var(--red); color: var(--paper); }
.chapter--ochre { background: var(--ochre); color: var(--ink); }
.chapter--yellow { background: var(--yellow); color: var(--ink); }
.chapter--brown { background: var(--brown); color: var(--paper); }
.chapter__title { font-size: var(--step-head); max-width: 24ch; }
.chapter__title.is-mid { font-size: clamp(2rem, 1rem + 2.8vw, 3.5rem); max-width: 32ch; }
.chapter__title.is-long { font-size: clamp(1.625rem, 1rem + 1.9vw, 2.75rem); line-height: 1.1; max-width: 44ch; }
.chapter__meta { max-width: 60ch; font-size: var(--step-lead); font-weight: 500; line-height: 1.25; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: clamp(40px, 5vw, 72px) var(--m) var(--gap-section); }
.grid__side { grid-column: 1 / span 3; }
.grid__main { grid-column: 4 / span 9; min-width: 0; }
.grid__wide { grid-column: 1 / -1; min-width: 0; }
.back { font-weight: 800; text-underline-offset: 4px; }
.side a { display: block; padding: 6px 0; text-decoration: none; font-weight: 500; }
.side a:hover { text-decoration: underline; text-underline-offset: 4px; }
.side a[aria-current] { font-weight: 800; color: var(--green); }

/* Editor content */
.prose > * { margin-block: 0 1em; }
.prose p, .prose li { max-width: 68ch; }
.prose a { color: var(--green); text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose h2 { margin-top: 2em; margin-bottom: 0.6em; font-size: var(--step-lead); line-height: 1.12; letter-spacing: -0.02em; max-width: 34ch; }
.prose h3 { margin-top: 1.6em; margin-bottom: 0.4em; font-size: 1.3em; line-height: 1.16; letter-spacing: -0.015em; max-width: 44ch; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose ul { list-style: disc; }
.prose li { margin-bottom: 0.25em; }
.prose blockquote { margin-inline: 0; padding-left: 20px; font-weight: 500; }
.prose .wp-block-image { margin-block: 1.5em; }
.prose .wp-block-image img { max-height: 80svh; object-fit: contain; object-position: left; }
.prose .wp-block-table { overflow-x: auto; }
.prose .wp-block-table table { border-collapse: collapse; width: 100%; font-size: 1rem; line-height: 1.35; }
.prose .wp-block-table td, .prose .wp-block-table th { padding: 8px 12px; border: 1px solid #c9ccc2; text-align: left; vertical-align: top; }
.prose .wp-block-embed { max-width: 56rem; }
/* Galleries show whole pictures, never cropped: dresses, logos and posters all need their edges. */
.prose .wp-block-gallery.has-nested-images { display: block; column-count: 3; column-gap: 8px; max-width: 72rem; margin-block: 1.5em; }
.prose .wp-block-gallery.has-nested-images:has(> figure:nth-child(2):last-child) { column-count: 2; max-width: 50rem; }
body .prose .wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image),
body .prose .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) { display: block; width: 100%; margin: 0 0 8px; break-inside: avoid; }
body .prose .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img,
body .prose .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) img { display: block; flex: none; width: 100%; height: auto; max-height: none; object-fit: fill; }
.prose .wp-block-gallery .wp-element-caption { position: static; background: none; color: var(--ink); padding: 6px 0 0; font-size: var(--step-small); text-shadow: none; /* taste-skill-ignore: removes the core caption shadow */ }
.prose .wp-block-gallery.has-nested-images figure.wp-block-image figcaption { background: none; color: var(--ink); position: static; max-height: none; overflow: visible; padding: 6px 0 0; font-size: var(--step-small); text-shadow: none; flex: none; /* taste-skill-ignore: removes the core caption shadow */ }
.prose .wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before { display: none; }

.pager { display: grid; grid-template-columns: 1fr 1fr; background: var(--tone); }
.pager__link { display: block; padding: clamp(24px, 3vw, 40px) var(--m); text-decoration: none; }
.pager__link:hover { background: var(--yellow); }
.pager__link--end { grid-column: 2; text-align: right; }
.pager__label { display: block; font-size: var(--step-small); font-weight: 500; }
.pager__title { display: block; font-size: var(--step-lead); font-weight: 800; line-height: 1.12; letter-spacing: -0.02em; }

.years ul { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.years a { display: block; min-width: 44px; padding: 8px 12px; background: var(--yellow); color: var(--ink); font-weight: 800; text-align: center; text-decoration: none; transition: transform 0.15s var(--ease); }
.years a:hover { transform: translateY(-2px); background: var(--paper); }
.year { margin-bottom: clamp(56px, 7vw, 96px); scroll-margin-top: 16px; }
.year__title { margin-bottom: 32px; font-size: var(--step-head); color: var(--green); }

.also { margin-top: 8px; }

.greetings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 24px; }
.greetings a { display: block; text-decoration: none; font-weight: 800; line-height: 1.15; }
.greetings a:hover span { text-decoration: underline; text-underline-offset: 4px; }
.greetings img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 12px; }

.trades { padding: var(--gap-section) var(--m) 0; }
.trades__head, .albums__head { margin-bottom: 32px; font-size: var(--step-head); }
.trades__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
.trades__grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.trades__grid figcaption { margin-top: 10px; font-size: var(--step-lead); font-weight: 800; letter-spacing: -0.02em; }
.albums { padding: var(--gap-section) var(--m); }
.albums__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 24px; }
.albums__list a { display: block; text-decoration: none; font-weight: 800; line-height: 1.15; }
.albums__list a:hover span { text-decoration: underline; text-underline-offset: 4px; }
.albums__list img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 12px; }

/* Search and contact */
.searchbox { max-width: 40rem; margin-top: 8px; }
.searchbox__label { display: block; margin-bottom: 8px; font-weight: 500; }
.searchbox__row { display: flex; gap: 8px; }
.searchbox input { flex: 1; min-width: 0; padding: 12px 14px; border: 0; font: inherit; color: var(--ink); background: var(--paper); }
.empty { font-size: var(--step-lead); font-weight: 500; }

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); padding: clamp(40px, 5vw, 72px) var(--m) var(--gap-section); }
.contact__head { margin-bottom: 24px; font-size: var(--step-lead); }
.contact__form { padding: clamp(24px, 3vw, 40px); background: var(--tone); align-self: start; }
.form__row { margin-bottom: 18px; }
.form__row label { display: block; margin-bottom: 6px; font-weight: 500; }
.form__row input, .form__row textarea { display: block; width: 100%; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; }
.form__row textarea { min-height: 10em; resize: vertical; }
.form__row input:user-invalid, .form__row textarea:user-invalid { border-color: var(--red); }
.form__hp { position: absolute; left: -9999px; clip-path: inset(50%); }
.form__note { margin-bottom: 18px; font-size: var(--step-small); }
.form__msg { margin-bottom: 18px; padding: 14px 16px; font-weight: 500; }
.form__msg--ok { background: var(--green); color: var(--paper); }
.form__msg--err { background: var(--red); color: var(--paper); }

/* Entrances (only when the script has marked the page ready, so nothing stays hidden without it) */
.reveal-ready [data-rise] { opacity: 0; transform: translateY(24px); }
.reveal-ready [data-rise].in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--d, 0ms); }

/* Narrower screens */
@media (max-width: 1160px) {
  .bar__toggle { display: inline-block; padding: 12px 18px; border: 0; background: var(--ink); color: var(--paper); font: inherit; font-weight: 800; cursor: pointer; }
  .bar__nav:not(:popover-open) { display: none; }
  .bar__nav:popover-open { display: block; position: fixed; inset: 0; width: 100%; height: 100%; padding: 24px var(--m); overflow: auto; background: var(--green); color: var(--paper); }
  .bar__close { display: block; margin: 0 0 24px auto; padding: 12px 18px; border: 0; background: var(--yellow); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
  .bar__menu, .bar__extra { display: block; }
  .bar__nav a { padding: 8px 0; font-size: clamp(1.75rem, 7vw, 2.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
  .bar__extra { margin-top: 24px; }
  .bar__extra a { font-size: var(--step-lead); }
  .rows { grid-template-columns: 1fr; }
  .studios__wall { grid-template-columns: repeat(4, 1fr); }
  .greetings, .trades__grid, .albums__list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  :root { --seam: 30%; }
  .hero { min-height: max(520px, calc(86svh - 84px)); }
  .panels { grid-template-columns: 1fr; }
  .panel { min-height: 78svh; }
  .notice__title, .notice__text { grid-column: 1 / -1; }
  .notice__title { margin-bottom: 8px; }
  .crafts { display: flex; flex-direction: column; align-items: stretch; gap: 24px; }
  .crafts__names { order: 2; }
  .crafts__frame { order: 1; }
  .crafts__pics { aspect-ratio: 3 / 2; }
  .crafts__head { margin-bottom: 12px; }
  .crafts__list { display: flex; flex-wrap: wrap; gap: 2px 18px; }
  .crafts__name { padding-block: 6px; font-size: clamp(1.625rem, 6.6vw, 2.5rem); }
  .crafts__name:hover, .crafts__name:focus-visible { transform: none; }
  .studios__title, .studios__lead { grid-column: 1 / -1; }
  .studios__lead { margin-block: 12px 20px; }
  .studios__head .btn { grid-column: 1 / -1; justify-self: start; }
  .studios__wall { grid-template-columns: repeat(2, 1fr); }
  .foot__places, .foot__nav { grid-column: 1 / -1; }
  .foot__nav { margin-top: 32px; }
  .prose .wp-block-gallery.has-nested-images { column-count: 2; }
  .grid__side, .grid__main { grid-column: 1 / -1; }
  .grid__side { margin-bottom: 24px; }
  .side { display: flex; flex-wrap: wrap; gap: 4px 20px; }
  .contact { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager__link--end { grid-column: 1; text-align: left; }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 20px; }
  .lists__head { flex-direction: column; gap: 8px; }
  .panel__foot { flex-direction: column; gap: 6px; }
  .crafts__cap { flex-direction: column; gap: 4px; }
  .crafts__cap a { text-align: left; }
  .join { min-height: 46svh; }
  .foot__end { font-size: 0.9375rem; }
}

@media (max-width: 520px) {
  .greetings, .trades__grid, .albums__list { grid-template-columns: 1fr; }
  .row__link { grid-template-columns: 64px 1fr; gap: 14px; }
  .row__img { width: 64px; height: 64px; }
  .row__img--empty { font-size: 0.9375rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready [data-rise] { opacity: 1; transform: none; }
}

@media print {
  .bar, .foot, .pager, .hero__band { display: none; }
}
