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

:root {
  /* Neutral base */
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --heading: #0b1220;
  --muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Accent — indigo/violet */
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --accent-dark: #4338ca;
  --accent-soft: #eef2ff;
  --grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  --ink: #0f172a;
  --ink-soft: #1e293b;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10);
  --shadow-accent: 0 8px 24px rgba(79, 70, 229, 0.28);
  --ring: 0 0 0 3px rgba(79, 70, 229, 0.16);
  --radius: 16px;
  --radius-sm: 10px;

  --max-width: 1040px;
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-dark); }
/* Inline content links stay recognizable against body text */
.prose a { text-decoration: underline; text-underline-offset: 2px; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }

/* ── NAV ─────────────────────────────────────────────── */
nav {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--heading);
  letter-spacing: -0.02em;
}
.nav-logo:hover { color: var(--heading); }
.nav-logo-img {
  height: 30px;
  width: auto;
  object-fit: contain;
}
.nav-links { display: flex; gap: 1.75rem; align-items: center; }
.nav-links a { position: relative; color: var(--muted); font-size: 0.92rem; font-weight: 500; }
.nav-links a:hover { color: var(--heading); }
.nav-links a.nav-active { color: var(--heading); font-weight: 600; }
.nav-links a.nav-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}
.lang-switch {
  position: relative;
  border-left: 1px solid var(--border);
  padding-left: 1.25rem;
  margin-left: 0.25rem;
}
.lang-switch summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::after {
  content: "";
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}
.lang-switch[open] summary { color: var(--heading); }
.lang-switch ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 140px;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 60;
}
.lang-switch li a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}
.lang-switch li a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.lang-switch li a.active { color: var(--accent); font-weight: 700; }

/* ── MAIN ────────────────────────────────────────────── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── HERO ────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 6.5rem 1.5rem 5.5rem;
  margin: 0 -1.5rem;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px),
    linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg) 100%);
  background-size: 44px 44px, 44px 44px, 100% 100%;
  background-position: -1px -1px, -1px -1px, 0 0;
  overflow: hidden;
}
/* Gradient light blobs */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 340px at 82% -10%, rgba(79, 70, 229, 0.13) 0%, transparent 65%),
    radial-gradient(480px 320px at 8% 110%, rgba(124, 58, 237, 0.09) 0%, transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.9) 100%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 360px;
  height: 172px; /* zgodne z proporcją logo 551:263, by nic nie ucinało */
  max-width: 42%;
  background: url('/assets/logo.svg') no-repeat center right / contain;
  opacity: 0.06;
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(79, 70, 229, 0.25);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.tagline::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad);
}
.hero h1 {
  font-size: clamp(2.35rem, 5.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--heading);
  margin-bottom: 1.25rem;
  max-width: 720px;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 {
    background: linear-gradient(150deg, var(--heading) 45%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}
.hero p {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 2.25rem;
}

/* ── SPLIT HERO (tekst + mockup telefonu) ────────────── */
.hero-split { display: flex; align-items: center; gap: 3rem; }
.hero-split::after { content: none; } /* watermark logo zbędny, gdy jest telefon */
.hero-copy { flex: 1 1 0; min-width: 0; }
.hero-phone { flex: 0 0 auto; position: relative; z-index: 1; }
.hero-phone::before {
  content: "";
  position: absolute;
  inset: -14% -20%;
  background: radial-gradient(closest-side, rgba(124, 58, 237, 0.20), transparent 72%);
  pointer-events: none;
}
.phone-frame {
  position: relative;
  width: 256px;
  padding: 9px;
  background: #0b1220;
  border-radius: 44px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.09),
    0 24px 60px rgba(15, 23, 42, 0.35);
  transform: rotate(2.5deg);
  transition: transform 0.3s ease;
}
.phone-frame:hover { transform: rotate(0deg); }
.phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 36px;
}
@media (max-width: 860px) {
  .hero-phone { display: none; }
}

