/* ==========================================================================
   Karlo Šibalić — portfolio
   1. Tokens          5. Hero            9. About
   2. Reset & base    6. Statement      10. Contact & footer
   3. Chrome          7. Work grid      11. Lightbox
   4. Preloader       8. Services       12. Motion & responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */

/* Self-hosted and subset to the glyphs this site uses — see
   tools/fetch-fonts.py. One file per face, no unicode-range split: the
   Croatian diacritics are in the same file as the ASCII, so a name like
   Šibalić never triggers a second request. */
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-400i.woff2') format('woff2');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var.woff2') format('woff2');
  font-weight: 300 700; font-style: normal; font-display: swap;
}

:root {
  /* Anodised aluminium and orange. A warm neutral grey rather than a cool
     one: it sits better next to the orange and next to the warm cast in
     most of the photographs. */
  --bg: #d8d7d3;
  --surface: #e3e2de;
  --surface-2: #edece9;
  --surface-3: #f5f4f2;
  --surface-4: #c2c1bc;

  --text: #17171a;
  --text-2: #55565a;
  --text-3: #86878b;

  --accent: #ed7341;
  --accent-dim: #c4522a;
  --accent-soft: rgba(237, 115, 65, 0.14);

  --line: rgba(23, 23, 26, 0.14);
  --line-strong: rgba(23, 23, 26, 0.32);

  /* Tint used for subtle hover washes on the light ground. */
  --wash: rgba(23, 23, 26, 0.04);

  --font-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Fluid type: min at 360px, max at 1600px. */
  --step--1: clamp(0.78rem, 0.75rem + 0.13vw, 0.85rem);
  --step-0: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  --step-1: clamp(1.1rem, 1rem + 0.45vw, 1.4rem);
  --step-2: clamp(1.4rem, 1.15rem + 1.1vw, 2.1rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.6rem);
  --step-4: clamp(2.6rem, 1.4rem + 5.2vw, 6rem);

  --gutter: clamp(1.25rem, 0.6rem + 2.8vw, 4.5rem);
  --section: clamp(5rem, 3rem + 9vw, 11rem);
  --grid-gap: clamp(0.5rem, 0.2rem + 1vw, 1.1rem);
  --radius: 3px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.6s;
}

/* Two surfaces stay dark, because a photograph shown against silver loses
   its blacks: the full-bleed hero and the viewer. Rather than hardcoding
   light colours all through those blocks, the palette is simply redefined
   for their subtrees and every child inherits the right values. */
.hero, .lightbox {
  --text: #f5f4f1;
  --text-2: #c9c7c2;
  --text-3: #97948f;
  --bg: #17171a;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.3);
  --surface-4: rgba(255, 255, 255, 0.24);
  --wash: rgba(255, 255, 255, 0.08);
  /* Redefining the token is not enough on its own: an element that never
     declared `color` inherits body's already-computed ink. Re-declaring it
     here makes the whole subtree resolve against the on-dark palette. */
  color: var(--text);
}

/* 2. Reset & base ---------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
/* Lenis drives scrolling when it loads; native smooth scroll would fight it. */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
}

/* `clip`, never `hidden`. `overflow-x: hidden` forces the other axis to
   `auto`, which turns the element into a scroll container — that is what
   let the page pan sideways, and it fights the smooth-scroll library too.
   `clip` cuts the overflow without creating anything scrollable. */
