/* ============================================================
   AUTOGAS Vol. IV — Design System
   ────────────────────────────────────────────────────────────
   Photography first. Type is quiet. One sans (Geist).
   Warm near-black ground. Each section is a viewport-sized
   scene around one image.

   Layers:
     1. Tokens      — :root custom properties
     2. Base        — element resets
     3. Primitives  — .mono, .headline, .text-* type scale
     4. Components  — .chrome, .scene, .split, .band, .row, .foot
     5. Utilities   — i18n visibility, .reveal
   ============================================================ */

/* ── 1. TOKENS ─────────────────────────────────────────────── */
:root {
  /* Ground — warm near-black, neutral enough for any photography */
  --bg:       #0E0D0B;
  --bg-2:     #18160F;
  --bg-3:     #221F18;

  /* Ink — warm cream that doesn't clash with photographic warmth */
  --ink:      #F1ECDD;
  --ink-dim:  #B5AE9C;
  --ink-faint:#7A7466;
  --ink-veil: rgba(241, 236, 221, 0.14);
  --ink-veil-soft: rgba(241, 236, 221, 0.06);

  /* The accent IS the cream — restraint; photographs carry colour */
  --hot:      #F1ECDD;

  --font-sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Spacing rhythm */
  --gutter:   28px;
  --edge:     56px;
}

/* ── 2. BASE ───────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--ink); color: var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── 3. PRIMITIVES ─────────────────────────────────────────── */

/* Monospace technical label */
.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 400;
  line-height: 1.2;
}
.mono.ink    { color: var(--ink); }
.mono.faint  { color: var(--ink-faint); }
.mono.lg     { font-size: 13px; letter-spacing: 0.18em; }
.mono.sm     { font-size: 10px; letter-spacing: 0.28em; }

p { line-height: 1.55; color: var(--ink-dim); margin: 0; }
p + p { margin-top: 14px; }

.text-lead {
  font-size: clamp(17px, 1.3vw, 21px);
  line-height: 1.45;
  color: var(--ink);
  max-width: 42ch;
  text-wrap: pretty;
}

.text-small {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 56ch;
}

/* Headline scale */
.headline {
  font-family: var(--font-sans);
  font-size: clamp(28px, 3.2vw, 48px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.018em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.headline-l {
  font-size: clamp(36px, 4.4vw, 68px);
  letter-spacing: -0.022em;
}
.headline-s {
  font-size: clamp(22px, 2vw, 32px);
  letter-spacing: -0.012em;
  line-height: 1.1;
}

/* ── 4. COMPONENTS ─────────────────────────────────────────── */

/* CHROME — top floating bar */
.chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  pointer-events: none;
}
.chrome::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(to bottom,
    rgba(14,13,11,0.85) 0%,
    rgba(14,13,11,0.55) 42%,
    rgba(14,13,11,0) 100%);
  pointer-events: none;
  z-index: -1;
}
.chrome > * { pointer-events: auto; }

.chrome__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.chrome__brand .mark {
  width: 20px; height: 18px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}
.chrome__brand .mark span {
  display: block; height: 1.5px;
  background: var(--ink);
}
.chrome__brand .mark span:nth-child(1) { width: 100%; }
.chrome__brand .mark span:nth-child(2) { width: 75%; }
.chrome__brand .mark span:nth-child(3) { width: 50%; }

.chrome__brand .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.chrome__brand .label small {
  display: block;
  font-size: 9px;
  color: var(--ink-faint);
  letter-spacing: 0.28em;
  margin-top: 3px;
}

.chrome__nav {
  display: flex;
  justify-content: center;
  gap: 26px;
}
.chrome__nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 0.2s;
  padding: 6px 0;
  position: relative;
}
.chrome__nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(.2,.7,.2,1);
}
.chrome__nav a:hover { color: var(--ink); }
.chrome__nav a:hover::after,
.chrome__nav a.is-active::after { transform: scaleX(1); }
.chrome__nav a.is-active { color: var(--ink); }

.chrome__right {
  display: flex;
  gap: 14px;
  align-items: center;
}

