/* jtvda.design · light and quiet, in the manner of barh, with International Klein Blue. */

:root {
  --paper: #f3f2ef;
  --white: #ffffff;
  --ink: #1c1c1c;
  --grey: #6e6d69;
  --line: #d9d7d2;
  --bar: #111111;
  --ikb: #002fa7;
  --thin: 'Jost', 'Futura', 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --pad: clamp(16px, 4vw, 64px);
  --gap: clamp(16px, 2.4vw, 36px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
::selection { background: var(--ikb); color: #fff; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
figure { margin: 0; }

.label {
  margin: 0;
  font: 400 12px/1.4 var(--sans);
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--grey);
}
.no { font: 400 12px/1 var(--sans); letter-spacing: 0.12em; color: var(--grey); font-variant-numeric: tabular-nums; }
.name { margin: 0; font: 300 clamp(34px, 3.6vw, 56px)/1 var(--thin); letter-spacing: -0.02em; }
.name--s { display: block; font-size: 20px; line-height: 1.2; letter-spacing: 0; color: var(--ink); }

/* the blue square that follows the name */
.sq { display: inline-block; width: 0.16em; height: 0.16em; margin-left: 0.06em; background: var(--ikb); }

/* ---------- bar ---------- */

.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  color: #fff;
  background: transparent;
  transition: background-color 0.4s ease;
}
.bar.is-solid { background: var(--bar); }
.bar a { text-decoration: none; }
.bar__brand { font: 300 30px/1 var(--thin); letter-spacing: -0.03em; opacity: 0; transition: opacity 0.4s ease; }
.bar.is-solid .bar__brand, html:not(.js) .bar__brand { opacity: 1; }
.bar__nav { display: flex; gap: clamp(20px, 3vw, 40px); font: 400 13px/1 var(--sans); letter-spacing: 0.14em; }
.bar__nav a { padding: 22px 0; }
.bar__nav a:hover, .bar__nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  color: #fff;
  background: #2a2a2a;
  overflow: hidden;
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: rgba(17, 17, 17, 0.34); }
.hero__inner {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero__mark { margin: 0; font: 200 clamp(96px, 17vw, 280px)/0.9 var(--thin); letter-spacing: -0.05em; }
.hero__sub { margin: 18px 0 0; font: 400 12px/1 var(--sans); letter-spacing: 0.42em; padding-left: 0.42em; }
.hero__cap { position: absolute; z-index: 1; left: var(--pad); bottom: 22px; margin: 0; font-size: 12px; letter-spacing: 0.08em; opacity: 0.85; }
.hero__down {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 10px 14px;
  font-size: 18px;
  text-decoration: none;
  animation: down 2.2s ease-in-out infinite;
}
@keyframes down { 0%, 100% { translate: 0 -2px; } 50% { translate: 0 4px; } }

/* ---------- intro ---------- */

.intro {
  background: var(--bar);
  color: #e9e8e4;
  padding: clamp(48px, 9vh, 96px) var(--pad);
}
.intro p {
  max-width: 62ch;
  margin: 0 auto;
  text-align: center;
  font: 300 clamp(18px, 1.6vw, 22px)/1.6 var(--thin);
}

/* ---------- work ---------- */

.work { padding: clamp(72px, 12vh, 140px) var(--pad) 0; }
.work--more { padding-top: clamp(72px, 12vh, 140px); }
.work__label { margin-bottom: clamp(32px, 6vh, 64px); }

.item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  overflow: hidden;
}
.item:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }
.item img { width: 100%; transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) { .item:hover img { transform: scale(1.025); } }

.row { margin-bottom: clamp(72px, 12vh, 140px); }
.row--split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: center;
}
.row--split .item { grid-column: 1 / span 7; }
.row--split .row__text { grid-column: 9 / span 4; }
.row--flip .item { grid-column: 6 / span 7; grid-row: 1; }
.row--flip .row__text { grid-column: 1 / span 4; grid-row: 1; }
.row__text { display: flex; flex-direction: column; gap: 18px; }
.row__text p { margin: 0; max-width: 38ch; color: var(--grey); }

.row--trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.row--trio .item img { aspect-ratio: 3 / 2; object-fit: cover; }

figcaption { display: flex; gap: 16px; margin-top: 14px; font-size: 13px; color: var(--grey); }
figcaption .no { padding-top: 5px; }

.full { margin-bottom: 0; }
.full .item img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.full figcaption { padding: 0 var(--pad); }

/* ---------- ikb band ---------- */

@keyframes float-a { 0%, 100% { transform: translate3d(0, 0, 0) rotate(-1.5deg); } 50% { transform: translate3d(0, -16px, 0) rotate(1deg); } }
@keyframes float-b { 0%, 100% { transform: translate3d(0, 0, 0) rotate(1deg); } 50% { transform: translate3d(0, 14px, 0) rotate(-1deg); } }
.float-a { display: block; animation: float-a 11s ease-in-out infinite; }
.float-b { display: block; animation: float-b 14s ease-in-out infinite; }