/* ── BUTTONS ─────────────────────────────────────────── */
.btn-group { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.6rem;
  border: 0;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.38);
  filter: brightness(1.06);
}
.btn-secondary {
  border: 1px solid var(--border-strong);
  color: var(--heading);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* ── SECTIONS ────────────────────────────────────────── */
section { padding: 4.5rem 0; border-bottom: 1px solid var(--border); }
section:last-child { border-bottom: none; }
section > h2 {
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.025em;
  color: var(--heading);
}
section > h2::after {
  content: "";
  display: block;
  width: 52px;
  height: 4px;
  margin-top: 0.9rem;
  border-radius: 2px;
  background: var(--grad);
}
section > p { color: var(--muted); max-width: 620px; }

/* ── CARDS ───────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.85rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}
.card:hover::before { transform: scaleX(1); }
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(79, 70, 229, 0.35);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, #f5f3ff 100%);
  border: 1px solid rgba(79, 70, 229, 0.15);
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--heading); }
.card p { font-size: 0.95rem; color: var(--muted); }

/* ── APP LIST ────────────────────────────────────────── */
.app-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.85rem;
  margin-bottom: 1.25rem;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.app-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(79, 70, 229, 0.25);
}
.app-item:last-child { margin-bottom: 0; }
.app-item h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--heading); }
.app-item p { color: var(--muted); font-size: 0.98rem; margin-bottom: 1rem; }
.store-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.store-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--heading);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.store-links a:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.app-links { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.9rem; }
.app-links a {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: var(--bg-subtle);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.app-links a:hover { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.app-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.6rem; }
.app-head h3 { margin-bottom: 0; }
.app-thumb { width: 56px; height: 56px; border-radius: 14px; box-shadow: var(--shadow-md); flex-shrink: 0; }
.badge-soon {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.25);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

/* ── TABLE ───────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
td { padding: 0.7rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
td:first-child { width: 40%; color: var(--muted); }

/* ── HONEYPOT ────────────────────────────────────────── */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── CONTACT FORM ────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--heading); }
input, textarea {
  width: 100%;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
textarea { resize: vertical; min-height: 140px; }

/* ── RODO CONSENT CHECKBOX ───────────────────────────── */
.form-group.consent { margin-bottom: 1.25rem; }
.consent-label {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
}
.consent-label input[type="checkbox"] {
  width: auto;
  margin: 0.15rem 0 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.consent-label a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ── PROSE ───────────────────────────────────────────── */
.prose h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.5rem; color: var(--heading); letter-spacing: -0.02em; }
.prose h2 { font-size: 1.15rem; font-weight: 700; margin: 2rem 0 0.5rem; color: var(--heading); }
.prose p { margin-bottom: 0.75rem; color: var(--text); }
.prose ul { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.prose li { margin-bottom: 0.25rem; }
.prose .meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 2rem; }

/* ── CTA BANNER ──────────────────────────────────────── */
.cta-banner {
  position: relative;
  background: linear-gradient(135deg, #312e81 0%, var(--accent-dark) 55%, var(--accent-2) 130%);
  border-radius: var(--radius);
  padding: 3.25rem 2rem;
  text-align: center;
  box-shadow: 0 16px 40px rgba(67, 56, 202, 0.30);
  overflow: hidden;
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 220px at 50% -20%, rgba(255, 255, 255, 0.16), transparent 70%),
    radial-gradient(420px 220px at 90% 120%, rgba(124, 58, 237, 0.35), transparent 70%);
  pointer-events: none;
}
.cta-banner h2 { color: #fff; margin-bottom: 0.6rem; font-size: 1.65rem; font-weight: 800; letter-spacing: -0.02em; position: relative; }
.cta-banner p { color: #c7d2fe; margin-bottom: 1.5rem; position: relative; }
.cta-banner .btn { position: relative; }
.cta-banner .btn-primary { background: #fff; color: var(--accent-dark); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }
.cta-banner .btn-primary:hover { background: var(--accent-soft); color: var(--accent-dark); filter: none; }
.cta-banner .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.cta-banner .btn-secondary:hover { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.65); }

/* ── FOOTER ──────────────────────────────────────────── */
footer {
  position: relative;
  background: var(--ink);
  padding: 2.25rem 1.5rem;
  margin-top: 4rem;
}
footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
  opacity: 0.7;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.88rem;
  color: #94a3b8;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: #cbd5e1; font-weight: 500; }
.footer-links a:hover { color: #fff; }

/* ── PLACEHOLDER ─────────────────────────────────────── */
.placeholder {
  background: var(--bg-subtle);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  color: var(--muted);
}

/* ── APP ICON + SCREENSHOTS ──────────────────────────── */
.app-icon {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 1.25rem;
}
.screenshots {
  display: flex;
  gap: 1.25rem;
  margin-top: 2rem;
  padding-bottom: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.screenshots::-webkit-scrollbar { height: 8px; }
.screenshots::-webkit-scrollbar-track { background: var(--bg-subtle); border-radius: 4px; }
.screenshots::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.screenshots::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.screenshots img {
  flex: 0 0 auto;
  width: 230px;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  scroll-snap-align: start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.screenshots img:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

/* ── SCROLL REVEAL (progressive enhancement) ─────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    will-change: opacity, transform;
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 600px) {
  .hero::after { display: none; }
  .nav-inner { height: 58px; }
  .nav-logo { font-size: 1rem; }
  .nav-logo-img { height: 26px; width: auto; }
  .nav-links { gap: 0.85rem; }
  .nav-links a { font-size: 0.85rem; }
  .lang-switch { padding-left: 0.85rem; margin-left: 0; }
  .lang-switch summary { font-size: 0.78rem; }
  .hero { padding: 4.5rem 1.5rem 3.5rem; }
  section { padding: 3rem 0; }
  .cta-banner { padding: 2.5rem 1.5rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
