/* meetreplay.com. The palette and both typefaces are the app's own, so the
   page and the program are recognisably one product:
   colours from src/theme.rs (dark and light), the mark and its recording orange
   from src/icon.rs, and Ubuntu Light and Hack, which are the fonts egui ships
   and the app draws with. Fonts are self-hosted: loading them from a font CDN
   hands every visitor's address to a third party, which is the wrong first
   impression for a product whose promise is that nothing leaves your PC. */

@font-face {
  font-family: "Ubuntu";
  src: url("/fonts/Ubuntu-Light.ttf") format("truetype");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Hack";
  src: url("/fonts/Hack-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #121722;
  --sunken: #0b0f18;
  --raised: #212b3d;
  --line: #28324a;
  --text: #e9edf5;
  --muted: #8b95aa;
  --accent: #5c86f0;
  --accent-text: #93b0ff;
  --rec: #ff5c5c;
  --body: "Ubuntu", "Segoe UI", system-ui, sans-serif;
  --mono: "Hack", "Cascadia Mono", Consolas, ui-monospace, monospace;
  color-scheme: dark light;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f2ed;
    --sunken: #e6e3dc;
    --raised: #ffffff;
    --line: #d2cec5;
    --text: #1c1e24;
    --muted: #6b6e78;
    --accent: #2f4fc4;
    --accent-text: #243ea0;
    --rec: #c02a2a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 300 1.125rem/1.6 var(--body);
}
a { color: var(--accent-text); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 2px; }

header.site, main, footer.site {
  max-width: 70rem;
  margin: 0 auto;
  padding-inline: 1.5rem;
}

/* ---- header ---- */
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1.25rem;
}
.mark { width: 2rem; height: 2rem; flex: none; }
nav a, nav [aria-current] { color: var(--muted); }
nav [aria-current] { color: var(--text); }

/* ---- hero: the transcript is the one loud thing on the page ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  padding-block: 3rem 5rem;
  align-items: center;
}
@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4rem; padding-block: 5rem 7rem; }
}
h1 {
  font-weight: 300;
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  max-width: 14ch;
}
.lede { color: var(--muted); max-width: 34rem; margin: 0 0 2rem; }
.availability { margin: 0; color: var(--text); }

.transcript {
  margin: 0;
  background: var(--sunken);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  font: 400 0.9rem/1.7 var(--mono);
}
.file {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.state { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--rec); white-space: nowrap; }
.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--rec);
  animation: pulse 2.4s ease-in-out infinite;
}
.lines { list-style: none; margin: 0; padding: 1rem; }
.lines li {
  display: grid;
  grid-template-columns: 5.2rem 4.2rem minmax(0, 1fr);
  gap: 0.4rem;
  animation: line-in 0.5s ease-out both;
}
.lines time { color: var(--muted); }
.lines b { font-weight: 400; color: var(--accent-text); }
.lines li:nth-child(1) { animation-delay: 0.2s; }
.lines li:nth-child(2) { animation-delay: 0.9s; }
.lines li:nth-child(3) { animation-delay: 1.6s; }
.lines li:nth-child(4) { animation-delay: 2.3s; }

.ask {
  margin: 0 1rem 1rem;
  padding: 0.9rem 1rem;
  background: var(--raised);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-family: var(--body);
  font-weight: 300;
  font-size: 1rem;
  animation: line-in 0.5s ease-out 3.2s both;
}
.ask p { margin: 0; }
.via { color: var(--muted); font-size: 0.85rem; }
.question { margin-top: 0.25rem !important; }
.answer { margin-top: 0.6rem !important; color: var(--text); }
.cite { color: var(--muted); font-family: var(--mono); font-size: 0.85em; }

@media (max-width: 30rem) {
  .transcript { font-size: 0.8rem; }
  .lines li { grid-template-columns: 4.6rem 3.8rem minmax(0, 1fr); }
}

@keyframes line-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .lines li, .ask, .dot { animation: none; }
}

/* ---- facts and steps: quiet, so the transcript stays the loud thing ---- */
h2 {
  font-weight: 300;
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0 0 2rem;
}
.facts, .steps { padding-block: 0 5rem; }
.facts dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 3rem; }
@media (min-width: 48rem) { .facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.facts dl > div { padding-block: 1.25rem; border-top: 1px solid var(--line); }
.facts dt { font-size: 1.15rem; margin-bottom: 0.35rem; }
.facts dd { margin: 0; color: var(--muted); max-width: 32rem; }

.steps ol { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 1.5rem; max-width: 44rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; color: var(--muted); }
.steps li::before {
  content: counter(step);
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 1rem;
  padding-top: 0.2rem;
}
.steps strong { font-weight: 300; color: var(--text); }
.steps em { font-style: normal; color: var(--text); }

/* ---- the privacy notice ---- */
.prose { max-width: 44rem; padding-block: 2rem 5rem; }
.prose h1 { max-width: none; font-size: clamp(2rem, 4vw, 2.8rem); }
.prose h2 { font-size: 1.4rem; margin: 3rem 0 1rem; }
.prose h3 { font-weight: 300; font-size: 1.15rem; margin: 2rem 0 0.75rem; }
.prose p, .prose li { color: var(--text); }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.6rem; }
.prose strong { font-weight: 600; color: var(--text); }
.prose code {
  font: 400 0.85em var(--mono);
  background: var(--raised);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

/* ---- footer ---- */
footer.site {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
footer.site p { margin: 0; }
