/* Paleta i fonty jak w aplikacji (apps/mobile/src/theme.ts) */
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 400; font-display: swap; src: url('../fonts/PlusJakartaSans_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 500; font-display: swap; src: url('../fonts/PlusJakartaSans_500Medium.ttf') format('truetype'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 600; font-display: swap; src: url('../fonts/PlusJakartaSans_600SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 700; font-display: swap; src: url('../fonts/PlusJakartaSans_700Bold.ttf') format('truetype'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-display: swap; src: url('../fonts/PlusJakartaSans_800ExtraBold.ttf') format('truetype'); }

:root {
  --bg: #F6F4FD;
  --surface: #FFFFFF;
  --surface-alt: #EFEBFB;
  --border: #E7E2F6;
  --text: #1B1537;
  --text-muted: #6E6890;
  --primary: #7C3AED;
  --primary-soft: #EDE7FE;
  --shadow: rgba(76, 29, 149, 0.10);
  --gradient: linear-gradient(135deg, #7C3AED 0%, #DB2777 55%, #F97316 100%);
  --soft-gradient: linear-gradient(135deg, #8B5CF6, #EC4899);
  --radius-lg: 28px;
  --radius: 18px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0B1E;
    --surface: #1A1530;
    --surface-alt: #241D3F;
    --border: #2F2750;
    --text: #F5F3FF;
    --text-muted: #A79FC9;
    --primary: #A78BFA;
    --primary-soft: #2E2356;
    --shadow: rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: var(--primary); }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 4vw, 36px); }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

/* Ikony z <symbol> w index.html */
svg:not([viewBox]) { width: 1em; height: 1em; flex: none; }

/* Logo jak w menu bocznym aplikacji: ST ai L */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { border-radius: 10px; }
.logo { font-weight: 800; font-size: 24px; letter-spacing: 0.04em; }
.logo-ai { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-small .logo { font-size: 18px; }
.brand-small img { border-radius: 8px; }

/* Pasek gorny */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--text-muted); font-weight: 600; font-size: 15px; }
.nav a:hover { color: var(--text); background: var(--surface-alt); }
.nav .nav-cta { color: #fff; background: var(--gradient); }
.nav .nav-cta:hover { color: #fff; background: var(--gradient); opacity: 0.9; }
@media (max-width: 520px) { .nav a:not(.nav-cta) { display: none; } }

/* Przyciski jak GradientButton / SoftButton w aplikacji */
.btn-gradient, .btn-soft, .btn-white {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 24px; border-radius: var(--radius);
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none;
  transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}
.btn-gradient svg, .btn-white svg { font-size: 20px; }
.btn-gradient { color: #fff; background: var(--gradient); box-shadow: 0 10px 24px rgba(124, 58, 237, 0.30); }
.btn-soft { color: var(--primary); background: var(--primary-soft); }
.btn-white { color: #7C3AED; background: #fff; box-shadow: 0 10px 24px rgba(27, 21, 55, 0.18); }
.btn-gradient:hover, .btn-soft:hover, .btn-white:hover { transform: translateY(-1px); opacity: 0.92; }

/* Hero */
.hero-section { padding: 40px 0 56px; position: relative; }
.hero-section::before {
  content: ''; position: absolute; inset: -120px 0 auto; height: 560px; z-index: -1;
  background:
    radial-gradient(420px 260px at 85% 40%, rgba(219, 39, 119, 0.16), transparent 70%),
    radial-gradient(460px 300px at 10% 20%, rgba(124, 58, 237, 0.14), transparent 70%);
}
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; } .hero-section { padding: 72px 0 88px; } }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; margin-bottom: 18px;
  border-radius: 999px; background: var(--primary-soft); color: var(--primary);
  font-size: 13px; font-weight: 700;
}
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.08; }
.grad-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 20px; font-size: 18px; color: var(--text-muted); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.meta { margin-top: 14px; font-size: 13px; color: var(--text-muted); }
@media (max-width: 480px) { .hero-actions a { width: 100%; } }

