/* KSO Motion — site styles. One file, no framework. */

@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/inter-tight-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --bg-raised: #121212;
  --ink: #ecebe7;
  --ink-2: #a3a29d;
  --ink-3: #6b6a66;
  --rule: rgba(236, 235, 231, 0.12);
  --gutter: clamp(20px, 5vw, 64px);
  --measure: 38rem;
  --max: 1440px;
  --font: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: 12px; z-index: 100;
  padding: 8px 12px; background: var(--ink); color: var(--bg); text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Wordmark ---------- */
.wordmark {
  display: inline-flex; align-items: baseline; gap: 0.32em;
  font-weight: 600; letter-spacing: -0.01em; font-size: 0.95rem;
  text-decoration: none; white-space: nowrap;
}
.wordmark__dot {
  display: inline-block; width: 0.22em; height: 0.22em; background: currentColor;
  transform: translateY(-0.02em);
}

/* ---------- Header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  padding-top: clamp(18px, 3vw, 32px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.site-header nav a {
  font-size: 0.875rem; color: var(--ink-2); text-decoration: none; margin-left: 28px;
  transition: color 0.2s var(--ease);
}
.site-header nav a:hover { color: var(--ink); }

/* Inner pages: header sits in flow */
.site-header--static { position: relative; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end; overflow: hidden; background: #000;
}
.hero__media, .hero__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.35) 38%, rgba(10,10,10,0) 62%),
    linear-gradient(to bottom, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0) 20%);
}
.hero__content {
  position: relative; z-index: 2; width: 100%;
  padding-bottom: clamp(32px, 7vh, 80px);
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px;
}
.hero h1 {
  margin: 0; max-width: 18ch;
  font-size: clamp(2.2rem, 5.4vw, 5rem); line-height: 0.98;
  font-weight: 500; letter-spacing: -0.035em;
}
.hero__sub { margin: 18px 0 0; color: var(--ink-2); max-width: 30rem; font-size: 1rem; }

/* ---------- Buttons ---------- */
.btn-film {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 0; border: 0; background: none; color: var(--ink);
  font: inherit; font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.005em;
  cursor: pointer; text-decoration: none;
}
.btn-film__icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(236,235,231,0.45);
  transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.btn-film__icon svg { width: 13px; height: 13px; margin-left: 2px; fill: currentColor; }
.btn-film:hover .btn-film__icon { border-color: var(--ink); background: rgba(236,235,231,0.08); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--rule); padding-bottom: 6px;
  transition: border-color 0.25s var(--ease);
}
.link-arrow:hover { border-color: var(--ink); }
.link-arrow span { transition: transform 0.25s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 13vw, 180px) 0; }
.section + .section { border-top: 1px solid var(--rule); }

.eyebrow {
  margin: 0 0 28px; font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--ink-3);
}

.statement {
  margin: 0; max-width: 22ch;
  font-size: clamp(1.75rem, 3.8vw, 3.25rem); line-height: 1.08;
  font-weight: 500; letter-spacing: -0.028em;
}

