/* Project Watch 3 */

:root {
  --black: #070708;
  --line: rgba(255, 255, 255, 0.14);
  --white: #f2f1ee;
  --muted: rgba(242, 241, 238, 0.66);
  --soft: rgba(242, 241, 238, 0.34);
  --live: #35d07f;

  --display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(18px, 4.5vw, 72px);
  --top: clamp(28px, 6vh, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* pointer position, -0.5..0.5, set from main.js */
  --mx: 0;
  --my: 0;
}

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

html { background: var(--black); scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
/* no overflow:hidden when lenis is stopped: it breaks position:sticky and the ending jumps */

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }

/* loader */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--black);
}
.loader__ring { width: 44px; height: 44px; transform: rotate(-90deg); }
.loader__ring circle { fill: none; stroke-width: 2; }
.loader__track { stroke: rgba(255, 255, 255, 0.1); }
.loader__fill {
  stroke: var(--white); stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}

/* discord hand-off */
.redirect {
  position: fixed; inset: 0; z-index: 150;
  display: grid; place-items: center;
  background: rgba(7, 7, 8, 0.82);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}
.redirect__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.redirect__icon {
  position: relative; width: 96px; height: 96px;
  display: grid; place-items: center;
  font-size: 34px;
}
.redirect__ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.redirect__ring circle {
  fill: none; stroke: var(--white); stroke-width: 1.5; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.redirect__title { margin-top: 28px; font: 700 clamp(22px, 2.4vw, 30px)/1.1 var(--display); letter-spacing: -0.02em; }
.redirect__text { margin-top: 8px; color: var(--muted); font-size: 15px; }

/* background video */
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; perspective: 1200px; }
/* The video is drawn at half size and scaled up 2x. The blur then only has to work on a
   quarter of the pixels (half the radius gives the same look), which keeps scrubbing smooth. */
.stage__video {
  position: absolute; left: 50%; top: 50%;
  width: 59%; height: 59%;
  object-fit: cover;
  filter: blur(calc(var(--blur, 12px) * 0.5)) saturate(1.1);
  transform:
    translate(-50%, -50%)
    translate3d(calc(var(--mx) * 28px), calc(var(--my) * 18px), 0)
    rotateY(calc(var(--mx) * 2.2deg))
    rotateX(calc(var(--my) * -1.6deg))
    scale(2);
  will-change: transform, filter;
}
.stage__shade { position: absolute; inset: 0; background: var(--black); opacity: 0.3; }
.stage__vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.7) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 25%, transparent 60%, rgba(0, 0, 0, 0.8));
}
.stage__grain {
  position: absolute; inset: -50%;
  opacity: 0.05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
}

/* scenes */
main { position: relative; z-index: 5; }
.scene { position: relative; height: calc(var(--h, 180) * 1vh); }
.scene__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  padding: var(--top) var(--gutter);
}
/* content drifts against the video; `translate` stacks with GSAP's transform */
.scene__sticky > * { translate: calc(var(--mx) * -22px) calc(var(--my) * -14px); }

.label {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
  font-size: 13px; font-weight: 500; color: var(--muted);
}
.label i { font-size: 12px; color: var(--white); }

.line { display: block; }
.line .w { display: inline-block; white-space: nowrap; }
.line .c { display: inline-block; will-change: transform, opacity, filter; }
.line--soft { color: var(--soft); }

