@font-face {
  font-family: "ZT Bros Oskon";
  src: url("/assets/ZTBrosOskon90s-Regular.otf") format("opentype");
  font-display: swap;
}

:root {
  --paper: #f2efe8;
  --ink: #171714;
  --signal: #e44f2a;
  --line: rgba(23, 23, 20, .22);
  --ease: cubic-bezier(.76, 0, .24, 1);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overscroll-behavior: none;
}

body {
  overflow: hidden;
  background: var(--paper);
}

a { color: inherit; text-decoration: none; }

button,
a { -webkit-tap-highlight-color: transparent; }

#gpu-canvas {
  position: fixed;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#portfolio-app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.experience-nav,
.experience-back,
.experience-footer {
  position: fixed;
  z-index: 10;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .01em;
}

.experience-nav {
  top: 24px;
  left: 28px;
  display: flex;
  gap: 20px;
}

.experience-nav a,
.experience-footer a {
  position: relative;
}

.experience-nav a::after,
.experience-footer a::after,
.experience-back::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}

.experience-nav a:hover::after,
.experience-nav a[aria-current="page"]::after,
.experience-footer a:hover::after,
.experience-back:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.experience-back {
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
}

.experience-back span { color: var(--signal); }

.experience-footer {
  right: 28px;
  bottom: 24px;
  left: 28px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.experience-footer p { margin: 0; }
.experience-footer a { pointer-events: auto; }

.experience-preloader {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 24px 28px;
  background: var(--ink);
  color: var(--paper);
  transition: clip-path 1s var(--ease);
  clip-path: inset(0 0 0 0);
}

.experience-preloader p {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.experience-preloader strong {
  font-family: "ZT Bros Oskon", sans-serif;
  font-size: clamp(86px, 14vw, 220px);
  font-weight: 400;
  line-height: .72;
  letter-spacing: -.07em;
}

.experience-ready .experience-preloader {
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
}

.page {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100vh;
}

.page-title {
  position: fixed;
  z-index: 6;
  top: 20px;
  right: 28px;
  margin: 0;
  overflow: hidden;
  font-family: "ZT Bros Oskon", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.03em;
}

.page-title span { display: block; }

.carousel {
  position: fixed;
  inset: 0;
  touch-action: pan-y;
}

.slot {
  position: absolute;
  display: block;
  width: 23vw;
  min-width: 250px;
  max-width: 430px;
  margin: 0;
}

.slot figure,
.slot-video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  margin: 0;
  border-radius: 8px;
}

.slot figure {
  position: relative;
  background: rgba(23, 23, 20, .08);
}

.slot-video {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}

.gpu-ready .slot-video { visibility: hidden; }

.slot-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 9px;
  font-size: 11px;
}

.slot-caption span:last-child { color: rgba(23, 23, 20, .55); }

.page-index {
  cursor: grab;
  touch-action: none;
}

.page-index:active { cursor: grabbing; }

.index-hit {
  position: fixed;
  z-index: 5;
  display: block;
  border-radius: 8px;
}

.index-hit span {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  width: max-content;
  font-size: 10px;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .25s ease, transform .25s ease;
}

.index-hit:hover span,
.index-hit:focus-visible span {
  opacity: 1;
  transform: none;
}

.page-inner {
  position: relative;
  min-height: auto;
  padding: 14vh 0 22vh;
}

.page-inner .page-title {
  color: rgba(23, 23, 20, .55);
}

.inner-copy {
  position: fixed;
  z-index: 6;
  top: 14vh;
  left: 28px;
  width: min(230px, 22vw);
}

.inner-label,
.inner-copy h2,
.inner-fact {
  margin: 0;
}

.inner-label {
  margin-bottom: 18px;
  color: rgba(23, 23, 20, .48);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.inner-copy h2 {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
}

.inner-fact {
  max-width: 30ch;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
}

.inner-view-cue {
  display: block;
  margin-top: 20px;
  color: rgba(23, 23, 20, .48);
  font-size: 9px;
}

.stack {
  display: grid;
  gap: 7vh;
  padding-bottom: 8vh;
}

.stack .slot {
  position: relative;
  z-index: 4;
  width: min(23vw, 360px);
  min-width: 250px;
  max-width: 360px;
  margin: 0 auto;
  cursor: pointer;
}

.stack .slot figure { aspect-ratio: 4 / 5; }

.stack .slot:focus-visible {
  outline: 1px solid var(--signal);
  outline-offset: 6px;
}

.film-viewer-fallback,
.film-viewer-ui {
  position: fixed;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.film-viewer-fallback {
  z-index: 3;
  background: #000;
}

.film-viewer-fallback video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-viewer-ui {
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px;
  color: #fff;
}

.film-viewer-ui p {
  margin: 0;
  font-size: 11px;
}

.film-viewer-ui button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.film-viewer-ui button span {
  display: inline-block;
  margin-left: 8px;
  font-size: 16px;
  line-height: 0;
}

.film-viewer-open #portfolio-app,
.film-viewer-open .experience-nav,
.film-viewer-open .experience-back,
.film-viewer-open .experience-footer,
.film-viewer-open .experience-cursor {
  opacity: 0;
  pointer-events: none;
}

.film-viewer-open {
  overflow: hidden !important;
}

.film-viewer-open .film-viewer-ui,
.film-viewer-open:not(.gpu-ready) .film-viewer-fallback {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.experience-cursor {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: var(--signal);
  color: var(--paper);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.65);
  transition: opacity .2s ease, transform .35s var(--ease);
}

.experience-cursor span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.cursor-active .experience-cursor {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.page.is-incoming {
  pointer-events: none;
}

.route-busy a { pointer-events: none; }

@media (max-width: 760px) {
  .experience-nav { top: 18px; left: 18px; }
  .experience-back { top: auto; bottom: 18px; left: 18px; transform: none; }
  .experience-footer { right: 18px; bottom: 18px; left: auto; }
  .experience-footer p { display: none; }
  .page-title { top: 18px; right: 18px; }
  .experience-preloader { padding: 18px; }

  .slot {
    width: 68vw;
    min-width: 0;
  }

  .slot-caption {
    font-size: 10px;
  }

  .inner-fact {
    max-width: 34ch;
    font-size: 12px;
  }

  .page-inner {
    padding-top: 110px;
  }

  .inner-copy {
    position: relative;
    top: auto;
    left: auto;
    width: calc(100vw - 36px);
    margin: 0 18px 72px;
  }

  .stack { gap: 9vh; }

  .stack .slot {
    width: min(72vw, 320px);
    min-width: 0;
  }

  .film-viewer-ui { padding: 18px; }
  .experience-cursor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ── Content pages (About / Contact) ── */

body.content-page {
  overflow: auto;
}

.content-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 120px 28px 120px;
}

.content-title {
  margin: 0 0 40px;
  font-family: "ZT Bros Oskon", sans-serif;
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: .9;
}

.content-body {
  font-size: 14px;
  line-height: 1.65;
}

.content-body p {
  margin: 0 0 20px;
  max-width: 48ch;
}

.content-lead {
  font-size: 16px;
  line-height: 1.5;
}

.contact-email a {
  position: relative;
  display: inline-block;
  font-family: "ZT Bros Oskon", sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1;
}

.contact-email a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  left: 0;
  height: 2px;
  background: var(--signal);
}

.contact-email a:hover {
  color: var(--signal);
}

.contact-email a:focus-visible {
  outline: 1px solid var(--signal);
  outline-offset: 6px;
}

@media (max-width: 760px) {
  .content-main {
    padding: 80px 18px 80px;
  }
}
