/* Type sizes match the reference site at desktop width (1440px). */
:root {
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #6f6f6f;
  --line: #e8e8e8;
  --pad: 32px;
  --font: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  /* Base UI text: 12px / 500 / 1.3 / -0.04em */
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font: inherit; }
.muted { color: var(--muted); }
.u { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease); }
.u:hover { background-size: 100% 1px; }

/* ---------- Type scale ---------- */
.display {            /* 124px / 600 / 0.88 / -0.035em, uppercase */
  font-size: clamp(52px, 8.61vw, 124px);
  font-weight: 600;
  line-height: .88;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.title {              /* 40px / 500 / 1 / -0.02em */
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}
.statement {          /* 24px / 400 / 1.05 / -0.01em */
  font-size: 24px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.small {              /* 13px / 400 / 1.35 / -0.005em */
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.005em;
}
.body {               /* 14px / 400 / 1.6 / -0.005em */
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.005em;
}

/* ---------- Header ---------- */
.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 500;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: start;
  padding: 14px var(--pad);
  color: #fff;
  mix-blend-mode: difference;   /* stays readable over images, like the reference */
}
.id, .place { display: flex; flex-direction: column; }
.clock { font-variant-numeric: tabular-nums; }
.menu { display: flex; gap: 16px; text-transform: uppercase; }
.social { display: flex; gap: 16px; justify-self: end; }
.menu a, .social a { transition: color .2s; }
.menu a:hover, .social a:hover, .menu .is-active { color: var(--muted); }

/* ---------- Home ---------- */
body[data-page="home"] { overflow: hidden; height: 100dvh; overscroll-behavior: none; touch-action: none; }
.home { position: fixed; inset: 0; background: var(--bg); --e: 0; }
.stage { position: absolute; inset: 0; }
.card {
  position: absolute;
  left: 0; top: 0;
  width: var(--cw); height: var(--ch);
  overflow: hidden;
  background: #f0f0f0;
  will-change: transform;
  transform-origin: 50% 50%;
  -webkit-user-select: none; user-select: none;
}
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card:hover img { transform: scale(1.05); }
.card:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }

.ui { transition: opacity .7s var(--ease) .35s, transform .7s var(--ease) .35s; }
.home:not(.ready) .ui, body:has(.home:not(.ready)) .top { opacity: 0; transform: translateY(6px); }

.ticker {
  position: absolute; left: 0; top: 50%;
  height: 150px; margin-top: -75px;
  display: flex; align-items: center;
  pointer-events: none; z-index: 300;
}
.ticks { position: relative; width: 40px; height: 100%; overflow: hidden; }
.ticks i { position: absolute; left: 0; top: 50%; height: 1px; background: var(--text); }
.current { font-size: 16px; font-weight: 500; line-height: 1.2; letter-spacing: -0.04em; padding-left: 16px; white-space: nowrap; }
.current.swap { animation: swap .45s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } }

.intro {
  position: absolute; left: var(--pad); top: 138px;
  width: min(459px, calc(100% - 2 * var(--pad)));
  color: #fff; mix-blend-mode: difference;
  z-index: 300; pointer-events: none;
}
.home-bar {
  position: absolute; left: var(--pad); right: var(--pad); bottom: 32px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  color: #fff; mix-blend-mode: difference;
  z-index: 300; pointer-events: none;
}
.home-bar .r { justify-self: end; }

/* ---------- Inner pages ---------- */
.page { padding: 144px var(--pad) 160px; min-height: 100vh; }
.page.tall { padding-top: 78px; display: flex; flex-direction: column; }

