/*
 * The front of the site: the home page, How it works, Help, and the page a
 * shared moment opens.
 *
 * Dark, always, for the reason the app's video surfaces are: anything that
 * frames footage reads on near-black, and the home page is a picture of the
 * grid. The documents (privacy, terms) keep style.css and follow the reader.
 *
 * ⚠️ Still no script and still nothing from anybody else. The grid on the home
 * page moves with CSS alone; the shared-moment page drains its life bar with
 * one CSS animation whose numbers come from the server. Both stop for
 * prefers-reduced-motion.
 */

@font-face {
  font-family: 'Space Grotesk';
  src: url('SpaceGrotesk-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #17171a;
  --surface-high: #202024;
  --ink: #f7f7f8;
  --ink-muted: #a3a3ab;
  --ink-faint: #84848e;
  --hairline: #2a2a2f;
  --accent: #c6f432;
  --on-accent: #111114;
  --record: #ff3b30;
  --wide: 68rem;
  --measure: 36rem;
  --gutter: 1.25rem;
  --display: 'Space Grotesk', Futura, 'Trebuchet MS', sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  text-wrap: pretty;
}

a {
  color: var(--ink);
  text-underline-offset: 0.2em;
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.measure {
  max-width: var(--measure);
}

/* ---- Header ------------------------------------------------------------ */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

/* The accent as a shape that means live, go, now — never as body text. */
.live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  flex: none;
}

.live-dot.pulse {
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(198, 244, 50, 0.55);
  }
  50% {
    box-shadow: 0 0 0 0.45rem rgba(198, 244, 50, 0);
  }
}

/* ---- Type ------------------------------------------------------------- */

h1,
h2,
.display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.6rem, 9vw, 5.25rem);
  line-height: 0.98;
  margin: 0 0 1.25rem;
}

h1 .stop {
  color: var(--accent);
}

h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.05;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 0 0 0.35rem;
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: clamp(1.125rem, 2.6vw, 1.3rem);
  color: var(--ink-muted);
  max-width: 34rem;
}

.quiet {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.75rem;
}

/* ---- Buttons ----------------------------------------------------------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid var(--hairline);
  color: var(--ink);
  background: var(--surface);
}

.btn:hover {
  background: var(--surface-high);
}

/* The one control that wears the accent: going. As in the app, sized to its
   words — a decision to leave the house, not a form's submit button. */
.btn.go {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn.go:hover {
  filter: brightness(1.05);
}

.actions + .quiet {
  margin-top: 0.75rem;
}

.btn.small {
  min-height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.9375rem;
}

/* ---- Home: hero ------------------------------------------------------- */

.hero {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding: 2.5rem 0 4rem;
}

@media (min-width: 58rem) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
    padding: 4rem 0 6rem;
  }
}

/* ---- Home: the living grid -------------------------------------------- */

/*
 * A picture of the front door, made of light rather than footage.
 *
 * No real clip is shown on the home page: every real clip is somebody's
 * moment, and a marketing page is not where it should end up. So each tile
 * is a colour field that suggests a kind of place — dusk on a rooftop, a
 * bar's neon, a market's awnings — drifting slowly, with the stamp and the
 * place in the corners exactly where the app puts them. Nothing sits over the
 * middle of a tile: no scrim, the same rule as the app.
 */
.mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  transform: rotate(-3deg);
}

.tile {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  background-size: 220% 220%;
  animation: drift 14s ease-in-out infinite alternate;
}

.tile:nth-child(2) {
  animation-duration: 17s;
  transform: translateY(1.2rem);
}
.tile:nth-child(3) {
  animation-duration: 12s;
}
.tile:nth-child(4) {
  animation-duration: 19s;
}
.tile:nth-child(5) {
  animation-duration: 15s;
  transform: translateY(1.2rem);
}
.tile:nth-child(6) {
  animation-duration: 13s;
}

@keyframes drift {
  from {
    background-position: 0% 30%;
  }
  to {
    background-position: 100% 70%;
  }
}

