:root {
  --bg: #000;
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: "Manrope", sans-serif;
}

body.not-found-page {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.08)),
    #c9472d;
}

a {
  color: inherit;
  text-decoration: none;
}

video {
  display: block;
  width: 100%;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.site-brand strong,
.site-nav,
h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
}

.brand-name {
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.site-nav {
  display: inline-flex;
  gap: 24px;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
}

.site-nav a {
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-color: var(--text);
}

.site-main {
  padding: 32px;
}

.not-found-page .site-header,
.not-found-page .site-footer {
  display: none;
}

.not-found-page .site-main {
  min-height: 100vh;
  padding: 0;
}

.page-intro,
.entry-copy,
.page-body {
  max-width: 1080px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.6rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

h3 {
  margin: 0;
  font-size: 1.25rem;
}

.intro-body,
.lead,
.prose,
.entry-facts,
.site-footer,
.tile-client {
  color: var(--muted);
}

.intro-body,
.lead,
.prose {
  font-size: 1.05rem;
  line-height: 1.7;
}

.page-intro {
  margin-bottom: 32px;
}

.home-intro {
  max-width: 900px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.video-tile {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111;
}

.video-tile video {
  height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 240ms ease, opacity 240ms ease;
  pointer-events: none;
}

.video-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.78) 100%);
  pointer-events: none;
}

.video-tile-hitarea {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.video-tile:hover video,
.video-tile:focus-visible video {
  transform: scale(1.03);
}

.video-tile-meta {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 18px 16px 16px;
}

.tile-client {
  margin: 0 0 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.video-tile-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.video-tile-heading h2 {
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
}

.video-tile-heading span {
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.92rem;
}

.entry-hero {
  width: 100%;
  max-width: none;
}

.entry-header {
  min-width: 0;
  justify-self: start;
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(760px, 900px);
  gap: clamp(32px, 5vw, 88px);
  align-items: start;
}

.entry-content {
  display: grid;
  gap: 28px;
  align-content: start;
  min-width: 0;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  padding-left: 0;
}

.entry-page h1 {
  font-size: clamp(4rem, 7vw, 7.2rem);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.about-copy {
  min-width: 0;
}

.about-image-panel {
  justify-self: center;
  width: min(100%, 280px);
  margin: 0 auto;
}

.about-image-panel img {
  display: block;
  width: 100%;
  height: auto;
  background: #111;
}

.kit-list-sections {
  display: grid;
  gap: 40px;
}

.kit-list-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.kit-list-section-copy {
  min-width: 0;
}

.kit-list-section-copy h2 {
  margin-top: 0;
}

.kit-list-section-media {
  justify-self: center;
  width: min(100%, 360px);
}

.kit-list-section-media .entry-inline-media {
  margin: 0;
}

.kit-list-section-media .entry-inline-media-single {
  justify-items: center;
}

.kit-list-section-media .entry-inline-figure {
  width: 100%;
  text-align: center;
}

.offline-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 18%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.028) 0,
      rgba(255, 255, 255, 0.028) 1px,
      transparent 1px,
      transparent 4px
    );
}

.offline-frame {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 18px solid #d65a3f;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.08)),
    #c9472d;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.12),
    inset 0 0 0 18px rgba(126, 26, 11, 0.16);
}

.offline-badge,
.offline-meta {
  position: absolute;
  left: 28px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.offline-badge {
  top: 24px;
  z-index: 2;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
}

.offline-meta {
  bottom: 24px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.82);
}

.offline-x {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom right,
      transparent calc(50% - 8px),
      #0f0f0f calc(50% - 8px),
      #0f0f0f calc(50% + 8px),
      transparent calc(50% + 8px)
    ),
    linear-gradient(
      to bottom left,
      transparent calc(50% - 8px),
      #0f0f0f calc(50% - 8px),
      #0f0f0f calc(50% + 8px),
      transparent calc(50% + 8px)
    );
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.offline-center {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  text-align: center;
  padding: 48px 24px;
}

.offline-code,
.offline-copy {
  margin: 0;
}

.offline-code {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.not-found-page h1 {
  font-size: clamp(4rem, 12vw, 8.8rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
}

.offline-copy {
  max-width: 36ch;
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.6;
}

.offline-home {
  position: absolute;
  right: 28px;
  bottom: 24px;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.34);
  padding: 12px 16px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.1);
}

.offline-home:hover,
.offline-home:focus-visible {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.2);
}

.entry-header .eyebrow {
  margin: 16px 0 0;
  padding-left: 0.32em;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  font-weight: 500;
}

.entry-facts {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.tag-list li {
  border: 1px solid var(--line);
  padding: 8px 10px;
  font-size: 0.88rem;
}

.entry-video {
  --entry-video-aspect-ratio: 16 / 9;
  align-self: start;
  position: relative;
  aspect-ratio: var(--entry-video-aspect-ratio);
  background: #111;
  overflow: hidden;
}

.entry-video-remote {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 50%),
    #050505;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.entry-video iframe,
.entry-video video {
  width: 100%;
  height: 100%;
  border: 0;
  background: #111;
}

.entry-video iframe,
.entry-video-remote media-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #111;
}

.entry-player {
  display: block;
}

