/* 722MGMT prototype. Monochrome shell, colour only inside client media. */
:root {
  --bg: #0e0e0c;
  --bg-2: #161614;
  --fg: #f4f3ef;
  --fg-2: #a4a29b;
  --fg-3: #5f5e58;
  --line: rgba(244, 243, 239, 0.12);
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mark: "Michroma", "Eurostile", "Arial Black", sans-serif;
  --gutter: clamp(16px, 3.2vw, 52px);
  --gap: clamp(8px, 1.4vw, 22px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 16px; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; }
svg { fill: currentColor; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }

/* Type roles */
.label {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  line-height: 1.5;
}
.display {
  margin: 0;
  color: var(--fg);
  font-size: clamp(44px, 8.6vw, 152px);
  font-weight: 600;
  font-stretch: 72%;
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.display em {
  font-family: var(--mark);
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.58em;
  line-height: 1;
  vertical-align: 0.06em;
}
.lede {
  margin: 0;
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.45;
  max-width: 42ch;
  color: var(--fg-2);
}

/* Split words for reveal */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.w > span { display: inline-block; will-change: transform; }

/* Loader */
.loader { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; }
.loader__logo { width: min(150px, 34vw); color: var(--fg); }
.loader__bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(40px + env(safe-area-inset-bottom, 0px)); height: 1px; background: var(--line); }
.loader__bar span { display: block; height: 100%; width: 0; background: var(--fg); }

/* Grain and cursor */
.grain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 80; pointer-events: none; opacity: 0.055; }
.cursor {
  position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none;
  width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: #fff; mix-blend-mode: difference; display: none; place-items: center;
  transition: width 0.35s var(--ease), height 0.35s var(--ease), margin 0.35s var(--ease), background 0.35s, border-color 0.35s;
  border: 1px solid transparent;
}
.cursor.is-big { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: rgba(255, 255, 255, 0.06); border-color: #fff; }
.cursor.is-link { width: 28px; height: 28px; margin: -14px 0 0 -14px; background: transparent; border-color: #fff; }
.cursor__label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; opacity: 0; transition: opacity 0.3s; }
.cursor.is-big .cursor__label { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: grid; }
  html, body, a, button, .tile, .index li { cursor: none; }
}

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(18px + env(safe-area-inset-top, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px)) 18px max(var(--gutter), env(safe-area-inset-left, 0px));
  mix-blend-mode: difference; color: #fff;
}
.nav__logo { display: block; width: 52px; opacity: 0; transform: translateY(-6px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.nav--mark .nav__logo { opacity: 1; transform: none; }
.nav__links { display: flex; gap: clamp(18px, 3vw, 40px); }
.nav__links a, .foot a, .filters button, .views button, .lightbox__close {
  font-size: 11px; font-weight: 500; font-stretch: 112%; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; line-height: 1.5;
}
.nav__links a { position: relative; color: #fff; }
.nav__links a::after, .foot a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.nav__links a:hover::after, .foot a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Hero */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--bg); }
.hero__media { position: absolute; inset: -12% 0; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; }
.hero__video.is-active { opacity: 1; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(14, 14, 12, 0.35), rgba(14, 14, 12, 0.05) 40%, rgba(14, 14, 12, 0.78) 100%); }
.hero__mark { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: clamp(200px, 40vw, 680px); color: var(--fg); filter: drop-shadow(0 2px 40px rgba(0, 0, 0, 0.25)); }
.hero__mark svg { width: 100%; height: auto; }
.hero__foot {
  position: absolute; left: max(var(--gutter), env(safe-area-inset-left, 0px)); right: max(var(--gutter), env(safe-area-inset-right, 0px));
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; color: var(--fg);
}
.hero__foot { justify-content: flex-end; }
.hero__foot .label { color: var(--fg); }
.hero__scroll { display: flex; align-items: center; gap: 12px; }
.hero__line { display: block; width: 48px; height: 1px; background: currentColor; transform-origin: left; animation: scrollline 2.6s var(--ease) infinite; }
@keyframes scrollline { 0% { transform: scaleX(0); transform-origin: left; } 45% { transform: scaleX(1); transform-origin: left; } 55% { transform: scaleX(1); transform-origin: right; } 100% { transform: scaleX(0); transform-origin: right; } }

