/* =========================================================
   Intempo Studios: styles
   ========================================================= */

:root {
  /* Surfaces */
  --bg: #0a0a0b;
  --panel: rgba(18, 18, 20, 0.55);
  --line: rgba(236, 235, 232, 0.12);
  --line-strong: rgba(236, 235, 232, 0.26);

  /* Text */
  --ink: #ecebe8;
  --muted: #9b9ca3;
  --dim: #64656c;

  /* Accents: silver and gold (gold sampled from the logo: #BF9227) */
  --silver: #c9cbd2;
  --silver-hi: #f1f1f3;
  --champagne: #d8c089;
  --gold: #bf9227;
  --gold-deep: #6e5418;
  --iri: linear-gradient(100deg, #f4f4f6 0%, #c3c6d0 32%, #e6d3a3 62%, #bf9227 100%);

  /* Type */
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  /* Layout */
  --wrap: 1360px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --nav-h: 76px;

  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  /* fallback if WebGL is unavailable */
  background:
    radial-gradient(60% 50% at 70% 20%, rgba(191, 146, 39, 0.06), transparent 70%),
    radial-gradient(50% 40% at 20% 70%, rgba(201, 203, 210, 0.06), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; border-radius: 0; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.045em; line-height: 0.95; }
[hidden] { display: none !important; }
:focus-visible { outline: 1px solid var(--silver-hi); outline-offset: 4px; }
::selection { background: var(--champagne); color: #0a0a0b; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

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

/* Italic serif accent with a silver-to-gold sheen */
em, .iri { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.iri {
  background: var(--iri);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* room for the italic's slanted overhang so the gradient covers every edge;
     negative margins keep word spacing unchanged */
  padding-inline: 0.1em; margin-inline: -0.1em;
  animation: sheen 9s ease-in-out infinite alternate;
}
@keyframes sheen { to { background-position: 100% 0; } }

/* Small numbered labels, e.g. "(01) - Services" */
.label {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

/* ---------- Hero background canvas (fades into the page at the bottom) ---------- */
#bg-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 75%, transparent);
  mask-image: linear-gradient(180deg, #000 75%, transparent);
}

/* ---------- Buttons: sharp, with a square arrow box ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.9rem;
  padding: 0.35rem 0.35rem 0.35rem 1rem;
  font-size: 0.9rem; font-weight: 500; letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
  white-space: nowrap;
}
.btn__box {
  width: 30px; height: 30px; display: grid; place-items: center; flex-shrink: 0;
  overflow: hidden; position: relative;
  transition: background-color 0.4s var(--ease);
}
.btn__box svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform 0.5s var(--ease); }
.btn:hover .btn__box svg { transform: translate(2px, -2px); }

.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid .btn__box { background: var(--bg); color: var(--ink); }
.btn--solid:hover { background: var(--silver-hi); }
.btn--solid:hover .btn__box { background: var(--gold-deep); }

.btn--line { border-color: var(--line-strong); color: var(--ink); background: rgba(10, 10, 11, 0.3); }
.btn--line:not(:has(.btn__box)) { padding: 0.75rem 1.25rem; }
.btn--line .btn__box { background: rgba(236, 235, 232, 0.08); }
.btn--line:hover { border-color: var(--silver); }
.btn--line:hover .btn__box { background: var(--ink); color: var(--bg); }

.btn--lg { font-size: 1rem; padding: 0.45rem 0.45rem 0.45rem 1.4rem; }
.btn--lg .btn__box { width: 40px; height: 40px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  transition: background-color 0.5s, border-color 0.5s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 10, 11, 0.6);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  border-bottom-color: var(--line);
}
/* backdrop-filter would trap the fixed mobile menu inside the bar, so drop it while open */
body.menu-open .nav { backdrop-filter: none; -webkit-backdrop-filter: none; }

.nav__inner { height: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem; }
.nav__brand { display: flex; align-items: center; gap: 0.7rem; justify-self: start; }
.nav__icon { width: 34px; height: auto; }
.nav__wordmark { width: 108px; height: auto; }

.nav__menu { display: flex; align-items: center; gap: 2.75rem; }
.nav__links { display: flex; gap: 2rem; }
.nav__links a {
  display: inline-flex; align-items: baseline; gap: 0.35rem;
  font-size: 0.95rem; font-weight: 500; letter-spacing: -0.01em; color: var(--muted);
  transition: color 0.3s;
}
.nav__num { font-size: 0.62rem; color: var(--dim); letter-spacing: 0.05em; transition: color 0.3s; }
.nav__links a:hover, .nav__links a.is-current { color: var(--ink); }
.nav__links a.is-current .nav__num { color: var(--champagne); }

.nav__toggle { display: none; width: 44px; height: 44px; position: relative; z-index: 2; border: 1px solid var(--line-strong); }
.nav__toggle span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink);
  transition: transform 0.5s var(--ease), top 0.5s var(--ease);
}
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__menu {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 2.5rem;
    padding: calc(var(--nav-h) + 2rem) var(--gutter) 2.5rem;
    background: rgba(10, 10, 11, 0.97);
    opacity: 0; visibility: hidden;
    transition: opacity 0.5s var(--ease), visibility 0.5s;
  }
  .nav__menu.is-open { opacity: 1; visibility: visible; }
  .nav__links { flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
  .nav__links li { border-bottom: 1px solid var(--line); overflow: hidden; }
  .nav__links a {
    display: flex; justify-content: space-between; align-items: center; flex-direction: row-reverse;
    padding: 1rem 0; font-size: clamp(2.25rem, 10vw, 3.25rem); font-weight: 600; letter-spacing: -0.045em; color: var(--ink);
    transform: translateY(105%); transition: transform 0.7s var(--ease);
  }
  .nav__num { font-size: 0.8rem; }
  .nav__menu.is-open .nav__links a { transform: none; }
  .nav__menu.is-open li:nth-child(2) a { transition-delay: 0.05s; }
  .nav__menu.is-open li:nth-child(3) a { transition-delay: 0.1s; }
  .nav__menu.is-open li:nth-child(4) a { transition-delay: 0.15s; }
  .nav__cta { justify-content: space-between; font-size: 1rem; padding: 0.5rem 0.5rem 0.5rem 1.25rem; }
  .nav__cta .btn__box { width: 40px; height: 40px; }
}
@media (max-width: 480px) { .nav__wordmark { display: none; } }
body.menu-open { overflow: hidden; }

/* ---------- Line-by-line heading reveal ---------- */
/* extra room above/below the mask so tall letters and italic tails (p, y, g) aren't clipped;
   the negative margins cancel it out so line spacing is unchanged */
[data-split] .line { display: block; overflow: hidden; padding-block: 0.12em 0.25em; margin-block: -0.12em -0.25em; }
[data-split] .line > span { display: inline-block; transform: translateY(105%); transition: transform 1.2s var(--ease); }
[data-split] .line:nth-child(2) > span { transition-delay: 0.08s; }
[data-split] .line:nth-child(3) > span { transition-delay: 0.16s; }
[data-split].is-visible .line > span, .no-js [data-split] .line > span { transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 8vh, 6rem));
  overflow: hidden;
}
.hero__top { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.5rem; align-items: end; position: relative; z-index: 2; }
.hero__head { grid-column: 1 / 10; }
.hero__title { font-size: clamp(3.4rem, 10.5vw, 9.5rem); }
.hero__title em { font-size: 1.05em; line-height: 0.8; }
/* "properly": static, mostly gold with a silver lead-in */
.hero__title .iri {
  background: linear-gradient(100deg, #eceef2 0%, #e6d3a3 22%, #d4af37 50%, #bf9227 80%, #a67c2e 100%);
  -webkit-background-clip: text; background-clip: text;
  animation: none;
}
.hero__aside { grid-column: 10 / 13; padding-bottom: 0.9rem; font-size: 1.05rem; color: var(--silver); max-width: 26rem; }
.hero__aside-dim { color: var(--dim); margin-top: 0.9rem; font-size: 0.95rem; }

/* Giant wordmark, bleeding off the bottom behind the doors */
.hero__wordmark {
  position: absolute; left: 50%; bottom: clamp(3rem, 7vw, 6rem);
  width: min(96vw, 1600px); height: auto;
  transform: translateX(-50%);
  opacity: 0.11;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
  mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
  z-index: 1;
}

.hero__doors {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1fr;
  margin-top: clamp(4rem, 18vh, 14rem);
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}
.door {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border: 1px solid var(--line-strong);
  background: rgba(14, 14, 16, 0.35);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.5s var(--ease);
}
.door + .door { border-left: 0; }
.door::before {
  /* gold/silver wash that sweeps up on hover */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(191, 146, 39, 0.0), rgba(191, 146, 39, 0.18) 60%, rgba(201, 203, 210, 0.16));
  transform: translateY(101%); transition: transform 0.8s var(--ease);
}
.door:hover::before, .door:focus-visible::before { transform: none; }
.door:hover { border-color: var(--silver); }
.door__num {
  font-family: var(--serif); font-style: italic; font-size: 2.5rem; line-height: 1; color: var(--champagne);
  width: 2.5rem;
}
.door__title { display: block; font-size: clamp(1.4rem, 2.6vw, 2.25rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
.door__sub { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 0.35rem; }
.door__arrow {
  width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-strong);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s;
}
.door__arrow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform 0.6s var(--ease); }
.door:hover .door__arrow { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.door:hover .door__arrow svg { transform: translateY(3px); }

@media (max-width: 900px) {
  .hero__head, .hero__aside { grid-column: 1 / -1; }
  .hero__aside { padding-bottom: 0; }
  .hero__doors { grid-template-columns: 1fr; }
  .door + .door { border-left: 1px solid var(--line-strong); border-top: 0; }
  .hero__wordmark { bottom: 11rem; width: 130vw; opacity: 0.09; }
}
@media (max-width: 480px) {
  .door { gap: 1rem; }
  .door__num { font-size: 2rem; width: 1.75rem; }
}

/* ---------- Sections / shared ---------- */
.section { padding-block: clamp(6rem, 13vw, 11rem); }
.h2 { font-size: clamp(2.6rem, 6.4vw, 5.5rem); margin-bottom: 1.75rem; }
.h2--xl { font-size: clamp(2.8rem, 7.4vw, 6.75rem); }
.lead { font-size: 1.05rem; color: var(--muted); max-width: 30rem; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.services__sticky { position: sticky; top: calc(var(--nav-h) + 2.5rem); }

.switch { margin-top: 3rem; border-top: 1px solid var(--line); }
.switch__btn {
  position: relative; display: flex; align-items: center; gap: 1.1rem; width: 100%;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line);
  font-size: clamp(1.75rem, 3.2vw, 2.75rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1;
  color: var(--dim); text-align: left;
  transition: color 0.5s var(--ease), padding-left 0.6s var(--ease);
}
.switch__btn::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%;
  background: linear-gradient(90deg, var(--silver-hi), var(--champagne));
  transform: scaleX(0); transform-origin: left; transition: transform 0.8s var(--ease);
}
.switch__key {
  font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 0.7em; letter-spacing: 0;
  width: 1.1em; color: inherit; transition: color 0.5s;
}
.switch__btn:hover { color: var(--muted); }
.switch__btn.is-active { color: var(--ink); padding-left: 0.4rem; }
.switch__btn.is-active::after { transform: scaleX(1); }
.switch__btn.is-active .switch__key { color: var(--champagne); }

.services__list { border-top: 1px solid var(--line); }
.panel.is-active .row { animation: rowIn 0.9s var(--ease) both; }
.panel.is-active .row:nth-child(2) { animation-delay: 0.06s; }
.panel.is-active .row:nth-child(3) { animation-delay: 0.12s; }
.panel.is-active .row:nth-child(4) { animation-delay: 0.18s; }
@keyframes rowIn { from { opacity: 0; transform: translateY(24px); } }

.row {
  position: relative;
  display: grid; grid-template-columns: 4.5rem 1fr; grid-template-rows: auto; gap: 0 1.5rem;
  padding: clamp(1.75rem, 3vw, 2.5rem) 0;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}
.row::before {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -0.5); z-index: -1;
  background: linear-gradient(90deg, rgba(191, 146, 39, 0.09), rgba(201, 203, 210, 0.04) 70%, transparent);
  opacity: 0; transition: opacity 0.6s var(--ease);
}
.row:hover::before { opacity: 1; }
.row__num { grid-column: 1; grid-row: 1; font-size: 0.75rem; letter-spacing: 0.1em; color: var(--dim); padding-top: 0.6rem; transition: color 0.4s; }
.row:hover .row__num { color: var(--champagne); }
.row__icon {
  grid-column: 1; grid-row: 1; align-self: end;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--silver);
  transition: border-color 0.4s, color 0.4s, transform 0.6s var(--ease);
}
.row__icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.row:hover .row__icon { border-color: var(--champagne); color: var(--silver-hi); transform: rotate(-8deg); }
.row__body { grid-column: 2; }
.row__title { font-size: clamp(1.9rem, 3.6vw, 3.25rem); letter-spacing: -0.045em; transition: transform 0.6s var(--ease); }
.row:hover .row__title { transform: translateX(0.5rem); }
.row__desc { color: var(--muted); margin-top: 0.8rem; font-size: 1.02rem; max-width: 34rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.4rem; }
.tags li {
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.01em;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line-strong);
  color: var(--silver);
  background: rgba(10, 10, 11, 0.35);
  transition: border-color 0.4s, color 0.4s;
}
.row:hover .tags li { border-color: rgba(216, 192, 137, 0.45); color: var(--ink); }