.headline {
  font: 800 clamp(44px, 8.2vw, 140px)/0.94 var(--display);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
.headline--md { font-size: clamp(40px, 6vw, 100px); }
.headline--xl { font-size: clamp(48px, 9.4vw, 164px); }

.lead { max-width: 430px; margin-top: 26px; color: var(--muted); font-size: clamp(15px, 1.15vw, 17px); }

.block { position: absolute; }
.block--left { left: var(--gutter); bottom: 110px; max-width: min(900px, 62vw); }
.block--high { bottom: auto; top: calc(var(--top) + 24px); }
.block--right { right: var(--gutter); top: calc(var(--top) + 24px); text-align: right; max-width: min(900px, 70vw); }
.block--right .label { justify-content: flex-end; }
.block--right .lead { margin-left: auto; }
.block--top { left: var(--gutter); top: calc(var(--top) + 8px); }

/* hero */
.scene--hero .scene__sticky { display: flex; flex-direction: column; justify-content: center; }
.wordmark {
  position: absolute; top: var(--top); left: var(--gutter);
  font: 800 13px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase;
}
.wordmark span { color: var(--soft); }
.hero .chip { margin-bottom: 28px; }
.hero__title {
  font: 900 clamp(56px, 13vw, 232px)/0.9 var(--display);
  letter-spacing: -0.05em;
}
.hero__sub {
  margin-top: 32px;
  font: 600 clamp(13px, 1.1vw, 16px)/1.4 var(--display);
  letter-spacing: 0.26em; text-transform: uppercase;
}
.hero__tag { margin-top: 8px; color: var(--muted); font-size: clamp(15px, 1.3vw, 19px); }

/* rotating districts / departments */
.steps { position: absolute; right: var(--gutter); bottom: 110px; width: min(360px, 30vw); height: 220px; }
.step {
  position: absolute; left: 0; right: 0; bottom: 0; opacity: 0;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.step__tag {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--soft); margin-bottom: 10px;
}
.step__title { font: 700 clamp(24px, 2.2vw, 34px)/1.05 var(--display); letter-spacing: -0.02em; }
.step__text { margin-top: 10px; color: var(--muted); font-size: 15px; }
.dept__abbr {
  font: 900 clamp(48px, 5vw, 84px)/0.9 var(--display); letter-spacing: -0.05em;
  margin-bottom: 14px;
}

.steps__dots { position: absolute; left: 0; bottom: -28px; display: flex; gap: 6px; }
.steps__dots span {
  position: relative; overflow: hidden;
  width: 18px; height: 2px; background: rgba(255, 255, 255, 0.22);
  transition: width 0.6s var(--ease);
}
.steps__dots span.is-active { width: 44px; }
.steps__dots i { position: absolute; inset: 0; background: var(--white); transform-origin: left; transform: scaleX(0); }
.steps__dots span:not(.is-active) i { opacity: 0; }

.marquee {
  position: absolute; left: 0; right: 0; bottom: 36px; overflow: hidden; opacity: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex; width: max-content; animation: marquee 50s linear infinite;
  font-size: 13px; color: var(--soft);
}
.marquee__track span { padding: 0 24px; }
.marquee__track span + span::before { content: "/"; margin-right: 24px; margin-left: -24px; opacity: 0.5; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* fire & ems */
.cols {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 64px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
}
.cols li { padding-top: 18px; border-top: 1px solid var(--line); }
.cols h3 {
  display: flex; align-items: center; gap: 10px;
  font: 700 20px/1.2 var(--display); margin-bottom: 6px;
}
.cols h3 i { font-size: 15px; color: var(--muted); }
.cols p { color: var(--muted); font-size: 14px; max-width: 300px; }

/* civilian */
.life { position: absolute; right: var(--gutter); bottom: 64px; width: min(500px, 42vw); }
.life li {
  display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; align-items: baseline;
  padding: 14px 0; border-top: 1px solid var(--line);
  transition: padding-left 0.5s var(--ease);
}
.life li:hover { padding-left: 8px; }
.life i { font-size: 14px; color: var(--muted); }
.life strong { font: 700 clamp(18px, 1.6vw, 23px)/1.2 var(--display); letter-spacing: -0.01em; }
.life em { grid-column: 2; font-style: normal; color: var(--muted); font-size: 14px; }

/* vehicles */
.rail {
  position: absolute; left: 0; right: 0; bottom: 56px;
  touch-action: pan-y;   /* vertical swipes still scroll the page on phones */
  user-select: none; -webkit-user-select: none;
}
/* margin instead of gap so the doubled strip is exactly twice one set wide (seamless loop) */
.rail__track { display: flex; width: max-content; will-change: transform; }
.car {
  margin: 0 20px 0 0; flex: none;
  width: clamp(260px, min(28vw, 50vh), 440px);
  transition: transform 0.6s var(--ease);
}
.rail.is-dragging .car { transform: scale(0.97); }
.car__img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; background: #151618; }
.car__img img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
  transform: scale(1.1) translateX(var(--px, 0px));
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
}
.car:hover .car__img img { transform: scale(1.15) translateX(var(--px, 0px)); }
.rail.is-dragging .car__img img { filter: brightness(0.85); }
.car figcaption { padding-top: 14px; }
.car h3 { font: 700 20px/1.2 var(--display); letter-spacing: -0.01em; }
.car p { color: var(--muted); font-size: 14px; }

/* join */
.scene--join .scene__sticky { display: flex; align-items: center; }
.join { width: 100%; }
.join__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 44px; }
.join__note { margin-top: 26px; max-width: 460px; color: var(--muted); font-size: 15px; }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  height: 54px; padding: 0 26px; border-radius: 999px;
  font: 600 15px/1 var(--display);
  border: 1px solid transparent;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s;
}
.btn i { font-size: 16px; }
.btn--light { background: var(--white); color: var(--black); }
.btn--light:hover { background: #fff; }
.btn--line { border-color: rgba(255, 255, 255, 0.35); background: none; color: inherit; cursor: pointer; }
.btn--line:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.btn .soon { margin-left: 2px; font-family: var(--body); font-weight: 600; }
.btn.is-done { background: var(--white); color: var(--black); border-color: var(--white); }

/* not live yet: readable, but clearly not clickable */
.btn.is-soon, .footer__links a.is-soon { color: var(--soft); border-color: var(--line); }
.btn.is-soon { background: none; cursor: default; }
.btn.is-soon:hover { background: none; color: var(--soft); border-color: var(--line); }
.footer__links a.is-soon:hover { color: var(--soft); }
.footer__links .soon { margin-left: 2px; }


.chip {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
}
.chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(53, 208, 127, 0.55); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(53, 208, 127, 0); }
}