/* Statement */
.statement {
  padding: clamp(96px, 16vh, 200px) max(var(--gutter), env(safe-area-inset-right, 0px)) clamp(96px, 16vh, 200px) max(var(--gutter), env(safe-area-inset-left, 0px));
  min-height: 100svh; display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: auto 1fr; gap: 40px var(--gap); border-top: 1px solid var(--line);
}
.statement__label { grid-column: 1 / -1; }
.statement__title { grid-column: 1 / -1; align-self: center; max-width: none; font-size: clamp(40px, 8vw, 164px); line-height: 0.98; padding-bottom: 6vh; }
.statement__title em { font-size: 0.5em; letter-spacing: 0.01em; vertical-align: 0.1em; }

/* Work */
.work { padding: 0 max(var(--gutter), env(safe-area-inset-right, 0px)) clamp(80px, 12vh, 160px) max(var(--gutter), env(safe-area-inset-left, 0px)); position: relative; }
.work__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px 32px; padding: 26px 0 34px; border-top: 1px solid var(--line); }
.work__count { color: var(--fg-3); margin-left: 0.6em; font-variant-numeric: tabular-nums; }
.work__tools { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; }
.filters, .views { display: flex; flex-wrap: wrap; gap: 18px; }
.filters button, .views button { color: var(--fg-3); position: relative; transition: color 0.4s; padding-bottom: 2px; }
.filters button::after, .views button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor; transform: scaleX(0); transition: transform 0.4s var(--ease); transform-origin: left; }
.filters button:hover, .views button:hover { color: var(--fg-2); }
.filters button.is-active, .views button.is-active { color: var(--fg); }
.filters button.is-active::after, .views button.is-active::after { transform: scaleX(1); }
.views { padding-left: 32px; border-left: 1px solid var(--line); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); align-items: start; }
.col { display: grid; gap: var(--gap); }
.col:nth-child(2) { padding-top: clamp(48px, 9vw, 150px); }
.col:nth-child(3) { padding-top: clamp(16px, 3vw, 50px); }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } .col:nth-child(2) { padding-top: clamp(40px, 12vw, 120px); } }

.tile { margin: 0; position: relative; background: var(--bg-2); transition: opacity 0.6s var(--ease); }
.tile__media { position: relative; overflow: hidden; width: 100%; aspect-ratio: var(--r, 4 / 5); max-width: 100%; }
.tile__media img, .tile__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(0.82);
  transform: scale(1.001);
  transition: filter 0.8s var(--ease), transform 1.4s var(--ease), opacity 0.6s;
}
.tile__media video { opacity: 0; }
.tile.is-playing .tile__media video { opacity: 1; }
.tile__cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: #fff; }
.tile__cap strong { font-weight: 500; font-size: 13px; letter-spacing: 0.02em; }
.tile__cap span { font-size: 10px; font-weight: 500; font-stretch: 112%; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; opacity: 0.8; }
@media (hover: hover) {
  .tile__cap { position: absolute; left: 14px; right: 14px; bottom: 12px; opacity: 0; transform: translateY(8px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); pointer-events: none; }
  .tile:hover .tile__cap { opacity: 1; transform: none; }
  .tile:hover .tile__media img, .tile:hover .tile__media video { filter: none; transform: scale(1.04); }
  .grid:has(.tile:hover) .tile:not(:hover) { opacity: 0.45; }
}
@media (hover: none) {
  .tile__media img { filter: grayscale(0.35) contrast(1.02); }
  .tile__cap { padding: 10px 0 2px; color: var(--fg-2); flex-direction: column; align-items: flex-start; gap: 4px; }
  .tile__cap span { white-space: normal; }
  .tile__cap strong { color: var(--fg); font-size: 12px; }
}