@media (max-width: 900px) {
  .services { grid-template-columns: 1fr; }
  .services__sticky { position: static; }
  .switch { margin-top: 2rem; display: grid; grid-template-columns: 1fr 1fr; border-top: 0; border: 1px solid var(--line); }
  .switch__btn { font-size: clamp(1.25rem, 5.5vw, 1.75rem); padding: 1rem; border-bottom: 0; justify-content: center; }
  .switch__btn + .switch__btn { border-left: 1px solid var(--line); }
  .switch__btn.is-active { padding-left: 1rem; background: rgba(236, 235, 232, 0.05); }
  .switch__key { display: none; }
}
@media (max-width: 520px) {
  .row { grid-template-columns: 1fr; }
  .row__num { grid-row: 1; padding-top: 0; }
  .row__icon { grid-row: 1; justify-self: end; align-self: start; }
  .row__body { grid-column: 1; margin-top: 1rem; }
}

/* ---------- Work ---------- */
.work__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.work__head .h2 { margin-bottom: 0; }
.filters { display: flex; align-items: center; gap: 0.75rem; color: var(--dim); font-size: 1.1rem; }
.filters__btn { font-weight: 500; letter-spacing: -0.02em; color: var(--dim); transition: color 0.3s; position: relative; }
.filters__btn:hover { color: var(--muted); }
.filters__btn.is-active { color: var(--ink); }
.filters__btn.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--champagne); }

