:root {
  --bg: #0b0f1a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-600: #4f46e5;
  --card: #0f172a;
  --card-border: #1f2937;
  --surface: #111827;
  --ok: #16a34a;
  --warn: #f59e0b;
  --info: #0ea5e9;
  --danger: #dc2626;
}

html.theme-dark {
  --bg: #0b0f1a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-600: #4f46e5;
  --card: #0f172a;
  --card-border: #1f2937;
  --surface: #111827;
}

html:not(.theme-dark) {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --accent: #4f46e5;
  --accent-600: #4338ca;
  --card: #ffffff;
  --card-border: #e5e7eb;
  --surface: #f1f5f9;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding: clamp(16px, 2vw, 24px);
}

header {
  position: sticky;
  top: 0;
  backdrop-filter: saturate(180%) blur(8px);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--card-border);
  z-index: 50;
}

.row {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

a {
  color: inherit;
  text-decoration: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.brand-logo {
  height: 70px;
  width: auto;
}

/* Theme icon filter - same as dashboards */
[data-theme-icon] {
  transition: filter 0.2s ease;
}

.theme-dark [data-theme-icon] {
  filter: brightness(0) invert(1);
}

nav a {
  font-weight: 600;
  opacity: 0.9;
}

nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 24px -6px color-mix(in oklab, var(--accent) 50%, transparent);
}

.btn.outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.ghost {
  background: transparent;
  border: 1px solid var(--card-border);
}

.hero {
  padding: clamp(32px, 5vw, 72px) 0;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 64px);
  line-height: 1.05;
  margin: 0 0 16px;
}

.hero p {
  font-size: clamp(18px, 2.5vw, 22px);
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 52ch;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid.features {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 20px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

/* Store content ratings (between "Jak to działa" and "FAQ") */
.content-rating-card {
  display: grid;
  gap: 10px;
}

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

.rating-item {
  border: 1px solid var(--card-border);
  background: color-mix(in oklab, var(--surface) 65%, transparent);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 10px;
}

.rating-title {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.rating-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card);
  font-weight: 900;
  letter-spacing: 0.2px;
}

.rating-link {
  color: var(--accent);
  font-weight: 800;
}

.rating-link:hover {
  text-decoration: underline;
}

.rating-meta {
  color: var(--muted);
  font-size: 14px;
}

/* "Pobierz na telefon" section */
.download-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 800;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px -6px color-mix(in oklab, var(--accent) 50%, transparent);
}

.store-btn--outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: none;
}

.store-btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.download-qr {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.download-qr__title {
  font-weight: 900;
}

.download-qr__code img {
  width: min(240px, 70vw);
  height: auto;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
}

.download-qr__meta {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  color: var(--muted);
  font-weight: 600;
}

.section {
  padding: clamp(36px, 5vw, 72px) 0;
}

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  align-items: center;
}

.big {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
}

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

.list {
  display: grid;
  gap: 14px;
}

.list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.list svg {
  flex: 0 0 20px;
  margin-top: 3px;
}

.kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco;
  background: var(--surface);
  border: 1px solid var(--card-border);
  padding: 2px 8px;
  border-radius: 8px;
}

footer {
  border-top: 1px solid var(--card-border);
  padding: 24px 0;
  color: var(--muted);
}

/* Flash messages */
.landing-flash {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 12px 48px 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  max-width: 90%;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.landing-flash--success {
  background: rgba(22, 163, 74, 0.15);
  border: 1px solid rgba(22, 163, 74, 0.4);
  color: var(--ok);
}

.landing-flash--error {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: var(--danger);
}

.landing-flash__close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 0;
  line-height: 1;
}

.landing-flash__close:hover {
  opacity: 1;
}

/* Copyright link - looks like regular text, fades on hover */
footer .copyright-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

footer .copyright-link:hover {
  opacity: 0.7;
}

/* Theme toggle button - same as dashboards */
.icon-pill {
  position: relative;
  padding: 4px;
  background: transparent;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  cursor: pointer;
  transition: transform 0.2s ease;
}

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

#themeToggle {
  transition: transform 0.3s ease;
}

#themeToggle:hover {
  transform: rotate(20deg);
}

/* Theme toggle icons (sun/moon) */
.theme-icon-light,
.theme-icon-dark {
  font-size: 18px;
  transition: opacity 0.2s ease;
}

/* Light theme: show sun, hide moon */
.theme-icon-dark {
  display: none;
}

.theme-icon-light {
  display: inline;
}

/* Dark theme: show moon, hide sun */
.theme-dark .theme-icon-dark {
  display: inline;
}

.theme-dark .theme-icon-light {
  display: none;
}

.icon {
  width: 24px;
  height: 24px;
}

.hero-illu {
  aspect-ratio: 16/10;
  width: 100%;
  border: 1px dashed var(--card-border);
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

/* Hero video player */
.hero-video {
  width: 100%;
  max-width: 640px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface, #000);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.hero-video__player {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #000;
  border-radius: 16px;
}

.hero-video__player:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Webinar section */
.webinar-card {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 20px;
  padding: 32px 40px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.webinar-badge {
  margin-bottom: 16px;
}

.webinar-badge .pill {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 6px 16px;
  font-size: 14px;
}

.webinar-intro {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 24px;
}

.webinar-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 32px;
  margin-bottom: 28px;
  padding: 16px;
  background: var(--bg);
  border-radius: 12px;
}

.webinar-detail {
  font-size: 1rem;
}

.webinar-links {
  text-align: center;
}

.webinar-links h3 {
  font-size: 1.1rem;
  margin: 0 0 12px;
  color: var(--text);
}

.webinar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  padding: 12px 28px;
}

.webinar-credentials {
  margin: 16px 0;
  padding: 12px 20px;
  background: var(--bg);
  border-radius: 8px;
  display: inline-block;
  text-align: left;
}

.webinar-credentials p {
  margin: 4px 0;
  font-family: monospace;
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .webinar-card {
    padding: 24px 20px;
  }
  
  .webinar-details {
    flex-direction: column;
    gap: 8px;
    text-align: left;
  }
}

@media (max-width: 900px) {
  nav .only-desktop {
    display: none;
  }
}
