/*
 * Landing page. Shares the font, the reel and the colours with the app so
 * both read as one product.
 */
:root {
  --font: "Archivo", ui-sans-serif, system-ui, sans-serif;

  /* Glassdraw colours: charcoal and cherry. */
  --charcoal: #1c1c1f;
  --charcoal-deep: #121214;
  --stage: #0b0b0c;
  --text: #f4f4f5;
  --text-2: rgb(244 244 245 / 0.72);
  --accent: #ff2e55;
  --accent-hover: #ff4a6c;
  --accent-ink: #ffffff;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* Charcoal under everything, so overscroll never flashes white. */
html { background: var(--charcoal-deep); }

body {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
  margin: 0;
  background: linear-gradient(160deg, var(--charcoal) 0%, var(--charcoal-deep) 100%);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/*
 * The background is a giant lucky-draw drum: the app's own reel, scaled up
 * to the whole screen, ghosted, turning slowly. When the demo lands on a
 * winner, a cherry flash washes through it.
 */
.backdrop-drum {
  --row: 24vh;

  position: fixed;
  inset: 0;
  z-index: -1;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: rgb(255 255 255 / 0.045);
  pointer-events: none;
}

.backdrop-drum::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 70% 50%, color-mix(in oklch, var(--accent) 26%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 1.6s var(--ease-out);
}

body[data-flash] .backdrop-drum::before {
  opacity: 1;
  transition-duration: 0.25s;
}

.backdrop-drum .reel {
  width: 100%;
  height: 100%;
}

.backdrop-drum .reel-strip li {
  font-size: calc(var(--row) * 0.7);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.04em;
  text-overflow: clip;
  padding-inline: 0;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.site-header,
.hero,
.site-footer {
  width: min(100% - 48px, 1240px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 28px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.wordmark img { border-radius: 7px; }

.wordmark-name {
  font-size: 1.375rem;
  font-weight: 800;
  font-stretch: 120%;
  letter-spacing: -0.03em;
}

.quiet-link {
  font-weight: 600;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.quiet-link:hover { text-decoration-color: var(--text); }

/* Words on the left, the working reel on the right. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 48px clamp(40px, 6vw, 96px);
  padding-block: 24px 48px;
}

.nowrap { white-space: nowrap; }

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 4.4vw, 4rem);
  font-weight: 800;
  font-stretch: 108%;
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.button {
  display: inline-grid;
  place-items: center;
  height: 60px;
  margin-top: 40px;
  padding-inline: 32px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.125rem;
  font-weight: 700;
  font-stretch: 112%;
  text-decoration: none;
  transition: background-color 0.15s, scale 0.15s var(--ease-out);
}

.button:hover { background: var(--accent-hover); }
.button:active { scale: 0.97; }

/* The app's own reel on the app's own stage colours. */
.demo-stage {
  --row: clamp(28px, 4.6vw, 64px);

  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding-inline: 4%;
  overflow: hidden;
  border-radius: 8px;
  background:
    url("draw/grain.png"),
    radial-gradient(90% 70% at 50% 0%, color-mix(in oklch, var(--accent) 18%, transparent), transparent 70%),
    var(--stage);
  color: var(--text);
}

.demo-stage .reel {
  width: 100%;
  height: calc(var(--row) * 5.6);
}

.demo-stage .reel-strip li { transition: color 0.3s var(--ease-out); }
.demo-stage[data-state="landed"] .reel-strip li:nth-child(4) { color: var(--accent); }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 24px 32px;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.maker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

/* Vehi's mark on its own slate tile, as in Vehi's icon. */
.maker img {
  box-sizing: content-box;
  padding: 5px;
  border-radius: 7px;
  background: #1f2937;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .demo-stage { --row: clamp(26px, 8.5vw, 56px); }
}

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