:root {
  --green: #34c759;
  --green-dark: #2a9f47;
  --green-soft: #e8f8ed;
  --bg: #f6f8f6;
  --surface: #ffffff;
  --text: #1a211c;
  --muted: #5c6b62;
  --border: #dfe8e1;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(26, 33, 28, 0.08);
  --max: 1120px;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--text);
  line-height: 1.55;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--green-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 1.5rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(246, 248, 246, 0.85);
  border-bottom: 1px solid var(--border);
}

.site-header .container,
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.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);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.mobile-nav.is-open {
  pointer-events: auto;
}

.mobile-nav__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(26, 33, 28, 0.42);
  opacity: 0;
  transition: opacity 0.25s ease;
  cursor: pointer;
}

.mobile-nav.is-open .mobile-nav__backdrop {
  opacity: 1;
}

.mobile-nav__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(88vw, 320px);
  height: 100%;
  padding: 1rem 1.25rem 1.5rem;
  background: var(--surface);
  box-shadow: -8px 0 32px rgba(26, 33, 28, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  outline: none;
}

.mobile-nav.is-open .mobile-nav__panel {
  transform: translateX(0);
}

.mobile-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.mobile-nav__title {
  font-weight: 700;
  font-size: 1.05rem;
}

.mobile-nav__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-nav__panel a {
  display: block;
  padding: 0.85rem 0.25rem;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.mobile-nav__panel a.mobile-nav__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.15rem;
  border-bottom: none;
  color: #fff;
  text-align: center;
  font-weight: 600;
}

.mobile-nav__panel a:hover:not(.mobile-nav__cta) {
  color: var(--green-dark);
  text-decoration: none;
}

.mobile-nav__cta {
  margin-top: 1rem;
}

body.nav-open {
  overflow: hidden;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(52, 199, 89, 0.25);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 24px rgba(52, 199, 89, 0.28);
}

.btn-primary:hover {
  background: var(--green-dark);
}

.btn-block {
  width: 100%;
}

.btn-header-cta {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.hero {
  padding: 3rem 0 2.5rem;
  overflow: visible;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 901px) {
  .hero {
    padding: 4.5rem 0 3rem;
  }

  .hero-grid {
    grid-template-columns: 1fr minmax(340px, 420px);
    gap: 2.5rem;
  }
}

.hero-municipalities {
  margin-bottom: 1rem;
}

.hero-municipalities__label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-municipalities__loading {
  margin: 0;
}

.municipality-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.municipality-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.85rem;
  font-weight: 600;
}

.municipality-chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0 0 1.75rem;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 34rem;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.store-soon,
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.store-badge {
  border-style: solid;
  border-color: var(--border);
  color: var(--text);
  text-decoration: none;
}

.store-badge:hover {
  border-color: var(--green);
  color: var(--green-dark);
  text-decoration: none;
}

.store-soon svg,
.store-badge svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.store-badge:hover svg {
  opacity: 1;
}

.sources-disclaimer {
  margin: 0 0 2rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  background: var(--green-soft);
  border: 1px solid var(--border);
}

.sources-disclaimer p {
  margin: 0;
}

.sources-disclaimer p + p {
  margin-top: 0.75rem;
}

.sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sources-list__item {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.sources-list__item h3 {
  margin: 0 0 0.35rem;
}

.sources-list__item .muted {
  margin: 0 0 0.5rem;
}

.sources-list__link {
  font-weight: 600;
  word-break: break-all;
}

.hero-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Podgląd aplikacji — jeden telefon, fade między slajdami */
.app-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  width: min(100%, 380px);
}

