/* TopTenarr — landing page
   Brand DNA from the app (Plex-orange on charcoal), elevated for marketing.
   Signature element: the Top 10 leaderboard hero — the artifact the app pins to Plex. */

:root {
  --bg: #0f1115;
  --bg-grad: #14171d;
  --panel: #181b22;
  --panel-2: #1e222b;
  --border: #262b35;
  --border-2: #333a47;
  --accent: #e5a00d;
  --accent-2: #ffb31f;
  --accent-deep: #b87d08;
  --text: #f4f5f7;
  --muted: #9aa3af;
  --faint: #646c7a;
  --green: #22c55e;
  --red: #ef4444;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --maxw: 1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  background-image: radial-gradient(120% 80% at 78% -10%, rgba(229, 160, 13, 0.10), transparent 55%);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(15, 17, 21, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
}
.wordmark .mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  object-fit: cover;
  display: block;
}
.wordmark .arr { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav-links a { color: var(--muted); transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: #1a1205; }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: 76px 0 64px; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 18px; }
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}
.hero h1 .hl { color: var(--accent); }
.hero .lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 30em;
  margin-bottom: 28px;
}
.hero .lede strong { color: var(--text); font-weight: 600; }

/* terminal / install */
.terminal {
  background: #0a0c0f;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  max-width: 520px;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.terminal-bar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-2); }
.terminal-bar .label { margin-left: 8px; font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.06em; }
.terminal-body { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 16px 18px; }
.terminal-body pre {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
}
.terminal-body pre .tok-flag { color: var(--accent); }
.terminal-body pre .tok-img { color: var(--green); }
.copy-btn {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: 5px 9px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.cta-row { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.cta-note { font-size: 13px; color: var(--faint); }

/* ---------- leaderboard (signature) ---------- */
.board {
  background: linear-gradient(180deg, var(--panel) 0%, #15181e 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.95);
}
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}
.board-head .svc { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 15px; }
.board-head .svc .tag { font-family: var(--mono); font-size: 10px; color: var(--faint); letter-spacing: 0.14em; }
.board-head .live { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.board-head .live .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); } 70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

.row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 9px 20px;
  border-bottom: 1px solid rgba(38, 43, 53, 0.55);
  opacity: 0;
  animation: rise 0.5s ease forwards;
}
.row:last-child { border-bottom: 0; }
.row .rank {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  text-align: right;
  line-height: 1;
}
.row .title { font-size: 14px; font-weight: 500; color: var(--text); }
.row .move { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; }
.move.up { color: var(--green); }
.move.down { color: var(--red); }
.move.flat { color: var(--faint); }
.move.new { color: var(--accent); }
.row.top { background: linear-gradient(90deg, rgba(229, 160, 13, 0.13), transparent 70%); }
.row.top .rank { color: var(--accent); font-size: 30px; }
.row.top .title { font-weight: 600; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.row:nth-child(1) { animation-delay: 0.05s; }
.row:nth-child(2) { animation-delay: 0.11s; }
.row:nth-child(3) { animation-delay: 0.17s; }
.row:nth-child(4) { animation-delay: 0.23s; }
.row:nth-child(5) { animation-delay: 0.29s; }
.row:nth-child(6) { animation-delay: 0.35s; }
.row:nth-child(7) { animation-delay: 0.41s; }
.row:nth-child(8) { animation-delay: 0.47s; }
.row:nth-child(9) { animation-delay: 0.53s; }
.row:nth-child(10) { animation-delay: 0.59s; }

/* ---------- sections ---------- */
.section { padding: 72px 0; border-top: 1px solid var(--border); }
.section-head { max-width: 38em; margin-bottom: 44px; }
.section-head .eyebrow { margin-bottom: 14px; display: block; }
.section-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.section-head p { color: var(--muted); font-size: 16px; margin-top: 12px; }

/* services strip */
.services { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 9px 15px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.pill.free { color: var(--text); border-color: var(--accent); background: rgba(229, 160, 13, 0.08); }
.pill.free .badge { color: var(--accent); font-size: 10px; margin-left: 7px; letter-spacing: 0.1em; }

/* pipeline (scrape -> sync -> pin) */
.pipeline { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 26px 24px; }
.step .num { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.14em; }
.step h3 { font-family: var(--display); font-weight: 700; font-size: 19px; margin: 12px 0 8px; letter-spacing: -0.01em; }
.step p { color: var(--muted); font-size: 14px; }
.arrow { display: grid; place-items: center; color: var(--border-2); font-size: 22px; padding: 0 16px; }

/* pricing */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tier { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 30px 28px; display: flex; flex-direction: column; }
.tier.pro { border-color: var(--accent); background: linear-gradient(180deg, rgba(229, 160, 13, 0.07), var(--panel) 40%); position: relative; }
.tier .tier-name { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.tier.pro .tier-name { color: var(--accent); }
.tier .price { font-family: var(--display); font-weight: 700; font-size: 40px; letter-spacing: -0.02em; margin: 14px 0 4px; }
.tier .price .per { font-size: 15px; color: var(--faint); font-weight: 500; font-family: var(--body); }
.tier .price .alt { display: block; font-size: 13px; color: var(--muted); font-family: var(--body); font-weight: 500; margin-top: 4px; }
.tier .desc { color: var(--muted); font-size: 14px; margin: 8px 0 20px; }
.tier ul { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-bottom: 24px; }
.tier li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text); }
.tier li::before { content: ""; flex: 0 0 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: rgba(34, 197, 94, 0.15); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); background-size: 11px; background-repeat: no-repeat; background-position: center; }
.tier .foot { margin-top: auto; }

/* platforms */
.platforms { display: flex; flex-wrap: wrap; gap: 12px; }
.plat { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); border: 1px solid var(--border); background: var(--panel); padding: 11px 16px; border-radius: 9px; }
.plat .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 44px 0; }
.footer .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.footer .meta { font-size: 13px; color: var(--faint); }
.footer .links { display: flex; gap: 22px; font-size: 14px; }
.footer .links a { color: var(--muted); transition: color 0.15s; }
.footer .links a:hover { color: var(--accent); }