.frame-id {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.frame-id b { color: var(--ink); font-weight: 400; }

.lang {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  gap: 0;
}
.lang button {
  background: transparent;
  border: 0;
  padding: 4px 8px;
  color: var(--ink-faint);
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  transition: color 0.18s;
}
.lang button:hover { color: var(--ink); }
.lang button.is-active { color: var(--ink); }
.lang span.sep { color: var(--ink-faint); padding: 0 2px; }

/* SCENE — viewport-sized image section */
.scene {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  display: block;
  color: var(--ink);
}
.scene--tall  { height: 100dvh; }
.scene--half  { height: 70vh; min-height: 520px; }
.scene--short { height: 60vh; min-height: 460px; }

.scene__img {
  position: absolute;
  inset: 0;
  background: var(--bg-2);
  overflow: hidden;
  transition: transform 1.6s cubic-bezier(.2,.7,.2,1);
}
.scene__img::before {
  /* tonal stripe — gives the placeholder a photographic surface */
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 28px,
    rgba(241, 236, 221, 0.022) 28px 29px
  );
  pointer-events: none;
}
.scene__img::after {
  /* legibility scrims — darken top, bottom and edges so overlaid
     text reads on any photograph, however bright */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(14,13,11,0.6) 0%, rgba(14,13,11,0) 26%),
    linear-gradient(to top, rgba(14,13,11,0.88) 0%, rgba(14,13,11,0) 50%),
    linear-gradient(to right, rgba(14,13,11,0.34) 0%, rgba(14,13,11,0) 30%, rgba(14,13,11,0) 70%, rgba(14,13,11,0.34) 100%);
  pointer-events: none;
}

/* Placeholder tints — warm radial so the frame isn't dead flat.
   Swap the .scene__img element for an <img> when real photos arrive. */
