/* Trego Ehitus — dark site office: charcoal, steel, logo crimson, level lines. */

:root {
  color-scheme: dark;

  --paper: #0b0d0e;
  --paper-2: #101314;
  --surface: #14181a;
  --surface-2: #1b2022;
  --ink: #f1f2ee;
  --ink-2: #b3bab5;
  --ink-3: #838c87;
  --line: rgba(241, 242, 238, .11);
  --line-strong: rgba(241, 242, 238, .25);

  --night: #070909;
  --night-2: #0c0f10;
  --night-line: rgba(241, 242, 238, .10);
  --on-night: #f1f2ee;
  --on-night-2: #b3bab5;
  --on-night-3: #838c87;
  --on-night-line: rgba(241, 242, 238, .22);

  --accent: #c8102e;
  --accent-text: #f06a7b;
  --accent-bright: #ff8a99;
  --accent-deep: #9b0c24;

  --radius-control: 4px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; scrollbar-color: var(--line-strong) var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, svg { display: block; }
picture { display: contents; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button { touch-action: manipulation; }
h1, h2, h3, h4, p, figure, blockquote, ol { margin: 0; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
p, li { text-wrap: pretty; }
::selection { background: rgba(200, 16, 46, .35); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

.wrap { width: min(100% - 64px, 1320px); margin-inline: auto; }
.icon { width: 18px; height: 18px; flex: none; }
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* ---------- shared pieces ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--ink-3);
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .02em;
}
.eyebrow-on-dark { color: var(--on-night-3); }

/* spirit level: a hairline with a centred bubble, the product's signature */
.level { position: relative; display: inline-block; width: 44px; height: 8px; flex: none; color: var(--line-strong); }
.level::before { content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: currentColor; }
.level::after { content: ''; position: absolute; left: 50%; top: 1.5px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent-text); transform: translateX(-50%); }
.level-on-dark { color: var(--on-night-line); }
.level-on-dark::after { background: var(--accent-bright); }

.section { padding-block: 96px; }
.section-head { margin-bottom: 48px; }
.section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.section-title {
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 20px;
}
.section-title.on-dark { color: var(--on-night); }
.lede { font-size: 16px; line-height: 1.7; color: var(--ink-2); max-width: 46rem; margin-bottom: 28px; }
.lede.on-dark { color: var(--on-night-2); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  gap: 8px;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease), color 140ms var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-solid { background: var(--accent); color: #fbf7f3; }
.btn-solid:hover { background: var(--accent-deep); }
.btn-outline { border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { background: var(--surface-2); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-text);
  transition: color 140ms var(--ease);
}
.text-link:hover { color: var(--ink); }

/* ---------- scroll progress ---------- */

.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 100; pointer-events: none; }
.progress-fill { display: block; height: 100%; width: 100%; background: var(--accent-text); transform: scaleX(0); transform-origin: left; }

/* ---------- header ---------- */

.site-header {
  --header-h: 65px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 14, .93);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; min-height: 44px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.1; }
