:root {
  color-scheme: dark;
  --background: #11110f;
  --text: #f2f0ea;
  --muted: #8e8a80;
  --line: #34332e;
  --accent: #d78b24;
  --display: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
  --ui: Inter, "Helvetica Neue", Arial, sans-serif;
  --page-gutter: clamp(22px, 5vw, 72px);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
}

button,
a,
[role="slider"] {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 29px var(--page-gutter) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wordmark {
  color: var(--text);
  text-decoration: none;
}

.prototype-label {
  color: var(--muted);
}

.experience {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: clamp(72px, 9vh, 116px) var(--page-gutter) max(56px, env(safe-area-inset-bottom));
}

.intro {
  width: min(100%, 1050px);
  margin: 0 auto clamp(42px, 7vh, 72px);
  text-align: center;
}

.intro h1 {
  max-width: 990px;
  margin: 0 auto;
  font-family: var(--display);
  font-size: clamp(64px, 7.7vw, 112px);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.062em;
  text-wrap: balance;
}

.intro p {
  max-width: 510px;
  margin: 30px auto 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.025em;
}

.scrubber {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.media-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid #2c2b27;
  border-radius: 12px;
  background: #1b1b18;
  cursor: ew-resize;
  outline: none;
  touch-action: pan-y;
  user-select: none;
}

.media-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.media-stage:focus-visible,
.timeline:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 5px;
}

.media-stage img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

.loading-shade {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--background);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: opacity 260ms ease, visibility 260ms ease;
}

.loading-shade::before {
  content: "";
  position: absolute;
  width: 36px;
  height: 1px;
  margin-top: 42px;
  background: var(--line);
  box-shadow: inset 9px 0 var(--accent);
  animation: load 1.1s steps(4) infinite;
}

.is-ready .loading-shade {
  opacity: 0;
  visibility: hidden;
}

@keyframes load {
  to { box-shadow: inset 36px 0 var(--accent); }
}

.edge-cue {
  position: absolute;
  top: 50%;
  display: grid;
  width: 34px;
  height: 42px;
  place-items: center;
  color: rgba(255, 255, 255, 0.72);
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 180ms ease;
  pointer-events: none;
}

.edge-cue-left { left: 12px; }
.edge-cue-right { right: 12px; }

.edge-cue svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;
}

.media-stage:hover .edge-cue,
.media-stage:focus-visible .edge-cue {
  opacity: 1;
}

.control-row {
  min-height: 52px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-top: 18px;
}

.gesture-label,
.frame-count {
  margin: 0;
}

.gesture-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.frame-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.frame-count strong {
  color: var(--accent);
  font-family: var(--display);
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.frame-count span {
  color: var(--muted);
}

.timeline {
  position: relative;
  height: 40px;
  margin-top: 2px;
  cursor: ew-resize;
  outline: none;
  touch-action: none;
  user-select: none;
}

.ticks {
  position: absolute;
  inset: 50% 0 auto;
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  align-items: center;
  transform: translateY(-50%);
}

.tick {
  width: 1px;
  height: 10px;
  justify-self: center;
  background: #676359;
  transition: height 90ms linear, background-color 90ms linear;
}

.tick.is-active {
  width: 2px;
  height: 16px;
  background: var(--accent);
}

.timeline-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--text);
  border-radius: 50%;
  background: var(--background);
  transform: translate(-50%, -50%);
  transition: left 35ms linear;
  pointer-events: none;
}

.interaction-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
  color: #706d65;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.interaction-note svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.1;
}

.mobile-copy {
  display: none;
}

noscript {
  display: block;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 680px) {
  :root {
    --page-gutter: 20px;
  }

  .site-header {
    padding-top: max(24px, env(safe-area-inset-top));
    font-size: 10px;
  }

  .prototype-label {
    display: none;
  }

  .experience {
    padding-top: clamp(68px, 11vh, 92px);
  }

  .intro {
    margin-bottom: 38px;
    text-align: left;
  }

  .intro h1 {
    max-width: none;
    font-size: clamp(54px, 17vw, 78px);
    line-height: 0.92;
    letter-spacing: -0.06em;
  }

  .intro p {
    display: none;
  }

  .desktop-copy {
    display: none;
  }

  .mobile-copy {
    display: inline;
  }

  .media-stage {
    border-radius: 8px;
  }

  .edge-cue {
    display: none;
  }

  .control-row {
    min-height: 66px;
    align-items: center;
    padding-top: 10px;
  }

  .gesture-label {
    font-size: 9px;
  }

  .frame-count strong {
    font-size: 31px;
  }

  .timeline {
    height: 54px;
    margin-top: -6px;
  }

  .tick {
    height: 12px;
  }

  .tick.is-active {
    height: 18px;
  }

  .timeline-thumb {
    width: 26px;
    height: 26px;
  }

  .interaction-note {
    margin-top: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