.scene__img--warm  { background: radial-gradient(ellipse at 40% 30%, #2A2519 0%, #18160F 60%, #0E0D0B 100%); }
.scene__img--cool  { background: radial-gradient(ellipse at 60% 50%, #1C2024 0%, #14171B 60%, #0E0D0B 100%); }
.scene__img--dust  { background: radial-gradient(ellipse at 50% 40%, #322B1F 0%, #1F1B12 65%, #0E0D0B 100%); }
.scene__img--ember { background: radial-gradient(ellipse at 70% 30%, #2E1F14 0%, #1B130D 60%, #0E0D0B 100%); }

.scene__img-photo { width: 100%; height: 100%; object-fit: cover; }

.scene__img-meta {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-dim);
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}
.scene__img-meta b { color: var(--ink); font-weight: 400; }
/* radial bloom + text halo so the centred caption reads on any photo.
   closest-side keeps the gradient fading fully to transparent at the
   element's own edges — no hard rectangular cut-off */
.scene__img-meta {
  padding: 60px 110px;
  background: radial-gradient(ellipse closest-side at center,
    rgba(14,13,11,0.7) 0%,
    rgba(14,13,11,0.46) 45%,
    rgba(14,13,11,0.18) 72%,
    rgba(14,13,11,0) 100%);
  text-shadow:
    0 0 8px rgba(14,13,11,0.9),
    0 0 3px rgba(14,13,11,0.95),
    0 1px 2px rgba(14,13,11,0.9);
}

/* VIEWFINDER — camera-frame corner brackets */
.viewfinder { position: relative; }
.viewfinder::before,
.viewfinder::after,
.viewfinder > .vf-tr,
.viewfinder > .vf-bl {
  content: "";
  position: absolute;
  width: 22px; height: 22px;
  border: 1px solid rgba(241, 236, 221, 0.32);
  pointer-events: none;
  z-index: 6;
}
.viewfinder::before { top: 22px; left: 22px; border-right: 0; border-bottom: 0; }
.viewfinder::after  { bottom: 22px; right: 22px; border-left: 0; border-top: 0; }
.viewfinder > .vf-tr { top: 22px; right: 22px; border-left: 0; border-bottom: 0; }
.viewfinder > .vf-bl { bottom: 22px; left: 22px; border-right: 0; border-top: 0; }

/* Contact-sheet corner labels */
.scene__corner {
  position: absolute;
  z-index: 5;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}
.scene__corner--tl { top: 56px; left: 56px; }
.scene__corner--tr { top: 56px; right: 56px; text-align: right; }
.scene__corner--bl { bottom: 56px; left: 56px; }
.scene__corner--br { bottom: 56px; right: 56px; text-align: right; }

/* Scene title block */
.scene__title {
  position: absolute;
  z-index: 5;
  bottom: 96px;
  left: 56px;
  right: 56px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}
.scene__title .name {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 1;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
.scene__title .meta {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.scene__title .meta b { color: var(--ink); font-weight: 400; }

/* The single restrained hover affordance */
.scene__open {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--ink-veil);
  padding-bottom: 6px;
  color: var(--ink-dim);
  transition: color 0.25s, border-color 0.25s;
}
.scene__open .arr {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1);
}

/* Linked scenes react on hover */
.scene--linked { cursor: pointer; }
.scene--linked:hover .scene__img { transform: scale(1.05); }
.scene--linked:hover .scene__open {
  color: var(--ink);
  border-color: var(--ink);
}
.scene--linked:hover .scene__open .arr { transform: translateX(6px); }

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: 12px;
}
.scroll-cue .line {
  width: 32px; height: 1px;
  background: var(--ink-faint);
  position: relative;
  overflow: hidden;
}
.scroll-cue .line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

/* SPLIT SCENE — image one side, info the other */
.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  min-height: 100vh;
  position: relative;
}
.split--rev { grid-template-columns: 1fr 1.4fr; }
.split--rev > .split__img { order: 2; }
.split--rev > .split__panel { order: 1; }

.split__img {
  position: relative;
  background: var(--bg-2);
  overflow: hidden;
  min-height: 600px;
}
.split__img .scene__img {
  position: absolute; inset: 0;
}
.split__panel {
  position: relative;
  background: var(--bg);
  padding: clamp(48px, 6vw, 96px) clamp(40px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
}
@media (max-width: 900px) {
  .split, .split--rev { grid-template-columns: 1fr; }
  .split--rev > .split__img { order: 1; }
  .split--rev > .split__panel { order: 2; }
  .split__img { min-height: 70vh; }
  .scene__corner--tl, .scene__corner--bl { left: 24px; }
  .scene__corner--tr, .scene__corner--br { right: 24px; }
  .scene__corner--tl, .scene__corner--tr { top: 70px; }
  .scene__corner--bl, .scene__corner--br { bottom: 24px; }
  .scene__title { left: 24px; right: 24px; bottom: 64px; grid-template-columns: 1fr; gap: 18px; }
}

/* INTRO BAND — quiet text + strip-of-images */
.band {
  padding: clamp(72px, 12vw, 180px) clamp(28px, 6vw, 96px);
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(40px, 5vw, 96px);
  align-items: center;
  border-top: 1px solid var(--ink-veil);
}
.band__strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.band__strip > div {
  aspect-ratio: 3/4;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.band__strip > div::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 24px,
    rgba(241, 236, 221, 0.025) 24px 25px
  );
}
.band__strip > div .label {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.band__strip > div .id {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
@media (max-width: 800px) {
  .band { grid-template-columns: 1fr; }
}

/* ROW — full-width text moment */
.row {
  padding: clamp(72px, 10vw, 140px) clamp(28px, 6vw, 96px);
  border-top: 1px solid var(--ink-veil);
}
.row__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: baseline;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink-veil);
  margin-bottom: clamp(40px, 5vw, 72px);
}
.row__head .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.row__head .ttl {
  font-family: var(--font-sans);
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 400;
  letter-spacing: -0.008em;
  color: var(--ink);
}
.row__head .right {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.row__head .right a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--ink-veil);
  padding-bottom: 4px;
  transition: color 0.2s, border-color 0.2s;
}
.row__head .right a:hover { color: var(--ink); border-color: var(--ink); }
.row__head .right a .arr { transition: transform 0.2s; display: inline-block; }
.row__head .right a:hover .arr { transform: translateX(4px); }
@media (max-width: 700px) {
  .row__head { grid-template-columns: 1fr; }
}

.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
@media (max-width: 700px) { .trio { grid-template-columns: 1fr; gap: 32px; } }

/* FOOT */
.foot {
  padding: 80px 28px 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
  border-top: 1px solid var(--ink-veil);
}
.foot h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 400;
  margin: 0 0 18px;
}
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot ul a, .foot ul li { font-size: 14px; color: var(--ink-dim); transition: color 0.18s; line-height: 1.4; }
.foot ul a:hover { color: var(--ink); }
.foot__brand { display: flex; flex-direction: column; gap: 14px; }
.foot__brand .row-line { display: flex; align-items: center; gap: 12px; }
.foot__brand .mark {
  display: inline-flex; flex-direction: column; gap: 3px; width: 22px;
}
.foot__brand .mark span { display: block; height: 1.5px; background: var(--ink); }
.foot__brand .mark span:nth-child(1) { width: 100%; }
.foot__brand .mark span:nth-child(2) { width: 75%; }
.foot__brand .mark span:nth-child(3) { width: 50%; }
.foot__brand .name {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
}
.foot__bottom {
  grid-column: 1 / -1;
  border-top: 1px solid var(--ink-veil);
  padding-top: 24px;
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
@media (max-width: 800px) {
  .foot { grid-template-columns: 1fr 1fr; gap: 36px; }
}

/* ── 5. UTILITIES ──────────────────────────────────────────── */

/* i18n — both languages render; CSS shows the active one */
[data-i18n-bg], [data-i18n-en] { display: inline; }
html[lang="bg"] [data-i18n-en] { display: none; }
html[lang="en"] [data-i18n-bg] { display: none; }
[data-i18n-bg].block, [data-i18n-en].block { display: block; }
html[lang="bg"] [data-i18n-en].block { display: none; }
html[lang="en"] [data-i18n-bg].block { display: none; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transition: opacity 0.9s ease-out;
}
.reveal.is-in { opacity: 1; }

/* ── 6. PAGE COMPONENTS ────────────────────────────────────── */

/* Page head — shared by projects / services / team / about indexes */
.page-head {
  padding: 144px 28px 56px;
  border-bottom: 1px solid var(--ink-veil);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: end;
}
.page-head h1 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 1;
  letter-spacing: -0.024em;
  margin: 24px 0 0;
}
@media (max-width: 800px) { .page-head { grid-template-columns: 1fr; padding: 124px 24px 36px; } }

/* Filters — sticky brand chips (projects index) */
.filters {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 20px 28px;
  border-bottom: 1px solid var(--ink-veil);
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(14,13,11,0.85);
  backdrop-filter: blur(14px);
}
.filter-chip {
  appearance: none;
  background: transparent;
  border: 1px solid var(--ink-veil);
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--ink-dim);
  transition: all 0.18s;
}
.filter-chip:hover { color: var(--ink); border-color: var(--ink-dim); }
.filter-chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Work grid — asymmetric, image-led project cards */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 26vw;
  grid-auto-flow: dense;
  gap: 4px;
}
.work-grid.is-filtering > .work-card[data-hidden="true"] { display: none; }

.work-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  cursor: pointer;
}
.work-card .scene__img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.work-card:hover .scene__img { transform: scale(1.05); }
.work-card .scene__img::after {
  background:
    linear-gradient(to bottom, rgba(14,13,11,0.52) 0%, rgba(14,13,11,0) 26%),
    linear-gradient(to top, rgba(14,13,11,0.8) 0%, rgba(14,13,11,0) 54%);
}
.work-card .info {
  position: absolute;
  z-index: 3;
  inset: auto 24px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
}
.work-card .name {
  font-size: clamp(20px, 1.6vw, 26px);
  letter-spacing: -0.012em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
}
.work-card .tags {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 8px;
  display: flex;
  gap: 16px;
}
.work-card .code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.work-card .frame-top-right {
  position: absolute;
  top: 22px;
  right: 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  z-index: 3;
}
.work-card--wide { grid-column: span 8; grid-row: span 2; }
.work-card--half { grid-column: span 6; grid-row: span 1; }
.work-card--tall { grid-column: span 4; grid-row: span 2; }
.work-card--sq   { grid-column: span 4; grid-row: span 1; }
@media (max-width: 900px) {
  .work-grid { grid-auto-rows: auto; }
  .work-card--wide, .work-card--half,
  .work-card--tall, .work-card--sq {
    grid-column: span 12;
    grid-row: auto;
    aspect-ratio: 4/3;
  }
}