html, body {
  overflow-x: clip;
  overscroll-behavior-x: none;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute; 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; top: 0; left: 50%; transform: translate(-50%, -120%);
  z-index: 200; padding: 0.75rem 1.25rem;
  background: var(--text); color: var(--bg);
  font-size: var(--step--1); font-weight: 600;
  transition: transform 0.25s var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

.shell {
  width: 100%;
  max-width: 1560px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Small letterspaced label used above every section heading. */
.eyebrow {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow::before {
  content: ''; width: 1.75rem; height: 1px;
  background: var(--line-strong); flex: none;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-top: 1.25rem;
}
.section-title em { font-style: italic; color: var(--accent); }

/* 3. Chrome (nav) ---------------------------------------------------------- */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 90;
  display: flex; align-items: center;
  padding-block: clamp(1rem, 0.6rem + 1vw, 1.6rem);
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease),
    border-color 0.4s var(--ease), padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(216, 215, 211, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
  padding-block: 0.85rem;
}
/* At rest the bar floats over the dark hero, so it borrows the on-dark
   palette. Once it gains its silver background — or once the mobile panel
   opens over silver — it reverts to page ink. */
.nav:not(.is-stuck):not(.is-open) {
  --text: #f5f4f1;
  --text-2: #dbd9d4;
  --line-strong: rgba(255, 255, 255, 0.3);
  color: var(--text);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; width: 100%;
}
/* The hero photograph can be bright sky behind the bar; the shadow is
   dropped the moment the bar has a background of its own. */
.nav:not(.is-stuck):not(.is-open) .nav__logo,
.nav:not(.is-stuck):not(.is-open) .nav__link {
  text-shadow: 0 1px 14px rgba(8, 8, 10, 0.75);
}
.nav__logo {
  font-family: var(--font-display);
  font-size: var(--step-1);
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}
.nav__logo span { color: var(--accent); }

.nav__links { display: flex; align-items: center; gap: clamp(1.2rem, 2.5vw, 2.4rem); }
.nav__link {
  position: relative;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  padding-block: 0.25rem;
  transition: color 0.3s var(--ease);
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link:hover::after, .nav__link.is-active::after {
  transform: scaleX(1); transform-origin: left;
}


.nav__burger {
  display: none; position: relative;
  width: 2.75rem; height: 2.75rem; margin-right: -0.6rem;
  -webkit-tap-highlight-color: transparent;
}
.nav__burger span {
  position: absolute; left: 50%; width: 20px; height: 1.5px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.45s var(--ease), opacity 0.25s var(--ease);
}
.nav__burger span:nth-child(1) { transform: translate(-50%, -5px); }
.nav__burger span:nth-child(2) { transform: translate(-50%, 5px); }
.nav.is-open .nav__burger span:nth-child(1) { transform: translate(-50%, 0) rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { transform: translate(-50%, 0) rotate(-45deg); }

/* 4. Preloader ------------------------------------------------------------- */

.preloader {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: var(--bg);
}
.preloader__inner { text-align: center; }
.preloader__mark {
  font-family: var(--font-display);
  font-size: var(--step-2);
  letter-spacing: 0.02em;
  overflow: hidden;
}
.preloader__bar {
  position: relative; width: min(46vw, 260px); height: 1px;
  margin: 1.5rem auto 0; background: var(--surface-4);
}
.preloader__fill {
  position: absolute; inset: 0; transform: scaleX(0); transform-origin: left;
  background: var(--accent);
  transition: transform 0.35s var(--ease-io);
}
.preloader__count {
  margin-top: 0.9rem;
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  color: var(--text-3);
}
.preloader.is-done {
  transform: translateY(-100%);
  transition: transform 0.9s var(--ease);
}
html.no-js .preloader { display: none; }

/* 5. Hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-bottom: clamp(2.5rem, 1rem + 5vw, 5rem);
  overflow: hidden;
  overflow: clip;
}
.hero__stage { position: absolute; inset: 0; z-index: 0; }
.hero__frame {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.6s var(--ease-io);
  will-change: opacity;
}
.hero__frame.is-active { opacity: 1; }
.hero__frame img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 42%;
  transform: scale(1.06);
}
/* Layered scrim. The headline sits bottom-left over frames that range from
   near-black to bright haze, so a single bottom fade is not enough: the
   horizontal pass guarantees contrast under the text column whatever the
   photograph is doing, while the right side stays open. */
.hero__stage::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,10,12,0.8) 0%, rgba(10,10,12,0.45) 28%,
      rgba(10,10,12,0.08) 55%, transparent 72%),
    linear-gradient(180deg, rgba(10,10,12,0.7) 0%, transparent 22%,
      transparent 42%, rgba(10,10,12,0.55) 82%, rgba(10,10,12,0.92) 100%);
}

.hero__content { position: relative; z-index: 1; width: 100%; }
/* Hero copy sits on photographs that vary from near-black to bright haze,
   so it runs brighter than section eyebrows and carries a soft shadow. */
.hero__eyebrow { margin-bottom: clamp(1rem, 2vw, 1.75rem); color: var(--text-2); }
.hero__eyebrow, .hero__title, .hero__lede {
  text-shadow: 0 1px 24px rgba(8, 8, 10, 0.55);
}
.hero__title {
  font-family: var(--font-display);
  font-size: var(--step-4);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero__title em { font-style: italic; }
.hero__lede {
  max-width: 46ch;
  margin-top: clamp(1rem, 2vw, 1.6rem);
  font-size: var(--step-1);
  color: var(--text-2);
  text-wrap: pretty;
}
.hero__foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
  margin-top: clamp(2rem, 4vw, 3.5rem);
}
.hero__actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: transform 0.4s var(--ease), background 0.35s var(--ease),
    color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.btn svg { width: 1em; height: 1em; transition: transform 0.4s var(--ease); }
.btn--solid { background: var(--text); color: var(--bg); }
.btn--solid:hover { background: var(--accent); }
.btn--ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); background: var(--wash); }
.btn:hover svg { transform: translateX(3px); }

