/* One expiring dispatch: the promise, a video, one action. Pure black, white and two greys, one monospace family. */
@font-face {
  font-family: "Azeret Mono";
  src: url("/fonts/azeret-mono-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #ffffff;
  --mute: #a6a6a6; /* 8.9:1 on black: every small line stays readable */
  --dim: #3a3a3a;  /* rules and resting borders only, never text */
  --ground: #000000;
  --red: #ff453a;
  --col: min(100%, 420px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; scrollbar-color: var(--dim) var(--ground); scrollbar-width: thin; }
body {
  min-height: 100svh;
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/1.55 "Azeret Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ink); color: var(--ground); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
b { font-weight: 600; color: var(--ink); }

main#page {
  width: var(--col);
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom));
}

/* ---- 1. the promise, the clock ---- */
.top { text-align: center; }
.clock-line {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute);
}
.clock-line #clock { color: var(--ink); font-weight: 500; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { opacity: 0.25; } }
h1 {
  margin-top: 14px;
  font-size: clamp(1.55rem, 7.4vw, 2.2rem);
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 b { font-weight: 600; }
.sub { margin-top: 8px; font-size: 13.5px; color: var(--mute); text-wrap: balance; }

/* ---- 2. the video ---- */
.frame-wrap { display: flex; justify-content: center; margin-top: 16px; }
.frame {
  position: relative;
  width: clamp(220px, calc((100svh - 330px) * 0.5625), 360px);
  aspect-ratio: 9 / 16;
  border: 1px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  background: #0b0b0c;
}
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sound {
  position: absolute; left: 12px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px 9px 11px;
  border: 0; border-radius: 40px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--ink);
  font: 500 12px/1 "Azeret Mono", monospace; letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.sound svg { width: 18px; height: 18px; }
.sound .f { fill: currentColor; }
.sound .w { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; opacity: 0.35; }
.sound.is-on { background: rgba(255, 255, 255, 0.92); color: var(--ground); }
.sound.is-on .w { opacity: 1; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, 0.15); pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--ink); }

/* ---- 3. the one action ---- */
.act { margin-top: 16px; display: grid; gap: 10px; }
.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 64px; padding: 10px 20px;
  border: 1px solid var(--ink); border-radius: 14px;
  background: var(--ink); color: var(--ground);
  text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.2s var(--ease);
}
.cta-text { display: grid; gap: 3px; }
.cta-main { font-size: 15px; font-weight: 600; letter-spacing: 0.01em; }
.cta-sub { font-size: 11.5px; opacity: 0.7; }
.cta svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; flex: none; transition: transform 0.35s var(--ease); }
.cta:hover { background: var(--ground); color: var(--ink); }
.cta:hover svg { transform: translateX(4px); }
.cta:active { transform: translateY(1px); }
.code {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  padding: 12px 16px; border: 1px solid var(--dim); border-radius: 14px; font-size: 12px;
}
.code-label { color: var(--mute); text-transform: uppercase; letter-spacing: 0.08em; }
.code-value { font-size: 15px; font-weight: 600; letter-spacing: 0.05em; user-select: all; }
.copy {
  border: 0; background: none; color: var(--ink); cursor: pointer; padding: 6px 0 6px 8px;
  font: 500 12px/1 "Azeret Mono", monospace; text-transform: uppercase; letter-spacing: 0.08em;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.qr { display: none; }

/* ---- 4–8. the rest: short blocks, one idea each ---- */
.block { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--dim); }
.block h2 { font-size: 17px; font-weight: 400; line-height: 1.35; letter-spacing: -0.01em; text-wrap: balance; }
.block p { margin-top: 10px; font-size: 13.5px; line-height: 1.7; color: var(--mute); }
.shot { display: block; width: 100%; height: auto; margin-top: 16px; border: 1px solid var(--dim); border-radius: 14px; }
.steps { margin-top: 14px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding-left: 28px; font-size: 13.5px; line-height: 1.65; color: var(--mute); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; color: var(--ink); font-weight: 500; }
.note { font-size: 12.5px !important; }
.contest { padding: 24px 18px 22px; border: 1px solid var(--ink); border-radius: 16px; }
.contest h2 b { font-weight: 600; }
.faq details { border-top: 1px solid var(--dim); }
.faq details:first-of-type { margin-top: 12px; }
.faq summary {
  display: flex; justify-content: space-between; gap: 16px; padding: 15px 0;
  font-size: 14px; color: var(--ink); cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--mute); font-weight: 300; transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; }

/* ---- 9. the action again ---- */
.end { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--dim); text-align: center; }
.clock-big { font-size: clamp(2.8rem, 14vw, 4.2rem); font-weight: 100; letter-spacing: -0.03em; line-height: 1; }
.clock-note { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; text-wrap: balance; }
.clock-note span { color: var(--ink); white-space: nowrap; }
.end .cta { text-align: left; }

.fine { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--dim); }
.fine p { font-size: 11px; line-height: 1.7; color: var(--mute); }

/* ---- the bar: in reach whenever no big button is on screen ---- */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.92); border-top: 1px solid var(--dim);
  transform: translateY(105%); transition: transform 0.4s var(--ease);
}
.bar.is-on { transform: none; }
.bar-clock { font-size: 15px; font-weight: 500; color: var(--ink); }
.bar-cta {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px;
  border-radius: 12px; background: var(--ink); color: var(--ground);
  font-size: 13px; font-weight: 600; text-decoration: none;
}

.gone { margin: 40vh auto 0; text-align: center; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }

/* computers: the same column, plus the QR for the phone in the visitor's pocket */
@media (min-width: 900px) {
  :root { --col: min(100%, 540px); }
  main#page { padding-top: 34px; }
  .frame { width: clamp(260px, calc((100svh - 340px) * 0.5625), 380px); }
  .qr { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 16px; margin-top: 8px; }
  .qr img { display: block; width: 112px; height: 112px; image-rendering: pixelated; border-radius: 8px; }
  .qr figcaption { font-size: 12px; line-height: 1.6; color: var(--mute); }
}

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

/* ---- the rules: a document to read, same black, same face ---- */
main.rules { display: block; max-width: 68ch; margin: 0 auto; padding: 28px 16px 56px; }
.rules .back { display: inline-block; margin-bottom: 28px; color: var(--mute); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; text-decoration: underline; text-underline-offset: 4px; }
.rules h1 { font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; margin-top: 0; }
.rules .lead { margin-top: 14px; color: var(--ink); font-size: 14px; line-height: 1.7; }
.rules h2 { margin-top: 34px; margin-bottom: 10px; font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.rules p, .rules li { font-size: 13px; line-height: 1.75; color: var(--mute); }
.rules p + p { margin-top: 10px; }
.rules b { color: var(--ink); font-weight: 500; }
.rules ol { padding-left: 1.4em; display: grid; gap: 8px; }
.rules table { width: 100%; margin: 12px 0; border-collapse: collapse; font-size: 12.5px; }
.rules th, .rules td { padding: 10px 8px 10px 0; border-top: 1px solid var(--dim); text-align: left; vertical-align: top; line-height: 1.6; }
.rules th { color: var(--ink); font-weight: 500; white-space: nowrap; }
.rules td:nth-child(2) { color: var(--ink); white-space: nowrap; padding-right: 14px; }
.rules td:last-child { color: var(--mute); }