/* Specs band — project detail */
.specs-band {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--ink-veil);
  border-bottom: 1px solid var(--ink-veil);
}
.specs-band > div {
  padding: 28px 32px;
  border-right: 1px solid var(--ink-veil);
}
.specs-band > div:last-child { border-right: 0; }
.specs-band .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint); }
.specs-band .v { margin-top: 10px; font-size: clamp(20px, 1.8vw, 28px); letter-spacing: -0.012em; color: var(--ink); line-height: 1.05; }
@media (max-width: 800px) {
  .specs-band { grid-template-columns: 1fr 1fr; }
  .specs-band > div { border-right: 0; border-bottom: 1px solid var(--ink-veil); }
}

/* Chapter — full-bleed image + caption (project build log) */
.chap { position: relative; }
.chap__caption {
  position: absolute;
  bottom: 56px; left: 56px; right: 56px;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 48px;
  align-items: end;
  color: var(--ink);
}
.chap__caption .num {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
}
.chap__caption h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.chap__caption .body {
  font-size: 15px;
  color: var(--ink-dim);
  line-height: 1.55;
  max-width: 50ch;
}
.chap__caption .stamp {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
@media (max-width: 900px) {
  .chap__caption { grid-template-columns: 1fr; bottom: 40px; left: 24px; right: 24px; gap: 14px; }
  .chap__caption .num { font-size: 36px; }
}

/* Before/after — full-bleed compare slider */
.ba {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
}
.ba__before, .ba__after { position: absolute; inset: 0; }
.ba__after { clip-path: inset(0 0 0 50%); }
.ba__handle {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1.5px;
  background: var(--ink);
  transform: translateX(-50%);
  pointer-events: none;
  box-shadow: 0 0 32px rgba(241,236,221,0.18);
}
.ba__handle::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--bg);
}
.ba__handle::after {
  content: "↔";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  color: var(--bg);
  font-size: 18px;
  font-family: var(--font-mono);
}
.ba__label {
  position: absolute;
  top: 56px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 8px 14px;
  background: rgba(14,13,11,0.55);
  backdrop-filter: blur(6px);
  border: 1px solid var(--ink-veil);
}
.ba__label--before { left: 56px; }
.ba__label--after  { right: 56px; }