.entry-video media-player {
  display: block;
  min-height: 0;
  contain: strict;
  --media-brand: #fff;
  --media-focus-ring-color: rgba(255, 255, 255, 0.35);
  --media-control-background: rgba(10, 10, 10, 0.82);
  --media-control-hover-background: rgba(255, 255, 255, 0.14);
  --media-menu-background: rgba(16, 16, 16, 0.96);
  --media-border-color: rgba(255, 255, 255, 0.14);
  --media-tooltip-background: rgba(12, 12, 12, 0.92);
  --media-tooltip-color: #fff;
  --media-font-family: "Manrope", sans-serif;
  --media-player-border-radius: 0;
  --media-video-border-radius: 0;
  --media-slider-track-height: 4px;
  --media-slider-thumb-size: 14px;
  color: var(--text);
}

.entry-video media-provider,
.entry-video media-video-layout {
  display: block;
}

.entry-video media-poster {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.entry-video media-poster[data-visible] {
  display: block;
}

.entry-video media-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-body {
  margin-top: 24px;
}

.entry-inline-media {
  display: grid;
  gap: 16px;
  margin: 28px 0 36px;
}

.entry-inline-media-grid {
  grid-template-columns: repeat(var(--entry-inline-columns, 2), minmax(0, 1fr));
}

.entry-inline-media-single {
  grid-template-columns: minmax(0, 1fr);
}

.kit-list-page .entry-inline-media-single {
  justify-items: center;
}

.entry-inline-figure {
  margin: 0;
}

.kit-list-page .entry-inline-media-single .entry-inline-figure {
  width: min(100%, 360px);
  justify-self: center;
  text-align: center;
}

.entry-inline-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #111;
  cursor: zoom-in;
}

.entry-inline-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.entry-gallery {
  margin-top: 88px;
  padding-left: clamp(72px, 9vw, 140px);
  padding-right: clamp(72px, 9vw, 140px);
}

.entry-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.entry-gallery-item {
  margin: 0;
}

.entry-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  background: #111;
  cursor: zoom-in;
}

.pswp__dynamic-caption {
  color: rgba(255, 255, 255, 0.82);
  font-family: "Manrope", sans-serif;
  line-height: 1.5;
}

.pswp__dynamic-caption--below {
  max-width: min(720px, calc(100vw - 32px));
  margin: 12px auto 0;
  text-align: center;
}

.entry-page .prose,
.entry-page .prose p,
.entry-page .prose li,
.entry-page .prose code {
  color: var(--text);
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin-top: 1.3em;
  margin-bottom: 0.35em;
  font-size: 1.8rem;
}

.prose p,
.prose ul {
  margin-top: 0;
}

.prose ul {
  padding-left: 22px;
}

.prose code {
  padding: 0.14rem 0.34rem;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.95em;
}

@media (max-width: 1400px) {
  .entry-layout {
    grid-template-columns: minmax(0, 1fr) minmax(480px, 680px);
    gap: clamp(24px, 4vw, 48px);
  }

  .entry-content {
    max-width: 680px;
  }

  .entry-page h1 {
    font-size: clamp(3.4rem, 6.4vw, 5.8rem);
  }
}

@media (max-width: 1200px) {
  .site-footer {
    display: block;
  }

  .site-nav {
    margin-top: 0;
  }

  .work-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .entry-layout {
    grid-template-columns: 1fr;
  }

  .about-layout,
  .kit-list-section {
    grid-template-columns: 1fr;
  }

  .entry-header {
    order: 1;
  }

  .entry-content {
    order: 2;
    gap: 24px;
    padding-left: 0;
  }

  .page-body {
    margin-top: 20px;
  }

  .about-image-panel {
    order: 2;
    justify-self: center;
    width: min(100%, 280px);
  }

  .kit-list-section-media {
    order: 2;
    width: min(100%, 360px);
  }

  .entry-inline-media-grid {
    grid-template-columns: 1fr;
  }

  .entry-gallery {
    margin-top: 64px;
    padding-left: clamp(32px, 5vw, 56px);
    padding-right: clamp(32px, 5vw, 56px);
  }
}

@media (max-width: 720px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-main,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  h1 {
    font-size: clamp(2.6rem, 15vw, 4.2rem);
  }

  .site-nav {
    gap: 18px;
    font-size: 1rem;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .entry-gallery {
    padding-left: 0;
    padding-right: 0;
  }

  .entry-gallery-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .video-tile-meta {
    padding: 12px;
  }

  .video-tile-heading {
    display: block;
  }

  .video-tile-heading span {
    display: block;
    margin-top: 6px;
  }

  .pswp__dynamic-caption--below {
    max-width: calc(100vw - 24px);
    font-size: 0.9rem;
  }

  .offline-frame {
    min-height: 100vh;
    border-width: 12px;
  }

  .offline-badge,
  .offline-meta {
    left: 16px;
  }

  .offline-badge {
    top: 16px;
  }

  .offline-meta {
    bottom: 76px;
    font-size: 0.72rem;
  }

  .offline-home {
    left: 16px;
    right: 16px;
    bottom: 16px;
    text-align: center;
  }

  .offline-x {
    background:
      linear-gradient(
        to bottom right,
        transparent calc(50% - 6px),
        #0f0f0f calc(50% - 6px),
        #0f0f0f calc(50% + 6px),
        transparent calc(50% + 6px)
      ),
      linear-gradient(
        to bottom left,
        transparent calc(50% - 6px),
        #0f0f0f calc(50% - 6px),
        #0f0f0f calc(50% + 6px),
        transparent calc(50% + 6px)
      );
  }
}
