*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: light dark;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --bg-elevated: #ffffff;
  --bg-muted: #eef1f7;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-glow: rgba(37, 99, 235, 0.25);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --header-blur: rgba(244, 246, 251, 0.88);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-elevated: #141820;
  --bg-muted: #1a2030;
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --border: #252b38;
  --border-strong: #343d4f;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --accent-glow: rgba(59, 130, 246, 0.35);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 40px rgba(0, 0, 0, 0.4);
  --header-blur: rgba(11, 13, 18, 0.88);
}

/* Fallback only before the head script sets data-theme */
html:not([data-theme="light"]):not([data-theme="dark"]) {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-elevated: #141820;
  --bg-muted: #1a2030;
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --border: #252b38;
  --border-strong: #343d4f;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --accent-glow: rgba(59, 130, 246, 0.35);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 40px rgba(0, 0, 0, 0.4);
  --header-blur: rgba(11, 13, 18, 0.88);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(ellipse 70% 45% at 50% -10%, var(--accent-soft), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
}

.container {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 1rem 0;
  backdrop-filter: blur(12px);
  background: var(--header-blur);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-theme {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

.header-theme-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.theme-switch {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
}

.brand img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex-shrink: 0;
}

.brand h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand p {
  margin: 0.1rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.theme-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.theme-switch-btn svg {
  flex-shrink: 0;
}

.theme-switch-btn:hover {
  color: var(--text);
}

.theme-switch-btn.is-active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow);
}

/* Hero */
.hero {
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.hero h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 18ch;
  margin-inline: auto;
}

.hero .lead {
  margin: 0 auto 2rem;
  max-width: 38rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: default;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 28px var(--accent-glow);
}

.btn-soon {
  background: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-download {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 28px var(--accent-glow);
  cursor: pointer;
}

.btn-download:hover {
  transform: translateY(-1px);
}

.badge {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border);
}

.security-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.security-list li {
  margin-bottom: 0.65rem;
}

.security-list code {
  font-size: 0.875em;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
}

.privacy-footer {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Sections */
section {
  padding: 2.5rem 0;
}

.section-title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.15rem 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 700;
}

.step h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.step p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.channel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.channel-tag {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  color: var(--text);
}

.privacy-box {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.privacy-box strong {
  color: var(--text);
}

.support-box {
  text-align: center;
}

.btn-support {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  color: #1a1a1a;
  background: #ffdd00;
  border: 1px solid #e6c700;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-support:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.download-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.35rem;
  font-size: 0.9375rem;
}

.download-box p {
  margin: 0.5rem 0;
}

/* Downloads section */
.downloads-section {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.download-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.35rem 1.4rem 1.4rem;
  box-shadow: var(--shadow);
}

.download-card--chrome {
  border-top: 3px solid #2563eb;
}

.download-card--firefox {
  border-top: 3px solid #ff7139;
}

.download-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.download-card-header h3 {
  margin: 0 0 0.15rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.download-card-meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.browser-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
}

.browser-badge--chrome {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.browser-badge--firefox {
  background: rgba(255, 113, 57, 0.14);
  color: #ff7139;
}

[data-theme="dark"] .browser-badge--chrome {
  color: #60a5fa;
}

[data-theme="dark"] .browser-badge--firefox {
  color: #ff9a6c;
}

.download-card-lead {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.download-card-lead strong {
  color: var(--text);
}

.install-steps {
  margin: 0 0 1.15rem;
  padding-left: 1.2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-grow: 1;
}

.install-steps li {
  margin-bottom: 0.45rem;
}

.install-steps li:last-child {
  margin-bottom: 0;
}

.install-steps code {
  font-size: 0.85em;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-download-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
  padding: 0.9rem 1.25rem;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  color: #fff;
  background: #2563eb;
  border: none;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-download-card--firefox {
  background: #ff7139;
  box-shadow: 0 4px 16px rgba(255, 113, 57, 0.35);
}

.btn-download-card:hover {
  transform: translateY(-2px);
  color: #fff;
}

.btn-file {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.9;
}

.downloads-note {
  margin: 0;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--bg-muted);
  border: 1px solid var(--border);
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0.35rem 0;
}

@media (max-width: 640px) {
  .hero {
    padding-top: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