.rise { animation: rise .9s var(--ease) both; }
.rise:nth-child(2) { animation-delay: .06s; } .rise:nth-child(3) { animation-delay: .12s; }
.rise:nth-child(4) { animation-delay: .18s; } .rise:nth-child(5) { animation-delay: .24s; }
.rise:nth-child(n+6) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 32px 12px; margin-top: 100px; }
.frame { aspect-ratio: 4 / 5; overflow: hidden; background: #f0f0f0; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work-item:hover .frame img { transform: scale(1.04); }
.row { display: flex; flex-direction: column; padding-top: 10px; }

/* Project */
.project .title { margin-top: 4px; }
.meta { margin-top: 56px; max-width: 640px; }
.meta div { display: grid; grid-template-columns: 196px 1fr; padding: 3px 0; }
.meta dt { color: var(--muted); }
.info { margin-top: 56px; max-width: 560px; }
.info .body { margin-top: 8px; color: var(--muted); }
.player {
  position: relative;
  margin-top: 96px;
  width: min(100%, calc(82vh * var(--r)));   /* tall videos stay within the screen */
  aspect-ratio: var(--r);
  background: #000;
}
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player video { object-fit: contain; background: #000; }

/* Vertical videos: text on the left, video on the right */
.p-side { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.p-side .player {
  margin-top: 0;
  justify-self: center;   /* centred in the right half, away from the edge */
  width: min(100%, calc((100vh - 200px) * var(--r)));
}
@media (max-width: 809px) {
  .p-side { grid-template-columns: 1fr; }
  .p-side .player { margin-top: 56px; justify-self: start; width: min(100%, calc(82vh * var(--r))); }
}
.gallery { display: grid; gap: 12px; margin-top: 96px; }
.player + .gallery { margin-top: 12px; }
.gallery.grid { grid-template-columns: repeat(3, 1fr); }
/* 2–3 photos: one small centred row that fits on screen, with space between */
.gallery.line {
  --g: clamp(12px, 3vw, 40px);
  display: flex; justify-content: center; align-items: flex-start; gap: var(--g);
  margin-top: 64px;
}
.gallery.line img {
  height: min(42vh, 420px);
  width: auto;
  max-width: calc((100% - 2 * var(--g)) / 3);
  object-fit: contain;
  background: none;
}
@media (max-width: 809px) { .gallery.line { margin-top: 40px; } }
@media (max-width: 560px) {
  .gallery.line img { height: auto; width: calc((100% - 2 * var(--g)) / 3); }
}
@media (max-width: 1199px) { .gallery.grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 809px) { .gallery.grid { grid-template-columns: 1fr; } }
.gallery img { width: 100%; height: auto; background: #f0f0f0; }
.next { display: inline-flex; flex-direction: column; margin-top: 120px; }
.next:hover .next-title { color: var(--muted); }
.next-title { transition: color .2s; }

/* About */
.about-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.about .statement { max-width: 520px; }
.about .body { max-width: 459px; margin-top: 16px; color: var(--muted); }
.about .statement + .body { margin-top: 40px; }
.portrait { width: 100%; height: auto; background: #f0f0f0; }
.cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 12px; margin-top: 120px; }
.cols h2 { color: var(--muted); margin-bottom: 12px; }
.cols li { padding: 1px 0; }
.stack li { display: flex; flex-direction: column; padding: 0 0 12px; }

/* Services */
.svc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 12px; margin-top: auto; padding-top: 120px; }
.svc li { display: flex; flex-direction: column; gap: 6px; }
.svc h2 { font-size: 16px; font-weight: 400; line-height: 1.3; letter-spacing: -0.03em; }
.svc p { max-width: 32ch; }

/* Contact */
.contact-img { width: 250px; aspect-ratio: 4 / 5; object-fit: cover; background: #f0f0f0; }
.contact-body { margin-top: auto; padding-top: 96px; }
.contact-body .statement { max-width: 459px; }
.details { display: grid; grid-template-columns: repeat(auto-fill, 210px); gap: 24px 12px; margin-top: 40px; }
.details li { display: flex; flex-direction: column; gap: 4px; }
.mail { display: inline-block; margin-top: 96px; overflow-wrap: anywhere; transition: color .2s; }
.mail:hover { color: var(--muted); }

/* Footer */
.foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 32px var(--pad) 28px; color: var(--muted); }
.foot a { justify-self: end; transition: color .2s; }
.foot a:hover { color: var(--text); }

/* ---------- Smaller screens ---------- */
@media (max-width: 1199px) {
  .intro { top: auto; bottom: 72px; }
  .work-grid { grid-template-columns: repeat(4, 1fr); }
  .svc { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 809px) {
  :root { --pad: 16px; }
  .top { grid-template-columns: 1fr auto; }
  .id .muted, .social { display: none; }
  .place { display: none; }
  .menu { gap: 12px; }
  .ticker { display: none; }
  .intro { bottom: 64px; opacity: calc(1 - var(--e) * 1.8); }
  .home-bar { grid-template-columns: 1fr; bottom: calc(16px + env(safe-area-inset-bottom)); text-align: center; }
  .home-bar > :not(.caption) { display: none; }
  .page { padding-top: 112px; }
  .page.tall { padding-top: 72px; }
  .title { font-size: 32px; }
  .work-grid { grid-template-columns: repeat(2, 1fr); margin-top: 56px; }
  .about-top { grid-template-columns: 1fr; gap: 40px; }
  .cols, .svc { grid-template-columns: 1fr; }
  .cols { margin-top: 72px; }
  .meta div { grid-template-columns: 110px 1fr; }
  .contact-img { width: 180px; }
  .foot { grid-template-columns: 1fr; }
  .foot a { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .rise, .current.swap { animation: none; }
  .ui, .card img, .frame img { transition: none; }
}