.hero__ticker {
  display: flex; align-items: center; gap: 0.9rem;
  font-size: var(--step--1); letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-3);
}
.hero__dots { display: flex; gap: 0.4rem; }
.hero__dot {
  width: 1.6rem; height: 2px; background: var(--surface-4);
  overflow: hidden; position: relative;
}
.hero__dot::after {
  content: ''; position: absolute; inset: 0;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
}
.hero__dot.is-active::after { animation: dotFill 6s linear forwards; }
@keyframes dotFill { to { transform: scaleX(1); } }

.hero__scroll {
  position: absolute; left: 50%; bottom: 1.4rem; z-index: 2;
  transform: translateX(-50%);
  display: grid; place-items: center; gap: 0.5rem;
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-3);
}
.hero__scroll i {
  display: block; width: 1px; height: 2.2rem;
  background: linear-gradient(var(--line-strong), transparent);
  animation: scrollHint 2.4s var(--ease-io) infinite;
}
@keyframes scrollHint {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* 6. Statement ------------------------------------------------------------- */

.statement { padding-block: var(--section); }
.statement__text {
  max-width: 22ch;
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.statement__grid {
  display: grid; gap: clamp(2rem, 5vw, 5rem);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: end;
}
.statement__body { color: var(--text-2); max-width: 52ch; }
.statement__body p + p { margin-top: 1.1rem; }

.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem; margin-top: 2.5rem;
  padding-top: 2rem; border-top: 1px solid var(--line);
}
.stats dt {
  font-family: var(--font-display);
  font-size: var(--step-2); line-height: 1; color: var(--text);
}
.stats dd {
  margin-top: 0.4rem;
  font-size: var(--step--1); letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--text-3);
}

/* 7. Work grid ------------------------------------------------------------- */

.work { padding-block: var(--section); }
.work__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter {
  position: relative;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--step--1); font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-2);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.filter:hover { color: var(--text); border-color: var(--line-strong); }
.filter[aria-pressed='true'] {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.filter__count {
  margin-left: 0.45rem; font-size: 0.7em; opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

/* Balanced masonry: JS distributes items into these columns shortest-first,
   so every frame keeps its true aspect ratio and nothing gets cropped. */
.grid { display: flex; gap: var(--grid-gap); align-items: flex-start; }
.grid__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--grid-gap); }

.tile {
  position: relative; display: block; width: 100%;
  /* The hover zoom overflows the frame; clip it without making the tile
     a scroll container. */
  overflow: hidden;
  overflow: clip;
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tile__media { position: relative; width: 100%; display: block; }
.tile__media img,
.tile__media video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease), opacity 0.6s var(--ease);
}
/* The LQIP is painted as a background so the real image can cross-fade
   over it without a second element in the DOM. */
.tile__media::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--lqip);
  background-size: cover; background-position: center;
  filter: blur(12px); transform: scale(1.1);
  transition: opacity 0.5s var(--ease);
}
.tile.is-loaded .tile__media::before { opacity: 0; }
.tile__media img { opacity: 0; }
.tile.is-loaded .tile__media img { opacity: 1; }

.tile__preview {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.tile.is-previewing .tile__preview { opacity: 1; }

.tile__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(8,8,10,0.82) 100%);
  opacity: 0; transition: opacity 0.5s var(--ease);
}
.tile__meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; padding: clamp(0.8rem, 2vw, 1.25rem);
  transform: translateY(0.5rem); opacity: 0;
  transition: transform 0.55s var(--ease), opacity 0.45s var(--ease);
}
.tile__name {
  font-family: var(--font-display);
  font-size: var(--step-1); line-height: 1.1;
}
.tile__cat {
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-top: 0.2rem;
}
/* On a still there is no title above it, so the category stands alone
   and carries a little more weight. */
.tile__cat:only-child {
  font-size: 0.78rem; letter-spacing: 0.18em; margin-top: 0;
}
.tile:hover .tile__veil, .tile:focus-visible .tile__veil { opacity: 1; }
.tile:hover .tile__meta, .tile:focus-visible .tile__meta { opacity: 1; transform: none; }
.tile:hover .tile__media img { transform: scale(1.045); }

