/* hexcam.app. Dark like the footage it shows, with the app's own parts: the blurred backdrop,
   glass capsules, the accent blue of the played part of a timeline. */

:root {
  color-scheme: dark;
  --accent: #2f7bff;
  --ink: #f4f5f7;
  --ink-2: rgba(244, 245, 247, 0.62);
  --ink-3: rgba(244, 245, 247, 0.38);
  --glass: rgba(40, 43, 52, 0.55);
  --edge: rgba(255, 255, 255, 0.13);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  background: #08090c;
  color: var(--ink);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: var(--ink-2); text-decoration: none; }
a:hover { color: var(--ink); }

/* A 48-pixel copy of the screenshot, stretched over the window: blurred by its own smallness. */
.backdrop {
  position: fixed;
  inset: -12%;
  z-index: -1;
  background: url(backdrop.jpg) center / cover;
  filter: blur(50px) saturate(1.3);
  opacity: 0.34;
}

.top {
  position: fixed;
  top: 18px; left: 22px;
  z-index: 6;
  display: flex; align-items: center; gap: 10px;
  font-weight: 650; letter-spacing: -0.01em;
  color: var(--ink);
}
.top img { display: block; }

/* The scene */

.film { position: relative; }
.frame {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 28px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 84px 3vw 96px;
}
.line {
  margin: 0;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}
h1.line { font-size: clamp(40px, 7.4vw, 92px); }
p.line { display: none; font-size: clamp(24px, 3.4vw, 40px); letter-spacing: -0.02em; }

.stage {
  position: relative;
  width: min(94vw, 1180px, 64vh * 1.714);
  aspect-ratio: 2400 / 1400;
}
.shot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border-radius: 1.5% / 2.57%;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}
#shot-b { display: none; }
.tile {
  position: absolute;
  background-image: url(screenshot-grid.jpg);
  border-radius: 4.5% / 6.9%;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  will-change: transform;
}

/* With the script running the scene is tall and its frame stays put while it plays. */
.live .film { height: 460vh; }
.live .frame { overflow: clip; position: sticky; top: 0; height: 100vh; height: 100svh; grid-template-rows: 3.2em auto; }
.live .line { grid-area: 1 / 1; align-self: end; opacity: 0; will-change: transform, opacity; }
.live h1.line { align-self: center; grid-row: 1 / 3; z-index: 2; text-shadow: 0 2px 40px rgba(0, 0, 0, 0.7); }
.live p.line { display: block; }
.live .stage { grid-area: 2 / 1; will-change: transform; }
.live .shot { opacity: 0; }
.live #shot-b { display: block; }

/* The end */

.end {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 18vh 24px 16vh;
  text-align: center;
}
.end img { filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.5)); margin-bottom: 18px; }
.soon { margin: 0; font-size: clamp(24px, 3.4vw, 40px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.small { margin: 6px 0 0; color: var(--ink-3); font-size: 15px; }

footer {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px;
  padding: 0 24px 96px;
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
}

/* The page's transport */

.scrub {
  position: fixed;
  left: 50%; bottom: 18px;
  z-index: 6;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  width: min(520px, calc(100vw - 36px));
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.scrub .play {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
}
.scrub .play::after {
  content: "";
  position: absolute; left: 11px; top: 9px;
  border: 6px solid transparent; border-left: 10px solid #fff; border-right: 0;
}
.scrub .track { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.scrub .played { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.scrub .clock { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* The privacy page */

.prose {
  max-width: 720px;
  margin: 96px auto 40px;
  padding: 32px;
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
}
.prose h1 { margin: 0 0 4px; font-size: clamp(30px, 4.6vw, 42px); letter-spacing: -0.03em; line-height: 1.1; }
.prose h2 { margin: 28px 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--ink-2); }
.prose b { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent); }
.prose .date { margin: 0 0 18px; font-size: 14px; color: var(--ink-3); }
.prose ul { padding-left: 20px; }
.page footer { padding-bottom: 40px; }
@media (max-width: 760px) { .prose { margin: 80px 14px 32px; padding: 24px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