.brand-name { font-size: 18px; font-weight: 600; color: var(--ink); }
.brand-accent { color: var(--ink-2); font-weight: 400; }
.brand-sub { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--ink-3); letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: 14px; font-weight: 500; color: var(--ink-2); transition: color 140ms var(--ease); }
.nav a:hover { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.langs { display: flex; align-items: center; gap: 4px; color: var(--ink-3); }
.langs .icon { width: 14px; height: 14px; margin-right: 4px; }
.lang {
  min-inline-size: 28px;
  min-block-size: 32px;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  transition: color 140ms var(--ease), border-color 140ms var(--ease);
}
.lang:hover { color: var(--ink); }
.lang.is-active { color: var(--ink); border-bottom-color: var(--accent-text); }
.header-cta { height: 34px; padding-inline: 16px; font-size: 13px; }
.menu-btn { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: none; color: var(--ink); }
.menu-btn .icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-menu { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav { display: none; }
body.menu-open { overflow: hidden; }
.mobile-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100svh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  animation: menu-in 200ms var(--ease);
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.mobile-nav-inner { padding-block: 8px 24px; }
.mobile-links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; color: var(--ink-2); }
.mobile-links a:last-child { border-bottom: 0; }
.mobile-links a:active { background: var(--surface); }
.mobile-langs { display: none; }
.mobile-cta { display: none; width: 100%; margin-top: 16px; }
.mobile-cta-secondary { margin-top: 8px; }

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  min-height: calc(100svh - 64px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero-copy {
  display: flex;
  flex-direction: column;
  padding: 64px 48px 40px max(32px, calc((100vw - 1320px) / 2));
}
.hero-copy-main { max-width: 560px; margin-block: auto; }
.hero-title {
  font-size: clamp(48px, 5vw, 72px);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-bottom: 24px;
}
.hero-desc { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 34rem; margin-bottom: 32px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-media { position: relative; min-height: 100%; overflow: hidden; background: var(--surface-2); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 40px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .03em;
}
.hero-scope li { display: flex; align-items: center; gap: 8px; }
.hero-scope li::before { content: ''; width: 5px; height: 5px; background: var(--accent-text); }

/* ---------- about ---------- */

.about { background: var(--paper); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 64px; align-items: center; }
.about-media { min-width: 0; }
.material-board { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; height: 480px; }
.material { position: relative; overflow: hidden; margin: 0; background: var(--surface-2); }
.material--large { grid-row: span 2; }
.material img { width: 100%; height: 100%; object-fit: cover; }
.material--large img { object-position: 50% 65%; }
.material:nth-child(2) img { object-position: 50% 45%; }
.material:nth-child(3) img { object-position: 50% 82%; }
.material figcaption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 8px;
  background: rgba(11, 13, 14, .82);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .03em;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.about-copy { max-width: 520px; }
.about-stats { display: flex; gap: 56px; margin-bottom: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.about-stat { display: grid; gap: 4px; }
.stat-num { font-size: 36px; font-weight: 500; line-height: 1; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-plus { color: var(--accent-text); }
.stat-label { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.4; letter-spacing: .04em; color: var(--ink-3); }

/* ---------- services ---------- */

.services { background: var(--paper-2); border-block: 1px solid var(--line); }
.services-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.35fr); gap: 64px; align-items: start; }
.services-head { position: sticky; top: 96px; }
.services-list { border-bottom: 1px solid var(--line); }
.service {
  display: grid;
  grid-template-columns: 40px minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.service-index {
  padding-top: 4px;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: var(--accent-text);
}
.service h3 { font-size: 20px; font-weight: 500; line-height: 1.3; color: var(--ink); transition: color 140ms var(--ease); }
.service p { font-size: 14px; line-height: 1.65; color: var(--ink-2); }
.service:hover h3 { color: var(--accent-text); }

/* ---------- projects ---------- */

.projects { background: var(--paper); }
.projects-grid { columns: 2; column-gap: 32px; }
.project { display: block; break-inside: avoid; margin-bottom: 48px; }
.project-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.project:nth-child(4n + 2) .project-media,
.project:nth-child(4n + 3) .project-media { aspect-ratio: 1 / 1; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity 200ms var(--ease); }
.project:hover .project-media img { opacity: .9; }
.project-info { padding-top: 12px; }
.project-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--ink-3);
}
.project-index { color: var(--accent-text); }
.project h3 { font-size: 20px; font-weight: 500; line-height: 1.3; color: var(--ink); transition: color 140ms var(--ease); }
.project:hover h3 { color: var(--accent-text); }

/* ---------- features ---------- */

.features { background: var(--night); border-block: 1px solid var(--line); color: var(--on-night); padding-block: 64px; }
.features-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.feature { border-top: 1px solid var(--night-line); padding-top: 20px; }
.feature h3 { font-size: 15px; font-weight: 500; color: var(--on-night); margin-bottom: 6px; }
.feature p { font-size: 13px; line-height: 1.65; color: var(--on-night-2); }

/* ---------- process ---------- */

.process { background: var(--paper); }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; list-style: none; padding: 0; }
.steps::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line-strong); }
.step { position: relative; padding-top: 24px; }
.step::before { content: ''; position: absolute; top: -4px; left: 0; width: 8px; height: 8px; background: var(--accent-text); }
.step-num { display: block; margin-bottom: 16px; font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--accent-text); }
.step h3 { font-size: 18px; font-weight: 500; color: var(--ink); margin-bottom: 8px; }
.step p { font-size: 14px; line-height: 1.65; color: var(--ink-2); }

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

.contact { background: var(--night); border-top: 1px solid var(--line); color: var(--on-night); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.contact-copy { max-width: 520px; }

/* .contact-card is a legacy alias: Pages caches HTML for 10 minutes, so a
   stale page can still reference the class used before the contact refactor. */
.contact-direct, .contact-card { display: grid; }
.contact-direct a, .contact-card a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--on-night-line);
}
.contact-direct a:last-child, .contact-card a:last-child { border-bottom: 1px solid var(--on-night-line); }
.contact-card a > .icon:not(.contact-arrow) { display: none; }
.contact-text { display: grid; gap: 4px; min-width: 0; }
.contact-label { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.4; color: var(--on-night-3); }
.contact-value {
  display: block;
  font-size: clamp(20px, 2.2vw, 32px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--on-night);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  transition: color 140ms var(--ease);
}
.contact-arrow { margin-left: auto; color: var(--on-night-3); opacity: .55; transition: color 140ms var(--ease), opacity 140ms var(--ease); }
.contact-direct a:hover .contact-value,
.contact-direct a:hover .contact-arrow,
.contact-card a:hover .contact-value,
.contact-card a:hover .contact-arrow { color: var(--accent-text); }
.contact-direct a:hover .contact-arrow,
.contact-card a:hover .contact-arrow { opacity: 1; }

