/* ==========================================================================
   QuickSync for Kodi · landing
   Static and dependency-free: no external fonts or scripts.
   Dark theme by default (it matches Kodi) + light variant via
   `prefers-color-scheme`.
   ========================================================================== */

:root {
  --bg: #0f1722;
  --bg-soft: #142030;
  --card: #18263a;
  --line: #26384f;
  --text: #e8f0fa;
  --muted: #9cb0c8;
  --accent: #12a8e0;
  --accent-strong: #0b8fc2;
  --shadow: 0 18px 40px rgba(3, 10, 20, 0.5);
  --radius: 16px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f8fc;
    --bg-soft: #ffffff;
    --card: #ffffff;
    --line: #dbe5f0;
    --text: #13202f;
    --muted: #586b82;
    --accent-strong: #0a7fae;
    --shadow: 0 14px 32px rgba(19, 32, 47, 0.12);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1000px 520px at 80% -12%, rgba(18, 168, 224, 0.2), transparent 62%),
    radial-gradient(700px 400px at 6% 4%, rgba(18, 168, 224, 0.1), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.05em 0.35em;
}

/* ------------------------------------------------------------------ i18n */

.i18n {
  display: none;
}

html[lang="es"] .i18n[data-lang="es"],
html[lang="en"] .i18n[data-lang="en"] {
  display: inline;
}

/* ---------------------------------------------------------------- header */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  border-radius: 7px;
}

.nav {
  display: flex;
  gap: 1.2rem;
  margin-left: auto;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

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

.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}

.lang button.is-active {
  background: var(--accent);
  color: #fff;
}

@media (max-width: 760px) {
  .nav {
    display: none;
  }
  .lang {
    margin-left: auto;
  }
}

/* ------------------------------------------------------------------ hero */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem);
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

.badge {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  letter-spacing: -0.02em;
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 1.6rem;
}

.lead strong {
  color: var(--text);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.3rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--bg-soft);
}

.hero-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-shot {
  margin: 0;
}

.hero-shot img,
.shots img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* -------------------------------------------------------------- sections */

.section {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-top: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1.4rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}

.card h3 {
  font-size: 1.08rem;
  margin: 0.6rem 0 0.4rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card-ico {
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.shots figure {
  margin: 0;
}

.shots figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.steps {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.steps li {
  margin-bottom: 0.6rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.install {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.install .card > p {
  margin: 0 0 0.9rem;
}

.install .card > p:last-child {
  margin-bottom: 0;
}

.install .steps {
  margin-bottom: 0.9rem;
}

.card-featured {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.badge-accent {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
}

th,
td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--bg-soft);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* -------------------------------------------------------------- advanced */

#ajustes > p.muted,
#avanzado > p.muted {
  margin: 1rem 0;
}

#avanzado .install {
  grid-template-columns: minmax(0, 1fr);
  margin: 1.2rem 0 0;
}

#avanzado > h3 {
  margin: 2rem 0 0;
}

pre.code {
  margin: 0.4rem 0 0;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
}

pre.code code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

.card pre.code {
  margin-top: 0.8rem;
}

/* ---------------------------------------------------------------- footer */

.foot {
  margin-top: 2rem;
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.foot p {
  margin: 0.3rem 0;
}

.foot .dot {
  margin: 0 0.4rem;
}

.heart {
  color: #e5484d;
}
