/* ==========================================================================
   Dislab — public site styles
   Measurements taken from the original Framer site (dis-lab.com).
   ========================================================================== */

@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/instrument-sans-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: 'Instrument Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/instrument-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Inter with the optical-size axis = "Inter Display" look for big titles */
@font-face { font-family: 'Inter Display'; 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 Display'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #fff;
  --fg: #000;
  --muted: rgba(0, 0, 0, .4);
  --line: #000;
  --pad: 16px;
  --header-h: 48px;
  --gap: 38px;
  --card-ratio: 1.6;
  --ease: cubic-bezier(.22, .61, .2, 1);
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Inter Display', 'Inter', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 11.05px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.is-locked { overflow: hidden; }
img, video, iframe { display: block; max-width: 100%; border: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p, h1, h2, h3, h4, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
.label { text-transform: uppercase; }
.display {
  font-family: var(--display);
  font-variation-settings: 'opsz' 32;
  font-weight: 300;
  font-size: 52px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: none;
}
a, button { transition: opacity .25s var(--ease); }
@media (hover: hover) {
  .site-footer a:hover, .site-footer button:hover, .project-nav a:hover, .overlay-close:hover, .contact-intro a:hover { opacity: .5; }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  color: #fff;
  mix-blend-mode: difference; /* black on white, white on images — like the original */
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.logo { position: absolute; left: 51px; top: 50%; transform: translateY(-50%); width: 76px; }
.logo img { width: 100%; height: auto; filter: invert(1); }
.nav-link { position: absolute; top: 50%; transform: translateY(-50%); line-height: 1; padding: 6px 0; }
.nav-about { left: 26%; }
.nav-contact { left: 52%; }
.clock { position: absolute; right: var(--pad); top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 7px; }
.clock i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.clock time { font-variant-numeric: tabular-nums; }
@media (hover: hover) { .nav-link:hover, .logo:hover { opacity: .6; } }

/* ---------- Hero / showreel ---------- */
.hero {
  position: relative;
  margin-top: var(--header-h);
  /* original height on usual screens; on big/wide screens the video is never cropped/zoomed more than ~2.2:1 */
  height: min(56.25vw, max(62.5vh, 45vw), calc(100vh - var(--header-h)));
  min-height: 200px;
  overflow: hidden;
  background: #000;
}
.hero-video, .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-vimeo { position: absolute; inset: 0; container-type: size; }
.hero-vimeo iframe {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: max(100cqw, 177.78cqh); height: max(100cqh, 56.25cqw); pointer-events: none;
  opacity: 0; transition: opacity .6s var(--ease);
}
.hero-vimeo.is-playing iframe { opacity: 1; }

/* ---------- Title + sentence over the showreel, in negative (like the header) ---------- */
.intro {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end; /* title + bio at the bottom center of the video */
  padding: 0 var(--pad) clamp(28px, 4.5vh, 56px);
  text-align: center;
  color: #fff;
  mix-blend-mode: difference; /* white on dark images, black on light images */
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.intro.is-loading { opacity: 0; }
.intro-title {
  margin: 0;
  max-width: 1100px;
  font-family: var(--display);
  font-variation-settings: 'opsz' 32;
  font-weight: 300;
  font-size: clamp(22px, 2.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.intro-text { max-width: 560px; margin: 12px auto 0; font-size: 12px; text-wrap: balance; }
.js .intro > * { opacity: 0; transform: translateY(16px); animation: intro-in 1s var(--ease) .3s forwards; }
.js .intro > * + * { animation-delay: .45s; }
@keyframes intro-in { to { opacity: 1; transform: none; } }

/* ---------- Filters ---------- */
.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding: 0 var(--pad);
  margin-top: 47px;
}
.filters a { position: relative; padding: 4px 0; transition: opacity .25s var(--ease); }
.filters a:not(.is-active) { opacity: .4; }
.filters a.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor; }
@media (hover: hover) { .filters a:hover { opacity: 1; } }

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  padding: 0 var(--pad);
  margin-top: 150px;
  transition: opacity .3s var(--ease);
}
.grid.is-loading { opacity: 0; }
.grid-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); }
.card { display: block; min-width: 0; }
.card-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 2.5px;
  margin-bottom: 4px;
}
.card-meta > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-num, .card-type { text-align: right; }
.card-media {
  position: relative;
  display: block;
  aspect-ratio: var(--card-ratio);
  overflow: hidden;
  background: #f2f2f2;
  container-type: inline-size;
}
.card-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease);
}
/* Vimeo background video, scaled to "cover" the card whatever the video format */
.card-media iframe {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: max(100cqw, calc(100cqw * var(--r) / var(--card-ratio)));
  height: max(calc(100cqw / var(--card-ratio)), calc(100cqw / var(--r)));
  max-width: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s var(--ease);
}
.card-media.is-playing iframe { opacity: 1; }
@media (hover: hover) {
  .card:hover .card-media img { transform: scale(1.03); }
}

