:root {
  --ink: #101214;
  --muted: #5d646b;
  --line: #d9ddd8;
  --paper: #fefdf3;
  --copper: #a33531;
  --signal: #a33531;
  --sans: "futura-100-cyrillic", "Futura", "Avenir Next", Helvetica, Arial, sans-serif;
  --pad: 56px;
  --top: 76px;
  --bottom: 82px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }
html:has(body.deck) { scroll-snap-type: y mandatory; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, dl, dd, figure { margin: 0; }
ol { padding: 0; list-style: none; }
i { font-style: normal; }

.substrate { position: fixed; top: 0; left: 0; z-index: -1; pointer-events: none; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; padding: 8px 12px; background: var(--ink); color: var(--signal); }

/* header */

.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--top);
  padding: 0 var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand { margin-right: auto; text-decoration: none; line-height: 1; }
.brand strong { display: block; font-size: 16px; letter-spacing: 0.02em; }
.brand small { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted); }

.menu { display: flex; gap: 32px; }
.menu a { font-size: 15px; font-weight: 700; color: var(--muted); text-decoration: none; }
.menu a:hover { color: var(--ink); }

.lang {
  display: flex;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}
.lang span, .lang a { padding: 8px 12px; border-radius: 999px; line-height: 1; text-decoration: none; }
.lang span { background: var(--ink); color: #fefdf4; }
.lang a { color: var(--muted); }
.lang a:hover { color: var(--ink); }

/* shared type */

.display {
  font-family: var(--sans);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.03em;
}
.display { --w: 38vw; --max: min(150px, 10vw); }
.display span { display: block; white-space: nowrap; font-size: min(var(--max), calc(var(--w) / (var(--n) * 0.7))); }
.display .outline {
  margin-top: 0.06em;
  color: var(--paper);
  -webkit-text-stroke: 1.4px var(--ink);
  letter-spacing: -0.02em;
}

.idx, .line {
  font: 11px/1.5 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.idx { margin-bottom: 30px; color: var(--copper); }
.idx a { text-decoration: none; }
.line { margin-top: 36px; color: var(--muted); }
.line a { text-decoration: none; color: var(--ink); }

.actions { margin-top: 36px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.btn:hover { background: var(--copper); }

/* deck */

.slide {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 40px;
  height: 100vh;
  height: 100svh;
  padding: var(--top) var(--pad) var(--bottom);
  scroll-snap-align: start;
  overflow: clip;
}
.copy { position: relative; z-index: 1; }

.art { position: relative; display: block; height: min(68vh, 620px); }



.sheet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76%;
  aspect-ratio: 16 / 11;
  transform: translate(-50%, -50%) rotate(var(--r, -2deg));
}
.frame {
  display: block;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(16, 18, 20, 0.45);
}
/* the sheet's edges continued past its corners, rotating with it */
.ext::before, .ext::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 0 dashed rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.ext::before { top: 0; bottom: 0; left: -200vmax; right: -200vmax; border-width: 1px 0; }
.ext::after { left: 0; right: 0; top: -200vmax; bottom: -200vmax; border-width: 0 1px; }
.sheet img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  filter: grayscale(1) contrast(1.3) brightness(1.05);
  mix-blend-mode: multiply;
  transition: filter 0.5s;
}
.art:hover img { filter: none; }


.contact .display a { text-decoration: none; }
.contact .display a:hover span:first-child { color: var(--copper); }

.intro-text { display: flex; flex-direction: column; justify-content: center; height: auto; max-width: none; }
.slide.intro { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.intro-text p { font-size: clamp(19px, min(1.625vw, 2.75vh), 27.5px); line-height: 1.5; }
/* highlighter: each wrapped line gets its own white box */
.intro-text p span {
  padding: 0.04em 0.3em;
  background: rgba(255, 255, 255, 0.75);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  text-shadow: 0 0 6px #fefdf4, 0 0 12px #fefdf4;
}
.intro-text b { font-weight: 700; }
.intro-text p + p { margin-top: 1.1em; }

/* pager */

.pager {
  position: fixed;
  inset: auto 0 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--bottom);
  padding: 0 var(--pad);
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.progress { position: absolute; top: -1px; left: 0; width: var(--p, 0); height: 2px; background: var(--copper); transition: width 0.4s; }

.hint { font: 10px var(--sans); letter-spacing: 0.065em; text-transform: uppercase; color: var(--muted); }
.hint i { margin-right: 14px; }

.pills { display: flex; gap: 2px; margin: 0 auto; }
.pills a {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.pills i { font: 9px var(--sans); color: var(--muted); letter-spacing: 0; }
.pills a[aria-current] { background: var(--ink); color: var(--paper); }
.pills a[aria-current] i { color: var(--signal); }

.count { margin-right: 12px; font: 12px var(--sans); }
.count b { font-weight: 400; }

.nav-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  cursor: pointer;
}
.nav-btn:hover { border-color: var(--ink); }
.nav-btn:disabled { opacity: 0.35; cursor: default; }

/* project page */

.case { max-width: 1440px; margin: 0 auto; padding: calc(var(--top) + 88px) var(--pad) 0; }

.case-hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; align-items: center; }
.case-hero .display { --w: 40vw; --max: min(150px, 10vw); }
.hero-art { aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.hero-art a { display: block; height: 100%; cursor: pointer; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.4s; }
.hero-art a:hover img { transform: scale(1.02); }
.wall { scroll-margin-top: 96px; }

.case-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  margin-top: 104px;
}

.specs { grid-column: 1 / span 4; align-self: start; }
.specs dt {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font: 10.5px var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.specs dd { margin: 4px 0 16px; font-size: 14px; }
.specs a { text-decoration: none; border-bottom: 1px solid var(--copper); }

.prose { grid-column: 6 / -1; max-width: 34em; font: 21px/1.55 var(--sans); }
.prose p + p { margin-top: 0.9em; }
.prose .note { font: 10.5px/1.5 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* gallery wall */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; margin-top: 112px; }
.tile {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  cursor: zoom-in;
}
/* every tile has the same shape; tall captures are cropped from the top, the modal shows them whole */
.tile img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.4s; }
.tile:hover img { transform: scale(1.025); }
.tile:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }

.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  padding: 0;
  border: 0;
  background: rgba(16, 18, 20, 0.92);
}
.lightbox::backdrop { background: transparent; }
.lb-scroll { height: 100%; overflow: hidden; padding: 56px 72px; display: flex; }
/* the whole image always fits in the window, tall ones included */
.lb-scroll img { display: block; margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; background: #fff; }
.lb-btn {
  position: fixed;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(16, 18, 20, 0.6);
  color: #fff;
  font: 22px/1 var(--sans);
  cursor: pointer;
}
.lb-btn:hover { background: var(--copper); border-color: var(--copper); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
body:has(.lightbox[open]) { overflow: hidden; }

.pn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 144px;
  padding: 28px 0 96px;
  border-top: 1px solid var(--ink);
}
.pn a { display: block; text-decoration: none; }
.pn .next-project { text-align: right; }
.pn small { display: block; margin-bottom: 20px; font: 11px var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--copper); }
.pn .display { --w: 34vw; --max: min(44px, 3.4vw); }
.pn a:hover .display span:first-child { color: var(--copper); }

.foot {
  display: flex;
  justify-content: space-between;
  padding: 20px var(--pad);
  border-top: 1px solid var(--line);
  font: 11px var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot a { text-decoration: none; }

@media (max-width: 1180px) {
  .pills { visibility: hidden; }
}

@media (max-width: 860px) {
  :root { --pad: 20px; --top: 64px; }
  html:has(body.deck) { scroll-snap-type: none; }
  .top { gap: 16px; }
  .brand small { display: none; }
  .menu { gap: 16px; }
  .menu a { font-size: 13px; }
  .lang { font-size: 12px; }
  .lang span, .lang a { padding: 6px 9px; }

  .case-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .display, .case-hero .display { --w: 84vw; --max: 30vw; }
  .pn .display { --w: 40vw; --max: 9vw; }
  .slide { grid-template-columns: minmax(0, 1fr); gap: 40px; height: auto; padding: calc(var(--top) + 56px) var(--pad) 24px; }
  .art { height: 72vw; }
  .sheet { width: 88%; }
  .contact { padding-bottom: 96px; }
  .pager { display: none; }
  .slide.intro { grid-template-columns: minmax(0, 1fr); }
  .intro-text { height: auto; max-width: none; }
  .intro-text p { font-size: 19px; }

  .case-body { grid-template-columns: 1fr; margin-top: 64px; }
  .specs, .prose { grid-column: 1; }
  .prose { margin-top: 32px; font-size: 18px; }
  .wall { margin-top: 72px; }
  .lb-scroll { padding: 64px 12px 16px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
  .pn { margin-top: 96px; padding-bottom: 64px; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheet img, .progress { transition: none; }
}
