/* PrzetargAI — landing page */

:root {
  --navy: #0f2557;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #16a34a;
  --bg: #ffffff;
  --bg-soft: #f4f7fc;
  --text: #14213d;
  --text-muted: #5b6577;
  --border: #e3e8f2;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(15, 37, 87, 0.10);
  --shadow-sm: 0 4px 14px rgba(15, 37, 87, 0.07);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }

/* Kotwice (#cennik, #faq…) — nagłówek jest sticky (68px), więc odsuń cel
   scrollowania, inaczej tytuł sekcji chowa się pod paskiem nawigacji. */
section[id], main[id] { scroll-margin-top: 84px; }

/* Widoczny fokus klawiatury (dostępność) */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}
/* Ciemne tło (nav navy / cta / footer) — jasny pierścień fokusa */
.cta :focus-visible,
.footer :focus-visible { outline-color: #fff; }

/* Link „przejdź do treści" — widoczny dopiero po sfokusowaniu */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 760px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--lg { padding: 14px 26px; font-size: 16px; }
.btn--block { display: flex; width: 100%; padding: 13px 20px; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); box-shadow: var(--shadow-sm); }
.btn--ghost { background: #fff; color: var(--blue); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--blue); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav__links { display: flex; align-items: center; gap: 28px; }
/* padding zwiększa obszar klikalny ponad minimum WCAG 2.5.8 (24px) */
.nav__links a { color: var(--text-muted); font-weight: 500; font-size: 15px; padding: 5px 0; }
.nav__links a:hover { color: var(--text); }
.nav__links a.btn { color: #fff; } /* CTA w menu zachowuje kolor przycisku */

/* Hamburger — ukryty na desktopie, widoczny na mobile (patrz media) */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.nav__toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__menu-cta { display: none; } /* CTA w menu tylko na mobile */

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
}
.brand--light { color: #fff; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, #eef3fc 0%, #ffffff 100%);
  padding: 72px 0 80px;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.badge {
  display: inline-block;
  background: #e0e9fd;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 { font-size: 46px; margin-bottom: 18px; }
.lead { font-size: 18px; color: var(--text-muted); margin-bottom: 28px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__note { margin-top: 16px; font-size: 14px; color: var(--text-muted); }

.card-preview {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
}
.card-preview__head { display: flex; gap: 7px; margin-bottom: 16px; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: #d7deea; }
.match {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  margin-bottom: 10px;
}
.match--muted { opacity: 0.6; }
.match__score {
  display: grid;
  place-items: center;
  min-width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}
.match--muted .match__score { background: #94a3b8; }
.match__body { display: flex; flex-direction: column; }
.match__body strong { font-size: 15px; }
.match__body span { font-size: 13px; color: var(--text-muted); }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section--soft { background: var(--bg-soft); }
.section__title { font-size: 34px; text-align: center; margin-bottom: 12px; }
.section__sub { text-align: center; color: var(--text-muted); font-size: 17px; margin-bottom: 44px; }
.section__title + .grid { margin-top: 48px; }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* stats */
.stat { text-align: center; }
.stat__num { font-size: 44px; font-weight: 800; color: var(--blue); }
.stat p { color: var(--text-muted); }

/* features */
.feature {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.feature__icon { font-size: 30px; margin-bottom: 12px; }
.feature h3 { font-size: 20px; margin-bottom: 8px; }
.feature p { color: var(--text-muted); }

/* steps */
.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}
.step__num {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  font-size: 19px;
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--text-muted); }

/* pricing */
.pricing { max-width: 820px; margin: 48px auto 0; align-items: start; }
.plan {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  position: relative;
}
.plan--featured {
  border: 2px solid var(--blue);
  box-shadow: var(--shadow);
}
.plan__tag {
  position: absolute;
  top: -13px;
  left: 32px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}
.plan__name { font-size: 22px; margin-bottom: 10px; }
.plan__price { margin-bottom: 6px; }
.plan__price .amount { font-size: 40px; font-weight: 800; }
.plan__price .period { color: var(--text-muted); font-size: 15px; }
.plan__desc { color: var(--text-muted); margin-bottom: 20px; }
.plan__list { list-style: none; margin-bottom: 24px; }
.plan__list li {
  padding: 8px 0 8px 28px;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.plan__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 800;
}
.plan__fineprint { margin-top: 12px; font-size: 13px; color: var(--text-muted); text-align: center; }

/* faq */
.faq {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 20px;
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--blue); font-weight: 400; }
.faq[open] summary::after { content: "–"; }
.faq p { color: var(--text-muted); padding: 0 0 18px; }

/* cta */
.cta { background: var(--navy); color: #fff; padding: 72px 0; }
.cta__inner { text-align: center; }
.cta h2 { font-size: 34px; margin-bottom: 10px; }
.cta p { color: #b7c4dd; font-size: 17px; margin-bottom: 28px; }
.cta__buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta__note { margin-top: 14px; font-size: 14px; opacity: .75; }
.store-badge {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
}

/* footer */
.footer { background: #0b1a3a; color: #c2cde0; padding: 48px 0 28px; }
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.footer__tag { margin-top: 10px; font-size: 14px; max-width: 320px; }
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.footer__links a { color: #c2cde0; font-size: 15px; display: inline-block; padding: 6px 0; }
.footer__links a:hover { color: #fff; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  font-size: 14px;
  color: #8b99b8;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 36px; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .section__title { font-size: 28px; }

  /* Nawigacja mobilna: hamburger + panel rozwijany */
  .nav__toggle { display: flex; }
  .nav__bar-cta { display: none; }
  .nav__menu-cta { display: flex; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 18px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
  }
  .nav__links.is-open { display: flex; }
  .nav__links a {
    padding: 14px 4px;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
  }
  .nav__links a.btn { border-bottom: none; margin-top: 12px; }
}

/* Szanuj preferencję ograniczonego ruchu (dostępność) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- checkout / panel pages (upgrade, success, cancel) ---------- */
.center-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #eef3fc 0%, #ffffff 100%);
  padding: 32px 20px;
}
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}
.panel__title { font-size: 26px; margin-bottom: 8px; }
.panel__price { font-size: 30px; font-weight: 800; margin-bottom: 20px; }
.panel__price span { font-size: 15px; font-weight: 500; color: var(--text-muted); }
.panel__text { color: var(--text-muted); margin-bottom: 16px; }
.panel__note { margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.panel__emoji {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--bg-soft);
  font-size: 30px;
  font-weight: 800;
}
.panel .plan__list { margin-bottom: 22px; }
.status { margin-top: 14px; font-size: 14px; min-height: 20px; }
.status--error { color: #dc2626; }

/* ---------- legal pages (polityka prywatności, regulamin) ---------- */
.legal-page { max-width: 780px; margin: 0 auto; padding: 40px 24px 80px; }
.legal-back { display: inline-block; margin-bottom: 20px; color: var(--blue); font-weight: 600; }
.legal-page h1 { font-size: 32px; margin-bottom: 6px; }
.legal-page .updated { color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }
.legal-page h2 { font-size: 20px; margin: 30px 0 10px; }
.legal-page h3 { font-size: 16px; margin: 18px 0 6px; }
.legal-page p { color: var(--text); line-height: 1.7; margin-bottom: 10px; }
.legal-page ul, .legal-page ol { padding-left: 22px; margin: 8px 0 14px; }
.legal-page li { color: var(--text); line-height: 1.7; margin-bottom: 5px; }
.legal-page .note {
  background: #fff8e6;
  border: 1px solid #f0d99a;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  margin: 18px 0;
}
.legal-page .note strong { color: #92670c; }