.tile__badge {
  position: absolute; top: 0.85rem; right: 0.85rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.tile__badge svg { width: 0.7rem; height: 0.7rem; fill: currentColor; }

.work__empty {
  padding: 4rem 0; text-align: center; color: var(--text-3);
}

/* A rule across the full width so the ragged column bottoms above it read
   as a deliberate edge rather than an accident of the masonry. */
.work__more {
  display: flex; justify-content: center;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
  border-top: 1px solid var(--line);
}
.work__more:has(.btn[hidden]) { border-top: 0; padding-top: 0; }
.work__more .btn svg { width: 0.95em; height: 0.95em; }
.work__more .btn:hover svg { transform: translateY(2px) translateX(0); }

/* Static fallback for visitors without JavaScript — plain columns, real
   aspect ratios, no interaction. Generated by tools/build-manifest.py. */
.nojs-grid { columns: 2; column-gap: var(--grid-gap); }
@media (max-width: 700px) { .nojs-grid { columns: 1; } }
.nojs-item { break-inside: avoid; margin-bottom: var(--grid-gap); }
.nojs-item img { width: 100%; height: auto; border-radius: var(--radius); }
.nojs-item figcaption {
  margin-top: 0.5rem;
  font-size: var(--step--1); color: var(--text-3);
}

/* 8. Services -------------------------------------------------------------- */

.services { padding-block: var(--section); border-top: 1px solid var(--line); }
.services__list { margin-top: clamp(2rem, 4vw, 3.5rem); }
.service {
  display: grid; gap: 0.5rem 2rem;
  grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: baseline;
  padding-block: clamp(1.4rem, 2.5vw, 2.2rem);
  border-top: 1px solid var(--line);
  transition: background 0.4s var(--ease), padding-inline 0.4s var(--ease);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service:hover { background: var(--wash); }
.service__no {
  font-size: var(--step--1); letter-spacing: 0.1em;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.service__name {
  font-family: var(--font-display);
  font-size: var(--step-2); line-height: 1.1;
}
.service__desc { color: var(--text-2); font-size: var(--step-0); }


/* 9. About ----------------------------------------------------------------- */

.about { padding-block: var(--section); }
.about__grid {
  display: grid; gap: clamp(2.5rem, 6vw, 6rem);
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}
.about__body { color: var(--text-2); font-size: var(--step-1); max-width: 58ch; }
.about__body p + p { margin-top: 1.2rem; }
.about__body strong { color: var(--text); font-weight: 500; }

.pullquote {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-left: clamp(1rem, 2vw, 1.75rem);
  border-left: 1px solid var(--accent);
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-style: italic;
  line-height: 1.25;
  color: var(--text);
}

.kit { margin-top: clamp(2rem, 4vw, 3rem); }
.kit__title {
  font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 1rem;
}
.kit__list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.kit__list li {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: var(--step--1); color: var(--text-2);
}

/* 10. Contact & footer ----------------------------------------------------- */

.contact {
  padding-block: var(--section);
  border-top: 1px solid var(--line);
  text-align: center;
}
.contact__title {
  font-family: var(--font-display);
  font-size: var(--step-4); line-height: 0.98; letter-spacing: -0.02em;
  margin-top: 1.5rem;
}
.contact__title em { font-style: italic; color: var(--accent); }
.contact__lede {
  max-width: 44ch; margin: 1.5rem auto 0;
  color: var(--text-2); font-size: var(--step-1);
}
.contact .eyebrow { justify-content: center; }
.contact .eyebrow::after {
  content: ''; width: 1.75rem; height: 1px; background: var(--line-strong);
}
.contact__lines {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
.contact__line {
  display: grid; gap: 0.4rem; justify-items: center;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.35s var(--ease);
}
.contact__label {
  font-size: var(--step--1); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-3);
  transition: color 0.35s var(--ease);
}
.contact__value {
  font-family: var(--font-display); font-size: var(--step-2); line-height: 1.1;
  transition: color 0.35s var(--ease);
}
.contact__line:hover { border-color: var(--accent); }
.contact__line:hover .contact__value,
.contact__line:hover .contact__label { color: var(--accent); }

.footer {
  padding-block: clamp(2.5rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.footer__copy { font-size: var(--step--1); color: var(--text-3); }
.socials { display: flex; gap: 0.6rem; }
.socials a {
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  border: 1px solid var(--line); border-radius: 50%;
  color: var(--text-2);
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease),
    transform 0.35s var(--ease);
}
.socials a:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-2px); }
.socials svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }

/* 11. Lightbox ------------------------------------------------------------- */

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; grid-template-rows: auto 1fr auto;
  background: rgba(8, 8, 10, 0.94);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox[hidden] { display: none !important; }

.lightbox__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: clamp(1rem, 2vw, 1.6rem) var(--gutter);
}
.lightbox__count {
  font-size: var(--step--1); letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums; color: var(--text-3);
}
.lightbox__close {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--line); border-radius: 50%;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    transform 0.4s var(--ease);
}
.lightbox__close:hover { background: var(--wash); border-color: var(--line-strong); transform: rotate(90deg); }
.lightbox__close svg { width: 1rem; height: 1rem; stroke: currentColor; stroke-width: 1.5; fill: none; }