/* Staggered editorial grid on 12 columns */
.work { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(1rem, 2.5vw, 2rem); row-gap: clamp(3rem, 6vw, 5rem); align-items: start; }
.w1 { grid-column: 1 / 8; }
.w2 { grid-column: 9 / 13; margin-top: 8rem; }
.w3 { grid-column: 2 / 6; }
.w4 { grid-column: 7 / 13; margin-top: 5rem; }
.w5 { grid-column: 1 / 5; margin-top: 3rem; }
.w6 { grid-column: 6 / 13; }
.w7 { grid-column: 3 / 8; }
.w8 { grid-column: 9 / 13; margin-top: 6rem; }

.w1 .work__media { aspect-ratio: 16 / 10; }
.w2 .work__media { aspect-ratio: 4 / 5; }
.w3 .work__media { aspect-ratio: 3 / 4; }
.w4 .work__media { aspect-ratio: 16 / 11; }
.w5 .work__media { aspect-ratio: 1 / 1; }
.w6 .work__media { aspect-ratio: 16 / 9; }
.w7 .work__media { aspect-ratio: 5 / 4; }
.w8 .work__media { aspect-ratio: 4 / 5; }

.work__item { transition: opacity 0.6s var(--ease), filter 0.6s var(--ease); }
.work .work__item.is-dimmed { opacity: 0.18; filter: grayscale(1); pointer-events: none; }
.work__media { position: relative; display: block; width: 100%; overflow: hidden; background: #141416; }
.work__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 1.2s var(--ease), filter 0.8s; filter: brightness(0.85); }
.work__media:hover img, .work__media:focus-visible img { transform: scale(1.07); filter: brightness(1); }
.work__view {
  position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(236, 235, 232, 0.92); color: var(--bg); font-size: 0.85rem; font-weight: 600;
  transform: scale(0.4); opacity: 0; transition: transform 0.6s var(--ease), opacity 0.4s;
}
.work__media:hover .work__view, .work__media:focus-visible .work__view { transform: none; opacity: 1; }
.work__item figcaption {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 1rem;
  padding-top: 0.9rem; margin-top: 0.9rem; border-top: 1px solid var(--line);
}
.work__n { font-size: 0.7rem; color: var(--dim); letter-spacing: 0.08em; }
.work__t { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.03em; }
.work__c { font-size: 0.78rem; color: var(--muted); text-align: right; }