/* finale: video sinks into black, one last call */
/* bottom padding = room for the footer, so the ending never has to move when it slides in */
.scene--finale .scene__sticky {
  display: grid; place-items: center; text-align: center;
  padding-bottom: calc(var(--footer-h, 170px) + 16px);
}
.finale { display: flex; flex-direction: column; align-items: center; }
.finale__name {
  font: 800 13px/1 var(--display); letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 30px;
}
.finale__name span { color: var(--soft); }
.finale .headline--xl { font-size: clamp(64px, 14vw, 240px); line-height: 0.88; }
.finale__sub { margin-top: 26px; color: var(--muted); font-size: clamp(16px, 1.5vw, 21px); }
.finale .join__cta { justify-content: center; margin-top: 40px; }
.finale .join__note { margin: 24px auto 0; }

/* footer */
/* sits below the screen and slides up on the last scroll (see toggleFooter in main.js) */
.footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px;
  padding: 36px var(--gutter) max(32px, env(safe-area-inset-bottom));
  background: rgba(7, 7, 8, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.footer__name { font: 800 13px/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase; }
.footer__name span { color: var(--soft); }
.footer__links { display: flex; gap: 24px; color: var(--muted); }
.footer__links a { display: inline-flex; align-items: center; gap: 8px; transition: color 0.3s; }
.footer__links a:hover { color: var(--white); }
.dash {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font: 600 13px/1 var(--display);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s;
}
.dash:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.dash.is-soon { color: var(--muted); border-color: var(--line); }
.dash.is-soon:hover { background: transparent; color: var(--muted); border-color: rgba(255, 255, 255, 0.3); }
.soon {
  padding: 3px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
}

/* cursor */
.has-cursor, .has-cursor * { cursor: none !important; }
.cursor {
  position: fixed; left: 0; top: 0; z-index: 200;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: difference;
  transition: opacity 0.3s;
}
.cursor.is-visible { opacity: 1; }
.cursor::before {
  content: ""; position: absolute; left: -5px; top: -5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff;
  transition: transform 0.35s var(--ease);
}
/* still a dot, just a bit bigger over things you can click */
.cursor.is-link::before { transform: scale(1.6); }
.cursor.is-down::before { transform: scale(0.75); }
.cursor.is-link.is-down::before { transform: scale(1.3); }

::selection { background: var(--white); color: var(--black); }

/* full row of its own, but keep the text itself to a readable width */
.footer__legal { flex-basis: 100%; padding-right: max(0px, calc(100% - 640px)); color: var(--soft); font-size: 12px; }

/* responsive */
@media (max-width: 1100px) {
  .block--left { top: calc(var(--top) + 24px); bottom: auto; right: var(--gutter); max-width: none; }
  .life { width: min(460px, 60vw); }
  .steps { width: min(360px, 44vw); }
}

@media (max-width: 760px) {
  /* the ending has to fit above a taller footer on phones */
  .finale__name { display: none; }
  .finale__sub { margin-top: 16px; font-size: 15px; }
  .finale .join__cta { margin-top: 26px; gap: 10px; }
  .finale .btn { height: 48px; }
  .finale .join__note { margin-top: 18px; font-size: 13px; }
  .block--left, .block--right { left: var(--gutter); right: var(--gutter); text-align: left; max-width: none; }
  .block--right .label { justify-content: flex-start; }
  .block--right .lead { margin-left: 0; }
  .block--left, .block--right, .block--high { top: calc(var(--top) + 8px); bottom: auto; }
  .label { margin-bottom: 16px; }
  .lead { margin-top: 16px; font-size: 15px; }
  .steps { left: var(--gutter); right: var(--gutter); width: auto; bottom: 96px; height: 200px; }
  .marquee { bottom: 32px; }
  .cols { grid-template-columns: 1fr; gap: 14px; bottom: 40px; }
  .cols li { padding-top: 12px; }
  .cols p { font-size: 13px; }
  .life { left: var(--gutter); right: var(--gutter); width: auto; bottom: 36px; }
  .life li { padding: 10px 0; }
  .life em { display: none; }
  .rail { bottom: 44px; }
  .car { width: 70vw; }
  .join__cta { flex-direction: column; align-items: stretch; }
  .join__cta .chip { align-self: flex-start; }
  .hero__sub { letter-spacing: 0.16em; }
}

@media (max-height: 760px) and (min-width: 761px) {
  .block--left { bottom: 80px; }
  .lead { margin-top: 16px; }
  .join__cta { margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .stage__grain, .marquee__track, .chip__dot { animation: none; }
}

/* links to the other pages, top right of the intro */
.topnav {
  position: absolute; top: calc(var(--top) - 9px); right: var(--gutter);
  display: flex; gap: 4px; font: 600 13px/1 var(--display);
}
.topnav a { padding: 9px 14px; border-radius: 999px; color: var(--muted); transition: color 0.3s, background 0.3s; }
.topnav a:hover { color: var(--white); background: rgba(255, 255, 255, 0.08); }
@media (max-width: 760px) { .topnav { display: none; } }
.footer__links { flex-wrap: wrap; }
