/* ==========================================================================
   DPP Rybník
   Drawing-sheet system: white paper, steel ink, the logo's lime as the tube.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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;
}

:root {
  /* colour */
  --paper: #ffffff;
  --sheet: #edf0ef;      /* galvanized steel, alternate bands */
  --ink: #1e2a31;        /* steel-blue graphite: text and drawing lines */
  --steel: #56646c;      /* secondary text */
  --line: #c8cfd0;       /* light rules */
  --field: #8a979d;      /* form borders */
  --lime: #7eb928;       /* logo green: the tube, primary buttons, current page */
  --lime-hover: #70a822;
  --lime-deep: #3b6a10;  /* links and focus on light backgrounds */
  --error: #b3261e;

  /* type */
  --font: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-lead: 1.3125rem;
  --fs-h3: 1.3125rem;
  --fs-h2: clamp(1.75rem, 1.25rem + 1.5vw, 2.25rem);
  --fs-h1: clamp(2.5rem, 1.3rem + 4.4vw, 4.5rem);
  --fs-h1-page: clamp(2.25rem, 1.4rem + 3.2vw, 3.75rem);
  --wide: 115%;          /* expanded width for display type */

  /* layout */
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --section: clamp(56px, 7vw, 104px);
  --header-h: 84px;
}

/* ---------- base ---------- */

*, *::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;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-stretch: 100%;
  font-optical-sizing: auto;
}

img { max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0;
  font-stretch: var(--wide);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 720; line-height: 1.02; letter-spacing: -0.02em; }
h2, .h2 { font-size: var(--fs-h2); font-weight: 680; line-height: 1.12; letter-spacing: -0.01em; }
h3, .h3 { font-size: var(--fs-h3); font-weight: 650; line-height: 1.25; font-stretch: 108%; letter-spacing: 0; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--lime-deep); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--lime-deep); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }

.num { font-variant-numeric: tabular-nums lining-nums; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink); max-width: 36em; }
.small { font-size: var(--fs-sm); color: var(--steel); }
.caption { font-size: var(--fs-sm); color: var(--steel); line-height: 1.45; }
.measure { max-width: 60ch; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: var(--paper); font-weight: 600; border-radius: 4px;
}
.skip-link:focus { top: 12px; color: var(--paper); }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  min-height: 48px; padding: 0 22px;
  border: 1.5px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 620; font-stretch: 105%; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn--primary { background: var(--lime); color: var(--ink); }
.btn--primary:hover { background: var(--lime-hover); color: var(--ink); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- utility bar ---------- */

.utility { background: var(--sheet); font-size: var(--fs-sm); }
.utility__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; }
.utility__eu { display: block; flex-shrink: 1; min-width: 0; }
.utility__eu img { display: block; height: 30px; width: auto; }
.utility__links { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.utility__privacy { color: var(--ink); }

.lang-switch { display: flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.lang-switch__item {
  display: block; padding: 3px 12px; font-size: var(--fs-xs); font-weight: 700; font-stretch: 112%;
  color: var(--ink); text-decoration: none; line-height: 1.6;
}
.lang-switch a.lang-switch__item:hover { background: var(--paper); color: var(--ink); }
.lang-switch__item.is-current { background: var(--ink); color: var(--paper); }

/* ---------- header and navigation ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: block; flex-shrink: 0; border-radius: 50%; }
.brand img { display: block; width: 70px; height: 70px; }

.site-nav__list { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; list-style: none; }
.site-nav__link {
  position: relative; display: block; padding: 12px 14px;
  font-size: 1rem; font-weight: 620; font-stretch: 104%;
  color: var(--ink); text-decoration: none;
}
.site-nav__link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px;
  height: 5px; border-radius: 3px; background: transparent;
  transition: background-color 0.15s;
}
.site-nav__link:hover { color: var(--ink); }
.site-nav__link:hover::after { background: var(--line); }
.site-nav__link[aria-current="page"]::after { background: var(--lime); }

.nav-toggle {
  display: none; align-items: center; gap: 10px;
  min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: none;
  font: inherit; font-weight: 620; color: var(--ink); cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 1px;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- sections ---------- */

.section { padding-block: var(--section); }
.section--sheet { background: var(--sheet); }
.section--tight-top { padding-top: clamp(16px, 2vw, 32px); }
.section--flush { padding-block: 0; }

.section-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 16px 48px; align-items: end; margin-bottom: 32px;
}
.section-head p { margin: 0; color: var(--steel); max-width: 46ch; }

.split {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px); align-items: start;
}
.split--drawing { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); align-items: center; }

