/* Figimi IPTV Player — website styles.
   Palette taken directly from the app's FigimiTheme.swift so the site and the
   product cannot drift apart. */

:root {
  --purple: #9501fe;
  --purple-deep: #6e00bd;
  --purple-soft: #ede0ff;
  --lavender: #f3f0ff;
  --white: #ffffff;
  --ink: #1a1625;
  --muted: #7a6f9c;
  --outline: #e4def7;
  --live: #ff3b5c;

  --bg: var(--lavender);
  --surface: var(--white);
  --text: var(--ink);
  --text-muted: var(--muted);
  --border: var(--outline);
  --shadow: 0 18px 40px rgba(149, 1, 254, 0.1);
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #120f1b;
    --surface: #1e1a2b;
    --surface-high: #2a2440;
    --text: #f4f1fb;
    --text-muted: #8f86ad;
    --border: #332c4a;
    --purple-soft: #2a2440;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

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

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

header.site .shell {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(149, 1, 254, 0.28);
}

nav.site {
  margin-left: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

nav.site a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
}

nav.site a:hover { color: var(--text); background: var(--purple-soft); }
nav.site a[aria-current="page"] { color: var(--purple); background: var(--purple-soft); }

/* ---------- Hero ---------- */

.hero {
  padding: 84px 0 56px;
  text-align: center;
}

.hero img.mark {
  width: 108px;
  height: 108px;
  border-radius: 26px;
  box-shadow: 0 22px 50px rgba(149, 1, 254, 0.32);
}

.hero h1 {
  margin: 28px 0 12px;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero p.lede {
  margin: 0 auto;
  max-width: 620px;
  font-size: 1.13rem;
  color: var(--text-muted);
}

.pill {
  display: inline-block;
  margin-bottom: 22px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 13px;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .pill { color: #d9b8ff; }
}

.cta-row {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn.primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 12px 28px rgba(149, 1, 254, 0.34);
}

.btn.primary:hover { background: var(--purple-deep); }

.btn.ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn.ghost:hover { background: var(--purple-soft); }

/* ---------- Sections ---------- */

section { padding: 30px 0; }

h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  font-weight: 700;
}

section > .shell > p.sub {
  margin: 0 0 26px;
  color: var(--text-muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 650;
}

.card p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-muted);
}

.card .ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--purple-soft);
  color: var(--purple);
  font-size: 19px;
}

@media (prefers-color-scheme: dark) {
  .card .ico { color: #d9b8ff; }
}

.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--purple);
  border-radius: 14px;
  padding: 20px 22px;
}

.notice p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.notice strong { color: var(--text); }

/* ---------- Plans ---------- */

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.plan .price {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--purple);
}

@media (prefers-color-scheme: dark) {
  .plan .price { color: #c98cff; }
}

.plan .price span { font-size: 0.92rem; font-weight: 500; color: var(--text-muted); }

/* ---------- Legal pages ---------- */

.legal { padding: 56px 0 20px; }

.legal h1 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  font-weight: 800;
}

.legal .updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 34px;
}

.legal h2 {
  margin: 40px 0 10px;
  font-size: 1.16rem;
  font-weight: 700;
}

.legal h3 {
  margin: 26px 0 8px;
  font-size: 1rem;
  font-weight: 650;
}

.legal p, .legal li { color: var(--text-muted); }
.legal strong { color: var(--text); font-weight: 600; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 7px; }

.legal a { color: var(--purple); text-decoration: none; border-bottom: 1px solid var(--border); }
.legal a:hover { border-bottom-color: var(--purple); }

@media (prefers-color-scheme: dark) {
  .legal a { color: #c98cff; }
}

.legal .lead {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.legal .lead p:first-child { margin-top: 0; }
.legal .lead p:last-child { margin-bottom: 0; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 28px 0 8px;
}

.toc p { margin: 0 0 10px; font-weight: 600; color: var(--text); font-size: 0.9rem; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.toc li { margin-bottom: 5px; font-size: 0.9rem; }

@media (max-width: 640px) {
  .toc ol { columns: 1; }
}

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

footer.site {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  padding: 34px 0 46px;
}

footer.site .shell {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

footer.site p { margin: 0; font-size: 0.87rem; color: var(--text-muted); }

footer.site .links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }

footer.site a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.87rem;
}

footer.site a:hover { color: var(--purple); }

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 50;
  background: var(--purple);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
}