.cols {
  display: grid; gap: 28px 64px; margin-top: clamp(40px, 6vw, 80px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  max-width: 64rem; margin-left: auto;
}
.cols p { margin: 0; color: var(--ink-2); }
.cols p strong { color: var(--ink); font-weight: 500; }

/* ---------- Work ---------- */
.work-card { display: block; text-decoration: none; }
.work-card__frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-raised);
}
.work-card__frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease), opacity 0.6s var(--ease);
}
.work-card:hover .work-card__frame img { transform: scale(1.015); }
.work-card__meta {
  display: grid; gap: 12px 48px; margin-top: 28px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
.work-card__title { margin: 0; font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.work-card__title span { color: var(--ink-3); }
.work-card__desc { margin: 0; color: var(--ink-2); max-width: var(--measure); }
.work-card__cta { margin-top: 20px; }

/* ---------- Contact ---------- */
.contact h2 {
  margin: 0; font-size: clamp(2rem, 5vw, 4.25rem); line-height: 1; font-weight: 500; letter-spacing: -0.035em;
}
.contact p { margin: 20px 0 40px; color: var(--ink-2); max-width: 30rem; }
.contact__email {
  font-size: clamp(1.25rem, 2.6vw, 2rem); font-weight: 500; letter-spacing: -0.02em;
  text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 6px;
  transition: border-color 0.25s var(--ease); word-break: break-word;
}
.contact__email:hover { border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 48px 0 40px; font-size: 0.875rem; color: var(--ink-3); }
.site-footer .wrap { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.site-footer p { margin: 0; max-width: 32rem; }
.site-footer .wordmark { color: var(--ink); margin-bottom: 14px; }
.site-footer a { color: var(--ink-2); }
.site-footer__legal { justify-self: end; text-align: right; }
@media (max-width: 720px) { .site-footer__legal { justify-self: start; text-align: left; } }

/* ---------- Case study ---------- */
.cs-head { padding: clamp(72px, 12vw, 160px) 0 clamp(40px, 6vw, 72px); }
.cs-back { display: inline-block; margin-bottom: 40px; font-size: 0.875rem; color: var(--ink-2); text-decoration: none; }
.cs-back:hover { color: var(--ink); }
.cs-head h1 {
  margin: 0; max-width: 16ch;
  font-size: clamp(2.4rem, 6vw, 5.5rem); line-height: 0.98; font-weight: 500; letter-spacing: -0.035em;
}
.cs-facts {
  display: flex; flex-wrap: wrap; gap: 10px 40px; margin: 36px 0 0; padding: 0; list-style: none;
  font-size: 0.875rem; color: var(--ink-2);
}
.cs-facts dt { color: var(--ink-3); margin-bottom: 2px; }
.cs-facts dd { margin: 0; color: var(--ink); }

.cs-film { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.cs-film img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.cs-film .btn-film { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.cs-film .btn-film__icon { width: 72px; height: 72px; background: rgba(10,10,10,0.3); }

.cs-body { padding: clamp(64px, 10vw, 140px) 0 0; }
.cs-block {
  display: grid; gap: 16px 64px; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  padding-bottom: clamp(56px, 8vw, 112px);
}
@media (max-width: 760px) { .cs-block { grid-template-columns: 1fr; } }
.cs-block h2 { margin: 0; font-size: 0.875rem; font-weight: 500; color: var(--ink-3); letter-spacing: 0.01em; padding-top: 0.35em; }
.cs-block__body { max-width: var(--measure); }
.cs-block__body p { margin: 0 0 1.1em; color: var(--ink-2); }
.cs-block__body p:last-child { margin-bottom: 0; }
.cs-block__body .lead {
  color: var(--ink); font-size: clamp(1.35rem, 2.4vw, 1.875rem); line-height: 1.2; font-weight: 500; letter-spacing: -0.02em;
}
.cs-block__body strong { color: var(--ink); font-weight: 500; }

.notes { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.notes li {
  display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 6px 32px;
  padding: 18px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2);
}
.notes li b { color: var(--ink); font-weight: 500; }
@media (max-width: 560px) { .notes li { grid-template-columns: 1fr; } }

.quotes { display: grid; gap: clamp(48px, 7vw, 96px); padding: clamp(56px, 9vw, 120px) 0; border-top: 1px solid var(--rule); }
.quote { margin: 0; max-width: 52rem; }
.quote blockquote { margin: 0; }
.quote blockquote p {
  margin: 0; font-size: clamp(1.5rem, 3.2vw, 2.6rem); line-height: 1.14; font-weight: 500; letter-spacing: -0.025em;
  text-indent: -0.42em;
}
.quote figcaption { margin-top: 22px; font-size: 0.9375rem; color: var(--ink-2); }
.quote figcaption span { color: var(--ink-3); }
.quote:nth-child(even) { justify-self: end; }

/* ---------- Film player overlay ---------- */
.player {
  position: fixed; inset: 0; z-index: 1000; background: #000;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}
.player.is-open { opacity: 1; visibility: visible; transition: opacity 0.35s var(--ease); }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player__ui {
  position: absolute; inset: auto 0 0 0; padding: 0 var(--gutter) clamp(18px, 3vw, 32px);
  display: flex; align-items: center; gap: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0));
  padding-top: 64px;
  transition: opacity 0.4s var(--ease);
}
.player__close {
  position: absolute; top: clamp(14px, 2.5vw, 28px); right: var(--gutter);
  transition: opacity 0.4s var(--ease);
}
.player.is-idle .player__ui, .player.is-idle .player__close { opacity: 0; }
.player.is-idle { cursor: none; }

.pbtn {
  appearance: none; border: 0; background: none; color: var(--ink); padding: 8px; margin: -8px;
  font: inherit; font-size: 0.8125rem; cursor: pointer; line-height: 1;
  display: inline-flex; align-items: center; gap: 8px;
}
.pbtn svg { width: 16px; height: 16px; fill: currentColor; }
.pbtn:hover { opacity: 0.75; }

.player__time { font-size: 0.8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 6.5em; }
.player__bar {
  flex: 1; height: 24px; display: flex; align-items: center; cursor: pointer; touch-action: none;
}
.player__track { position: relative; width: 100%; height: 1px; background: rgba(236,235,231,0.25); }
.player__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--ink); }
.player__bar:hover .player__track { height: 2px; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: flex; align-items: center; }
.notfound h1 { margin: 0 0 16px; font-size: clamp(2rem, 5vw, 4rem); font-weight: 500; letter-spacing: -0.03em; }
.notfound p { color: var(--ink-2); margin: 0 0 32px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