.app-preview__glow {
  position: absolute;
  top: 14%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 55%;
  background: radial-gradient(ellipse, rgba(52, 199, 89, 0.26) 0%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.phone-carousel {
  position: relative;
  z-index: 1;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
}

.phone-carousel__hit-area {
  display: grid;
  grid-template-columns: minmax(52px, 1fr) minmax(0, 260px) minmax(52px, 1fr);
  align-items: stretch;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.phone-carousel__zone {
  grid-row: 1;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 4;
  -webkit-tap-highlight-color: transparent;
}

.phone-carousel__zone--prev {
  grid-column: 1;
}

.phone-carousel__zone--next {
  grid-column: 3;
}

.phone-carousel__stage {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  width: 100%;
  margin: 0 auto;
  cursor: pointer;
  touch-action: pan-y;
}

.phone-carousel__stage::before {
  content: "";
  display: block;
  padding-bottom: 216.4%;
}

.phone-carousel__stage .phone-carousel__item {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

.phone-carousel__stage .phone-carousel__item.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.phone-carousel__chrome {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
}

.phone-carousel__caption {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  min-height: 1.4em;
}

.phone-carousel__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.phone-carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 35%, transparent);
  cursor: pointer;
  transition:
    width 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.phone-carousel__dot.is-active {
  width: 22px;
  background: var(--green);
}

.phone-carousel__dot:hover:not(.is-active) {
  background: color-mix(in srgb, var(--green) 45%, var(--muted));
  transform: scale(1.15);
}

@media (prefers-reduced-motion: reduce) {
  .phone-carousel__stage .phone-carousel__item {
    transition: none;
  }
}

.app-preview .iphone {
  margin: 0;
  width: 100%;
}

.iphone-frame {
  position: relative;
  background: linear-gradient(145deg, #1c1c1e 0%, #0a0a0c 100%);
  border-radius: 40px;
  padding: 9px;
  box-shadow:
    0 20px 50px rgba(26, 33, 28, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.iphone-island {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 26%;
  min-width: 64px;
  max-width: 96px;
  height: 22px;
  border-radius: 18px;
  background: #000;
  z-index: 3;
  pointer-events: none;
}

.iphone-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
}

@media (min-width: 901px) {
  .app-preview {
    width: 100%;
    max-width: 400px;
    justify-self: center;
  }

  .phone-carousel__hit-area {
    max-width: 420px;
    grid-template-columns: minmax(48px, 1fr) minmax(0, 320px) minmax(48px, 1fr);
  }
}

.section {
  padding: 3rem 0;
}

.section-beta {
  padding: 2.5rem 0 3rem;
}

@media (min-width: 901px) {
  .section {
    padding: 4rem 0;
  }
}

.section-alt {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.section-head h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature {
  padding: 1.35rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(26, 33, 28, 0.04);
}

.section-alt .feature {
  background: var(--bg);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--green-soft);
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
}

.feature h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
}

.step h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.privacy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.privacy-list {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.privacy-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.65rem;
  color: var(--muted);
}

.privacy-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.privacy-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #1a211c 0%, #243028 100%);
  color: #e8efe9;
  box-shadow: var(--shadow);
}

.privacy-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
}

.privacy-card p {
  margin: 0;
  color: #b8c9bd;
  font-size: 0.95rem;
}

.muni-banner {
  padding: 2rem;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(135deg, var(--green-soft) 0%, #ffffff 55%);
  border: 1px solid #c8ecd4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.muni-banner h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.muni-banner p {
  margin: 0;
  color: var(--muted);
  max-width: 36rem;
}

.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

/* Beta — jedna karta, czytelna na mobile */
.beta-card {
  display: grid;
  gap: 0;
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.beta-card__intro {
  padding: 1.35rem 1.25rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fffef8 0%, var(--surface) 100%);
}

.beta-card__intro h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 4.5vw, 1.75rem);
  line-height: 1.2;
}

.beta-card__intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.beta-card__hint {
  margin-top: 0.85rem !important;
}

.beta-card__form {
  padding: 1.25rem;
}

.beta-card__form h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.beta-pill {
  display: inline-block;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: #fff3cd;
  color: #8a6d00;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.65rem;
}

.signup-form {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0.75rem;
}

.field-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: -0.35rem;
}

.signup-form input[type="email"] {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 16px;
}

.checkbox-row {
  display: grid;
  grid-template-columns: 1.125rem 1fr;
  gap: 0.6rem;
  align-items: start;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}

.checkbox-row input {
  margin: 0.15rem 0 0;
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--green);
}

.beta-legal {
  margin: 0;
  line-height: 1.45;
}

.form-msg {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.92rem;
}

.form-msg.ok {
  color: var(--green-dark);
}

.form-msg.err {
  color: #c0392b;
}

@media (min-width: 901px) {
  .beta-card {
    grid-template-columns: 1fr 1fr;
  }

  .beta-card__intro {
    padding: 2rem;
    border-bottom: none;
    border-right: 1px solid var(--border);
  }

  .beta-card__form {
    padding: 2rem;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    display: flex;
    flex-direction: column;
  }

  .app-preview {
    order: 0;
    margin-top: 1.5rem;
    margin-bottom: 0;
    width: min(100%, 380px);
  }

  .privacy-grid {
    grid-template-columns: 1fr;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .btn-header-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding-top: 1.75rem;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 8vw, 2.4rem);
  }

  .hero-lead {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .store-row {
    flex-direction: column;
  }

  .store-soon,
  .store-badge {
    width: 100%;
    justify-content: center;
  }

  .muni-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .muni-banner .btn {
    width: 100%;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head {
    margin-bottom: 1.75rem;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.legal-page {
  padding: 3rem 0 4rem;
}

.legal-page h1 {
  margin-bottom: 0.5rem;
}

.legal-page .updated {
  color: var(--muted);
  margin-bottom: 2rem;
}

.legal-page h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
}

.legal-page h3 {
  margin: 1.5rem 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.legal-page p,
.legal-page li {
  color: var(--text);
}

.legal-page ul {
  padding-left: 1.25rem;
}

.legal-page li {
  margin-bottom: 0.45rem;
}

.legal-page a {
  color: var(--green-dark);
}