/* ---------- Footer ---------- */
.site-footer { padding: 150px var(--pad) 20px; }
.footer-email {
  display: inline-block;
  font-family: var(--display);
  font-variation-settings: 'opsz' 32;
  font-weight: 300;
  font-size: 56px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-transform: none;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: 360px;
}
.footer-grid ul { display: grid; gap: 4px; margin-top: 14px; }
.f-sitemap { grid-column: 1; }
.f-social { grid-column: 5; }
.f-location { grid-column: 6; }
.f-location p:last-child { margin-top: 14px; }
.footer-legal { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
.footer-legal a:last-child { grid-column: 4; }

/* ---------- Overlays (About / Contact) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.overlay[hidden] { display: block; visibility: hidden; pointer-events: none; }
.overlay.is-open { opacity: 1; transform: none; visibility: visible; }
.overlay-inner { position: relative; min-height: 100%; padding: 12px 12px 40px; }
.overlay-close { position: absolute; right: 12px; top: 6px; padding: 6px 0; }
.overlay .display { margin-top: 26px; }

.about-image { margin-top: 6px; height: min(320px, 40vh); overflow: hidden; background: #111; }
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-text { max-width: 600px; margin-top: 12px; }
.about-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 110px; }
.about-lists ul { display: grid; gap: 4px; margin-top: 12px; }

.contact-intro { margin-top: 18px; }
.contact-direct { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; }
.contact-direct a { text-decoration: underline; text-underline-offset: 2px; }
.contact-promise { opacity: .4; }
.f-phone { margin-top: 6px; }
.contact-form { display: grid; gap: 30px; margin-top: 30px; }
.field { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field legend { padding: 0; margin-bottom: 10px; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  font: 13px/1.4 var(--sans);
  letter-spacing: -0.01em;
  color: var(--fg);
  padding: 12px 12px;
  -webkit-appearance: none;
  appearance: none;
}
.field input { height: 44px; }
.field textarea { height: 125px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(0,0,0,.85); }
.field input:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--line); }
.service-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.service { position: relative; }
.service input { position: absolute; opacity: 0; pointer-events: none; }
.service span {
  display: flex; align-items: center; justify-content: center;
  height: 36px; border: 1px solid var(--line);
  font-size: 12px; text-transform: none;
  cursor: pointer; user-select: none;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.service input:checked + span { background: #000; color: #fff; }
.service input:focus-visible + span { outline: 1px solid #000; outline-offset: 2px; }
.send { justify-self: center; font-size: 12px; padding: 14px 24px; }
.send:disabled { color: var(--muted); cursor: default; }
.form-status { text-align: center; min-height: 1.5em; margin-top: -20px; }
.form-status.is-error { color: #c00; }
.form-note { font-size: 9px; }
.form-note a { text-decoration: underline; text-underline-offset: 2px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.contact-form.is-sent .field, .contact-form.is-sent .send, .contact-form.is-sent .form-note { display: none; }
.contact-form.is-sent .form-status { margin-top: 40px; font-size: 13px; }

/* ---------- Project page ---------- */
.project { padding: 0 var(--pad); }
.project-head { padding-top: 120px; }
.project-title sup { font-family: var(--sans); font-size: 11.05px; letter-spacing: -0.01em; vertical-align: top; position: relative; top: 4px; margin-left: 8px; }
.project-info { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.project-info p + p { margin-top: 2px; }
.player { margin-top: 40px; }
.player-frame {
  position: relative;
  aspect-ratio: var(--r);
  width: min(100%, calc((100vh - 120px) * var(--r)));
  margin: 0 auto;
  background: #000;
}
.player-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.project-details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 60px; }
.project-desc p:last-child { margin-top: 12px; max-width: 520px; }
.project-credits { grid-column: 2; }
.project-desc + .project-credits { grid-column: auto; }
.project-credits dl { display: grid; gap: 4px; margin-top: 12px; }
.project-credits dl > div { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.project-credits dt { opacity: .5; }
.project-cta { margin-top: 120px; text-align: center; display: grid; justify-items: center; gap: 14px; }
.project-cta-title {
  font-family: var(--display); font-variation-settings: 'opsz' 32; font-weight: 300;
  font-size: clamp(30px, 3.6vw, 52px); line-height: 1.1; letter-spacing: -0.02em; text-transform: none;
}
.project-cta-link { padding: 12px 22px; border: 1px solid #000; transition: background .25s var(--ease), color .25s var(--ease); }
.project-cta-note { opacity: .4; }
@media (hover: hover) { .project-cta-link:hover { background: #000; color: #fff; } }
.project-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 100px; }
.project-nav .next span { opacity: .5; margin-right: 6px; }

/* ---------- Legal ---------- */
.legal { padding: 120px var(--pad) 0; }
.legal-body { max-width: 720px; margin-top: 40px; text-transform: none; font-size: 13px; line-height: 1.6; }
.legal-body h2, .legal-body h3 { font-size: 13px; font-weight: 500; text-transform: uppercase; margin-top: 36px; }
.legal-body h4 { font-size: 13px; font-weight: 500; margin-top: 18px; }
.legal-body p, .legal-body ul { margin-top: 10px; }
.legal-body ul { list-style: disc; padding-left: 20px; }
.legal-body a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 10px; padding-top: var(--header-h); }
.notfound-code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 64px; line-height: 1; letter-spacing: 0; }
.notfound a { margin-top: 20px; }
.page-404 .site-footer { display: none; }

/* ---------- Admin shortcut (only visible when logged in) ---------- */
.admin-badge { position: fixed; right: 16px; bottom: 16px; z-index: 90; background: #000; color: #fff; padding: 8px 12px; border-radius: 20px; font-size: 10px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Mobile ---------- */
@media (max-width: 809px) {
  :root { --header-h: 64px; }
  .logo { left: 43px; width: 59px; }
  .nav-about { left: 45%; }
  .nav-contact { left: auto; right: var(--pad); }
  .clock { display: none; }
  .hero { height: auto; aspect-ratio: 16 / 9; min-height: 0; }
  .hero { aspect-ratio: auto; height: max(300px, 56.25vw); }
  .intro-title { font-size: clamp(19px, 5.4vw, 28px); }
  .intro { padding-bottom: 22px; }
  .intro-text { margin-top: 12px; max-width: 320px; }
  .filters { margin-top: 150px; gap: 4px 12px; padding: 0 8px; }
  .project-cta { margin-top: 80px; }
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-email { font-size: clamp(28px, 9.4vw, 56px); }
  .footer-grid { grid-template-columns: 1fr 1fr; margin-top: 160px; row-gap: 40px; }
  .f-sitemap { grid-column: 1; }
  .f-social { grid-column: 2; grid-row: 1; }
  .f-location { grid-column: 1 / -1; }
  .footer-legal { grid-template-columns: 1fr 1fr; margin-top: 40px; }
  .footer-legal a:last-child { grid-column: 2; }
  .display { font-size: 40px; }
  .service-options { grid-template-columns: 1fr 1fr; }
  .about-lists { margin-top: 60px; }
  .project-head { padding-top: 100px; }
  .player-frame { width: 100%; }
  .player.is-vertical .player-frame { width: min(100%, calc((100svh - 120px) * var(--r))); }
  .project-details { grid-template-columns: 1fr; }
  .project-credits, .project-desc + .project-credits { grid-column: 1; }
  .project-nav { flex-direction: column; }
  .project-nav .next { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
}
