:root {
  --bg: #0e0e0d;
  --panel: #191917;
  --ink: #ecebe5;
  --mute: #8b8a84;
  --dim: rgba(236, 235, 229, 0.16);
  --line: rgba(236, 235, 229, 0.13);
  --accent: #ff5a36;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Archivo", system-ui, sans-serif;
  --pad: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.07;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol, ul { list-style: none; }
em, .it { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
h2 {
  font: 800 clamp(44px, 6.5vw, 104px)/0.92 var(--sans);
  letter-spacing: -0.04em;
}
h2 sup {
  font-size: 0.2em;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--accent);
  vertical-align: top;
  margin-left: 0.25em;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 14px;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.pill:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--pad);
  padding: 20px var(--pad);
  font-size: 13px;
  line-height: 1.4;
  mix-blend-mode: difference;
}
.top .label { font-size: 11px; color: #9a9994; }
.logo { font: italic 400 30px/1 var(--serif); }
.top nav { justify-self: end; text-align: right; }
.top nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: end;
  column-gap: var(--pad);
  padding: 120px var(--pad) 40px;
  overflow: hidden;
}
.hero-stage {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(50% 45% at 72% 62%, rgba(255, 90, 54, 0.16), transparent 70%),
    radial-gradient(40% 40% at 20% 30%, rgba(236, 235, 229, 0.05), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(-4%, 3%) scale(1.08); } }
.hero-intro { max-width: 36ch; font-size: clamp(15px, 1.2vw, 18px); color: var(--mute); }
.hero-actions { display: flex; gap: 10px; align-self: end; }
.hero-intro, .hero-actions { margin-bottom: clamp(12px, 2.5vw, 32px); animation: rise 1.2s 0.6s var(--ease) both; }
.hero-name {
  grid-column: 1 / -1;
  font: italic 400 clamp(64px, 22vw, 480px)/0.82 var(--serif);
  letter-spacing: -0.025em;
  white-space: nowrap;
  padding-bottom: 0.14em;
}
.hero-name .w { display: inline-block; }
.hero-name .w span {
  display: inline-block;
  animation: rise 1.1s var(--ease) both;
  animation-delay: calc(var(--i) * 45ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(40%); filter: blur(16px); } }
body:not(.loaded) { overflow: hidden; }
body:not(.loaded) :is(.hero-name span, .hero-intro, .hero-actions) { animation-play-state: paused; }

