/* Idlesquare public site (EN at /, RU under /ru/). Colours are the original
   WordPress theme's: navy #21294c (text and dark bands), cream #f8eed3
   (buttons, with navy text: 12:1), taupe #89837a (decoration only: 3.5:1 on
   the light grey, too low for small text), greys #e2e2e2 and #f4f4f4. Type
   is Jost (latin + cyrillic).

   Scale: content sits in .container, at most 1320px wide, and every type
   size has a fixed ceiling, so a 2560px monitor at 100% zoom shows the same
   comfortable page as a laptop, with more margin - not a blown-up one.

   Images: the CMS puts the class ON the <img> (partials/picture.ejs), so the
   rules below are written for the img itself, never ".x img". */

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/jost-latin-wght-normal.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Cyrillic for the Russian site (the same variable font, its own subset). */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/jost-cyrillic-wght-normal.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --navy: #21294c;
  --navy-deep: #161c36;
  --cream: #f8eed3;
  --cream-dark: #efdfb4;
  --taupe: #89837a;
  --grey: #e2e2e2;
  --light: #f4f4f4;
  --ink: #21294c;
  --body: #2f3655;
  --muted: #555a6e;
  --on-dark: #ffffff;
  --on-dark-soft: #dcdfea;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --header-h: 76px;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --focus: var(--navy);
  --shadow: 0 10px 30px rgba(33, 41, 76, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  /* Header, main, footer in a column with main taking the slack: the footer
     sits at the bottom of the window on short pages instead of mid-screen. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font: 400 clamp(1rem, 0.96rem + 0.15vw, 1.0625rem)/1.7 var(--sans);
  color: var(--body);
  background: var(--light);
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3 { color: var(--ink); font-weight: 500; line-height: 1.2; margin: 0 0 0.5em; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.container--text { width: min(100% - 2 * var(--gutter), 780px); }
.measure { max-width: 68ch; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 100; background: #fff; color: var(--navy); padding: 10px 16px; font-weight: 500; }
.skip-link:focus { top: 12px; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---- Buttons and links ----------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  font: 500 1rem/1.2 var(--sans); padding: 0.85em 1.5em;
  border: 2px solid transparent; border-radius: 2px; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.btn--cream { background: var(--cream); color: var(--navy); }
.btn--cream:hover { background: var(--cream-dark); color: var(--navy); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-deep); color: #fff; }
.btn--small { padding: 0.5em 1em; font-size: 0.9375rem; }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.link-arrow { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 500; text-decoration: none; }
.link-arrow .icon { transition: transform 0.2s; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover .icon { transform: translateX(4px); }
.link-arrow--back:hover .icon { transform: translateX(-4px); }

/* ---- Header ---------------------------------------------------------------- */
.site-header { background: var(--grey); position: relative; z-index: 20; box-shadow: 0 1px 0 rgba(33, 41, 76, 0.08); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 32px; min-height: var(--header-h); }
.site-logo { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; font-size: 1.2rem; font-weight: 500; white-space: nowrap; }
.site-logo img { width: 44px; height: 44px; }
.site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px clamp(4px, 1.2vw, 16px); margin: 0; padding: 0; list-style: none; }
.site-nav a:not(.btn) { display: block; padding: 10px 8px; color: var(--navy); font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:not(.btn):hover { border-bottom-color: var(--taupe); }
.site-nav a[aria-current] { border-bottom-color: var(--navy); }
.site-nav a.lang-switch, .lang-switch { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px !important; color: var(--navy); font-weight: 500; font-size: 0.9375rem; text-decoration: none; border: 1px solid #b9bccb !important; border-radius: 2px; letter-spacing: 0 !important; }
.nav-toggle { display: none; }
.lang-switch:hover { border-color: var(--navy) !important; }
.lang-switch .icon { width: 18px; height: 18px; }
@media (min-width: 960px) { .site-header { position: sticky; top: 0; } }
@media (max-width: 959px) {
  /* Without JavaScript the links simply wrap under the logo. */
  html:not(.js) .site-header__inner { flex-direction: column; justify-content: center; padding-block: 12px; }
  html:not(.js) .site-nav ul { justify-content: center; }
  /* With it: a menu button, and the links in a panel under the bar. */
  html.js .site-header__inner { flex-wrap: wrap; min-height: 64px; }
  html.js .site-logo img { width: 40px; height: 40px; }
  html.js .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; margin-right: -12px;
    font: 500 0.9375rem/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--navy); background: none; border: 0; cursor: pointer;
  }
  html.js .nav-toggle .icon { width: 24px; height: 24px; }
  html.js .nav-toggle .icon--x, html.js .nav-toggle[aria-expanded="true"] .icon--menu { display: none; }
  html.js .nav-toggle[aria-expanded="true"] .icon--x { display: block; }
  html.js .site-nav { display: none; flex-basis: 100%; padding-bottom: 16px; }
  html.js .site-nav.is-open { display: block; }
  html.js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid #c9cad3; }
  html.js .site-nav li { border-bottom: 1px solid #c9cad3; }
  html.js .site-nav a:not(.btn) { padding: 14px 4px; border-bottom: 0; }
  html.js .site-nav a[aria-current] { font-weight: 600; }
  html.js .site-nav li:has(.btn), html.js .site-nav li:has(.lang-switch) { border-bottom: 0; padding-top: 12px; }
  html.js .site-nav .btn { width: 100%; padding-block: 0.8em; }
  html.js .site-nav .lang-switch { display: flex; justify-content: center; }
  .site-nav a:not(.btn) { font-size: 0.9375rem; }
}

/* ---- Sections ---------------------------------------------------------------- */
.section { padding-block: clamp(48px, 5.5vw, 96px); }
.section--light { background: var(--light); }
.section--grey { background: var(--grey); }
.section--navy { background: var(--navy); color: var(--on-dark); --focus: #fff; }
.section--navy h2, .section--navy h3, .section--navy a:not(.btn) { color: var(--on-dark); }
.section--tight { padding-block: 0 clamp(48px, 5.5vw, 96px); }
.section--flush-top { padding-top: 0; }
.section--intro { padding-bottom: clamp(28px, 3vw, 48px); }
.section-title { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.375rem); margin-bottom: 0.45em; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; margin-bottom: clamp(24px, 3vw, 40px); }
.section-head .section-title { margin-bottom: 0; }
.section-head--stack { display: block; }
.section-head--stack p { margin: 0; max-width: 60ch; }
.eyebrow { margin-bottom: 0.6em; font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; }
.lead { font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem); line-height: 1.55; color: var(--ink); }
.intro-block .lead { margin: 0; max-width: 62ch; }