.band {
  background: var(--ikb);
  color: #fff;
  padding: clamp(72px, 12vh, 140px) var(--pad);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: center;
}
.band__pieces { grid-column: 1 / span 8; display: flex; align-items: flex-end; gap: 6%; }
.band .item { overflow: visible; }
.band .item:focus-visible { outline-color: #fff; }
.band__chair { width: 30%; }
.band__table { width: 64%; }
.band__text { grid-column: 10 / span 3; display: flex; flex-direction: column; gap: 18px; }
.band__text p { margin: 0; color: rgba(255, 255, 255, 0.78); }
.band .no { color: rgba(255, 255, 255, 0.7); }

/* ---------- about ---------- */

.about {
  background: var(--white);
  padding: clamp(80px, 14vh, 160px) var(--pad);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(32px, 6vh, 64px);
  align-items: start;
}
.about > .label { grid-column: 1 / -1; }
.about__portrait { grid-column: 1 / span 4; max-width: 400px; }
.about__text { grid-column: 6 / span 6; display: flex; flex-direction: column; gap: 24px; }
.about__text p { margin: 0; max-width: 52ch; color: var(--grey); }
.about__text .about__lead { font: 300 clamp(26px, 2.6vw, 40px)/1.2 var(--thin); color: var(--ink); letter-spacing: -0.01em; }
.about__facts {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px 24px;
  margin: 16px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.about__facts dd { margin: 0; }
.about__facts a { text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--line); }
.about__facts a:hover { text-decoration-color: var(--ikb); }

/* ---------- contact ---------- */

.contact {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ikb);
  color: #fff;
  padding: clamp(96px, 14vh, 160px) var(--pad) clamp(28px, 5vh, 48px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 64px;
}
.contact .label { color: rgba(255, 255, 255, 0.75); }
.contact__main { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.contact__mail {
  font: 200 clamp(36px, 8.4vw, 144px)/1 var(--thin);
  letter-spacing: -0.03em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.3s ease;
}
.contact__mail:hover, .contact__mail:focus-visible { text-decoration-color: currentColor; outline: none; }
.contact__copy {
  appearance: none;
  margin: 0;
  padding: 12px 0;
  border: 0;
  background: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.contact__copy:hover, .contact__copy:focus-visible { color: #fff; outline: none; }
.contact__foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; border-top: 1px solid rgba(255, 255, 255, 0.35); padding-top: 4px; }
.contact__foot a, .contact__foot span { padding: 12px 0; }
.contact__foot a { text-decoration: none; }
.contact__foot a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- reveal ---------- */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- viewer ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  opacity: 0;
  overscroll-behavior: contain;
  transition: opacity 0.35s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__fig { width: min(86vw, 1400px); height: min(72vh, 900px); display: grid; place-items: center; }
.lightbox__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; cursor: pointer; }
.lightbox button {
  appearance: none;
  margin: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font: 400 12px/1.4 var(--sans);
  letter-spacing: 0.18em;
}
.lightbox button:focus { outline: none; }
.lightbox button:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; }
.lightbox__top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 0 var(--pad); font-variant-numeric: tabular-nums; }
.lightbox__close { padding: 20px 0 20px 24px; }
.lightbox__close:hover, .lightbox__nav:hover { text-decoration: underline; text-underline-offset: 5px; }
.lightbox__nav { position: absolute; top: 60px; bottom: 120px; z-index: 1; width: 18%; display: flex; align-items: center; padding: 0 var(--pad) !important; color: var(--grey) !important; }
.lightbox__nav--prev { left: 0; justify-content: flex-start; }
.lightbox__nav--next { right: 0; justify-content: flex-end; }
.lightbox__bottom { position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(20px, 4vh, 40px); display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 8px 24px; }
.lightbox__name { margin: 0; font: 300 clamp(28px, 3vw, 44px)/1 var(--thin); letter-spacing: -0.02em; }
.lightbox__detail { margin: 0; max-width: 52ch; font-size: 13px; color: var(--grey); }
.lb-open { overflow: hidden; }

/* ---------- phone ---------- */

@media (max-width: 760px) {
  .bar { height: 52px; }
  .bar__brand { font-size: 26px; }
  .bar__nav { gap: 18px; font-size: 12px; }

  .hero__sub { letter-spacing: 0.3em; padding-left: 0.3em; font-size: 11px; }
  .hero__cap { right: var(--pad); bottom: 56px; text-align: center; }

  .row--split, .band, .about { display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
  .row--split .row__text, .band__text { padding-right: 8%; }
  .row__text { gap: 12px; }
  .name { font-size: 34px; }
  .row--trio { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .full .item img { aspect-ratio: 4 / 3; }
  .band__pieces { gap: 4%; }
  .band__chair { width: 34%; }
  .band__table { width: 62%; }
  .about__portrait { width: 64vw; }
  .about__facts { grid-template-columns: 84px minmax(0, 1fr); }

  .lightbox { align-items: start; padding-top: 60px; }
  .lightbox__fig { width: 92vw; height: calc(100svh - 260px); }
  .lightbox__nav { top: auto; bottom: 0; height: 56px; width: 50%; }
  .lightbox__bottom { bottom: 64px; flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float-a, .float-b, .hero__down { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