.prose h2 { margin-bottom: 20px; }
.prose h3 { margin: 36px 0 12px; }
.prose p { max-width: 66ch; }

.more { margin-top: 32px; }

.columns-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px clamp(32px, 5vw, 72px); }
.group h2 { margin-bottom: 12px; }

/* ---------- hero ---------- */

.hero { padding-block: clamp(32px, 5vw, 72px) clamp(48px, 6vw, 96px); overflow: hidden; }
.hero__inner {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "title title" "text figure";
  gap: clamp(24px, 3vw, 40px) clamp(24px, 4vw, 64px); align-items: start;
}
.hero__title { grid-area: title; max-width: 20ch; }
.hero__text { grid-area: text; padding-top: clamp(8px, 2vw, 32px); }
.hero__figure { grid-area: figure; margin: 0; }
.hero__figure .caption { margin: 12px 0 0; max-width: 46ch; }

/* ---------- technical drawings (inline SVG) ---------- */

.drawing { display: block; width: 100%; height: auto; font-family: var(--font); overflow: visible; }
.d-outline { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.d-outline--nofill { fill: none; }
.d-tube__wall { fill: none; stroke: var(--ink); stroke-width: 18; }
.d-tube__body { fill: none; stroke: var(--lime); stroke-width: 15; }
.d-tube__wall--wide { stroke-width: 44; }
.d-tube__body--wide { stroke-width: 41; }
.d-centerline { fill: none; stroke: var(--ink); stroke-width: 0.9; stroke-dasharray: 14 3 2 3; opacity: 0.75; }
.d-thin { fill: none; stroke: var(--ink); stroke-width: 1; }
.d-cut { stroke: var(--ink); stroke-width: 3.2; }
.d-arrowhead { fill: var(--ink); }
.d-ring { fill: var(--lime); }
.d-hatch { stroke: var(--ink); stroke-width: 1; opacity: 0.55; }
.d-text { fill: var(--ink); font-size: 14px; font-weight: 560; font-variant-numeric: tabular-nums lining-nums; }
.d-text--letter { font-size: 17px; font-weight: 650; font-style: italic; }
.d-text--label { font-size: 17px; font-weight: 720; font-stretch: var(--wide); }

.drawing-figure { margin: 0; }
.drawing--bend { max-width: 460px; margin-inline: auto; }

/* The one orchestrated moment: the coil draws itself, then gets dimensioned.
   site.js adds .is-visible when the drawing scrolls into view; without JS it is simply shown. */
@media (prefers-reduced-motion: no-preference) {
  .js .drawing--coil .d-tube path { stroke-dasharray: 1 1; }
  .js .drawing--coil:not(.is-visible) .d-tube path { stroke-dashoffset: 1; }
  .js .drawing--coil:not(.is-visible) .d-header,
  .js .drawing--coil:not(.is-visible) .d-late,
  .js .drawing--coil:not(.is-visible) .d-section,
  .js .drawing--coil:not(.is-visible) .d-dims { opacity: 0; }
  .drawing--coil.is-visible .d-header { animation: d-fade 0.5s ease-out 0.1s both; }
  .drawing--coil.is-visible .d-tube path { animation: d-draw 2s cubic-bezier(0.65, 0, 0.35, 1) 0.35s both; }
  .drawing--coil.is-visible .d-late { animation: d-fade 0.5s ease-out 2.15s both; }
  .drawing--coil.is-visible .d-section { animation: d-fade 0.6s ease-out 2.05s both; }
  .drawing--coil.is-visible .d-dims { animation: d-fade 0.6s ease-out 2.3s both; }
}
@keyframes d-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes d-fade { from { opacity: 0; } }

/* ---------- datasheets and lists ---------- */

.datasheet { margin: 0; border-top: 2px solid var(--ink); }
.datasheet__row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 4px 20px; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.datasheet dt { color: var(--steel); }
.datasheet dd { margin: 0; font-weight: 620; }
.datasheet--spec { margin-top: 24px; }
.datasheet--spec dd { font-size: 1.1875rem; }
.datasheet--compact .datasheet__row { grid-template-columns: 9em minmax(0, 1fr); }
.split__side > .h3, .split__side > h2.h3 { margin-bottom: 16px; }

.ticks { margin: 0; padding: 0; list-style: none; }
.ticks li { position: relative; padding: 10px 0 10px 30px; border-bottom: 1px solid var(--line); }
.ticks li:first-child { border-top: 1px solid var(--line); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: calc(10px + 0.8em - 2.5px);
  width: 16px; height: 5px; border-radius: 3px; background: var(--lime);
}

.credo {
  margin-top: 36px !important; max-width: 30em;
  font-size: var(--fs-lead); line-height: 1.45; font-weight: 560; font-stretch: 106%;
}

/* ---------- home: services ---------- */

.services {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px clamp(32px, 4vw, 56px); margin: 32px 0 0; padding: 0; list-style: none;
}
.service { display: grid; grid-template-columns: clamp(120px, 14vw, 180px) minmax(0, 1fr); gap: 20px; align-items: start; }
.service__media { display: block; }
.service__media img, .swatches { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.service__title { margin-bottom: 8px; }
.service__title a { color: var(--ink); text-decoration: none; }
.service__title a:hover { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; }
.service p { margin: 0; }

/* powder coating has no photo: show the colours it produces */
.swatches { display: flex; }
.swatches span { flex: 1; }
.swatches span:nth-child(1) { background: var(--lime); }
.swatches span:nth-child(2) { background: #2c5a85; }
.swatches span:nth-child(3) { background: #a8452c; }
.swatches span:nth-child(4) { background: #d8dcd6; }
.swatches span:nth-child(5) { background: var(--ink); }

/* ---------- home: recent work ---------- */

.work { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.work__item a { display: block; color: var(--ink); text-decoration: none; }
.work__item img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.work__caption { display: block; margin-top: 10px; font-size: var(--fs-sm); font-weight: 560; line-height: 1.4; }
.work__year { color: var(--steel); font-weight: 400; }
.work__item a:hover .work__caption { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* ---------- home: standards ---------- */

.standards { margin: 0; border-top: 2px solid var(--ink); }
.standards__row { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr); gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.standards dt { font-weight: 720; font-stretch: 110%; }
.standards dd { margin: 0; color: var(--steel); }

/* ---------- people ---------- */

.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 0; padding: 0; list-style: none; }
.person { border-top: 2px solid var(--ink); padding-top: 16px; }
.person p { margin: 0; }
.person__name { font-size: 1.1875rem; font-weight: 700; font-stretch: 108%; }
.person__role { color: var(--steel); margin-bottom: 14px !important; }
.person__phone a { font-size: var(--fs-lead); font-weight: 620; color: var(--ink); text-decoration: none; }
.person__phone a:hover { text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 3px; }
.person__email--big { font-size: 1.1875rem; }

/* ---------- page head ---------- */

.page-head { padding-block: clamp(40px, 6vw, 80px) clamp(24px, 3vw, 40px); }
.page-head__title { font-size: var(--fs-h1-page); }
.page-head__lead { margin-top: 20px; max-width: 46em; }

/* ---------- production ---------- */

.shots { display: grid; gap: 16px; margin-top: clamp(40px, 5vw, 64px); }
.shots--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shot { margin: 0; }
.shot a { display: block; }
.shot img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.shot figcaption { margin-top: 8px; }

.eu-block { display: inline-block; padding: 20px; background: var(--paper); }
.eu-block img { display: block; width: 250px; }

/* ---------- quality control ---------- */

.roster { columns: 3 240px; column-gap: 48px; margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.roster li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line); }

.strengths__title { margin: 48px 0 16px; }
.strengths { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.strengths li { padding: 6px 16px; border-radius: 999px; background: var(--paper); font-weight: 600; }

.ref {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  grid-template-areas: "head media" "head body";
  gap: 24px clamp(32px, 5vw, 72px);
  margin-top: 32px; padding-top: 32px; border-top: 2px solid var(--ink);
}
.ref + .ref { margin-top: 56px; }
.ref__head { grid-area: head; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.ref__media { grid-area: media; }
.ref__body { grid-area: body; }
.ref__client { margin-bottom: 6px; }
.ref__project { color: var(--steel); }
.ref__subhead { font-weight: 620; margin: 28px 0 10px; max-width: 70ch; }
.ref__wide { display: block; width: 100%; max-width: 450px; height: auto; }
.ref__photos { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ref__photos--1 { grid-template-columns: minmax(0, 420px); }
.ref__photos a { display: block; }
.ref__photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- gallery ---------- */

.year-nav { border-block: 1px solid var(--line); }
.year-nav__list { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 6px 0; list-style: none; }
.year-nav__list a {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-weight: 700; font-stretch: 112%; color: var(--ink); text-decoration: none;
}
.year-nav__list a:hover { background: var(--sheet); }

.timeline { padding-block: 24px var(--section); }
.year {
  display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr);
  gap: 24px 40px; padding-top: 32px; margin-top: 40px; border-top: 2px solid var(--ink);
}
.year__label {
  position: sticky; top: calc(var(--header-h) + 24px); align-self: start;
  font-size: clamp(2.5rem, 1.6rem + 2.6vw, 3.5rem); font-weight: 760; font-stretch: 120%; line-height: 1;
}
.project + .project { margin-top: 40px; }
.project__title { margin-bottom: 14px; }
.project__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.project__photos a { display: block; }
.project__photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: opacity 0.15s; }
.project__photos a:hover img { opacity: 0.85; }

/* ---------- certificates ---------- */

.certs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 40px 40px; margin: 0; padding: 0; list-style: none;
}
.cert { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: start; }
.cert__preview {
  display: block; background: var(--paper);
  box-shadow: 0 1px 2px rgba(30, 42, 49, 0.2), 0 8px 18px -8px rgba(30, 42, 49, 0.35);
  transition: transform 0.15s;
}
.cert__preview:hover { transform: translateY(-2px); }
.cert__preview img { display: block; width: 112px; height: auto; aspect-ratio: 310 / 440; object-fit: cover; object-position: left top; }
.cert__title { font-size: 1rem; }
.cert__std { display: block; font-size: 1.5rem; font-weight: 740; font-stretch: var(--wide); line-height: 1.1; }
.cert__name { display: block; margin-top: 4px; font-size: 1.0625rem; font-weight: 620; font-stretch: 104%; }
.cert__scope { margin: 10px 0 0; }
.cert__issuer { margin: 8px 0 0; font-size: var(--fs-sm); color: var(--steel); }
.cert__docs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }

.chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 620; color: var(--ink); text-decoration: none;
}
.chip:hover { background: var(--ink); color: var(--paper); }

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px clamp(32px, 5vw, 80px); }
.contact-grid h2 { margin-bottom: 16px; }
.contact-grid .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.company { font-style: normal; margin: 0 0 20px; }
.company strong { font-weight: 700; font-stretch: 108%; }
.contact-grid__company .small { margin-top: 16px; }

.map { aspect-ratio: 16 / 7; border: 2px solid var(--ink); background: var(--sheet); }
.map iframe { display: block; width: 100%; height: 100%; border: 0; }
.map__link { margin: 12px 0 var(--section); font-size: var(--fs-sm); }

.form { margin-top: 28px; max-width: 760px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 6px; font-weight: 620; }
.field__opt { font-weight: 400; color: var(--steel); }
.field__hint { margin: -2px 0 8px; font-size: var(--fs-sm); color: var(--steel); }
.field__error { margin: -2px 0 8px; font-size: var(--fs-sm); font-weight: 620; color: var(--error); }
.field input, .field textarea {
  display: block; width: 100%; min-height: 48px; padding: 11px 14px;
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--field); border-radius: 4px;
}
.field textarea { resize: vertical; min-height: 9em; }
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field--error input, .field--error textarea { border-color: var(--error); }
.form__consent { margin: 4px 0 24px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.notice { margin: 20px 0 0; padding: 14px 18px; border-radius: 4px; font-weight: 600; max-width: 760px; }
.notice--ok { background: #e4f1d3; box-shadow: inset 5px 0 0 var(--lime); }
.notice--error { background: #fbe9e7; box-shadow: inset 5px 0 0 var(--error); }

/* ---------- footer: drawing title block ---------- */

.site-footer { padding-block: 48px 40px; border-top: 1px solid var(--line); }
.titleblock {
  display: grid; margin: 0;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.35fr) minmax(0, 1.1fr) minmax(0, 0.7fr);
  grid-template-areas:
    "brand office   ids     sheet"
    "brand register contact lang"
    "certs certs    docs    copy";
  gap: 1.5px; background: var(--ink); border: 2.5px solid var(--ink);
}
.tb { min-width: 0; padding: 10px 14px 12px; background: var(--paper); }
.tb dt { margin-bottom: 4px; font-size: var(--fs-xs); color: var(--steel); line-height: 1.3; }
.tb dd { margin: 0; font-size: 0.9375rem; line-height: 1.45; overflow-wrap: anywhere; }
.tb a { color: var(--ink); }
.tb a:hover { color: var(--lime-deep); }
.tb--brand { grid-area: brand; display: flex; align-items: center; }
.tb--brand dd { display: flex; align-items: center; gap: 14px; }
.tb--brand img { width: 64px; height: 64px; display: block; }
.tb__company { font-size: 1.375rem; font-weight: 760; font-stretch: var(--wide); line-height: 1.1; }
.tb--office { grid-area: office; }
.tb--ids { grid-area: ids; }
.tb--sheet { grid-area: sheet; }
.tb--register { grid-area: register; }
.tb--contact { grid-area: contact; }
.tb--lang { grid-area: lang; }
.tb--certs { grid-area: certs; }
.tb--docs { grid-area: docs; display: flex; align-items: center; }
.tb--copy { grid-area: copy; display: flex; align-items: center; }
.tb--sheet dd, .tb--lang dd { font-size: 1.0625rem; font-weight: 720; font-stretch: 110%; }
.tb__badges { display: inline-flex; align-items: center; gap: 12px; }
.tb__badges img { display: block; height: 38px; width: auto; }

/* ---------- lightbox ---------- */

.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; color: #fff; background: rgba(17, 25, 30, 0.95);
}
.lightbox::backdrop { background: rgba(17, 25, 30, 0.6); }
.lightbox__frame {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; padding: 68px 16px 92px;
}
.lightbox__img { display: block; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; background: #fff; }
.lightbox__caption { margin: 14px 0 0; font-size: 0.9375rem; text-align: center; max-width: 60ch; }
.lightbox__btn {
  position: absolute; min-height: 44px; padding: 0 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.75); border-radius: 999px; background: transparent;
  font: inherit; font-weight: 620; color: #fff; cursor: pointer;
}
.lightbox__btn:hover { background: #fff; color: var(--ink); }
.lightbox__btn:focus-visible { outline-color: #fff; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { bottom: 24px; left: 16px; }
.lightbox__next { bottom: 24px; right: 16px; }
.lightbox__btn[hidden] { display: none; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .site-nav__link { padding-inline: 10px; font-size: 0.9375rem; }
  .site-nav__link::after { left: 10px; right: 10px; }
}

@media (max-width: 960px) {
  :root { --header-h: 72px; }
  .brand img { width: 52px; height: 52px; }
  .nav-toggle { display: inline-flex; }
  .site-header__inner { flex-wrap: wrap; }

  /* without JavaScript the menu simply wraps under the logo */
  .site-nav { width: 100%; padding-bottom: 8px; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    padding: 8px var(--gutter) 20px; background: var(--paper);
    border-bottom: 2px solid var(--ink); box-shadow: 0 12px 24px -12px rgba(30, 42, 49, 0.3);
  }
  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__link { padding: 14px 0; font-size: 1.125rem; border-bottom: 1px solid var(--line); }
  .site-nav__link::after { left: 0; right: auto; width: 40px; bottom: 6px; }

  .hero__inner, .split, .split--drawing, .contact-grid, .section-head, .columns-2 { grid-template-columns: minmax(0, 1fr); }
  .hero__inner { grid-template-areas: "title" "text" "figure"; }
  .hero__text { padding-top: 0; }
  .hero__title { max-width: 14ch; }
  .services { grid-template-columns: minmax(0, 1fr); }
  .work { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "media" "body"; }
  .ref__head { position: static; }
  .year { grid-template-columns: minmax(0, 1fr); }
  .year__label { position: static; }

  .titleblock {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "brand    brand"
      "office   ids"
      "register register"
      "contact  contact"
      "sheet    lang"
      "certs    certs"
      "docs     docs"
      "copy     copy";
  }
}

@media (max-width: 640px) {
  .lead { font-size: 1.1875rem; }
  /* drawings shrink on phones: enlarge their lettering so it stays readable */
  .d-text { font-size: 20px; }
  .d-text--letter, .d-text--label { font-size: 22px; }
  .utility__privacy { display: none; }
  .utility__eu img { height: 26px; }
  .shots--3, .ref__photos { grid-template-columns: minmax(0, 1fr); }
  .people, .contact-grid .people { grid-template-columns: minmax(0, 1fr); }
  .service { grid-template-columns: 112px minmax(0, 1fr); gap: 16px; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .map { aspect-ratio: 4 / 3; }
  .cert { grid-template-columns: 96px minmax(0, 1fr); }
  .cert__preview img { width: 96px; }
  .lightbox__frame { padding-inline: 8px; }
}

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

@media print {
  .utility, .site-header, .nav-toggle, .lightbox, .form, .map { display: none !important; }
  .section--sheet { background: none; }
}