/* ---- Home hero ------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--grey); }
.hero::before {
  /* The theme's large pale circle behind the heading, drawn in CSS. */
  content: ''; position: absolute; left: 50%; top: 50%; width: min(64vw, 860px); aspect-ratio: 1;
  transform: translate(-30%, -50%); border-radius: 50%; background: rgba(255, 255, 255, 0.45);
}
.hero__inner { position: relative; display: grid; align-items: center; gap: 32px clamp(32px, 5vw, 80px); padding-block: clamp(40px, 6vw, 88px); }
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: clamp(520px, calc(100svh - var(--header-h)), 760px); }
  .hero__image { order: -1; }
}
.hero__title { font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.75rem); line-height: 1.1; margin-bottom: 0.45em; }
.hero__lead { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.4rem); color: var(--ink); margin: 0; }
.hero__image { display: block; width: 100%; max-width: 600px; max-height: 600px; object-fit: contain; justify-self: center; }

/* ---- Home intro -------------------------------------------------------------- */
.intro__inner { display: grid; gap: clamp(24px, 4vw, 72px); align-items: center; }
@media (min-width: 900px) { .intro__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.intro__quote { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.75rem); line-height: 1.45; color: var(--ink); margin: 0; }
.intro__body { padding: clamp(24px, 3vw, 48px); background: var(--grey); border-left: 3px solid var(--navy); }
.intro__body .section-title { font-size: clamp(1.4rem, 1.2rem + 0.7vw, 2rem); }

