:root {
  --bg: #000000;
--fg: #EEEEEE;
  --muted: rgba(255, 255, 255, 0.58);
  --rule: rgba(255, 255, 255, 0.18);
  --frame: rgba(255, 255, 255, 0.4);
  --cursor-color: rgba(255, 255, 255, 0.95);
  --cursor-fill: #ffffff;

  --gutter: 24px;
  --container-mobile: calc(100vw - 40px);
  --container-desktop: calc(100vw - 64px);
  --max-page-width: 1440px;
}

body[data-theme="light"] {
  --bg: #EEEEEE;
  --fg: #000000;
  --muted: rgba(0, 0, 0, 0.58);
  --rule: rgba(0, 0, 0, 0.18);
  --frame: rgba(0, 0, 0, 0.4);
  --cursor-color: rgba(0, 0, 0, 0.95);
  --cursor-fill: #000000;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: 72px;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter Tight", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

/* Cursor only on non-touch */
body:not(.is-touch-device),
body:not(.is-touch-device) a,
body:not(.is-touch-device) button,
body:not(.is-touch-device) input,
body:not(.is-touch-device) textarea,
body:not(.is-touch-device) select,
body:not(.is-touch-device) label,
body:not(.is-touch-device) summary,
body:not(.is-touch-device) [role="button"],
body:not(.is-touch-device) .media-frame,
body:not(.is-touch-device) .hover-zone,
body:not(.is-touch-device) .carousel-hit,
body:not(.is-touch-device) .case-study,
body:not(.is-touch-device) .site-brand,
body:not(.is-touch-device) .site-nav a,
body:not(.is-touch-device) .theme-dot {
  cursor: none !important;
}

.page,
.site-header-inner {
  width: min(var(--container-mobile), var(--max-page-width));
  margin: 0 auto;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 2000;
  opacity: 1;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.site-header.is-hidden {
  opacity: 0;
}

.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-top: 18px;
}

.site-brand,
.site-nav,
.site-nav a,
.theme-switcher {
  pointer-events: auto;
}

.site-brand {
  font-size: 26px;
  line-height: 1;
  letter-spacing: 0;
  color: var(--fg);
}

.theme-switcher {
  position: absolute;
  left: 50%;
  top: 25px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.theme-dot {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0;
  border: 0.1px solid var(--fg);
  background: transparent;
  appearance: none;
}

.theme-dot[data-theme="dark"] {
  background: #000000;
  border-color: #ffffff;
}

.theme-dot[data-theme="light"] {
  background: #EEEEEE;
  border-color: #000000;
}

.theme-dot.is-active {
  box-shadow: 0 0 0 1px var(--fg);
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  font-size: 15px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg);
}

/* Cursor */

#customCursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  margin-left: -13px;
  margin-top: -13px;
  border: 2px solid var(--cursor-color);
  border-radius: 999px;
  background: transparent;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition:
    width 0.18s ease,
    height 0.18s ease,
    margin-left 0.18s ease,
    margin-top 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    opacity 0.15s ease;
}

#customCursor.is-hover {
  width: 6px;
  height: 6px;
  margin-left: -3px;
  margin-top: -3px;
  border-color: var(--cursor-fill);
  background: var(--cursor-fill);
}

body.is-touch-device #customCursor {
  display: none;
}

/* Hero */

.hero {
  padding-top: 24px;
}

.hero-copy {
  grid-column: 1 / span 11;
  max-width: 26ch;
  margin: 0;
  font-size: 52px;
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-weight: 300;
  color: var(--fg);
}

/* Work */

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 80px var(--gutter);
  margin-top: 64px;
}

.case-study {
  grid-column: span 12;
}

.media-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--frame);
  background: var(--bg);
  -webkit-user-select: none;
  user-select: none;
}

.media-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.overlay-top {
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  z-index: 5;
}

.overlay-theme-light {
  color: var(--fg);
}

.overlay-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overlay-count {
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.24em;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  border: 1px solid currentColor;
}

.dot.active {
  background: currentColor;
}

/* Desktop hover zones */
.hover-zones {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
}

.hover-zone {
  display: block;
}

/* Mobile/touch tap zones */
.carousel-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 6;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  appearance: none;
  opacity: 0;
  pointer-events: none;
}

.carousel-hit-prev {
  left: 0;
}

.carousel-hit-next {
  right: 0;
}

body.is-touch-device .hover-zones {
  display: none;
}

body.is-touch-device .carousel-hit {
  pointer-events: auto;
}

/* Meta */

.case-meta {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 16px;
  margin-top: 16px;
}

.case-title-block {
  grid-column: span 12;
}

.case-description-block {
  grid-column: span 12;
}

.case-title {
  margin: 0 0 16px 0;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  font-weight: 300;
  color: var(--fg);
}

.case-list,
.eyebrow,
.case-description,
.section-label {
  font-family: "DM Mono", monospace;
}

.case-list {
  color: var(--fg);
  letter-spacing: 0;
  font-size: 10px;
  line-height: 1.25;
  text-transform: uppercase;
}

.case-list div + div {
  margin-top: 2px;
}

.eyebrow {
  margin-bottom: 8px;
  color: #FFFFFF;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.case-description {
  max-width: 50ch;
  margin: 0;
  color: var(--fg);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* Sections */

.section-rule {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.section-label {
  grid-column: span 12;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-copy {
  grid-column: span 12;
  margin-top: 16px;
}

.section-copy p,
.section-copy a {
  max-width: 28ch;
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--fg);
}

.section-copy a {
  display: block;
}

.section-copy a + a {
  margin-top: 4px;
}

/* Reveal */
.has-js .hero-copy,
.has-js .case-title,
.has-js .case-description {
  opacity: 0;
  transform: translateY(12px);
  will-change: opacity, transform;
}

.has-js .hero-copy {
  transform: translateY(16px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.has-js .case-title {
  transition:
    opacity 1s ease,
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.has-js .case-description {
  transition:
    opacity 1.5s ease,
    transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

@media (min-width: 900px) {
  .page,
  .site-header-inner {
    width: min(var(--container-desktop), var(--max-page-width));
  }

  .hero {
    padding-top: 48px;
  }

  .work-grid {
    margin-top: 96px;
    gap: 112px var(--gutter);
  }

  .case-study {
    grid-column: span 6;
  }

  .overlay-top {
    padding: 20px;
  }

  .case-meta {
    margin-top: 18px;
    row-gap: 16px;
  }

  .case-title-block {
    grid-column: span 4;
  }

  .case-description-block {
    grid-column: 8 / span 4;
    text-align: left;
  }

  .case-description {
    margin-left: auto;
    text-align: left;
  }

  .section-rule {
    margin-top: 96px;
    padding-top: 40px;
  }

  .section-label {
    grid-column: span 4;
  }

  .section-copy {
    grid-column: 6 / span 7;
    margin-top: 0;
  }
}

@media (min-width: 992px) {
  .site-nav {
    gap: 40px;
  }

  .site-nav a {
    font-size: 18px;
  }
}

@media (hover: hover) and (pointer: fine) {
.hover-zone {
  position: relative;
}
/*
.hover-zone:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 1px;
  background: rgba(255,255,255,0.5);
  pointer-events: none;
}*/


/* Hide nav + theme switcher on mobile */
@media (max-width: 768px) {
  .site-nav {
    display: none;
  }

  .theme-switcher {
    display: none;
  }
}