.tile.dusk {
  background-image: linear-gradient(160deg, #ff8a5b 0%, #b8467a 45%, #2b1b4f 100%);
}
.tile.neon {
  background-image: radial-gradient(circle at 30% 30%, #ff3db8 0%, transparent 45%),
    radial-gradient(circle at 70% 70%, #3dd6ff 0%, transparent 50%), linear-gradient(180deg, #16061f, #07121f);
}
.tile.market {
  background-image: linear-gradient(180deg, rgba(11, 11, 13, 0.1) 40%, rgba(11, 11, 13, 0.75) 100%),
    repeating-linear-gradient(115deg, #d99a00 0 18px, #c2382f 18px 36px, #17725c 36px 54px);
}
.tile.park {
  background-image: linear-gradient(180deg, #a8e0ff 0%, #6cc27b 55%, #2f6b3a 100%);
}
.tile.stadium {
  background-image: radial-gradient(ellipse at 50% 0%, #fffbe0 0%, transparent 55%),
    linear-gradient(180deg, #0d1b2a 0%, #1b3a2a 100%);
}
.tile.road {
  background-image: repeating-linear-gradient(90deg, transparent 0 22px, rgba(255, 70, 70, 0.8) 22px 26px, transparent 26px 60px),
    linear-gradient(180deg, #0a0a14 0%, #2a1e4a 60%, #ff9a3c 100%);
}

.tile .stamp,
.moment-window .stamp {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.tile .where {
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  line-height: 1.25;
}

/* ---- Home: sections --------------------------------------------------- */

.section {
  padding: 4rem 0;
  border-top: 1px solid var(--hairline);
}

.beats {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 48rem) {
  .beats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.beat .num {
  font-family: var(--display);
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
  display: block;
}

.beat p {
  color: var(--ink-muted);
  margin: 0;
}

/* What it will never do — the list other apps would never write down. */
.nevers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 48rem) {
  .nevers {
    grid-template-columns: repeat(2, 1fr);
  }
}

.nevers li {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
}

.nevers strong {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.nevers span {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

/* ---- Documents on the dark site (How it works, Help, Delete) ------------ */

.doc {
  padding: 1rem 0 4rem;
}

.doc h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 0.6rem;
}

.doc ol,
.doc ul {
  padding-left: 1.25rem;
}

.doc li {
  margin-bottom: 0.5rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin: 0 0 1.25rem;
}

.panel > :last-child {
  margin-bottom: 0;
}

/* The same loud placeholder as the documents: a decision still owed by a person. */
.to-confirm {
  border: 2px dashed var(--accent);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  background: var(--surface-high);
  font-size: 0.9375rem;
}

.to-confirm > :last-child {
  margin-bottom: 0;
}

.to-confirm::before {
  content: 'Before launch';
  display: block;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

/* ---- A shared moment --------------------------------------------------- */

/*
 * On a phone: when and where first, then the clip, then going. The clip is
 * the page, but a link opened from a chat has to say what it is before it
 * asks for a full screen of attention. Side by side where there is room.
 */
.moment {
  display: grid;
  grid-template-areas: 'head' 'window' 'rest';
  gap: 1.25rem;
  padding: 0.5rem 0 4rem;
  align-items: start;
}

.moment-head {
  grid-area: head;
}

.moment-window {
  grid-area: window;
}

.moment-rest {
  grid-area: rest;
}

@media (min-width: 52rem) {
  .moment {
    grid-template-columns: minmax(0, 22rem) 1fr;
    grid-template-areas: 'window head' 'window rest';
    grid-template-rows: auto 1fr;
    column-gap: 3.5rem;
    row-gap: 0;
    padding-top: 2rem;
  }
}

/*
 * The window. The clip is the page; everything else is about going.
 *
 * Phone-shaped because that is how it was filmed. The accent ring means it is
 * current — filmed within the hour — and it is the only colour on the footage.
 */
.moment-window {
  position: relative;
  /* Never taller than most of the screen, so going is always in reach. */
  width: min(100%, 22rem, calc(62vh * 0.5625));
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  margin: 0 auto;
  border: 1px solid var(--hairline);
}

.moment-window.current {
  box-shadow: 0 0 0 2px var(--accent), 0 0 3rem rgba(198, 244, 50, 0.18);
  border-color: transparent;
}

.moment-window video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.moment-window.passed {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 35%, #202024 0%, #0b0b0d 70%);
}

.moment-window.passed .display {
  font-size: 1.75rem;
  line-height: 1.05;
  margin: 0 0 0.5rem;
}

.when {
  font-family: var(--display);
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.place {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
}

.area {
  color: var(--ink-muted);
  margin: 0 0 0.5rem;
}

.moment-rest .life {
  margin-top: 0.5rem;
}

/*
 * How long it has left, draining while you look at it.
 *
 * The one thing no other video page has: the clip's own expiry, made visible.
 * The width it starts at and how long it takes to reach nothing are set per
 * page, in a nonce'd style block, because they are this clip's numbers.
 */
.life {
  margin: 0 0 2rem;
}

.life-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.life-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-high);
  overflow: hidden;
}

.life-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--ink);
  animation-name: drain;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.life-fill.current {
  background: var(--accent);
}

.facts {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 0.5rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.facts li::before {
  content: '— ';
  color: var(--ink-faint);
}

/* ---- Footer ------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 2rem 0 4rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.site-footer a {
  color: var(--ink-muted);
}

@media (prefers-reduced-motion: reduce) {
  .tile,
  .live-dot.pulse,
  .life-fill {
    animation: none;
  }
}