@media (max-width: 900px) {
  .work { grid-template-columns: repeat(6, 1fr); row-gap: 2.75rem; }
  .w1, .w4, .w6 { grid-column: 1 / -1; margin-top: 0; }
  .w2, .w5, .w8 { grid-column: 1 / 4; margin-top: 0; }
  .w3, .w7 { grid-column: 4 / 7; margin-top: 3rem; }
}
@media (max-width: 560px) {
  .work { grid-template-columns: 1fr; }
  .work__item { grid-column: 1 / -1 !important; margin-top: 0 !important; }
  .work__item:nth-child(even) { margin-left: 14%; }
  .work__c { display: none; }
  .work__view { display: none; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: grid; grid-template-rows: auto 1fr auto; gap: 1rem;
  padding: 1.25rem var(--gutter);
  background: rgba(8, 8, 9, 0.96);
  animation: fadeIn 0.4s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } }
.lightbox__bar, .lightbox__arrows { display: flex; justify-content: space-between; align-items: center; }
.lightbox__count { font-size: 0.8rem; letter-spacing: 0.12em; color: var(--muted); }
.lightbox__figure { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; min-height: 0; }
.lightbox__figure img { max-height: 100%; max-width: 100%; min-height: 0; object-fit: contain; animation: zoomIn 0.6s var(--ease); }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.97); } }
.lightbox__figure figcaption { font-size: 0.95rem; color: var(--silver); flex-shrink: 0; }
.lightbox__btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.7rem 1rem; border: 1px solid var(--line-strong); font-size: 0.85rem; font-weight: 500;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}
.lightbox__btn:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.lightbox__btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ---------- Clients / Testimonials ---------- */
.quotes { max-width: 1120px; }
.quotes__stage { display: grid; min-height: clamp(18rem, 32vw, 24rem); }
.quote { grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem; }
.quote.is-active { animation: quoteIn 1s var(--ease); }
@keyframes quoteIn { from { opacity: 0; transform: translateY(20px); filter: blur(6px); } }
.quote p {
  font-size: clamp(1.75rem, 4.2vw, 3.6rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1.08;
  text-indent: -0.4em;
}
.quote em { font-size: 1.05em; }
@media (max-width: 600px) { .quote p { text-indent: 0; } }
.quote footer { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; align-items: baseline; }
.quote footer strong { font-weight: 600; font-size: 1.05rem; }
.quote footer span { color: var(--muted); font-size: 0.9rem; }

.quotes__nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 3.5rem; }
.qtab { text-align: left; font-size: 0.85rem; color: var(--dim); transition: color 0.4s; }
.qtab:hover { color: var(--muted); }
.qtab.is-active { color: var(--ink); }
.qtab__n { color: var(--champagne); margin-right: 0.35rem; opacity: 0.5; transition: opacity 0.4s; }
.qtab.is-active .qtab__n { opacity: 1; }
.qtab__bar { display: block; height: 1px; background: var(--line-strong); margin-bottom: 0.9rem; position: relative; overflow: hidden; }
.qtab__bar span { position: absolute; inset: 0; background: var(--silver-hi); transform: scaleX(0); transform-origin: left; }
.qtab.is-done .qtab__bar span { transform: scaleX(1); }
.qtab.is-active .qtab__bar span { animation: progress var(--quote-time, 7s) linear forwards; }
.quotes.is-paused .qtab.is-active .qtab__bar span { animation-play-state: paused; }
.quotes.is-static .qtab.is-active .qtab__bar span { animation: none; transform: scaleX(1); }
@keyframes progress { to { transform: scaleX(1); } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 6fr 5fr; gap: clamp(3rem, 7vw, 7rem); align-items: end; }
.contact__email {
  display: inline-flex; flex-direction: column; gap: 0.3rem; margin-top: 2.75rem;
  font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 500; letter-spacing: -0.03em;
  padding-bottom: 0.4rem; border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.4s, color 0.4s;
  word-break: break-all;
}
.contact__email-label { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.contact__email:hover { border-color: var(--champagne); color: var(--silver-hi); }

.form { position: relative; display: flex; flex-direction: column; gap: 0.25rem; }
.field { position: relative; display: grid; grid-template-columns: 7.5rem 1fr; align-items: baseline; border-bottom: 1px solid var(--line-strong); transition: border-color 0.4s; }
.field::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, var(--silver-hi), var(--champagne));
  transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease);
}
.field:focus-within::after { transform: scaleX(1); }
.field label { font-size: 0.8rem; font-weight: 500; color: var(--muted); padding-top: 1.35rem; }
.field label span { color: var(--dim); font-size: 0.68rem; margin-right: 0.6rem; letter-spacing: 0.06em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 1.2rem 0 1.1rem;
  background: transparent; border: 0; border-radius: 0;
  font-size: 1.1rem; letter-spacing: -0.02em;
  appearance: none; -webkit-appearance: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; }