.lightbox__stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding-inline: var(--gutter);
  min-height: 0; overflow: hidden; overflow: clip;
}
.lightbox__media {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; max-width: 1400px;
}
/* `display: contents` drops <picture> out of the box tree, so the image is a
   direct child of a definite-height flex parent. Without it the percentage
   max-height resolves against an auto-height wrapper and the frame overflows
   the stage, covering the caption. */
.lightbox__media picture { display: contents; }
.lightbox__media img,
.lightbox__media video {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 2px;
  opacity: 0; transition: opacity 0.45s var(--ease);
}
.lightbox__media.is-ready img,
.lightbox__media.is-ready video { opacity: 1; }

.lightbox__spinner {
  position: absolute; width: 2rem; height: 2rem;
  border: 1.5px solid var(--surface-4); border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  opacity: 1; transition: opacity 0.3s var(--ease);
}
.lightbox__media.is-ready .lightbox__spinner { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center;
  width: clamp(2.75rem, 5vw, 3.5rem); height: clamp(2.75rem, 5vw, 3.5rem);
  border: 1px solid var(--line); border-radius: 50%;
  background: rgba(10, 10, 12, 0.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.lightbox__nav:hover { background: var(--wash); border-color: var(--line-strong); }
.lightbox__nav svg { width: 1.1rem; height: 1.1rem; stroke: currentColor; stroke-width: 1.5; fill: none; }
.lightbox__nav--prev { left: max(0.75rem, calc(var(--gutter) - 3.75rem)); }
.lightbox__nav--next { right: max(0.75rem, calc(var(--gutter) - 3.75rem)); }

.lightbox__foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  padding: clamp(1rem, 2vw, 1.6rem) var(--gutter) clamp(1.25rem, 3vw, 2rem);
}
/* Capitalize so a bare category reads as a heading. It leaves existing
   capitals alone, so a film name like "BMW X5" is unaffected. */
.lightbox__title {
  font-family: var(--font-display); font-size: var(--step-2); line-height: 1.1;
  text-transform: capitalize;
}
.lightbox__cat {
  font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-top: 0.25rem;
}
.lightbox__alt { max-width: 46ch; font-size: var(--step--1); color: var(--text-3); }

/* 12. Motion & responsive -------------------------------------------------- */

/* Reveals stay opt-in: without JS the `.js` class never lands and every
   section renders at full opacity. */
html.js [data-reveal] { opacity: 0; transform: translateY(28px); }
html.js [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

@media (max-width: 900px) {
  .statement__grid, .about__grid { grid-template-columns: minmax(0, 1fr); }
  .service { grid-template-columns: 3rem minmax(0, 1fr); }
  .service__desc { grid-column: 2; }
}

@media (max-width: 720px) {
  .nav__burger { display: block; position: relative; z-index: 2; }
  .nav__logo { position: relative; z-index: 2; }
  .nav__links {
    /* Sits above the page but below the logo and burger. A negative
       z-index here would drop it behind the page content entirely. */
    position: fixed; inset: 0 0 auto; z-index: 1;
    flex-direction: column; align-items: flex-start;
    gap: 0.5rem;
    padding: 6rem var(--gutter) 2.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform: translateY(-100%);
    transition: transform 0.6s var(--ease);
    visibility: hidden;
  }
  .nav.is-open .nav__links { transform: translateY(0); visibility: visible; }
  .nav__link { font-family: var(--font-display); font-size: var(--step-2);
    text-transform: none; letter-spacing: 0; padding-block: 0.5rem; }
  .nav__link::after { display: none; }
  /* The headline spans the full width here, so the horizontal scrim that
     protects it on desktop no longer covers it. Lean on the vertical one. */
  .hero__stage::after {
    background:
      linear-gradient(180deg, rgba(10,10,12,0.72) 0%, rgba(10,10,12,0.15) 22%,
        rgba(10,10,12,0.62) 58%, rgba(10,10,12,0.95) 100%);
  }
  .hero__foot { flex-direction: column; align-items: flex-start; }
  .hero__scroll { display: none; }
  .stats { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .lightbox__nav--prev { left: 0.6rem; }
  .lightbox__nav--next { right: 0.6rem; }
  .lightbox__alt { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
  .hero__frame img { transform: none; }
  .marquee__track { animation: none; }
}
