:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-soft: #64748b;
  --brand: #0369a1;
  --brand-dark: #0c4a6e;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --border: #e2e8f0;
  --hero: #0f172a;
  --header-bg: rgba(248, 250, 252, 0.92);
  --footer-bg: #0f172a;
  --footer-ink: #94a3b8;
  --footer-link: #cbd5e1;
  --download-panel-bg: linear-gradient(135deg, #e0f2fe 0%, #f8fafc 50%, #fef3c7 100%);
  --surface-hover: #ffffff;
  --surface-hover-border: #cbd5e1;
  --table-head-bg: #f1f5f9;
  --code-bg: #0f172a;
  --code-fg: #e2e8f0;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --max: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-elevated: #111827;
  --ink: #f1f5f9;
  --ink-muted: #94a3b8;
  --ink-soft: #64748b;
  --brand: #38bdf8;
  --brand-dark: #7dd3fc;
  --accent: #fbbf24;
  --accent-soft: #422006;
  --border: #1e293b;
  --hero: #020617;
  --header-bg: rgba(11, 18, 32, 0.92);
  --footer-bg: #020617;
  --footer-ink: #94a3b8;
  --footer-link: #e2e8f0;
  --download-panel-bg: linear-gradient(135deg, rgba(3, 105, 161, 0.22) 0%, #111827 45%, rgba(66, 32, 6, 0.35) 100%);
  --surface-hover: #1e293b;
  --surface-hover-border: #334155;
  --table-head-bg: #1e293b;
  --code-bg: #020617;
  --code-fg: #e2e8f0;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand-dark);
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-link img.logo-header {
  height: 40px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--ink);
}

.lang-switch {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(3, 105, 161, 0.35);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 10px 28px rgba(3, 105, 161, 0.45);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--surface-hover-border);
  color: var(--ink);
}

.theme-toggle {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--surface-hover-border);
  background: var(--surface-hover);
}

.theme-toggle .theme-icon-dark {
  display: none;
}

html[data-theme="dark"] .theme-toggle .theme-icon-light {
  display: none;
}

html[data-theme="dark"] .theme-toggle .theme-icon-dark {
  display: inline;
}

.theme-logo-dark {
  display: none;
}

html[data-theme="dark"] .theme-logo-light {
  display: none;
}

html[data-theme="dark"] .theme-logo-dark {
  display: block;
}

.hero {
  background: radial-gradient(1200px 600px at 20% -10%, rgba(56, 189, 248, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(245, 158, 11, 0.12), transparent 50%),
    var(--hero);
  color: #e2e8f0;
  padding: 4.5rem 0 5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.hero .product {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero .lead {
  margin: 0 0 1.75rem;
  font-size: 1.15rem;
  color: #cbd5e1;
  max-width: 36ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hero-meta {
  font-size: 0.9rem;
  color: #94a3b8;
}

.hero-visual {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.hero-visual img {
  margin: 0 auto 1rem;
  width: min(100%, 320px);
}

.mock-window {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #334155;
  background: #1e293b;
  font-size: 0.8rem;
}

.mock-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem;
  background: #0f172a;
  color: #94a3b8;
  border-bottom: 1px solid #334155;
}

.mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
}

.mock-dot.accent {
  background: #fbbf24;
}

.mock-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 160px;
}

.mock-pane {
  padding: 0.75rem;
  font-family: ui-monospace, Consolas, monospace;
  line-height: 1.45;
  color: #cbd5e1;
}

.mock-pane:first-child {
  border-right: 1px solid #334155;
}

.mock-line.diff-left {
  color: #fbbf24;
}

.mock-line.diff-right {
  color: #7dd3fc;
}

section {
  padding: 4rem 0;
}

section h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.section-intro {
  margin: 0 0 2rem;
  color: var(--ink-muted);
  max-width: 60ch;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
}

.feature-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.screenshots-section {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
  padding: 3.5rem 0 4rem;
}

.screenshot-carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.screenshot-carousel:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.screenshot-stage {
  position: relative;
  min-width: 0;
}

.screenshot-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  cursor: zoom-in;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.screenshot-open:hover {
  border-color: #7eb0d5;
}

.screenshot-open img {
  display: block;
  width: 100%;
  max-height: min(52vh, 520px);
  object-fit: contain;
  object-position: center center;
}

.screenshot-caption {
  margin: 0.75rem 0 0;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.screenshot-counter {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.screenshot-thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 640px) {
  .screenshot-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .screenshot-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.screenshot-thumb {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}

.screenshot-thumb-frame {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg);
  transition: border-color 0.15s ease, transform 0.2s ease;
}

.screenshot-thumb:hover .screenshot-thumb-frame {
  border-color: #7eb0d5;
}

.screenshot-thumb.is-active .screenshot-thumb-frame {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.screenshot-thumb-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screenshot-thumb-badge {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fullscreen lightbox (Digivetus ImageLightbox pattern) */
.screenshot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-lightbox[hidden] {
  display: none !important;
}

.screenshot-lightbox-body {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-lightbox-body img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.screenshot-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.screenshot-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.screenshot-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.screenshot-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.screenshot-lightbox-nav.prev {
  left: 1rem;
}

.screenshot-lightbox-nav.next {
  right: 1rem;
}

.screenshot-lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.screenshot-hint {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.screenshot-empty {
  margin: 1rem 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.screenshot-nav {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  align-self: center;
}

.screenshot-nav:hover {
  background: var(--surface-hover);
  border-color: var(--surface-hover-border);
}

@media (max-width: 640px) {
  .screenshot-carousel {
    gap: 0.35rem;
  }

  .screenshot-nav {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.2rem;
  }
}

.strip {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.strip-item strong {
  display: block;
  font-size: 1.35rem;
  color: var(--brand);
  margin-bottom: 0.25rem;
}

.strip-item span {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.download-panel {
  background: var(--download-panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.download-panel h2 {
  margin-bottom: 0.35rem;
}

.download-panel p {
  margin: 0;
  color: var(--ink-muted);
}

.download-note {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.faq {
  max-width: 720px;
}

.faq details {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq p {
  margin: 0.65rem 0 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 2.5rem 0;
  font-size: 0.9rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
}

.site-footer a {
  color: var(--footer-link);
}

.site-footer .logo-footer {
  height: 36px;
  margin-bottom: 0.75rem;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .strip-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .download-panel {
    grid-template-columns: 1fr;
  }

  .nav .hide-mobile {
    display: none;
  }
}