/* Parts list */
.parts {
  padding: clamp(72px, 10vw, 140px) clamp(28px, 6vw, 96px);
  border-top: 1px solid var(--ink-veil);
}
.parts__row {
  display: grid;
  grid-template-columns: 140px 1.6fr 1.4fr 70px 130px;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--ink-veil);
  align-items: baseline;
  font-size: 14.5px;
}
.parts__row.head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 14px;
}
.parts__pn { font-family: var(--font-mono); color: var(--ink-faint); font-size: 12px; letter-spacing: 0.06em; }
.parts__name { color: var(--ink); }
.parts__supplier { color: var(--ink-dim); font-size: 13.5px; }
.parts__qty { font-family: var(--font-mono); color: var(--ink-dim); font-size: 12px; }
.parts__status { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-dim); }
@media (max-width: 800px) {
  .parts__row { grid-template-columns: 1fr 1fr; gap: 8px 24px; }
}

/* Adjacent works */
.adj {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink-veil);
}
.adj > a {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  display: block;
}
.adj > a:first-child { border-right: 1px solid var(--ink-veil); }
.adj .scene__img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.adj > a:hover .scene__img { transform: scale(1.04); }
.adj__label {
  position: absolute;
  z-index: 3;
  inset: 0;
  padding: 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.adj__label .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-dim); }
.adj__label .ttl { font-size: clamp(20px, 1.8vw, 28px); letter-spacing: -0.014em; color: var(--ink); margin-top: 6px; line-height: 1.1; }
.adj > a:last-child .adj__label { flex-direction: row-reverse; text-align: right; }

/* Service row — image + text */
.svc-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  border-top: 1px solid var(--ink-veil);
  transition: background 0.25s;
}
.svc-row:hover { background: var(--bg-2); }
.svc-row__img {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg-2);
  overflow: hidden;
}
.svc-row__img .scene__img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.svc-row:hover .svc-row__img .scene__img { transform: scale(1.04); }
.svc-row__img .corner {
  position: absolute;
  top: 22px; left: 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  z-index: 3;
}
.svc-row__panel {
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.svc-row__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.svc-row__title {
  font-family: var(--font-sans);
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 400;
  letter-spacing: -0.014em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0;
}
.svc-row__desc {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.55;
  margin-top: 8px;
}
.svc-row__meta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  gap: 24px;
  padding-top: 20px;
}
@media (max-width: 900px) {
  .svc-row { grid-template-columns: 1fr; }
  .svc-row__panel { padding: 40px 28px; }
}

/* Team portraits */
.portraits {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}
/* uniform portrait tiles — every card the same size tiles with no gaps */
.portrait {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  grid-column: span 4;
  aspect-ratio: 3/4;
}
.portrait .scene__img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.portrait:hover .scene__img { transform: scale(1.04); }
.portrait .corner,
.portrait .corner-right {
  position: absolute;
  top: 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  z-index: 3;
}
.portrait .corner { left: 22px; }
.portrait .corner-right { right: 22px; }
.portrait .info {
  position: absolute;
  bottom: 22px; left: 22px; right: 22px;
  z-index: 3;
}
.portrait .name {
  font-family: var(--font-sans);
  font-size: clamp(20px, 1.8vw, 28px);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0;
}
.portrait .role {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
@media (max-width: 800px) {
  .portrait { grid-column: span 6; }
}

/* Chapter row — about page image + text */
.chap-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  border-top: 1px solid var(--ink-veil);
  min-height: 80vh;
}
.chap-row--rev { grid-template-columns: 1fr 1.4fr; }
.chap-row--rev .chap-row__img { order: 2; }
.chap-row__img {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  min-height: 70vh;
}
.chap-row__img .corner,
.chap-row__img .corner-right {
  position: absolute;
  top: 22px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  z-index: 3;
}
.chap-row__img .corner { left: 22px; }
.chap-row__img .corner-right { right: 22px; }
.chap-row__panel {
  padding: 80px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}
