/* TellyPop — shared styles. Plain CSS, no build step. */

:root {
  --bg: #0B0D0E;
  --stage: #080A0B;
  --surface: #111517;
  --surface-2: #181D1F;
  --line: #343B3D;
  --text: #F4F5F1;
  --text-2: #BDC4BD;
  --lime: #A8E45B;
  --lime-hi: #B8F16B;
  --ink: #10170A;

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --page: 72rem;
  --measure: 45rem; /* ~720px reading width */
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 18px;
  --ease: 140ms ease;

  color-scheme: dark;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

strong {
  color: var(--text);
  font-weight: 700;
}

a {
  color: var(--lime);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(168, 228, 91, 0.55);
  transition: color var(--ease), text-decoration-color var(--ease), background-color var(--ease);
}

a:hover {
  color: var(--lime-hi);
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

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

a:focus-visible {
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
  color: var(--ink);
  outline: 3px solid var(--text);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  min-height: 4.5rem;
  padding-block: 0.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  color: var(--text);
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.wordmark:hover {
  color: var(--text);
}

.wordmark svg {
  flex: none;
  width: 2rem;
  height: 2rem;
}

.nav-list,
.footer-list {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list {
  gap: 0.25rem;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-list a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-list a:focus-visible {
  border-radius: 999px;
}

.nav-list a[aria-current="page"] {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
}

.nav-list a[aria-current="page"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
}

@media (max-width: 30rem) {
  .site-nav {
    width: 100%;
  }

  .nav-list {
    margin-inline: -0.75rem;
  }
}

/* ---------- Landing ---------- */

.hero {
  padding-block: clamp(3rem, 9vw, 6.5rem) clamp(3rem, 7vw, 5rem);
}

.hero-grid {
  display: grid;
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 1.6rem + 4.6vw, 4.75rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.lead {
  max-width: 34rem;
  margin-top: 1.5rem;
  color: var(--text-2);
  font-size: clamp(1.125rem, 1rem + 0.55vw, 1.3125rem);
  line-height: 1.6;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 0;
  padding: 0.625rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.4;
}

.status::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(168, 228, 91, 0.16);
}

.platforms {
  margin: 1.25rem 0 0;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.stage {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(58% 52% at 50% 50%, rgba(168, 228, 91, 0.1), rgba(168, 228, 91, 0) 72%),
    var(--stage);
  overflow: hidden;
}

.stage svg {
  width: min(58%, 19rem);
  height: auto;
}

.section {
  padding-block: clamp(2.75rem, 7vw, 4.5rem);
  border-top: 1px solid var(--line);
}

.section-title {
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.points {
  margin: 0;
}

.point {
  display: grid;
  gap: 0.375rem 2.5rem;
  padding-block: 1.375rem;
  border-top: 1px solid var(--line);
}

.point:last-child {
  border-bottom: 1px solid var(--line);
}

@media (min-width: 48rem) {
  .point {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
    padding-block: 1.75rem;
  }
}

.point dt {
  color: var(--text);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.point dd {
  max-width: 38rem;
  margin: 0;
  color: var(--text-2);
}

.links {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  height: 100%;
  padding: 1.375rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-2);
  text-decoration: none;
}

.link-card:hover {
  background: var(--surface-2);
  color: var(--text-2);
}

.link-card:focus-visible {
  border-radius: var(--radius);
}

.link-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
}

.link-title span {
  color: var(--lime);
  transition: transform var(--ease);
}

.link-card:hover .link-title span {
  transform: translateX(3px);
}

.publisher {
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  color: var(--text-2);
  font-size: 0.9375rem;
}

/* ---------- Documents (privacy, terms, support) ---------- */

.doc {
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(3rem, 8vw, 5.5rem);
}

.doc-inner {
  max-width: var(--measure);
  margin-inline: auto;
}

.doc-header h1 {
  font-size: clamp(2.125rem, 1.5rem + 3vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.doc-meta {
  margin: 0.875rem 0 0;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.doc-header .doc-meta:first-child {
  margin: 0 0 0.75rem;
}

.doc-intro {
  margin: 1.25rem 0 0;
  color: var(--text-2);
  font-size: 1.125rem;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.panel {
  margin-block: 2rem;
  padding: clamp(1.25rem, 4vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel h2 {
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.panel > :last-child {
  margin-bottom: 0;
}

.panel ul {
  margin: 0;
  padding-left: 1.25rem;
}

.panel li + li {
  margin-top: 0.5rem;
}

.panel li,
.panel p {
  color: var(--text-2);
}

.toc ol {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--text-2);
}

@media (min-width: 40rem) {
  .toc ol {
    columns: 2;
    column-gap: 2.5rem;
  }
}

.toc li {
  break-inside: avoid;
  padding-block: 0.3125rem;
  line-height: 1.5;
}

.toc li::marker {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.prose {
  color: var(--text-2);
  line-height: 1.75;
}

.prose h2 {
  margin: 2.5rem 0 1rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  scroll-margin-top: 1.5rem;
}

.prose h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.0625rem;
  letter-spacing: -0.005em;
  line-height: 1.35;
  scroll-margin-top: 1.5rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25em;
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose ul li::marker {
  color: var(--lime);
}

.prose ol li::marker {
  color: var(--text);
  font-weight: 700;
}

.prose a {
  overflow-wrap: anywhere;
}

.note {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--lime);
  border-radius: 0 12px 12px 0;
  background: var(--surface);
  color: var(--text);
}

.note p:last-child {
  margin-bottom: 0;
}

.path {
  color: var(--text);
  font-weight: 650;
}

/* Support */

.faq-group + .faq-group {
  margin-top: 0.5rem;
}

.faq-index {
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-index li + li {
  margin-top: 0.25rem;
}

.faq-index a {
  display: inline-block;
  padding-block: 0.25rem;
}

.contact {
  margin-top: 2rem;
}

.contact .email {
  display: block;
  margin: 0.25rem 0 1.25rem;
  color: var(--text);
  font-size: clamp(1.25rem, 1rem + 1.4vw, 1.625rem);
  font-weight: 750;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  user-select: all;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.375rem;
  border-radius: 12px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--lime-hi);
  color: var(--ink);
}

.button:focus-visible {
  border-radius: 12px;
  outline-color: var(--text);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.button-quiet {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
}

.button-quiet:hover {
  background: var(--surface-2);
  color: var(--text);
}

.button-quiet:focus-visible {
  outline-color: var(--lime);
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.9375rem;
}

.footer-inner {
  display: grid;
  gap: 1rem;
}

@media (min-width: 48rem) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1rem 3rem;
  }
}

.footer-list {
  gap: 0 1.25rem;
}

.footer-list a {
  display: inline-block;
  padding-block: 0.375rem;
  color: var(--text);
  text-decoration: none;
}

.footer-list a:hover {
  color: var(--lime);
  text-decoration: underline;
}

.footer-note {
  max-width: 34rem;
  margin: 0;
}

.copyright {
  margin: 0;
}

@media (min-width: 48rem) {
  .copyright {
    grid-column: 2;
    grid-row: 1;
    padding-block: 0.375rem;
  }
}

/* ---------- Preferences ---------- */

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

@media (forced-colors: active) {
  .status::before,
  .nav-list a[aria-current="page"]::before {
    background: CanvasText;
  }
}

@media print {
  :root {
    --bg: #fff;
    --stage: #fff;
    --surface: #fff;
    --surface-2: #fff;
    --line: #bbb;
    --text: #000;
    --text-2: #222;
    --lime: #000;
  }

  .skip-link,
  .site-nav,
  .footer-nav,
  .stage,
  .actions {
    display: none;
  }

  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
  }
}