/* Telefon z ekranem powitalnym aplikacji (index.tsx, Welcome) */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  position: relative; width: 300px; max-width: 100%; aspect-ratio: 9 / 19;
  padding: 10px; border-radius: 46px; background: #1B1537;
  box-shadow: 0 40px 80px rgba(76, 29, 149, 0.28), inset 0 0 0 2px #2F2750;
  transform: rotate(2deg);
}
.phone-notch { position: absolute; top: 18px; left: 50%; width: 84px; height: 22px; margin-left: -42px; border-radius: 999px; background: #1B1537; z-index: 2; }
.app {
  height: 100%; border-radius: 37px; overflow: hidden; display: flex; flex-direction: column;
  background: var(--bg); font-size: 10px; line-height: 1.35;
}
.app-header { display: flex; align-items: center; gap: 10px; padding: 46px 14px 10px; font-weight: 800; font-size: 14px; }
.app-header-icon { font-size: 18px; color: var(--text); }
.app-body { flex: 1; display: flex; flex-direction: column; gap: 9px; padding: 0 12px; overflow: hidden; }
.app-hero { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; background: var(--gradient); color: #fff; }
.app-hero-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,0.22); font-size: 15px; }
.app-hero-title { font-weight: 800; font-size: 15px; line-height: 1.25; }
.app-hero-text { font-size: 9.5px; color: rgba(255,255,255,0.92); }
.app-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,0.2); font-weight: 600; font-size: 9px; }
.app-btn { display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: 12px; background: var(--gradient); color: #fff; font-weight: 700; font-size: 10.5px; }
.app-btn svg { font-size: 13px; }
.app-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.app-tile { display: flex; flex-direction: column; gap: 6px; padding: 9px; border-radius: 12px; background: var(--surface); font-weight: 600; box-shadow: 0 4px 10px var(--shadow); }
.app-tile-icon { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; }
.app-input { display: flex; align-items: center; gap: 8px; margin: 8px 12px; padding: 5px 5px 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.app-input span:first-of-type { flex: 1; }
.app-input-cam { font-size: 14px; color: var(--primary); }
.app-send { width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--gradient); color: #fff; font-size: 11px; }
.app-tabs { display: flex; justify-content: space-around; padding: 7px 0 14px; background: var(--surface); box-shadow: 0 -4px 12px var(--shadow); }
.app-tabs span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 600; font-size: 8.5px; color: var(--text-muted); }
.app-tabs span svg { font-size: 16px; }
.app-tabs .active { color: var(--primary); }

/* Kolory jak categoryStyle i SUGGESTIONS w aplikacji */
.c-violet { color: #7C3AED; background: rgba(124, 58, 237, 0.12); }
.c-pink { color: #DB2777; background: rgba(219, 39, 119, 0.12); }
.c-orange { color: #F97316; background: rgba(249, 115, 22, 0.13); }
.c-green { color: #10B981; background: rgba(16, 185, 129, 0.13); }
.c-blue { color: #3B82F6; background: rgba(59, 130, 246, 0.13); }
.c-cyan { color: #06B6D4; background: rgba(6, 182, 212, 0.13); }
@media (prefers-color-scheme: dark) {
  .c-violet { color: #A78BFA; } .c-pink { color: #F472B6; } .c-orange { color: #FB923C; }
}

/* Sekcje */
.section { padding: 64px 0; }
.section-alt { background: var(--surface-alt); }
.section-lead { margin-top: 12px; max-width: 640px; color: var(--text-muted); font-size: 17px; }
@media (min-width: 900px) { .section { padding: 88px 0; } }

.cards { display: grid; gap: 16px; margin-top: 36px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
  display: flex; flex-direction: column; gap: 10px; padding: 24px;
  border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 14px var(--shadow);
}
.card p { color: var(--text-muted); font-size: 15px; }
.card-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; flex: none; margin-bottom: 4px; }

.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--radius); background: var(--surface); }
.step p { color: var(--text-muted); font-size: 15px; }
.step-no { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: var(--soft-gradient); color: #fff; font-weight: 800; font-size: 18px; }

/* Pobieranie */
.download {
  display: grid; gap: 32px; align-items: center; padding: 32px 24px;
  border-radius: var(--radius-lg); background: var(--gradient); color: #fff;
  box-shadow: 0 30px 60px rgba(124, 58, 237, 0.25);
}
@media (min-width: 760px) { .download { grid-template-columns: 1fr auto; padding: 48px; } }
.download h2 { color: #fff; }
.download-copy > p { margin-top: 12px; font-size: 17px; color: rgba(255, 255, 255, 0.92); }
.download-actions { margin-top: 24px; }
.download-meta { margin-top: 14px; font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.ios-note { margin-top: 18px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.18); font-size: 14px; display: inline-block; }
.qr-card { justify-self: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; border-radius: 24px; background: #fff; color: #1B1537; }
.qr { width: 220px; height: 220px; display: grid; place-items: center; text-align: center; font-size: 14px; }
.qr svg { width: 100%; height: 100%; }
.qr-caption { font-weight: 700; font-size: 14px; }

/* Na telefonie przycisk przed kodem QR, na komputerze odwrotnie */
.on-mobile { display: none; }
[data-platform="android"] .on-mobile, [data-platform="ios"] .on-mobile { display: block; }
[data-platform="android"] .on-desktop, [data-platform="ios"] .on-desktop { display: none; }
[data-platform="android"] .qr-card, [data-platform="ios"] .qr-card { display: none; }
[data-platform="ios"] .ios-note { background: #fff; color: #1B1537; }
@media (max-width: 480px) { .download-actions a { width: 100%; } }

.privacy { display: flex; gap: 20px; align-items: flex-start; }
.privacy p { margin-top: 12px; color: var(--text-muted); font-size: 16px; max-width: 760px; }
.privacy h2 { font-size: clamp(22px, 3vw, 28px); }
@media (max-width: 560px) { .privacy { flex-direction: column; } }

.footer { padding: 32px 0 40px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.footer p { font-size: 14px; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-gradient, .btn-soft, .btn-white { transition: none; }
}