.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background:
    linear-gradient(var(--mute) 0 0) 24px 24px / 28px 1px,
    linear-gradient(var(--mute) 0 0) 24px 24px / 1px 28px,
    linear-gradient(var(--mute) 0 0) right 24px top 24px / 28px 1px,
    linear-gradient(var(--mute) 0 0) right 24px top 24px / 1px 28px,
    linear-gradient(var(--mute) 0 0) left 24px bottom 24px / 28px 1px,
    linear-gradient(var(--mute) 0 0) left 24px bottom 24px / 1px 28px,
    linear-gradient(var(--mute) 0 0) right 24px bottom 24px / 28px 1px,
    linear-gradient(var(--mute) 0 0) right 24px bottom 24px / 1px 28px,
    var(--bg);
  background-repeat: no-repeat;
  transition: opacity 0.4s 0.8s, visibility 0s 1.2s;
}
.loaded .loader {
  --r: 80vmax;
  clip-path: polygon(evenodd, 0 0, 100% 0, 100% 100%, 0 100%, 0 0, var(--hepta));
  animation: iris 1.2s cubic-bezier(0.5, 0, 0.3, 1);
  opacity: 0;
  visibility: hidden;
}
.loader strong {
  font: 800 clamp(72px, 13vw, 180px)/1 var(--sans);
  font-stretch: 78%;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.loader-bar { width: min(260px, 60vw); height: 1px; background: var(--line); }
.loader-bar i { display: block; width: 0; height: 100%; background: var(--accent); }

.gl { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
main, .foot { position: relative; z-index: 1; }
.scene-off { position: fixed; left: var(--pad); bottom: 14px; z-index: 9; font-size: 10px; opacity: 0.6; pointer-events: none; }
.manifesto { padding: clamp(120px, 22vh, 260px) var(--pad); }
.manifesto p {
  max-width: 19em;
  font: 500 clamp(28px, 4.3vw, 72px)/1.08 var(--sans);
  letter-spacing: -0.025em;
}
.manifesto span { color: var(--dim); transition: color 0.5s; }
.manifesto span.on { color: var(--ink); }
.manifesto span.it.on { color: var(--accent); }

.stats ul { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.stats li { display: flex; flex-direction: column; gap: 8px; padding: 28px var(--pad) 24px; }
.stats li + li { border-left: 1px solid var(--line); }
.stats strong { font: 800 clamp(56px, 7.5vw, 128px)/0.9 var(--sans); font-stretch: 80%; letter-spacing: -0.03em; }
.idx { font-size: 12px; color: var(--mute); }

.work { padding-top: clamp(120px, 20vh, 220px); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 0 var(--pad) 40px;
}
.filters { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.filters button {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 4px 0;
  transition: color 0.3s;
}
.filters button:hover, .filters [aria-pressed="true"] { color: var(--ink); }
.filters [aria-pressed="true"] { text-decoration: underline; text-underline-offset: 5px; }
.filters sup { margin-left: 3px; color: var(--accent); }

.work-list { border-top: 1px solid var(--line); }
.work-list li { border-bottom: 1px solid var(--line); }
.row {
  width: 100%;
  display: grid;
  grid-template-columns: clamp(40px, 7vw, 120px) 1fr auto 48px;
  align-items: center;
  gap: 16px;
  padding: clamp(14px, 1.6vw, 24px) var(--pad);
  text-align: left;
  transition: color 0.35s;
}
.row-num, .row-meta { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.row-title {
  font: 800 clamp(30px, 5.2vw, 88px)/1 var(--sans);
  font-stretch: 78%;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  transition: transform 0.5s var(--ease);
}
.row-arrow { justify-self: end; font-size: 24px; transition: transform 0.4s var(--ease), color 0.3s; }
@media (hover: hover) {
  .work-list:hover .row { color: var(--mute); }
  .work-list .row:hover { color: var(--ink); }
  .row:hover .row-title { transform: translateX(16px); }
  .row:hover .row-arrow { transform: rotate(45deg); color: var(--accent); }
}

.preview {
  --w: min(15vw, 210px);
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5;
  width: var(--w);
  aspect-ratio: 4 / 3;
  margin: calc(var(--w) * -0.375) 0 0 calc(var(--w) * -0.5);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 4px;
  background: var(--panel);
  pointer-events: none;
  opacity: 0;
  scale: 0.7;
  transition: opacity 0.3s, scale 0.5s var(--ease);
}
.preview.on { opacity: 1; scale: 1; }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview span { font: italic 400 calc(var(--w) * 0.4)/1 var(--serif); color: var(--accent); }

.af {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 11;
  pointer-events: none;
  background:
    linear-gradient(var(--accent) 0 0) left top / 12px 1.5px,
    linear-gradient(var(--accent) 0 0) left top / 1.5px 12px,
    linear-gradient(var(--accent) 0 0) right top / 12px 1.5px,
    linear-gradient(var(--accent) 0 0) right top / 1.5px 12px,
    linear-gradient(var(--accent) 0 0) left bottom / 12px 1.5px,
    linear-gradient(var(--accent) 0 0) left bottom / 1.5px 12px,
    linear-gradient(var(--accent) 0 0) right bottom / 12px 1.5px,
    linear-gradient(var(--accent) 0 0) right bottom / 1.5px 12px;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.3s;
}
.af.lock { opacity: 1; }

.services {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--pad);
  padding: clamp(120px, 20vh, 220px) var(--pad);
}
.services h2 { position: sticky; top: 120px; align-self: start; }
.services-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px 16px;
  padding: 28px 0 32px;
  border-top: 1px solid var(--line);
}
.services-list .idx { padding-top: 8px; }
.services-list h3 { font: 700 clamp(24px, 2.4vw, 36px)/1.1 var(--sans); letter-spacing: -0.02em; }
.services-list p { grid-column: 2; max-width: 50ch; color: var(--mute); }
.tools { padding-top: 28px; border-top: 1px solid var(--line); }
.tools p { margin-top: 10px; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.tools.code { padding-top: 18px; border-top: 0; }
.code p { max-width: 50ch; letter-spacing: 0; text-transform: none; color: var(--mute); }

.contact { padding: clamp(120px, 20vh, 220px) var(--pad) 80px; border-top: 1px solid var(--line); }
.contact h2 { font-size: clamp(56px, 11vw, 200px); }
.contact h2 em { color: var(--accent); }
.contact-mail {
  display: inline-block;
  margin-top: 48px;
  font-size: clamp(20px, 3vw, 44px);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
.contact-mail:hover { background-size: 100% 1px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 40px; }
.socials a { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); transition: color 0.3s; }
.socials a:hover { color: var(--ink); }

.foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--pad) 48px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
}
.foot a:hover { color: var(--ink); }

.viewer {
  margin: auto;
  width: min(1100px, calc(100% - 2 * var(--pad)));
  max-height: calc(100svh - 2 * var(--pad));
  padding: clamp(24px, 4vw, 48px);
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
}
@property --r { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --t { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.loader, .viewer[open] {
  --hepta:
    calc(50% + var(--r) * cos(var(--t))) calc(50% + var(--r) * sin(var(--t))),
    calc(50% + var(--r) * cos(var(--t) + 0.143turn)) calc(50% + var(--r) * sin(var(--t) + 0.143turn)),
    calc(50% + var(--r) * cos(var(--t) + 0.286turn)) calc(50% + var(--r) * sin(var(--t) + 0.286turn)),
    calc(50% + var(--r) * cos(var(--t) + 0.429turn)) calc(50% + var(--r) * sin(var(--t) + 0.429turn)),
    calc(50% + var(--r) * cos(var(--t) + 0.571turn)) calc(50% + var(--r) * sin(var(--t) + 0.571turn)),
    calc(50% + var(--r) * cos(var(--t) + 0.714turn)) calc(50% + var(--r) * sin(var(--t) + 0.714turn)),
    calc(50% + var(--r) * cos(var(--t) + 0.857turn)) calc(50% + var(--r) * sin(var(--t) + 0.857turn)),
    calc(50% + var(--r) * cos(var(--t))) calc(50% + var(--r) * sin(var(--t)));
}
.viewer[open] {
  --r: 80vmax;
  clip-path: polygon(var(--hepta));
  animation: iris 1.1s cubic-bezier(0.5, 0, 0.3, 1);
}
@keyframes iris { from { --r: 0px; --t: -0.3turn; } }
.viewer::backdrop { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); }
.viewer-close {
  position: sticky;
  top: 0;
  float: right;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  transition: background 0.3s, color 0.3s;
}
.viewer-close:hover { background: var(--ink); color: var(--bg); }
.viewer-title {
  margin-top: 12px;
  font: 800 clamp(36px, 5vw, 72px)/0.95 var(--sans);
  font-stretch: 78%;
  text-transform: uppercase;
}
.viewer-info {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 24px 48px;
  margin: 32px 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.viewer-info dd { margin-top: 6px; }
.viewer-info .wide dd { max-width: 60ch; color: var(--mute); }
.viewer-link { margin-bottom: 32px; }
.viewer-media { display: grid; gap: 16px; clear: both; }
.viewer-media iframe, .viewer-media video { width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; display: block; }
.viewer-media img { width: 100%; max-height: 88svh; object-fit: contain; display: block; border-radius: 4px; }
.play { position: relative; display: block; width: 100%; background: #000; border-radius: 4px; }
.play img { aspect-ratio: 16 / 9; object-fit: cover; opacity: 0.7; transition: opacity 0.4s; }
.play .pill { position: absolute; inset: 0; margin: auto; width: fit-content; height: fit-content; max-width: 90%; text-align: center; background: var(--bg); }
.play:enabled:hover img { opacity: 1; }
.play:enabled:hover .pill { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.play:disabled { cursor: default; }
.play-keys { font-size: 14px; color: var(--mute); }

.fade { opacity: 0; translate: 0 32px; filter: blur(10px); transition: opacity 1s var(--ease), translate 1s var(--ease), filter 1.2s var(--ease); }
.fade.in { opacity: 1; translate: 0 0; filter: none; }

@media (max-width: 760px) {
  .top { grid-template-columns: auto 1fr; }
  .top .info:not(nav) { display: none; }
  .top nav .label { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-intro { margin-bottom: 20px; }
  .hero-actions { flex-wrap: wrap; margin-bottom: 28px; }
  .hero-name { font-size: 34vw; white-space: normal; line-height: 0.85; }
  .stats ul { grid-template-columns: 1fr 1fr; }
  .stats li:nth-child(3) { border-left: 0; }
  .stats li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .row { grid-template-columns: auto 1fr; gap: 6px 12px; }
  .row-title { grid-column: 1 / -1; grid-row: 2; }
  .row-meta { justify-self: end; }
  .row-arrow { display: none; }
  .services { grid-template-columns: 1fr; gap: 40px; }
  .services h2 { position: static; }
  .services-list li { grid-template-columns: 36px 1fr; }
  .viewer-info { grid-template-columns: auto 1fr; }
  .viewer-info .wide { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fade { opacity: 1; translate: none; }
}

.lite { --sans: "Barlow", system-ui, sans-serif; --serif: "Bebas Neue", "Barlow Condensed", sans-serif; }
.lite em, .lite .it { font-family: inherit; font-style: normal; font-weight: inherit; color: var(--accent); }
.lite h2, .lite .logo, .lite .hero-name, .lite .loader strong, .lite .stats strong, .lite .row-title, .lite .preview span, .lite .services-list h3, .lite .viewer-title { font-family: var(--serif); font-weight: 400; font-style: normal; font-stretch: normal; letter-spacing: 0.01em; }
.lite .label { font-family: "Barlow Condensed", sans-serif; font-weight: 600; }