.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.index li {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px 32px; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line); color: var(--fg-2); transition: color 0.4s, opacity 0.4s;
}
.index li .name { color: var(--fg-3); font-size: clamp(22px, 3.2vw, 44px); font-weight: 500; font-stretch: 78%; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1; color: var(--fg-3); transition: color 0.4s; min-width: 0; }
.index li:hover .name, .index li:hover { color: var(--fg); }
.index li .meta, .index li .year { font-size: 11px; font-weight: 500; font-stretch: 112%; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.index:has(li:hover) li:not(:hover) { opacity: 0.5; }
@media (max-width: 600px) { .index li { grid-template-columns: 1fr auto; } .index li .meta { grid-column: 1 / -1; } }

.preview { position: fixed; left: 0; top: 0; z-index: 40; width: clamp(180px, 22vw, 340px); aspect-ratio: 4 / 5; pointer-events: none; opacity: 0; overflow: hidden; background: var(--bg-2); }
.preview img { width: 100%; height: 100%; object-fit: cover; }

/* About */
.about { padding: clamp(96px, 14vh, 180px) max(var(--gutter), env(safe-area-inset-right, 0px)) clamp(60px, 10vh, 120px) max(var(--gutter), env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); }
.about__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px var(--gap); padding: clamp(32px, 5vh, 64px) 0; border-top: 1px solid var(--line); }
.about__row:first-child { border-top: 0; padding-top: 0; }
.about__row h2 { font-family: var(--mark); font-style: normal; font-weight: 400; font-size: clamp(28px, 4.2vw, 68px); line-height: 1; margin: 0; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg); }
.about__row p { margin: 0; max-width: 44ch; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.5; color: var(--fg-2); min-width: 0; }
@media (max-width: 720px) { .about__row { grid-template-columns: 1fr; } }

/* Contact */
.contact { padding: clamp(120px, 22vh, 260px) max(var(--gutter), env(safe-area-inset-right, 0px)) clamp(80px, 14vh, 180px) max(var(--gutter), env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); }
.email { display: block; margin-top: 28px; text-align: left; max-width: 100%; }
.email__text { display: block; font-size: clamp(32px, 7.4vw, 140px); font-weight: 600; font-stretch: 70%; text-transform: uppercase; line-height: 1; letter-spacing: -0.01em; color: var(--fg); transition: color 0.5s; word-break: break-word; }
.email__mark { display: inline-block; height: 0.72em; vertical-align: baseline; margin: 0 0.04em; }
.email__mark svg { height: 100%; width: auto; fill: currentColor; }
.email:hover .email__text { color: var(--fg-2); }
.email__hint { display: block; margin-top: 18px; font-size: 11px; font-weight: 500; font-stretch: 112%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); transition: color 0.4s; }
.email:hover .email__hint { color: var(--fg-2); }

/* Footer */
.foot {
  display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding: 24px max(var(--gutter), env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(var(--gutter), env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--line);
}
.foot p, .foot a { margin: 0; font-size: 11px; font-weight: 500; font-stretch: 112%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); text-decoration: none; position: relative; }
.foot a { color: var(--fg-2); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--fg); }
.lightbox::backdrop { background: rgba(14, 14, 12, 0.9); }
.lightbox__close { position: absolute; z-index: 2; top: calc(22px + env(safe-area-inset-top, 0px)); right: max(var(--gutter), env(safe-area-inset-right, 0px)); color: var(--fg-2); }
.lightbox__close:hover { color: var(--fg); }
.lightbox__close:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 5px; }
.lightbox__media { position: absolute; inset: clamp(64px, 9vh, 100px) max(var(--gutter), env(safe-area-inset-right, 0px)) clamp(64px, 9vh, 100px) max(var(--gutter), env(safe-area-inset-left, 0px)); display: flex; align-items: center; justify-content: center; }
.lightbox__frame { position: relative; width: min(100%, calc((100vh - 2 * clamp(64px, 9vh, 100px)) * 16 / 9)); aspect-ratio: 16 / 9; max-height: 100%; background: #000; }
.lightbox__frame iframe, .lightbox__frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; }
.lightbox__out { position: absolute; left: 0; bottom: -34px; font-size: 11px; font-weight: 500; font-stretch: 112%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-2); text-decoration: none; }
.lightbox__out:hover { color: var(--fg); }
.lightbox__cap { position: absolute; left: max(var(--gutter), env(safe-area-inset-left, 0px)); bottom: calc(26px + env(safe-area-inset-bottom, 0px)); color: var(--fg-2); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero__line { animation: none; transform: none; }
  .hero__video { transition: none; }
  .tile__media img, .tile__media video { transition: filter 0.3s, opacity 0.3s; transform: none !important; }
}

/* Small screens */
@media (max-width: 520px) {
  .nav__links { gap: 14px; }
  .nav__links a { font-size: 10px; letter-spacing: 0.1em; }
  .nav__logo { width: 42px; }
  .work__tools { width: 100%; justify-content: space-between; }
  .views { padding-left: 0; border-left: 0; }
  .filters, .views { gap: 14px; }
}