/* ---- Project cards -------------------------------------------------------------- */
.cards { display: grid; gap: clamp(16px, 2vw, 28px); margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { position: relative; overflow: hidden; background: var(--navy-deep); color: var(--on-dark); --focus: #fff; }
.card__image { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform 0.6s ease; }
.cards--2 .card__image { aspect-ratio: 4 / 3; }
.card:hover .card__image { transform: scale(1.03); }
.card__body {
  position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(18px, 2vw, 28px);
  padding-top: clamp(48px, 5vw, 80px);
  background: linear-gradient(rgba(16, 20, 40, 0), rgba(16, 20, 40, 0.85) 45%);
}
.card__title { color: var(--on-dark); font-size: clamp(1.2rem, 1.1rem + 0.4vw, 1.5rem); margin-bottom: 0.2em; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a::after { content: ''; position: absolute; inset: 0; }
.card__title a:hover { text-decoration: underline; }
.card__body p { margin: 0; color: var(--on-dark-soft); }

/* ---- Feature strip --------------------------------------------------------- */
.features { padding-block: clamp(28px, 3.5vw, 48px); }
.feature-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px clamp(32px, 6vw, 96px); margin: 0; padding: 0; list-style: none; font-size: clamp(1.05rem, 1rem + 0.25vw, 1.25rem); color: var(--ink); }
.feature-list li { display: inline-flex; align-items: center; gap: 10px; }

/* ---- Services grid (home) ------------------------------------------------------ */
.service-grid { display: grid; gap: clamp(32px, 4vw, 56px) clamp(32px, 4vw, 64px); margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.service__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px; color: var(--navy); border: 1px solid var(--navy); border-radius: 50%; }
.service__icon .icon { width: 26px; height: 26px; }
.service__title { font-size: clamp(1.2rem, 1.1rem + 0.3vw, 1.4rem); }
.service p { margin: 0; }

/* ---- Page banners ------------------------------------------------------------ */
.banner { position: relative; display: flex; align-items: flex-end; min-height: clamp(200px, 20vw, 340px); background: var(--navy-deep); color: var(--on-dark); overflow: hidden; }
.banner__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The theme laid a grey veil over these banners; it also keeps the title
   readable, and softens the upscale (the sources are 1281px wide). */
.banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(16, 20, 40, 0.15), rgba(16, 20, 40, 0.62)); }
.banner__body { position: relative; z-index: 1; padding-block: clamp(28px, 3.5vw, 52px); }
.banner__title { margin: 0; color: var(--on-dark); font-size: clamp(2rem, 1.5rem + 1.8vw, 3.25rem); text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35); }
.banner .breadcrumb a { color: var(--on-dark-soft); }
.banner:not(:has(.banner__image)) { min-height: clamp(150px, 14vw, 220px); background: var(--navy); }