/* ---------- get it on your TV ---------- */
.tv-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: center; }
.tv-badges { display: flex; flex-wrap: wrap; gap: 14px; }
.store-badge {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 200px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--panel);
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
}
.store-badge .sb-top { font-size: 11px; color: var(--faint); letter-spacing: 0.04em; }
.store-badge .sb-main { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.store-badge.apk { border-color: var(--accent); background: rgba(229, 160, 13, 0.08); cursor: pointer; }
.store-badge.apk:hover { transform: translateY(-1px); border-color: var(--accent-2); background: rgba(229, 160, 13, 0.14); }
.store-badge.apk .sb-main { color: var(--accent); }
.store-badge.soon { opacity: 0.6; cursor: default; }
.tv-note { margin-top: 16px; font-size: 13px; color: var(--faint); }
.tv-steps { display: flex; flex-direction: column; gap: 16px; }
.tv-step { display: flex; align-items: flex-start; gap: 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.tv-num { flex: 0 0 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(229, 160, 13, 0.12); color: var(--accent); font-family: var(--display); font-weight: 700; font-size: 16px; }
.tv-step h4 { font-family: var(--display); font-weight: 700; font-size: 16px; margin-bottom: 3px; letter-spacing: -0.01em; }
.tv-step p { color: var(--muted); font-size: 14px; }
.tv-step code, .tv-adb code { font-family: var(--mono); font-size: 0.92em; color: var(--accent); background: rgba(229, 160, 13, 0.08); padding: 1px 6px; border-radius: 5px; }
.tv-adb { margin-top: 28px; font-size: 13px; color: var(--faint); }

/* footer disclaimer */
.footer .disclaimer { margin-top: 20px; max-width: 60em; font-size: 12px; line-height: 1.6; color: var(--faint); }

/* ---------- legal pages ---------- */
.legal { padding: 56px 0 72px; }
.legal .wrap { max-width: 760px; }
.legal .eyebrow { display: block; margin-bottom: 12px; }
.legal h1 { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 4vw, 42px); letter-spacing: -0.025em; }
.legal-meta { font-family: var(--mono); font-size: 12px; color: var(--faint); margin: 8px 0 28px; }
.legal h2 { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; margin: 32px 0 10px; }
.legal p { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.legal p strong, .legal li strong { color: var(--text); font-weight: 600; }
.legal ul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.legal li { position: relative; padding-left: 20px; color: var(--muted); font-size: 15px; }
.legal li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.legal a { color: var(--accent); }
.legal a:hover { color: var(--accent-2); }
.legal code { font-family: var(--mono); font-size: 0.9em; color: var(--accent); background: rgba(229, 160, 13, 0.08); padding: 1px 6px; border-radius: 5px; }
.legal-disclaimer { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--faint); line-height: 1.6; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .tv-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 52px 0 44px; }
  .board { order: -1; }
  .pipeline { grid-template-columns: 1fr; gap: 12px; }
  .arrow { transform: rotate(90deg); padding: 4px 0; }
  .tiers { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .row { opacity: 1; animation: none; }
  .pulse { animation: none; }
  .btn-primary:hover { transform: none; }
}
