/* Anilili — static site styles
   Palette derived from the app icon (#8873EF violet on pure black). */

:root {
  --bg: #000000;
  --surface: #0b0b10;
  --surface-2: #14141c;
  --surface-3: #1c1c26;
  --border: #262633;
  --border-soft: #1e1e29;
  --text: #f4f4f7;
  --text-muted: #9a9aa8;
  --text-dim: #6f6f7d;

  --primary: #8873ef;
  --primary-strong: #6b54d6;
  --primary-bright: #a594f5;
  --primary-soft: rgba(136, 115, 239, 0.14);
  --primary-line: rgba(136, 115, 239, 0.32);

  --accent: #f5c518;      /* rating gold, used sparingly */
  --info: #4a9dff;        /* episode labels */
  --success: #43c59e;
  --danger: #ff5c72;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
  --shadow-primary: 0 20px 60px -18px rgba(136, 115, 239, 0.45);

  --maxw: 1140px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-bright); text-decoration: none; }
a:hover { color: #c9befb; }

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5.4vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
li { margin-bottom: 0.5em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}
.narrow { max-width: 760px; }

.section { padding: clamp(56px, 9vw, 110px) 0; }
.section-sm { padding: clamp(40px, 6vw, 68px) 0; }
.section + .section { border-top: 1px solid var(--border-soft); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-bright);
  margin-bottom: 14px;
}
.lead { font-size: 1.12rem; color: var(--text-muted); }
.muted { color: var(--text-muted); }
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand:hover { color: var(--text); }

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 9px;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-2); }

.nav-cta {
  margin-left: 8px;
}
.menu-toggle {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px; height: 42px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
}

@media (max-width: 980px) {
  .nav {
    position: fixed;
    inset: 66px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 22px 22px;
    background: #050507;
    border-bottom: 1px solid var(--border);
    transform: translateY(-140%);
    transition: transform 0.28s ease;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 12px 10px; font-size: 1rem; }
  .nav-cta { margin: 8px 0 0; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: #0c0a1a;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { background: var(--primary-bright); color: #0c0a1a; }
.btn-ghost {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-lg { padding: 17px 30px; font-size: 1.05rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 7vw, 84px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -240px; left: 50%;
  width: 780px; height: 780px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(136, 115, 239, 0.22), transparent 62%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero h1 span { color: var(--primary-bright); }
.hero .lead { max-width: 34ch; }
.hero-mock {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-mock img { width: 100%; }
.badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 22px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.badge-strip span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .lead { max-width: none; }
  .hero-mock { max-width: 420px; margin: 0 auto; }
}

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 20px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-bright);
  margin-bottom: 16px;
  font-size: 1.35rem;
}
.card-link {
  display: block;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card-link:hover {
  color: inherit;
  border-color: var(--primary-line);
  transform: translateY(-2px);
}
.card-link .more { color: var(--primary-bright); font-weight: 600; font-size: 0.92rem; }

/* ---------- Screenshot gallery ---------- */
.shots {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}
.shots.tv { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .shots, .shots.tv { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .shots, .shots.tv { grid-template-columns: 1fr; } }
.shot {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.shot img { width: 100%; }
.shot figcaption {
  padding: 12px 15px;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
}

/* ---------- Download table ---------- */
.dl-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.96rem;
}
.dl-table th, .dl-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.dl-table th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--text);
}
.dl-table tr:last-child td { border-bottom: none; }
.dl-table code {
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.88em;
}
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-bright);
}

/* ---------- Download cards ---------- */
.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dl-card .file { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.9rem; color: var(--text); }
.dl-card .desc { color: var(--text-muted); font-size: 0.92rem; margin: 0; flex: 1; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; padding: 0; list-style: none; }
.steps li {
  position: relative;
  padding: 0 0 26px 58px;
  margin: 0;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary-soft);
  border: 1px solid var(--primary-line);
  color: var(--primary-bright);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps li::after {
  content: "";
  position: absolute;
  left: 18.5px; top: 40px; bottom: 4px;
  width: 1px;
  background: var(--border);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.1rem; margin-bottom: 6px; }
.steps p { margin-bottom: 10px; }
.steps figure { margin: 12px 0 0; }
.steps figure img {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* ---------- FAQ / accordion ---------- */
.faq { border-top: 1px solid var(--border); }
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 44px 20px 2px;
  position: relative;
  font-weight: 600;
  font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--primary-bright);
  font-weight: 400;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details > div {
  padding: 0 2px 22px;
  color: var(--text-muted);
}
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Callout ---------- */
.callout {
  border: 1px solid var(--primary-line);
  background: var(--primary-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 0.96rem;
}
.callout.warn { border-color: rgba(245, 197, 24, 0.4); background: rgba(245, 197, 24, 0.09); }
.callout.info { border-color: rgba(74, 157, 255, 0.35); background: rgba(74, 157, 255, 0.09); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--text); }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(136, 115, 239, 0.16), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 70px) 24px;
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 18px 0 0;
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0; margin: 0;
}
.breadcrumbs li::after { content: "/"; margin-left: 8px; color: var(--border); }
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary-bright); }

/* ---------- Article ---------- */
.article h2 { margin-top: 1.8em; }
.article h3 { margin-top: 1.5em; }
.article ul li::marker { color: var(--primary); }
.article table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.95rem; }
.article th, .article td { border: 1px solid var(--border); padding: 10px 13px; text-align: left; }
.article th { background: var(--surface-2); }
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 34px;
}
.toc p { font-weight: 600; margin-bottom: 10px; }
.toc ul { margin: 0; padding-left: 1.1em; }
.toc a { color: var(--text-muted); }
.toc a:hover { color: var(--primary-bright); }

/* ---------- Related links ---------- */
.related {
  margin-top: 46px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.related h2 { font-size: 1.3rem; margin-bottom: 18px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #050507;
  border-top: 1px solid var(--border);
  padding: 60px 0 34px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
}
.footer-grid h4 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: var(--text-muted); }
.footer-grid a:hover { color: var(--primary-bright); }
.footer-brand p { color: var(--text-muted); max-width: 34ch; margin-top: 12px; }
.footer-bottom {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  color: var(--text-dim);
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Misc ---------- */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
}
.pill-list li {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  text-align: center;
}
.stat-row .num { font-size: 1.9rem; font-weight: 700; color: var(--primary-bright); }
.stat-row .lbl { font-size: 0.9rem; color: var(--text-muted); }
@media (max-width: 620px) { .stat-row { grid-template-columns: 1fr; } }

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

:focus-visible {
  outline: 2px solid var(--primary-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
