/* ---------- Tokens ---------- */
:root {
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-ink: #ffffff;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0b1020;
    --surface: #131a2c;
    --surface-alt: #0f1626;
    --text: #e6e8ee;
    --muted: #9aa3b2;
    --border: #232b3f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --bg: #0b1020;
  --surface: #131a2c;
  --surface-alt: #0f1626;
  --text: #e6e8ee;
  --muted: #9aa3b2;
  --border: #232b3f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.5);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  transition: background-color .2s ease, color .2s ease;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 8px; top: 8px;
  background: var(--accent); color: var(--accent-ink); padding: 8px 12px;
  border-radius: var(--radius-sm); z-index: 100;
  transform: translateY(calc(-100% - 16px));
}
.skip-link:focus { transform: translateY(0); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.nav-inner {
  display: flex; align-items: center; gap: 16px; padding: 12px 0;
  flex-wrap: wrap;
}
.nav-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.nav-brand img { width: 32px; height: 32px; border-radius: 6px; }
.nav-links { display: flex; gap: 22px; margin-left: 24px; }
.nav-links a { color: var(--text); font-weight: 500; padding: 4px 2px; border-bottom: 2px solid transparent; }
.nav-links a:hover { text-decoration: none; border-bottom-color: var(--accent); }
.nav-trailing { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-lang { display: flex; gap: 6px; }
.nav-lang a {
  padding: 4px 8px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 600;
}
.nav-lang a.active { background: var(--accent); color: var(--accent-ink); }
.theme-toggle {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; color: var(--text);
}
.theme-toggle:hover { background: var(--surface-alt); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: inline; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: inline; }
.nav-youtube { color: #ef4444; display: inline-flex; }

/* Mobile nav: details/summary disclosure */
.nav-disclosure { display: none; }
@media (max-width: 760px) {
  .nav-disclosure {
    display: block; width: 100%; order: 99; flex-basis: 100%;
    background: var(--surface); border-top: 1px solid var(--border); margin-top: 8px;
  }
  .nav-disclosure summary {
    list-style: none; padding: 12px 20px; cursor: pointer; font-weight: 600; color: var(--text);
  }
  .nav-disclosure summary::-webkit-details-marker { display: none; }
  .nav-disclosure .nav-links { display: flex; flex-direction: column; gap: 4px; padding: 0 20px 16px; margin-left: 0; }
  .nav-inner > .nav-links { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: var(--radius-sm);
  font-weight: 600; line-height: 1.2; border: 1px solid transparent; cursor: pointer;
  transition: transform .08s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
  font-size: 16px;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--secondary:hover { background: var(--surface-alt); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--surface-alt); text-decoration: none; }
.btn:active { transform: translateY(1px); }

/* ---------- Section ---------- */
.section { padding: 80px 0; }
.section--alt { background: var(--surface-alt); }
.section-title { font-size: 32px; margin: 0 0 16px; text-align: center; letter-spacing: -0.01em; }
.section-lede { color: var(--muted); text-align: center; max-width: 600px; margin: 0 auto 36px; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(800px 400px at 80% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(600px 300px at 0% 10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
}
.hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-text h1 { font-size: 56px; line-height: 1.05; margin: 0 0 14px; letter-spacing: -0.025em; }
.hero-text .lede { font-size: 20px; color: var(--muted); margin: 0 0 28px; max-width: 540px; }
.hero-text .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px; }
.trust__pill {
  font-size: 13px; color: var(--muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px; background: var(--surface);
}
.trust__pill::before { content: "✓"; color: var(--accent); margin-right: 6px; font-weight: 700; }

.window-frame {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.window-frame__bar {
  display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}
.window-frame__bar span {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
}
.window-frame__bar span:nth-child(1) { background: #ff5f57; }
.window-frame__bar span:nth-child(2) { background: #febc2e; }
.window-frame__bar span:nth-child(3) { background: #28c840; }
.window-frame img { width: 100%; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-text h1 { font-size: 40px; }
}

/* ---------- Showcase blocks (alternating) ---------- */
.showcase {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  margin-bottom: 80px;
}
.showcase:last-child { margin-bottom: 0; }
.showcase--reverse .showcase__text { order: 2; }
.showcase__text h3 { font-size: 30px; margin: 0 0 14px; letter-spacing: -0.015em; }
.showcase__text > p { color: var(--muted); margin: 0 0 20px; font-size: 17px; }
.showcase__points { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.showcase__points li { display: flex; align-items: flex-start; gap: 12px; }
.showcase__points li svg { flex: 0 0 24px; color: var(--accent); margin-top: 2px; }
.showcase__points li strong { display: block; color: var(--text); font-weight: 600; }
.showcase__points li span { color: var(--muted); }
.showcase__image img { border-radius: var(--radius); box-shadow: var(--shadow-md); border: 1px solid var(--border); }
@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; gap: 32px; margin-bottom: 56px; }
  .showcase--reverse .showcase__text { order: 0; }
}

/* ---------- Compare ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare__col {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.compare__col--with {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-md);
}
.compare__label {
  display: inline-block; align-self: flex-start;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.compare__col--without .compare__label { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--muted); }
.compare__col--with .compare__label { background: var(--accent); color: var(--accent-ink); }
.compare__col h3 { margin: 0 0 16px; font-size: 22px; letter-spacing: -0.01em; line-height: 1.2; }
.compare__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.compare__col li { display: flex; align-items: flex-start; gap: 12px; }
.compare__col--without li { color: var(--muted); }
.compare__col--with li { color: var(--text); }
.compare__col--without li::before {
  content: "×"; flex: 0 0 16px; font-weight: 700; line-height: 1.5; color: var(--muted); font-size: 16px;
}
.compare__col--with li::before {
  content: "✓"; flex: 0 0 16px; font-weight: 700; line-height: 1.5; color: var(--accent); font-size: 14px;
}
@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bento__tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.bento__tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.bento__tile svg { color: var(--accent); width: 32px; height: 32px; margin-bottom: 12px; }
.bento__tile h4 { margin: 0 0 6px; font-size: 17px; }
.bento__tile p { margin: 0; color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .bento { grid-template-columns: 1fr; } }

/* ---------- Downloads ---------- */
.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.download-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 14px; align-items: stretch;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.download-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.download-card--matched { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent), var(--shadow-md); }
.download-card__os { display: flex; align-items: center; gap: 10px; }
.download-card__os svg { width: 28px; height: 28px; color: var(--accent); }
.download-card h3 { margin: 0; font-size: 18px; }
.download-card p { margin: 0; color: var(--muted); font-size: 14px; }
.download-card__hint { font-size: 13px; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 12px; }
.download-card .btn { width: 100%; text-align: center; margin-top: auto; }
@media (max-width: 900px) { .downloads { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 4px 22px; margin-bottom: 12px;
}
.faq-item summary {
  cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item[open] summary { color: var(--accent); }
.faq-item > div { padding-bottom: 16px; color: var(--muted); }
.faq-item p { margin: 0 0 8px; }
.faq-item p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface-alt); padding: 36px 0; margin-top: 24px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--accent); }

/* ---------- Theme-aware images ---------- */
.theme-dark { display: none; }
:root[data-theme="dark"] .theme-light { display: none; }
:root[data-theme="dark"] .theme-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-light { display: none; }
  :root:not([data-theme]) .theme-dark { display: block; }
}

/* ---------- Image Lightbox ---------- */
.image-lightbox {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.image-lightbox.active {
  opacity: 1; pointer-events: auto;
}
.image-lightbox img {
  max-width: 90vw; max-height: 90vh; object-fit: contain;
  border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: lightbox-zoom-in 0.3s ease;
}
@keyframes lightbox-zoom-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
