/* The Telly — thetelly.org
   Dark-only on purpose: the app has four palettes and every one of them is dark, so a
   light website would be the odd one out. Colours below are lifted from the app's own
   Blue (default) palette in app/src/main/res/values/colors_themes.xml. */

@font-face {
  font-family: "Google Sans Flex";
  src: url("fonts/google-sans-flex-subset.woff2") format("woff2-variations");
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --bg:          #24262A;   /* tt default background */
  --bg-deep:     #141618;   /* tt secondary background */
  --surface:     #2A2C2E;   /* sidebar / guide block */
  --surface-2:   #303134;   /* guide panel stroke */
  --accent:      #0A5FC7;   /* Blue palette accent */
  --accent-lift: #0080F7;   /* Blue palette focus elapsed */
  --text:        rgba(255, 255, 255, 0.87);
  --text-dim:    rgba(255, 255, 255, 0.67);
  --text-faint:  rgba(255, 255, 255, 0.55);

  --measure: 68ch;
  --radius: 14px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-wrap: break-word;       /* a long unbroken string must never widen the page */
  font-family: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variation-settings: "opsz" 18, "wght" 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-variation-settings: "opsz" 32, "wght" 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
h3 { font-size: 1.15rem; font-variation-settings: "opsz" 24, "wght" 600; }
p  { margin: 0 0 1em; }
p, li { text-wrap: pretty; }

a { color: var(--accent-lift); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }

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

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff;
  padding: .75rem 1rem; border-radius: 0 0 8px 0; z-index: 10;
}
.skip:focus { left: 0; top: 0; }

.wrap { width: min(100% - 2 * var(--pad), 1120px); margin-inline: auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg-deep) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-2);
}
.site-header .wrap {
  display: flex; align-items: center; gap: .75rem 1.5rem;
  min-height: 68px; padding-block: .5rem;
  flex-wrap: wrap;                 /* nav drops to its own line before it can overflow */
}
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
/* logo-lockup.svg is cropped to its ink, so this height is the real height of the
   artwork. (The app's banner source has ~60% empty margin baked in; using it uncropped
   made a 34px logo draw at about 14px.) */
.brand img { height: clamp(30px, 2.6vw, 40px); width: auto; display: block; }
.site-nav {
  margin-left: auto;
  display: flex; gap: clamp(.75rem, 2.5vw, 1.75rem); flex-wrap: wrap;
  min-width: 0;                    /* flex items default to min-width:auto and refuse to shrink */
}
@media (max-width: 560px) {
  .site-nav { margin-left: 0; width: 100%; }
}
.site-nav a {
  color: var(--text-dim); text-decoration: none; font-variation-settings: "opsz" 18, "wght" 500;
  font-size: .95rem;
}
.site-nav a:hover { color: #fff; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(3rem, 9vw, 6.5rem) clamp(2rem, 5vw, 3.5rem); }
.hero p.lede {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  color: var(--text-dim); max-width: var(--measure);
}
.cta-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.4rem; border-radius: 999px;
  font-variation-settings: "opsz" 18, "wght" 600;
  text-decoration: none; border: 1px solid transparent;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-lift); color: #fff; }
.btn-ghost { border-color: var(--surface-2); color: var(--text); background: var(--surface); }
.btn-ghost:hover { border-color: var(--text-faint); color: #fff; }

.pill {
  display: inline-block; padding: .3rem .7rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--surface-2);
  color: var(--text-dim); font-size: .8rem; letter-spacing: .02em;
  font-variation-settings: "opsz" 14, "wght" 500;
}

/* ---------- honest positioning strip ---------- */
.disclaimer {
  border: 1px solid var(--surface-2); border-left: 3px solid var(--accent);
  background: var(--bg-deep); border-radius: var(--radius);
  padding: 1.1rem 1.35rem; margin-block: 2rem;
}
.disclaimer p { margin: 0; color: var(--text-dim); max-width: var(--measure); }
.disclaimer strong { color: var(--text); }

/* ---------- sections ---------- */
section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
section > .wrap > p { max-width: var(--measure); color: var(--text-dim); }
.section-head { margin-bottom: 2rem; }

/* ---------- screenshots ---------- */
/* These are dense 1080p UI captures. At two-up on a laptop the guide grid becomes
   unreadable, so the showcase shot gets the full width and the rest pair off. */
.shots { display: grid; gap: 1.75rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.shots > .shot--wide { grid-column: 1 / -1; }
figure.shot { margin: 0; }
figure.shot img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius); border: 1px solid var(--surface-2);
  background: var(--bg-deep);
}
figure.shot figcaption {
  margin-top: .6rem; color: var(--text-faint); font-size: .9rem;
}

/* ---------- features ---------- */
.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.feature {
  background: var(--surface); border: 1px solid var(--surface-2);
  border-radius: var(--radius); padding: 1.35rem;
}
.feature h3 { margin-bottom: .35rem; }
.feature p { margin: 0; color: var(--text-dim); font-size: .95rem; }

/* ---------- privacy highlight ---------- */
.privacy-facts { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: 1.5rem; }
.fact {
  border: 1px solid var(--surface-2); border-radius: var(--radius);
  padding: 1.25rem; background: var(--bg-deep);
}
.fact .big {
  display: block; font-variation-settings: "opsz" 40, "wght" 700;
  font-size: 1.9rem; line-height: 1.1; margin-bottom: .3rem;
}
.fact p { margin: 0; color: var(--text-dim); font-size: .95rem; }

/* ---------- community ---------- */
.community-grid {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 760px) {
  .community-grid { grid-template-columns: minmax(0, 1fr) auto; }
}
.qr-card {
  background: #fff; padding: 1rem; border-radius: var(--radius);
  width: 220px; justify-self: start;
}
.qr-card img { display: block; width: 100%; height: auto; }
.qr-card figcaption { color: #141618; font-size: .8rem; text-align: center; margin-top: .5rem; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--surface-2);
  background: var(--bg-deep);
  padding-block: 2.5rem;
  color: var(--text-faint); font-size: .9rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: baseline; }
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-left: auto; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* ---------- long-form legal pages ---------- */
.doc { padding-block: clamp(2.5rem, 7vw, 4rem); }
.doc .wrap { max-width: 78ch; }
.doc h2 { margin-top: 2.25rem; font-size: 1.5rem; }
.doc h3 { margin-top: 1.5rem; }
.doc ul { padding-left: 1.25rem; }
.doc li { margin-bottom: .5rem; color: var(--text-dim); }
.doc p { color: var(--text-dim); }
.doc .updated { color: var(--text-faint); font-size: .9rem; }
/* Tables are the usual cause of a page that scrolls sideways on a phone: they refuse to
   shrink past their content. Give this one its own scroll container instead. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 0; font-size: .95rem; min-width: 30rem; }
.doc th, .doc td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--surface-2); vertical-align: top; }
.doc th { color: var(--text); font-variation-settings: "opsz" 18, "wght" 600; }
.doc td { color: var(--text-dim); }

/* A whole paragraph whose accuracy depends on an unresolved decision (see the Android
   backup section). Flagged so it cannot ship unreviewed. */
.todo-block {
  border: 1px dashed #E5334A; border-radius: var(--radius);
  padding: 1rem 1.15rem; background: rgba(229, 51, 74, 0.08);
}

/* A placeholder awaiting the registered company details. Deliberately loud so it
   cannot ship unnoticed. */
.todo {
  background: rgba(229, 51, 74, 0.14);
  border: 1px dashed #E5334A;
  border-radius: 6px; padding: .05em .4em; color: #fff;
  font-variation-settings: "opsz" 18, "wght" 600;
}