/* ---------- footer ---------- */

.site-footer { background: var(--night); border-top: 1px solid var(--night-line); color: var(--on-night); padding-block: 48px 32px; }
.site-footer .brand-name { color: var(--on-night); }
.site-footer .brand-accent { color: var(--on-night-2); }
.site-footer .brand-sub { color: var(--on-night-3); }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--night-line); }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--on-night-2); transition: color 140ms var(--ease); }
.footer-links a:hover { color: var(--on-night); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 24px; }
.footer-bottom p { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--on-night-3); }

/* ---------- mobile quick-contact dock ---------- */

.mobile-dock {
  position: fixed;
  inset: auto 0 0;
  z-index: 45;
  display: none;
  grid-template-columns: 1fr 1fr;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(11, 13, 14, .96);
  border-top: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  transform: translateY(100%);
  visibility: hidden;
  opacity: 0;
  transition: transform 220ms var(--ease), opacity 220ms var(--ease), visibility 220ms var(--ease);
}
.mobile-dock.is-visible { transform: none; visibility: visible; opacity: 1; }
.mobile-dock a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}
.mobile-dock a + a { border-left: 1px solid var(--line); }
.mobile-dock .icon { width: 16px; height: 16px; color: var(--accent-text); }
.mobile-dock a:active { background: var(--surface-2); }
body.menu-open .mobile-dock { transform: translateY(100%); visibility: hidden; opacity: 0; }

/* ---------- touch targets ---------- */

@media (pointer: coarse) {
  .brand { min-height: 44px; }
  .lang { min-inline-size: 40px; min-block-size: 44px; }
  .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .legal-toc a { display: flex; align-items: center; min-height: 44px; }
  .text-link { position: relative; }
  .text-link::after { content: ''; position: absolute; inset: -12px -8px; }
}

/* ---------- legal pages ---------- */

.legal-hero { padding-block: 80px 48px; background: var(--paper); border-bottom: 1px solid var(--line); }
.legal-title { max-width: 900px; margin-bottom: 20px; font-size: clamp(36px, 4.4vw, 60px); font-weight: 500; line-height: 1.02; letter-spacing: -.03em; color: var(--ink); }
.legal-lead { max-width: 44rem; margin-bottom: 28px; font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .02em;
  color: var(--ink-3);
}
.legal-meta strong { font-weight: 400; color: var(--ink-2); }

.legal-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 72px; align-items: start; padding-block: 64px 104px; }
.legal-toc { position: sticky; top: 96px; max-height: calc(100vh - 128px); overflow-y: auto; padding-right: 8px; }
.legal-toc h2 {
  margin-bottom: 14px;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--ink-3);
}
.legal-toc ol { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.legal-toc li { border-bottom: 1px solid var(--line); }
.legal-toc a { display: block; padding: 9px 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); transition: color 140ms var(--ease); }
.legal-toc a:hover { color: var(--ink); }

.legal-body { max-width: 820px; min-width: 0; }
.legal-section { padding-top: 44px; border-top: 1px solid var(--line); scroll-margin-top: 88px; }
.legal-section:first-child { padding-top: 0; border-top: 0; }
.legal-section h2 { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; font-size: 24px; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; color: var(--ink); }
.legal-index { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.4; color: var(--accent-text); }
.legal-section h3 { margin: 22px 0 8px; font-size: 16px; font-weight: 500; color: var(--ink); }
.legal-section p, .legal-section li { font-size: 15px; line-height: 1.75; color: var(--ink-2); }
.legal-section p + p { margin-top: 12px; }
.legal-section ul { display: grid; gap: 8px; margin: 14px 0 0; padding-left: 20px; }
.legal-section li::marker { color: var(--accent-text); }
.legal-section strong { color: var(--ink); font-weight: 500; }
.legal-section a { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 140ms var(--ease); }
.legal-section a:hover { color: var(--ink); }
.legal-section:target h2 { color: var(--accent-text); }

/* ---------- focus on dark surfaces ---------- */

.contact-copy :focus-visible,
.contact-direct :focus-visible,
.contact-card :focus-visible,
.site-footer :focus-visible { outline-color: var(--accent-bright); }

/* ---------- motion ---------- */

.reveal { opacity: 0; transform: translateY(10px); transition: opacity 420ms var(--ease), transform 420ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

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

@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .about-grid, .services-grid, .contact-grid { gap: 48px; }
}

@media (min-width: 1101px) {
  .mobile-nav, .mobile-nav.is-open { display: none; }
}

