/* MILATONIN LAB — the one stylesheet of every page.
   Restyle the site through the variables in :root.
   Building blocks: .site-header, .hero (+ .hero-frame, .hero-media, .viewfinder, .hero-title),
   .masthead (+ .wordmark, .intro), .section (+ .section-head, .section-title, .filters),
   .grid + .card, .band (black block) + .portrait + .chip, .facts, .services, .project-head,
   .logline, .credits, .prose, .embed, .stills, .contact, .links, .button, .label, .site-footer. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Roboto Mono";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("/fonts/roboto-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Roboto Mono";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("/fonts/roboto-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --paper: #ffffff;
  --ink: #000000;
  --dim: #6b6b6b;
  --line: #e4e4e4;
  --night: #000000;
  --night-ink: #f5f5f5;
  --night-dim: #9b9b9b;
  --rec: #ff3b30;

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --mono-weight: 500;
  --wordmark-weight: 900;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1440px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

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

img, video, iframe, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: 0.2em; }
::selection { background: var(--ink); color: var(--paper); }
[hidden] { display: none !important; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.label {
  font: var(--mono-weight) 12px/1.45 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dim { color: var(--dim); }

/* ---- header: the top bar of the letterbox ---- */

.site-header { background: var(--night); color: var(--night-ink); }
.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  min-height: 60px;
  padding-block: 14px;
}
.brand {
  margin-right: auto;
  font: 800 15px/1 var(--sans);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-header nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-header nav a { opacity: 0.72; text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { opacity: 1; }
.site-header nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.clock { color: var(--night-dim); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .clock { display: none; } }

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

.hero { background: var(--night); color: var(--night-ink); }
.hero-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 2.39 / 1;
  min-height: 64svh;
  max-height: 86svh;
  background: #0d0d0d;
}
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.62), rgb(0 0 0 / 0) 55%);
  z-index: 1;
}
.hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/placeholders/grain.svg");
  opacity: 0.16;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}

.viewfinder {
  --c: rgb(255 255 255 / 0.85);
  --l: 22px;
  --w: 1.5px;
  position: absolute;
  inset: clamp(12px, 2.6vw, 36px);
  z-index: 2;
  display: grid;
  grid-template: auto 1fr auto / 1fr auto;
  gap: 12px;
  padding: 16px 20px;
  color: rgb(255 255 255 / 0.9);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.45);
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w),
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l);
  background-repeat: no-repeat;
}
.viewfinder > :nth-child(2) { text-align: right; }
.viewfinder > :nth-child(3) { grid-column: 1; grid-row: 3; align-self: end; }
.viewfinder > :nth-child(4) { grid-column: 2; grid-row: 3; align-self: end; text-align: right; }
.rec { font-variant-numeric: tabular-nums; }
.rec::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--rec);
  vertical-align: 0;
}
@media (prefers-reduced-motion: no-preference) { .rec::before { animation: blink 1.6s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }

.hero-title {
  margin: 10px 0 0;
  max-width: 14em;
  font: 800 clamp(30px, 5vw, 76px)/0.95 var(--sans);
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-wrap: balance;
}
@media (max-width: 560px) {
  .viewfinder > :nth-child(3) { grid-column: 1 / -1; }
  .viewfinder > :nth-child(4) { display: none; }
}

/* ---- giant name after the picture ---- */

.masthead { container-type: inline-size; padding-top: clamp(28px, 4vw, 56px); }
.wordmark {
  margin: 0;
  font-weight: var(--wordmark-weight);
  font-size: calc(100cqi / 7.2);
  line-height: 0.8;
  letter-spacing: -0.05em;
  word-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-left: -0.04em;
}
.intro {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr);
  gap: 20px clamp(20px, 3vw, 48px);
  margin-top: clamp(24px, 3.5vw, 48px);
  padding-block: clamp(20px, 2.4vw, 32px) clamp(40px, 6vw, 88px);
  border-top: 1px solid var(--line);
}
.intro p { margin: 0; }
.intro .statement { font: 500 clamp(18px, 1.6vw, 22px)/1.45 var(--sans); letter-spacing: -0.01em; }
.intro .links { justify-content: flex-end; margin: 0; }
@media (max-width: 860px) {
  .intro { grid-template-columns: 1fr; }
  .intro .links { justify-content: flex-start; }
}

/* ---- sections ---- */

