/* Lost Art — site styles. Colours and type live in the tokens below. */
:root {
  --ink: #0A0A0A;
  --paper: #FFFFFF;
  --blue: #00A0DD;
  --blue-hi: #4CC3F0;
  --line: #1E1E1E;
  --line-2: #2A2A2A;
  --mute: #8A8A8A;
  --mute-2: #9A9A9A;
  --body: #C4C4C4;
  --futura: 'futura-pt', Jost, sans-serif;
  --work: 'Work Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --cols: 3;
  --grid-line: #D6D6D1;
}

html { scroll-behavior: smooth; }
html.is-locked { overflow: hidden; }
body { margin: 0; background: var(--ink); color: #fff; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-hi); }
button { font: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }

/* ── Side rail ─────────────────────────────────────────── */
.rail {
  position: fixed; top: 0; left: 0; bottom: 0; width: 60px; z-index: 60;
  background: var(--blue); display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; padding: 18px 0 20px; box-sizing: border-box;
}
.rail-logo { display: grid; place-items: center; padding: 4px; color: #000; }
.rail-logo:hover { color: #000; }
.rail-logo svg { width: 41px; height: 37px; display: block; }
.rail-mid { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.rail-vert {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 700 11px/1 var(--futura); letter-spacing: .3em; color: #000;
}
.rail-vert--lg { font-size: 13px; }
.rail-leaf { width: 15px; height: 13px; display: block; }
.rail-icons { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rail-icons a {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #000;
}
.rail-icons a:hover { background: #000; color: var(--blue); }
.rail-icons svg { width: 17px; height: 17px; display: block; }

.shell { margin-left: 60px; }

/* ── Top nav ───────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,10,.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px 32px; flex-wrap: wrap;
}
.nav-loc { font: 400 10px/1 var(--mono); letter-spacing: .2em; color: var(--mute); }
.nav-right { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.nav-links { display: flex; gap: 22px; font: 500 11px/1 var(--futura); letter-spacing: .16em; }
.nav-links a { color: var(--mute-2); }
.nav-links a:hover { color: #fff; }
.nav-links a.is-current { color: #fff; }
.nav-links a.is-current:hover { color: var(--blue); }
.btn-cta {
  padding: 11px 20px; background: var(--blue); color: #000;
  font: 700 11px/1 var(--futura); letter-spacing: .16em;
}
.btn-cta:hover { background: var(--blue-hi); color: #000; }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  position: relative; background-color: var(--ink);
  background-image: url('/assets/img/hero.jpg');
  background-size: cover; background-position: 72% center; background-repeat: no-repeat;
  min-height: clamp(460px, 44vw, 720px); display: flex; align-items: stretch; overflow: hidden;
}
.hero-grad {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #0A0A0A 0%, rgba(10,10,10,.94) 26%, rgba(10,10,10,.58) 46%, rgba(10,10,10,0) 66%);
}
.hero-copy {
  position: relative; z-index: 2; padding: clamp(40px,6vw,86px) 32px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  width: min(680px, 60%);
}
.eyebrow { font: 400 10px/1 var(--mono); letter-spacing: .22em; color: var(--blue); margin-bottom: 26px; }
.hero-h {
  margin: 0; font: 700 clamp(34px,6vw,86px)/.94 var(--futura); letter-spacing: -.025em;
  color: #fff; width: 584px; max-width: 100%;
}
/* LOST ART is scaled so its width matches ILLUSTRATION below (their width ratio in Futura PT Bold). */
.hero-name { display: block; font-size: 1.535em; line-height: .9; }
.outline { display: block; color: transparent; -webkit-text-stroke: 1px #6A6A6A; }
.hero-p {
  margin: 0; font: 300 clamp(14px,1.3vw,17px)/1.6 var(--work); color: var(--body);
  max-width: 380px; width: 352px; text-wrap: pretty;
}

/* ── Marquee ───────────────────────────────────────────── */
.marquee { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink); overflow: hidden; padding: 17px 0; }
.marquee-track { display: flex; width: max-content; animation: la-marq 42s linear infinite; }
.marquee-set {
  display: flex; gap: 38px; flex: none; padding-right: 38px;
  font: 500 14px/1 var(--mono); letter-spacing: .2em; color: #fff; white-space: nowrap;
}
.marquee-set .dot { color: var(--blue); }
@keyframes la-marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ── Section heads ─────────────────────────────────────── */
.label { margin: 0; font: 700 13px/1 var(--futura); letter-spacing: .2em; color: #fff; }
.sub { font: 400 10px/1 var(--mono); letter-spacing: .14em; color: var(--mute); }

/* ── Work grid ─────────────────────────────────────────── */
.work { background: var(--paper); color: var(--ink); padding: clamp(40px,5vw,64px) 32px clamp(48px,6vw,76px); scroll-margin-top: 60px; }
.work .label { color: var(--ink); }
.work-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border-bottom: 1px solid var(--ink); padding-bottom: 16px;
}
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter {
  padding: 9px 16px; font: 500 10px/1 var(--mono); letter-spacing: .14em; cursor: pointer;
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink); text-transform: uppercase;
}
.filter:hover { background: #F2F2F2; }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.grid {
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0,1fr)); gap: 1px;
  border: 1px solid var(--grid-line); border-top: none;
  /* Whatever the tiles don't fill (the end of an uneven last row) shows faint stripes. */
  background: repeating-linear-gradient(135deg, #F8F8F6 0 9px, #F0F0ED 9px 18px);
}
/* The lines between tiles come from each tile's own 1px outline, so empty cells stay unlined. */
.tile { display: block; background: var(--paper); padding: 14px; cursor: pointer; color: var(--ink); box-shadow: 0 0 0 1px var(--grid-line); }
.tile { transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; }
.tile:hover, .tile:focus-visible { background: var(--ink); color: #fff; box-shadow: 0 0 0 1px var(--ink); outline: none; }
.tile:hover .tile-tag, .tile:focus-visible .tile-tag { color: #9A9A9A; }
.tile[hidden] { display: none; }
.tile-frame {
  position: relative; aspect-ratio: 4/5; overflow: hidden;
  background: repeating-linear-gradient(135deg, #F2F2F2 0 9px, #E7E7E7 9px 18px);
  display: grid; place-items: center;
}
.tile-frame img, .tile-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover .tile-frame img, .tile:hover .tile-frame video { transform: scale(1.03); }
.tile-ph { padding: 12px; font: 400 9px/1.6 var(--mono); letter-spacing: .14em; color: #6A6A6A; text-align: center; text-transform: uppercase; }
.tile-num, .tile-new {
  position: absolute; top: 10px; z-index: 1; font: 500 10px/1 var(--mono); letter-spacing: .1em; color: var(--ink);
}
.tile-num { left: 10px; padding: 4px 6px; transition: background-color .2s ease, color .2s ease; }
.tile-new { right: 10px; padding: 4px 6px; background: var(--blue); color: #000; }
.tile-frame.has-img .tile-num { background: var(--paper); }
.tile:hover .tile-num, .tile:focus-visible .tile-num { background: var(--ink); color: #9A9A9A; }
.tile-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 14px; }
.tile-client { font: 600 clamp(14px,1.2vw,16px)/1.15 var(--futura); letter-spacing: .01em; }
.tile-tag { font: 400 9px/1.4 var(--mono); color: #6A6A6A; text-align: right; text-transform: uppercase; }
.work-count { margin-top: 18px; font: 400 10px/1 var(--mono); letter-spacing: .14em; color: #6A6A6A; }

/* ── Services ──────────────────────────────────────────── */
.services { padding: clamp(48px,6vw,80px) 32px; border-bottom: 1px solid var(--line); scroll-margin-top: 60px; }
.services-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 38px; }
.svc { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.svc-item { display: flex; flex-direction: column; background: var(--ink); padding: 28px 24px 30px; color: inherit; }
.svc-item:hover { color: inherit; }
.svc-item.is-linked { cursor: pointer; transition: background .2s ease; }
.svc-item.is-linked:hover { background: #111; }
.svc-item.is-linked:hover .svc-title { color: var(--blue); }
.svc-link { display: none; margin-top: auto; padding-top: 18px; font: 500 10px/1 var(--mono); letter-spacing: .14em; color: var(--blue); text-transform: uppercase; }
.svc-item.is-linked .svc-link { display: block; }
.svc-item:not(.is-linked) { cursor: default; }
.svc-num { font: 400 10px/1 var(--mono); color: var(--blue); margin-bottom: 18px; }
.svc-title { margin: 0 0 10px; font: 700 clamp(20px,2vw,26px)/1.1 var(--futura); color: #fff; }
.svc-body { margin: 0; font: 300 14px/1.6 var(--work); color: #A8A8A8; text-wrap: pretty; }

/* ── About + contact ───────────────────────────────────── */
.about { padding: clamp(48px,6vw,88px) 32px clamp(56px,7vw,100px); scroll-margin-top: 60px; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: clamp(28px,4vw,64px); align-items: start; }
.about .label { margin-bottom: 26px; }
.about-h { margin: 0; font: 700 clamp(32px,4.4vw,58px)/1 var(--futura); letter-spacing: -.02em; color: #fff; }
.facts { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 34px; font: 400 10px/1.7 var(--mono); letter-spacing: .14em; color: var(--mute); }
.facts b { display: block; font-weight: 400; color: #fff; }
.about-p { font: 300 clamp(14px,1.15vw,15.5px)/1.75 var(--work); color: var(--body); text-wrap: pretty; max-width: 560px; margin: 34px 0 0; }
.contact-col { display: flex; flex-direction: column; gap: clamp(28px,3vw,40px); max-width: 620px; }
.contact { scroll-margin-top: 80px; }
.contact .label { margin-bottom: 20px; }
.cbtns { display: flex; flex-direction: column; gap: 12px; }
.cbtn {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 26px 28px; border: 1px solid var(--line-2); background: var(--ink);
}
.cbtn:hover { background: #141414; border-color: var(--blue); }
.cbtn-h { font: 700 clamp(20px,2.1vw,28px)/1.15 var(--futura); letter-spacing: -.005em; color: #fff; }
.cbtn-v { font: 400 11px/1 var(--mono); letter-spacing: .14em; color: var(--mute); white-space: nowrap; }

/* ── Footer ────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 56px 32px 40px; }
.footer-sig { width: clamp(116px,13vw,150px); height: auto; display: block; margin: 0 auto 56px; }
.footer-row { display: flex; align-items: baseline; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding-top: 26px; border-top: 1px solid var(--line); }
.foot-links { display: flex; gap: 22px; font: 500 11px/1 var(--futura); letter-spacing: .16em; }
.foot-links a { color: var(--mute-2); }
.foot-links a:hover { color: #fff; }

/* ── Case-study overlay ────────────────────────────────── */
.ov {
  position: fixed; inset: 0; z-index: 100; background: var(--ink); overflow-y: auto;
  display: flex; align-items: flex-start; align-content: flex-start; flex-wrap: wrap; overscroll-behavior: contain;
}
.ov[hidden] { display: none; }
.ov:focus { outline: none; }
.brief {
  flex: 0 0 clamp(300px,30%,400px); min-width: 280px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; background: var(--ink); z-index: 3;
}
.brief-head { padding: clamp(24px,3vw,40px) clamp(20px,2.4vw,34px) 28px; }
.brief-top { display: flex; align-items: stretch; justify-content: space-between; gap: 14px; margin-bottom: 6px; min-height: 1.2em; }
.brief-client { display: flex; align-items: center; font: 700 clamp(17px,1.5vw,21px)/1.25 var(--futura); letter-spacing: -.005em; color: #fff; }
.brief-num {
  flex: none; align-self: center; display: grid; place-items: center; padding: 4px 11px;
  background: var(--blue); font: 500 clamp(11px,.95vw,13px)/1 var(--mono); letter-spacing: .08em; color: #000;
}
.brief-title { margin: 0; font: 700 clamp(28px,3.1vw,44px)/1.04 var(--futura); letter-spacing: -.025em; color: #fff; min-height: 2.08em; }
.brief-scope { font: 300 15px/1.65 var(--work); color: var(--body); margin-top: 18px; text-wrap: pretty; min-height: 4.95em; }
.brief-scope p { margin: 0 0 1em; }
.brief-scope p:last-child { margin-bottom: 0; }
/* Project details: a fixed label column and a value column, with a rule above and below every
   row, so long and short lists keep the same structure. */
.brief-meta {
  margin: 28px 0 0; border-top: 1px solid var(--line);
  font: 400 10px/1.6 var(--mono); letter-spacing: .14em; color: var(--mute);
}
.brief-meta > div { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 0 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.brief-meta dt { text-transform: uppercase; }
.brief-meta dd { margin: 0; color: #fff; text-transform: uppercase; }
.brief-toggle { display: none; }
.ov-nav {
  margin-top: auto; position: sticky; bottom: 0; background: var(--ink); border-top: 1px solid var(--line);
  padding: 18px clamp(20px,2.4vw,34px) 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.ov-arrow {
  width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 1px solid var(--line-2);
  color: #fff; font: 400 15px/1 var(--mono); cursor: pointer;
}
.ov-arrow:hover { border-color: var(--blue); color: var(--blue); }
.ov-counter { font: 400 11px/1 var(--mono); letter-spacing: .16em; color: var(--mute); }
.ov-main { flex: 1; min-width: min(100%,300px); position: relative; }
.close-bar {
  position: sticky; top: 0; z-index: 4; display: flex; justify-content: flex-end; padding: 16px 20px;
  background: linear-gradient(#0A0A0A 55%, rgba(10,10,10,0));
}
.ov-close {
  display: flex; align-items: center; gap: 10px; background: var(--ink); border: 1px solid #3A3A3A; color: #fff;
  font: 500 10px/1 var(--mono); letter-spacing: .16em; padding: 12px 16px; cursor: pointer;
}
.ov-close:hover { border-color: var(--blue); color: var(--blue); }
/* Justified rows: each item grows in proportion to its width/height, so every image in a row
   ends up the same height and the row fills the width. Rows are grouped by the build. */
.gallery { --gap: 14px; display: flex; flex-direction: column; gap: var(--gap); padding: 0 clamp(16px,2vw,28px) clamp(28px,3vw,44px); }
/* Rows are grids of equal columns (--units): a square takes one column, a wide image two
   (including the gap between them). Every cell is one column tall, so columns line up
   between rows and squares stay square. */
.g-row {
  display: grid; grid-template-columns: repeat(var(--units, 2), minmax(0, 1fr)); gap: var(--gap);
  container-type: inline-size;
}
.g-row > * {
  position: relative; margin: 0; background: #141414; overflow: hidden; min-width: 0;
  height: calc((100cqw - (var(--units, 2) - 1) * var(--gap)) / var(--units, 2));
}
.g-row > .is-wide { grid-column: span 2; }
.g-row img, .g-row video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Studio crops: the build positions the image inside its frame; height keeps its proportions. */
.g-row img.crop { position: absolute; max-width: none; height: auto; }
/* Grey placeholder boxes (projects without images yet) keep their own proportions. */
.g-flex { display: flex; container-type: normal; }
.g-flex > * { flex: var(--ar) 1 0%; aspect-ratio: var(--ar); height: auto; }
.g-row > .ph {
  background: repeating-linear-gradient(135deg, #141414 0 10px, #1D1D1D 10px 20px);
  display: grid; place-items: center; padding: 14px; box-sizing: border-box;
  font: 400 9px/1.7 var(--mono); letter-spacing: .16em; color: var(--mute); text-align: center;
}

/* ── Responsive (from the design's breakpoints) ────────── */
@media (min-width: 640px) {
  .brief { position: sticky; top: 0; align-self: flex-start; min-height: 100vh; max-height: 100vh; overflow-y: auto; }
}
@media (max-width: 639px) {
  .brief { flex-basis: 100%; border-right: none; border-bottom: 1px solid var(--line); }
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(min(var(--cols), 3), minmax(0,1fr)); } }   /* 4 across gets cramped below this */
@media (max-width: 1000px) { .svc { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 720px) {
  .rail { bottom: auto; right: 0; width: auto; height: 56px; flex-direction: row; padding: 0 8px 0 14px; }
  .rail-logo svg { width: 36px; height: 30px; }
  .rail-mid { display: none; }
  .rail-icons { flex-direction: row; gap: 0; }
  .rail-icons a { width: 40px; height: 40px; }
  .shell { margin-left: 0; padding-top: 56px; }
  .nav { top: 56px; padding: 13px 20px; justify-content: center; }
  .nav-loc, .btn-cta { display: none; }
  .nav-links { gap: 18px; letter-spacing: .12em; }
  .hero { min-height: max(560px, calc(100svh - 104px)); background-position: 68% top; }
  .hero-grad { background: linear-gradient(0deg, #0A0A0A 0%, rgba(10,10,10,.94) 34%, rgba(10,10,10,.35) 60%, rgba(10,10,10,0) 78%); }
  .hero-copy { width: 100%; padding: 0 20px 36px; justify-content: flex-end; gap: 16px; box-sizing: border-box; }
  /* The small blue line reads as sitting further away than it is, so tuck it closer to the headline. */
  .eyebrow { margin-bottom: 18px; }
  .hero-h { font-size: clamp(34px,10.5vw,60px); width: auto; }
  .hero-p { width: auto; }
  .work, .services, .about, .footer { padding-left: 20px; padding-right: 20px; }
  .work, .services, .about, .contact { scroll-margin-top: 112px; }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tile { padding: 8px 8px 12px; }
  .tile-meta { flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 10px; }
  .cbtn { padding: 20px; flex-wrap: wrap; }
  .footer-row { flex-direction: column-reverse; align-items: center; gap: 24px; text-align: center; }
  /* Full 11px size; one line on typical phones (~380px and up), two centered lines on narrower ones. */
  .foot-links { flex-wrap: wrap; justify-content: center; gap: 12px 14px; letter-spacing: .14em; }
  .close-bar { position: fixed; top: 0; right: 0; background: none; padding: 12px; z-index: 6; }
  /* Phones: client + ID on one line, then title and description, then the three details side by side. */
  /* Title goes first, up beside the Close button (which floats top-right), then client + ID. */
  .brief-head { padding-top: 10px; }
  .brief-main { display: flex; flex-direction: column; }
  .brief-main .brief-title { order: -1; margin-right: 108px; min-height: 40px; display: flex; align-items: center; }
  .brief-top { margin: 8px 0 0; }
  .brief-client { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; align-self: center; }
  .brief-meta { margin-top: 14px; }
  .brief-meta > div { grid-template-columns: 96px minmax(0, 1fr); }
  /* Folded by default: two lines of description (always the same height), then "Details +". */
  .js .brief-toggle {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 0; background: none; border: none;
    color: var(--blue); font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; cursor: pointer;
  }
  .js .brief-toggle span { font-size: 13px; }
  .js .brief-head:not(.is-open) .brief-scope { height: 3.3em; overflow: hidden; }
  .js .brief-head:not(.is-open) .brief-scope p:first-child { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .js .brief-head:not(.is-open) .brief-scope p:not(:first-child) { display: none; }
  .js .brief-head:not(.is-open) .brief-meta { display: none; }
  .brief-title { font-size: 26px; min-height: 0; }
  .brief-scope { font-size: 14px; margin-top: 10px; min-height: 0; }
  .ov-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 12px 20px; }
  .gallery { --gap: 8px; padding: 16px 16px 96px; }
}
@media (max-width: 560px) { .svc { grid-template-columns: minmax(0,1fr); } }