@media (max-width: 900px) {
  html { scroll-padding-bottom: calc(54px + env(safe-area-inset-bottom, 0px)); }
  .mobile-dock { display: grid; }
  .header-cta { display: none; }
  .mobile-cta { display: inline-flex; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-copy { padding: 56px 32px 32px; }
  .hero-copy-main { margin-block: 0; }
  .hero-media { height: 52vh; min-height: 320px; }
  .hero-scope { margin-top: 40px; }
  .about-grid, .services-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .about-copy { order: -1; }
  .services-head { position: static; }
  .material-board { height: 420px; }
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps::before { top: 0; bottom: 0; left: 0; right: auto; width: 1px; height: auto; }
  .step { padding: 0 0 32px 24px; }
  .step:last-child { padding-bottom: 0; }
  .step::before { top: 6px; left: -4px; }
}

@media (max-width: 760px) {
  .site-header { --header-h: 61px; }
  .wrap { width: min(100% - 48px, 1320px); }
  .section { padding-block: 64px; }
  .header-inner { height: 60px; }
  .brand-mark { width: 31px; height: 31px; }
  .hero-media { height: 48vh; min-height: 300px; }
  .hero-title { font-size: clamp(38px, 9vw, 52px); }
  .hero-desc { font-size: 16px; }
  .section-head { margin-bottom: 32px; }
  .section-head--row { display: block; }
  .section-head--row .text-link { margin-top: 20px; }
  .material-board { height: 340px; }
  .service { grid-template-columns: 32px minmax(0, 1fr); gap: 12px 16px; padding: 24px 0; }
  .service p { grid-column: 2; font-size: 15px; }
  .projects-grid { columns: 1; }
  .project { margin-bottom: 40px; }
  .project:nth-child(n) .project-media { aspect-ratio: 4 / 3; }
  .features { padding-block: 48px; }
  .features-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .feature { padding-top: 16px; }
  .feature p { font-size: 14px; }
  .step p { font-size: 15px; }
  .contact-direct a, .contact-card a { gap: 12px; padding: 22px 0; }
  .contact-arrow { display: none; }
  .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-links { gap: 0 24px; }
  .footer-links a { font-size: 14px; }
}

@media (max-width: 620px) {
  .langs { display: none; }
  .mobile-langs { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-3); }
  .mobile-langs .lang { min-inline-size: 40px; min-height: 44px; padding-inline: 6px; }
  .mobile-langs .icon { width: 14px; height: 14px; margin-right: 2px; }
}

@media (max-height: 520px) and (max-width: 1100px) {
  .mobile-nav-inner { padding-block: 2px 10px; }
  .mobile-links a { padding: 9px 0; font-size: 14px; }
  .mobile-cta { margin-top: 10px; }
  .mobile-cta-secondary { margin-top: 6px; }
}

@media (max-height: 380px) and (max-width: 1100px) {
  .mobile-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
}

@media (max-width: 360px) {
  .eyebrow { gap: 8px; }
  .level { width: 36px; }
}

@media (max-width: 480px) {
  .hero-copy { padding: 48px 24px 28px; }
  .hero-media { height: 44vh; min-height: 260px; }
  .hero .actions { flex-direction: column; align-items: stretch; }
  .hero .actions .btn { width: 100%; }
  .material-board { height: 300px; grid-template-columns: 1.2fr 1fr; }
  .projects-grid .project { margin-bottom: 32px; }
  .contact-direct a, .contact-card a { padding: 20px 0; }
  .contact-value { font-size: 18px; }
  .brand { gap: 9px; }
  .brand-mark { width: 28px; height: 28px; }
}

@media (max-width: 900px) {
  .legal-hero { padding-block: 56px 40px; }
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 40px 72px; }
  .legal-toc { position: static; max-height: none; overflow: visible; padding: 16px 0 0; border-top: 1px solid var(--line); }
  .legal-toc h2 { margin-bottom: 10px; }
  .legal-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; border-top: 1px solid var(--line); }
  .legal-toc li { border-bottom: 1px solid var(--line); }
  .legal-toc a { display: flex; align-items: center; min-height: 44px; padding: 8px 0; }
}

@media (max-width: 760px) {
  .legal-title { font-size: clamp(32px, 9vw, 44px); }
  .legal-lead { font-size: 16px; }
  .legal-section { padding-top: 36px; }
  .legal-section h2 { font-size: 21px; }
}

@media (max-width: 480px) {
  .legal-hero { padding-block: 44px 32px; }
  .legal-lead { font-size: 15px; }
  .legal-section h2 { gap: 10px; font-size: 19px; }
  .legal-section p, .legal-section li { font-size: 15px; }
  .legal-section ul { padding-left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .mobile-nav.is-open, .mobile-dock { animation: none; transition: none; }
  * { transition-duration: .01ms !important; }
}