.section { padding-block: clamp(56px, 8vw, 120px); }
.section + .section { padding-top: 0; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 18px 24px;
  margin-bottom: clamp(28px, 4vw, 56px);
}
.section-title {
  margin: 0;
  font: 800 clamp(34px, 5.6vw, 80px)/0.92 var(--sans);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  padding: 10px 15px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: var(--mono-weight) 12px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---- work grid (masonry) ---- */

.grid { columns: 3 300px; column-gap: clamp(16px, 2vw, 28px); }
.card { display: block; break-inside: avoid; margin-bottom: clamp(28px, 3vw, 44px); text-decoration: none; }
.thumb { overflow: hidden; border-radius: var(--radius); background: var(--line); }
.thumb img, .thumb video { width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .thumb img, .thumb video { transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1); }
  .card:hover .thumb img, .card:hover .thumb video { transform: scale(1.03); }
}
.card h3 { margin: 14px 0 4px; font: 600 19px/1.3 var(--sans); letter-spacing: -0.015em; }
.card:hover h3 { text-decoration: underline; text-decoration-thickness: 1.5px; }
.card .label { color: var(--dim); }

/* ---- black block ---- */

.band { background: var(--night); color: var(--night-ink); }
.band .container {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(56px, 8vw, 120px);
}
.band h1, .band h2 {
  margin: 22px 0 22px;
  font: 700 clamp(40px, 6vw, 88px)/0.98 var(--sans);
  letter-spacing: -0.04em;
}
.band p { max-width: 34em; margin: 0 0 1em; color: #cdcdcd; font-size: 18px; }
.band .label { color: var(--night-dim); }
.chip {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 3px;
  background: var(--night-ink);
  color: var(--night) !important;
}
.portrait { margin: 0; }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); filter: grayscale(1) contrast(1.06); }
@media (max-width: 760px) { .band .container { grid-template-columns: 1fr; } }

.links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 28px 0 0; padding: 0; list-style: none; }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }
.links a[href^="http"]::after { content: " ↗"; }

.button {
  display: inline-block;
  margin-top: 12px;
  padding: 15px 22px;
  border: 1px solid currentColor;
  border-radius: 999px;
  text-decoration: none;
}
.button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.band .button:hover { background: var(--night-ink); border-color: var(--night-ink); color: var(--night); }

/* ---- facts and services (about page) ---- */

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 clamp(20px, 3vw, 48px); margin: 0; }
.facts > div { padding: 18px 0 22px; border-top: 1px solid var(--ink); }
.facts dt { margin-bottom: 10px; color: var(--dim); }
.facts dd { margin: 0; font: 600 20px/1.35 var(--sans); letter-spacing: -0.015em; }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(16px, 2vw, 28px); margin: 0; padding: 0; list-style: none; }
.services li { padding: 26px 26px 30px; border: 1px solid var(--line); border-radius: var(--radius); }
.services .label { color: var(--dim); }
.services h3 { margin: 40px 0 10px; font: 700 26px/1.1 var(--sans); letter-spacing: -0.025em; }
.services p { margin: 0; color: #333; }

/* ---- project page ---- */

.project-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 32px clamp(32px, 6vw, 96px);
  padding-block: clamp(40px, 6vw, 88px);
}
.logline { margin: 0; font: 500 clamp(22px, 2.5vw, 32px)/1.3 var(--sans); letter-spacing: -0.02em; }
.credits { display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; margin: 0; align-content: start; }
.credits dt { color: var(--dim); padding-top: 3px; }
.credits dd { margin: 0; }
@media (max-width: 860px) { .project-head { grid-template-columns: 1fr; } }

.prose { max-width: 42em; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { margin: 1.8em 0 0.6em; font: 700 28px/1.15 var(--sans); letter-spacing: -0.025em; }
.prose img { border-radius: var(--radius); margin: 1.6em 0; }

.embed { aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: var(--radius); background: var(--night); }
.embed iframe { width: 100%; height: 100%; border: 0; }

.stills { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.stills img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.stills .wide { grid-column: 1 / -1; }

.back { display: inline-block; margin-top: clamp(40px, 6vw, 80px); text-decoration: none; }
.back:hover { text-decoration: underline; }

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

.contact { border-top: 1px solid var(--line); }
.contact .big {
  display: inline-block;
  margin-top: 18px;
  font: 800 clamp(32px, 7.4vw, 112px)/1 var(--sans);
  letter-spacing: -0.045em;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact .big:hover { text-decoration: underline; text-decoration-thickness: 0.06em; }

/* ---- footer ---- */

.site-footer { background: var(--night); color: var(--night-dim); }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 26px 30px; }

/* ---- "no signal" page ---- */

.no-signal { min-height: calc(100svh - 60px); display: grid; place-items: center; text-align: center; background: var(--night); color: var(--night-ink); padding: 48px var(--gutter); }
.no-signal h1 { margin: 18px 0 26px; font: 900 clamp(96px, 22vw, 260px)/0.8 var(--sans); letter-spacing: -0.06em; }
.card p { margin: 0; }
.no-signal .button:hover { background: var(--night-ink); border-color: var(--night-ink); color: var(--night); }