.field textarea { resize: vertical; min-height: 7rem; line-height: 1.45; }
.field.is-invalid { border-bottom-color: #d0776b; }
.field.is-invalid label { color: #e0948a; }
.select { position: relative; }
.select::after {
  content: ""; position: absolute; right: 0.25rem; top: 50%; width: 7px; height: 7px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.select select { cursor: pointer; padding-right: 2rem; }
.select select:invalid { color: var(--dim); }
.select option { background: #141416; color: var(--ink); }
.form__honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap-reverse; }
.form__status { font-size: 0.88rem; color: var(--muted); flex: 1 1 12rem; }
.form__status.is-error { color: #e0948a; }
.form .btn[disabled] { opacity: 0.6; pointer-events: none; }

.form__success {
  position: absolute; inset: -1rem; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 2rem;
  background: rgba(10, 10, 11, 0.94);
  border: 1px solid var(--line);
  animation: fadeIn 0.6s var(--ease);
}
.form__success .label { margin-bottom: 1rem; color: var(--champagne); }
.form__success h3 { font-size: clamp(2.5rem, 5vw, 4rem); }
.form__success-text { color: var(--muted); margin: 1.1rem 0 2rem; max-width: 26rem; }

@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .field { grid-template-columns: 1fr; }
  .field label { padding-top: 1rem; }
  .field input, .field select, .field textarea { padding-top: 0.4rem; }
  .form__foot .btn { width: 100%; justify-content: space-between; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-top: clamp(3.5rem, 7vw, 5.5rem); background: linear-gradient(180deg, rgba(10, 10, 11, 0.2), rgba(10, 10, 11, 0.85)); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 2.5rem; }
.footer .label { margin-bottom: 1rem; }
.footer__list { display: flex; flex-direction: column; gap: 0.35rem; }
.footer__link { font-size: 1rem; color: var(--silver); transition: color 0.3s; word-break: break-all; }
.footer__link:hover { color: var(--ink); }
.footer__link small { font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-left: 0.35rem; }
.footer__col--end { align-self: start; justify-self: end; }
.footer__logo {
  width: 100%; height: auto; margin-top: clamp(4rem, 9vw, 7rem);
  opacity: 0.9;
}
.footer__base {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-block: 1.5rem; margin-top: clamp(1.5rem, 3vw, 2.5rem); border-top: 1px solid var(--line);
  font-size: 0.8rem; color: var(--dim);
}
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__col--end { justify-self: start; }
}
@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--delay, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* =========================================================
   MOBILE LAYOUT (phones, up to 767px)
   Desktop and tablet use everything above unchanged.
   ========================================================= */
.mbar, .mprog { display: none; }

@media (max-width: 767px) {
  :root { --nav-h: 64px; --gutter: 1.25rem; }

  .section { padding-block: 5rem; }
  .label { margin-bottom: 1.25rem; font-size: 0.68rem; }
  .h2 { font-size: clamp(2.5rem, 12vw, 3.4rem); margin-bottom: 1.25rem; }
  .h2--xl { font-size: clamp(2.6rem, 12.5vw, 3.6rem); }
  .lead { font-size: 1rem; }

  /* ---- Nav ---- */
  .nav__icon { width: 30px; }
  .nav__toggle { width: 42px; height: 42px; }
  .nav__toggle span:first-child { top: 16px; }
  .nav__toggle span:last-child { top: 24px; }
  .nav__toggle[aria-expanded="true"] span:first-child,
  .nav__toggle[aria-expanded="true"] span:last-child { top: 20px; }

  /* ---- Hero: wordmark runs vertically up the right edge ---- */
  .hero { padding-top: calc(var(--nav-h) + 2.5rem); }
  .hero__top { gap: 1.5rem; }
  .hero__title { font-size: clamp(3.2rem, 16.5vw, 4.6rem); line-height: 0.92; }
  .hero__aside { font-size: 1rem; max-width: 20rem; }
  .hero__aside-dim { display: none; }
  .hero__wordmark {
    left: auto; right: 0; top: 50%; bottom: auto;
    width: 92svh; max-width: none; opacity: 0.08;
    transform: translate(50%, -50%) rotate(-90deg);
  }
  .hero__doors { margin-top: 3rem; margin-bottom: 1.25rem; }
  .door { padding: 1.1rem 1.1rem 1.1rem 1rem; gap: 0.9rem; }
  .door__num { font-size: 1.9rem; width: 1.6rem; }
  .door__title { font-size: 1.35rem; }
  .door__sub { font-size: 0.8rem; margin-top: 0.2rem; }
  .door__arrow { width: 38px; height: 38px; }

  /* ---- Shared swipe track ---- */
  .rows, .work {
    display: flex; gap: 0.75rem;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .rows::-webkit-scrollbar, .work::-webkit-scrollbar { display: none; }

  .mprog { display: flex; align-items: center; gap: 1rem; margin-top: 1.25rem; font-size: 0.72rem; letter-spacing: 0.1em; color: var(--muted); }
  .mprog__count { font-variant-numeric: tabular-nums; min-width: 3.6rem; }
  .mprog__bar { flex: 1; height: 1px; background: var(--line-strong); position: relative; overflow: hidden; }
  .mprog__bar span { position: absolute; inset: 0; background: linear-gradient(90deg, var(--silver-hi), var(--gold)); transform-origin: left; transform: scaleX(0); transition: transform 0.5s var(--ease); }
  .mprog__hint { text-transform: uppercase; color: var(--dim); transition: opacity 0.4s; }
  .mprog.is-used .mprog__hint { opacity: 0; }

  /* ---- Services: swipeable cards ---- */
  .services { gap: 2.25rem; grid-template-columns: minmax(0, 1fr); }
  .services > * { min-width: 0; }
  .switch { margin-top: 1.75rem; }
  .services__list { border-top: 0; }
  .row {
    flex: 0 0 84%; scroll-snap-align: start;
    display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; gap: 0;
    padding: 1.4rem;
    border: 1px solid var(--line-strong);
    background: linear-gradient(180deg, rgba(24, 24, 27, 0.9), rgba(14, 14, 16, 0.9));
    min-height: 21rem;
  }
  .row::before { display: none; }
  .row__num { grid-column: 1; grid-row: 1; align-self: center; padding-top: 0; color: var(--champagne); }
  .row__icon { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; }
  .row__body { grid-column: 1 / -1; grid-row: 2; margin-top: 0; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 2.5rem; }
  .row__title { font-size: 1.9rem; }
  .row:hover .row__title { transform: none; }
  .row__desc { font-size: 0.95rem; margin-top: 0.6rem; }
  .tags { margin-top: 1.1rem; }
  .tags li { font-size: 0.74rem; }

  /* ---- Work: swipeable gallery, filter hides instead of dims ---- */
  .work__head { flex-direction: column; align-items: flex-start; gap: 1.5rem; margin-bottom: 2rem; }
  .filters { font-size: 1rem; }
  .work { row-gap: 0; }
  .work__item, .work__item:nth-child(even) { flex: 0 0 80%; margin: 0 !important; scroll-snap-align: start; }
  .work .work__item.is-dimmed { display: none; }
  .work .reveal { opacity: 1; transform: none; }
  .work__item .work__media { aspect-ratio: 4 / 5 !important; }
  .work__item figcaption { grid-template-columns: auto 1fr; row-gap: 0.15rem; }
  .work__c { display: block; grid-column: 2; text-align: left; }

  /* ---- Clients: swipe between quotes ---- */
  .quotes__stage { min-height: 19rem; touch-action: pan-y; }
  .quote { gap: 1.75rem; }
  .quote p { font-size: clamp(1.55rem, 7.2vw, 1.9rem); line-height: 1.12; }
  .quotes__nav { margin-top: 2.25rem; gap: 0.6rem; }
  .qtab { font-size: 0.75rem; }

  /* ---- Contact ---- */
  .contact { gap: 3rem; }
  .contact__email {
    display: flex; margin-top: 2rem; padding: 1rem 1.1rem;
    border: 1px solid var(--line-strong); font-size: 1.05rem;
  }
  .field { grid-template-columns: 1fr; }
  .field label { padding-top: 1.1rem; }
  .field input, .field select, .field textarea { padding-top: 0.35rem; font-size: 1.05rem; }
  .form__foot { flex-direction: column-reverse; align-items: stretch; }
  .form__foot .btn { width: 100%; justify-content: space-between; }
  .form__success { inset: -0.5rem; }

  /* ---- Footer ---- */
  .footer { padding-top: 3.5rem; padding-bottom: 5rem; /* room for the sticky bar */ }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem 1rem; }
  .footer__grid .footer__col:first-child, .footer__col--end { grid-column: 1 / -1; justify-self: stretch; }
  .footer__col--end .btn { width: 100%; justify-content: space-between; }
  .footer__logo { margin-top: 3rem; }
  .footer__base { flex-direction: column; gap: 0.25rem; }

  /* ---- Sticky "Get in touch" bar ---- */
  .mbar {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 0.75rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(10, 10, 11, 0), rgba(10, 10, 11, 0.85) 40%);
    transform: translateY(110%);
    transition: transform 0.6s var(--ease);
    pointer-events: none;
  }
  .mbar.is-shown { transform: none; pointer-events: auto; }
  .mbar__cta { width: 100%; justify-content: space-between; padding: 0.45rem 0.45rem 0.45rem 1.25rem; font-size: 1rem; }
  .mbar__cta .btn__box { width: 40px; height: 40px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .reveal, [data-split] .line > span { opacity: 1; transform: none; }
}