.chap-row__panel h2 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -0.018em;
  line-height: 1.05;
  margin: 0;
}
.chap-row__panel p {
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1.6;
  max-width: 50ch;
}
@media (max-width: 900px) {
  .chap-row, .chap-row--rev { grid-template-columns: 1fr; }
  .chap-row--rev .chap-row__img { order: 1; }
  .chap-row__img { min-height: 60vh; }
  .chap-row__panel { padding: 48px 28px; }
}

/* Stats strip — about page */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--ink-veil);
}
.stats-strip > div {
  padding: 36px 32px;
  border-right: 1px solid var(--ink-veil);
}
.stats-strip > div:last-child { border-right: 0; }
.stats-strip .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-faint); }
.stats-strip .v { font-family: var(--font-mono); font-size: clamp(36px, 4.4vw, 64px); margin-top: 12px; color: var(--ink); line-height: 1; font-weight: 300; letter-spacing: -0.032em; }
@media (max-width: 800px) {
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .stats-strip > div { border-right: 0; border-bottom: 1px solid var(--ink-veil); }
}

/* Visit grid — contact page */
.visit-hero { height: 80vh; min-height: 600px; }
.visit-hero .scene__title { bottom: 64px; }
.visit-hero h1 {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1;
  letter-spacing: -0.024em;
  margin: 0;
}
.visit-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border-top: 1px solid var(--ink-veil);
}
.visit-grid > div { padding: 64px 56px; }
.visit-grid > div + div { border-left: 1px solid var(--ink-veil); }
@media (max-width: 800px) {
  .visit-grid { grid-template-columns: 1fr; }
  .visit-grid > div + div { border-left: 0; border-top: 1px solid var(--ink-veil); }
  .visit-grid > div { padding: 40px 28px; }
}
.v-line {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--ink-veil);
  align-items: baseline;
}
.v-line:first-of-type { border-top: 1px solid var(--ink-veil); }
.v-line .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-faint); }
.v-line .v { font-family: var(--font-sans); font-size: clamp(18px, 1.5vw, 22px); letter-spacing: -0.008em; color: var(--ink); line-height: 1.2; }
.v-line .v.mono-v { font-family: var(--font-mono); font-size: 15px; letter-spacing: 0.04em; }
.v-line a:hover { color: var(--ink); }

/* Map block */
.map-block {
  margin-top: 36px;
  aspect-ratio: 16/9;
  background: var(--bg-2);
  border: 1px solid var(--ink-veil);
  position: relative;
  overflow: hidden;
}
.map-block svg { width: 100%; height: 100%; display: block; }
.map-block .pin {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -100%);
  pointer-events: none;
  text-align: center;
  z-index: 2;
}
.map-block .pin-dot {
  width: 14px; height: 14px;
  background: var(--ink);
  border: 2px solid var(--bg);
  border-radius: 50%;
  margin: 0 auto 10px;
  position: relative;
}
.map-block .pin-dot::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  opacity: 0.4;
  animation: ping 2.2s ease-out infinite;
}
@keyframes ping { from { transform: scale(0.6); opacity: 0.5; } to { transform: scale(2.4); opacity: 0; } }
.map-block .pin-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Form */
.field { display: grid; gap: 8px; }
.field + .field { margin-top: 18px; }
.field label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.field input, .field textarea {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink-veil);
  padding: 10px 0;
  font-family: var(--font-sans);
  font-size: 18px;
  color: var(--ink);
  transition: border-color 0.25s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:focus, .field textarea:focus { outline: 0; border-bottom-color: var(--ink); }
.radio-group { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.radio-group label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 7px 12px;
  border: 1px solid var(--ink-veil);
  cursor: pointer;
  transition: all 0.18s;
}
.radio-group input[type="radio"] { display: none; }
.radio-group input[type="radio"]:checked + label { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.radio-group label:hover { border-color: var(--ink-dim); color: var(--ink); }