/* ---- About --------------------------------------------------------------------- */
.about { display: grid; gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (min-width: 900px) { .about { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.about__text .lead { margin-bottom: 1.4em; }
.about__images { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 24px); align-items: start; }
.about__image { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: var(--shadow); }
.about__image--2 { margin-top: clamp(32px, 5vw, 80px); }
.inspire__text { max-width: 68ch; margin-bottom: clamp(24px, 3vw, 40px); }
.inspire__text p:last-child { margin-bottom: 0; }

/* Stats (About) */
.stats { display: grid; gap: clamp(32px, 4vw, 64px); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 clamp(20px, 3vw, 36px); }
.stat__ring { grid-row: 1; grid-column: 1; width: clamp(100px, 9vw, 128px); height: auto; transform: rotate(-90deg); }
.stat__track, .stat__value { fill: none; stroke-width: 12; }
.stat__track { stroke: #fff; }
.stat__value { stroke: var(--navy); }
.stat__number { grid-row: 1; grid-column: 1; justify-self: center; margin: 0; font-size: clamp(1.4rem, 1.2rem + 0.7vw, 1.9rem); font-weight: 500; color: var(--ink); }
.stat__text { grid-row: 1; grid-column: 2; }
.stat__title { font-size: clamp(1.25rem, 1.1rem + 0.45vw, 1.55rem); margin-bottom: 0.25em; }
.stat__text p { margin: 0; }

/* ---- Service rows (Services): full width, image and text alternating ---------- */
.rows { display: grid; gap: clamp(24px, 3vw, 40px); margin: 0; padding: 0; list-style: none; }
.row { display: grid; background: #fff; box-shadow: var(--shadow); }
@media (min-width: 760px) {
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .row:nth-child(even) .row__image { order: 2; }
}
.row__image { display: block; width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.row__body { padding: clamp(24px, 3.5vw, 56px); align-self: center; }
.row__body p { margin: 0; max-width: 56ch; }
.row__title { font-size: clamp(1.35rem, 1.15rem + 0.6vw, 1.8rem); }

/* Call to action (Services) */
.cta { display: grid; gap: clamp(32px, 5vw, 80px); align-items: center; }
@media (min-width: 900px) { .cta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.cta__figure { margin: 0; }
.cta__image { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; box-shadow: var(--shadow); }
.cta__figure figcaption { margin-top: 16px; font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem); color: var(--ink); }
.cta__body p { max-width: 52ch; }

/* ---- Brochure band (Portfolio) ------------------------------------------------- */
.brochure__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.brochure__inner p { margin: 0; color: var(--on-dark-soft); max-width: 60ch; }

/* ---- Contact ---------------------------------------------------------------------- */
.contact__top, .contact__bottom { display: grid; gap: clamp(32px, 5vw, 80px); }
.contact__bottom { margin-top: clamp(40px, 5vw, 80px); padding-top: clamp(40px, 5vw, 80px); border-top: 1px solid #d3d4db; }
@media (min-width: 900px) {
  .contact__top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; }
  .contact__bottom { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}
.contact-list { margin: 0 0 1em; padding: 0; list-style: none; display: grid; gap: 14px; font-size: 1.0625rem; }
.contact-list li { display: flex; align-items: center; gap: 12px; }
.contact-list .icon { color: var(--navy); }
.contact__note { font-style: italic; color: var(--muted); }
.contact__map { position: relative; display: block; box-shadow: var(--shadow); }
.contact__map-image { display: block; width: 100%; }
.contact__map-label { position: absolute; right: 12px; bottom: 12px; padding: 6px 12px; background: var(--navy); color: #fff; font-size: 0.9375rem; }
.contact__map:hover .contact__map-label { background: var(--navy-deep); text-decoration: underline; }
.contact-form { max-width: 720px; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--ink); }
.field .optional { font-weight: 400; color: var(--muted); }
.field input:not([type="checkbox"]), .field textarea {
  display: block; width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid #8b8fa3; border-radius: 2px;
}
.field textarea { resize: vertical; min-height: 9em; }
.field--check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.field--check input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--navy); }
.field--check label { margin: 0; font-weight: 400; }
.field--check .field-error { grid-column: 2; }
.field [aria-invalid="true"] { border-color: #b3261e; outline: 1px solid #b3261e; }
.field-error { margin: 6px 0 0; color: #a1251b; font-size: 0.9375rem; font-weight: 500; }
.form-status-region:focus { outline: none; }
.form-status { margin: 0 0 20px; padding: 12px 16px; border-radius: 2px; font-weight: 500; }
.form-status--success { background: #e6f4ea; color: #14532d; }
.form-status--error { background: #fdecea; color: #7f1d1d; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form.is-submitting { cursor: progress; }
.inquiries { padding: clamp(24px, 3vw, 40px); background: var(--grey); }
.inquiries__title { font-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.75rem); }
.inquiries__highlight { font-size: 1.15rem; font-weight: 500; color: var(--ink); margin-bottom: 0.2em; }
.inquiries__list { margin: 1.2em 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.inquiries__list li { display: flex; align-items: center; gap: 10px; }
.inquiries__contact { margin: 0; }

/* ---- Text pages (Privacy Policy), thanks, 404 ------------------------------------- */
.page-title { font-size: clamp(2rem, 1.5rem + 1.8vw, 3rem); }
.main--message { display: flex; flex-direction: column; }
.main--message .section { flex: 1; display: flex; align-items: center; }

/* ---- Galleries: photos that open full size (site.js adds the lightbox) ----------- */
.gallery { display: grid; gap: clamp(8px, 1vw, 14px); margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.gallery--dense { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.gallery--strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .gallery--strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Masonry: columns of photos at their own proportions - any number of photos
   fills the columns evenly, with no lonely last row. */
.gallery--masonry, .gallery--masonry-dense { display: block; columns: 4 220px; column-gap: clamp(8px, 1vw, 14px); }
.gallery--masonry-dense { columns: 6 140px; }
.gallery--masonry li, .gallery--masonry-dense li { break-inside: avoid; margin-bottom: clamp(8px, 1vw, 14px); }
.gallery--masonry .gallery__img, .gallery--masonry-dense .gallery__img { aspect-ratio: auto; height: auto; }
@media (max-width: 639px) { .gallery--masonry, .gallery--masonry-dense { columns: 2; } }
.gallery a { display: block; overflow: hidden; background: var(--grey); }
/* Square tiles: the project photos are a mix of portrait and landscape, and
   a square crops either kindly. The full photo opens on click. */
.gallery__img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.4s ease; }
.gallery--strip .gallery__img { aspect-ratio: 3 / 2; }
.gallery a:hover .gallery__img { transform: scale(1.04); }
.gallery a:focus-visible { outline-offset: 2px; }

/* Lightbox: the photo is scaled to fit the screen (many brochure photos are
   small originals; shown at their own size they were postage stamps). */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(16, 20, 40, 0.95); padding: 56px 72px 64px; }
.lightbox[hidden] { display: none; }
.lightbox img { display: block; width: 100%; height: 100%; max-width: 1400px; object-fit: contain; }
.lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 50%; background: rgba(16, 20, 40, 0.6); color: #fff; cursor: pointer; --focus: #fff; }
.lightbox button:hover { background: rgba(16, 20, 40, 0.9); }
.lightbox .icon { width: 22px; height: 22px; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 18px; left: 0; right: 0; margin: 0; text-align: center; color: #fff; font-size: 0.9375rem; }
body.has-lightbox { overflow: hidden; }
@media (max-width: 640px) { .lightbox { padding: 64px 8px 72px; } .lightbox__prev, .lightbox__next { top: auto; bottom: 8px; transform: none; } }

/* ---- Project page ---------------------------------------------------------------- */
.project-head { background: var(--grey); }
.project-head__inner { display: grid; gap: clamp(24px, 4vw, 72px); align-items: center; padding-block: clamp(32px, 5vw, 72px); }
@media (min-width: 900px) { .project-head__inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.project-head__text { max-width: 62ch; }
.project-head .rich-text { font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem); }
.project-head__title { font-size: clamp(2rem, 1.5rem + 1.8vw, 3.25rem); margin-bottom: 0.3em; }
.project-head__image { display: block; width: 100%; max-height: 640px; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: var(--shadow); }
.project-photos .section-title { margin-bottom: 0.8em; }
.project-nav { padding-block: clamp(28px, 3vw, 44px); }
.project-nav__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.project-nav .link-arrow { color: var(--on-dark); }
.project-nav__label { color: var(--on-dark-soft); }
.breadcrumb { margin: 0 0 0.6em; font-size: 0.875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---- CMS rich text (project stories, the Privacy Policy) --------------------------- */
.rich-text > :first-child { margin-top: 0; }
.rich-text > :last-child { margin-bottom: 0; }
.rich-text h2 { font-size: clamp(1.25rem, 1.1rem + 0.45vw, 1.5rem); margin: 1.4em 0 0.4em; }
.rich-text h3 { font-size: 1.2rem; margin: 1.2em 0 0.4em; }
.rich-text ul, .rich-text ol { padding-left: 1.3em; margin: 0 0 1em; }
.rich-text li { margin-bottom: 0.3em; }
.rich-text blockquote { margin: 1em 0; padding-left: 16px; border-left: 3px solid var(--taupe); color: var(--ink); }

/* ---- Footer -------------------------------------------------------------------------- */
.site-footer { background: var(--navy); color: var(--on-dark); --focus: #fff; }
.site-footer__main { display: grid; gap: 32px clamp(32px, 5vw, 80px); padding-block: clamp(40px, 5vw, 64px); }
@media (min-width: 760px) { .site-footer__main { grid-template-columns: 1.2fr 0.8fr 1.2fr; } }
.site-footer h2 { color: var(--on-dark); font-size: 1.0625rem; margin-bottom: 0.7em; letter-spacing: 0.02em; }
.site-footer p { margin: 0 0 0.6em; color: var(--on-dark-soft); }
.site-footer a { color: var(--on-dark); }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.bottom-bar { background: var(--grey); color: var(--ink); --focus: var(--navy); }
.bottom-bar a { color: var(--navy); }
.bottom-bar__links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.bottom-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 14px; font-size: 0.9375rem; }
/* Scoped to .bottom-bar: .site-footer p (light text for the navy band) would
   otherwise paint this near-white on the light grey bar. */
.bottom-bar .copyright { display: inline-flex; align-items: center; gap: 12px; margin: 0; color: var(--ink); }
.copyright img { width: 32px; height: 32px; }
@media (max-width: 640px) { .bottom-bar__inner { justify-content: center; text-align: center; } }

/* Signed-in staff during maintenance */
.staff-banner { background: var(--cream); color: var(--navy); padding: 10px var(--gutter); font-size: 0.9375rem; text-align: center; }
.staff-banner a { color: var(--navy); font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
