:root {
  --stage: #0d0f10;
  --stage-raised: #131618;
  --film: #edeee9ff;
  --film-dim: #c7c9c4;
  --dim: #7c868f;
  --tally: #e23b24;
  --rule: rgba(237, 238, 240, 0.1);
  --rule-strong: rgba(237, 238, 240, 0.18);
  --max: 1180px;
  --edge: 48px;
}

@media (max-width: 700px) {
  :root { --edge: 20px; }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--stage);
  color: var(--film);
  font-family: "Archivo", -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3 {
  margin: 0;
  font-family: "Archivo Expanded", "Archivo", sans-serif;
}

a { color: inherit; }

.mono {
  font-family: "IBM Plex Mono", monospace;
}

/* ---------- Atmosphere (grain + vignette) ---------- */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
}
.atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
  opacity: 0.22;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--edge);
  background: rgba(13, 15, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.rec {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--dim);
  min-width: 150px;
}
.rec-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tally);
  box-shadow: 0 0 6px 1px rgba(226, 59, 36, 0.65);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.rec-label { color: var(--tally); font-weight: 500; }
.rec-tc { color: var(--film-dim); }

.logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-decoration: none;
  font-family: "Archivo Expanded", sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.site-header nav {
  display: flex;
  gap: 28px;
  min-width: 150px;
  justify-content: flex-end;
}
.site-header nav a {
  text-decoration: none;
  font-size: 14px;
  color: var(--film-dim);
  transition: color 0.15s;
}
.site-header nav a:hover { color: var(--film); }

@media (max-width: 700px) {
  .logo { display: none; }
  .rec-label { display: none; }
  .site-header nav { gap: 16px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 92vh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) brightness(0.85);
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13,15,16,0.55) 0%, rgba(13,15,16,0.15) 30%, rgba(13,15,16,0.35) 60%, rgba(13,15,16,0.96) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 var(--edge) 64px;
  max-width: 860px;
}
.hero-kicker {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--film-dim);
  margin: 0 0 18px;
  letter-spacing: 0.01em;
}
.hero h1 {
  font-size: clamp(32px, 5.4vw, 58px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
}
.hero-sub {
  font-size: 17px;
  color: var(--film-dim);
  max-width: 520px;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Section scaffolding ---------- */
section { padding: 88px var(--edge); border-top: 1px solid var(--rule); }
@media (max-width: 700px) { section { padding: 56px var(--edge); } }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 40px;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.section-head h2 {
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
}
.section-rule {
  flex: 1;
  height: 1px;
  background: var(--rule-strong);
}

/* ---------- Services ---------- */
.services { max-width: var(--max); margin: 0 auto; padding-left: var(--edge); padding-right: var(--edge); }
.service-rows { border-top: 1px solid var(--rule); }
.service-row {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 32px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  position: relative;
}
.service-row::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--tally);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s ease;
}
.service-row:hover::before { transform: scaleY(1); }
.service-row h3 {
  font-size: 20px;
  font-weight: 700;
  transition: color 0.15s;
}
.service-row:hover h3 { color: var(--tally); }
.service-row p {
  margin: 0;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.6;
  max-width: 46ch;
  align-self: center;
}
@media (max-width: 640px) {
  .service-row { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Work ---------- */
.work { max-width: none; }
#work-sections { max-width: var(--max); margin: 0 auto; }

.work-section { margin-bottom: 56px; scroll-margin-top: 76px; }
.work-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--film-dim);
  margin-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } }

.thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
  background: var(--stage-raised);
  border: none;
  padding: 0;
  display: block;
  width: 100%;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
  filter: saturate(0.92);
}
.thumb-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92);
}
.thumb:hover img,
.thumb:hover .thumb-preview { transform: scale(1.04); }
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(237,238,240,0.5);
  background: rgba(13,15,16,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.thumb:hover .play-icon { opacity: 1; }
.play-icon svg { width: 13px; height: 13px; fill: var(--film); margin-left: 2px; }

.thumb-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 10px 8px;
  font-size: 11px;
  color: var(--film-dim);
  background: linear-gradient(180deg, rgba(13,15,16,0) 0%, rgba(13,15,16,0.85) 70%);
  pointer-events: none;
}

.clip-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(13,15,16,0.7);
  color: var(--film);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  padding: 3px 7px;
  border: 1px solid var(--rule-strong);
}
.external-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(13,15,16,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}
.external-icon svg { width: 11px; height: 11px; fill: var(--film); }

/* ---------- About ---------- */
.about { max-width: var(--max); margin: 0 auto; padding-left: var(--edge); padding-right: var(--edge); }
.about-bio {
  font-size: 17px;
  line-height: 1.7;
  color: var(--film-dim);
  max-width: 62ch;
  margin: 0;
}

/* ---------- Contact ---------- */
.contact { max-width: var(--max); margin: 0 auto; padding-left: var(--edge); padding-right: var(--edge); }
.contact-line {
  color: var(--dim);
  font-size: 16px;
  margin: 0 0 16px;
}
.contact-email {
  display: inline-block;
  font-family: "Archivo Expanded", sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 4vw, 36px);
  text-decoration: none;
  border-bottom: 2px solid var(--tally);
  padding-bottom: 4px;
  transition: opacity 0.15s;
}
.contact-email:hover { opacity: 0.75; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 28px var(--edge) 40px;
  color: var(--dim);
  font-size: 13px;
  max-width: var(--max);
  margin: 0 auto;
}

/* ---------- Lightbox ---------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 10, 0.94);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  width: min(92vw, 1200px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-media {
  width: 100%;
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-media video,
.lightbox-media img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  background: #000;
  display: block;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: var(--film);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(237,238,240,0.06);
  border: 1px solid var(--rule-strong);
  color: var(--film);
  font-size: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}
.lightbox-arrow:hover { background: rgba(237,238,240,0.14); }
.lightbox-arrow-prev { left: 16px; }
.lightbox-arrow-next { right: 16px; }
@media (max-width: 700px) {
  .lightbox-arrow { width: 36px; height: 36px; font-size: 15px; }
  .lightbox-arrow-prev { left: 6px; }
  .lightbox-arrow-next { right: 6px; }
}

.lightbox-title {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--film-dim);
  text-align: center;
}
.lightbox-title:empty { display: none; }

.thumb-strip {
  display: flex;
  gap: 5px;
  margin-top: 14px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}
.thumb-strip img {
  width: 68px;
  height: 40px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.45;
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: opacity 0.15s, border-color 0.15s;
}
.thumb-strip img:hover { opacity: 0.75; }
.thumb-strip img.active {
  opacity: 1;
  border-color: var(--tally);
}

/* ---------- Accessibility ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--tally);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rec-dot { animation: none; }
  .thumb img { transition: none; }
}
