/* ============================================================
   Proton wspiera — landing (redesign 1:1 wg makiety)
   Fonts: Roboto (display) + Inter (UI)
   ============================================================ */
:root {
  --red:       #FF0000;
  --red-dark:  #8B0000;
  --ink:       #010101;
  --ink-90:    rgba(1,1,1,0.90);
  --ink-65:    rgba(1,1,1,0.65);
  --ink-60:    rgba(1,1,1,0.60);
  --gray:      #888888;
  --gray-2:    #A3A3A3;
  --gray-3:    #7E7E7E;
  --track:     #E8E8E8;
  --media-bg:  #F3F3F3;
  --sec-bg:    #FAFAFB;
  --green:     #22C55E;
  --line:      #E0E0E0;
  --line-2:    #E8E8E8;
  --line-3:    #F0F0F0;
  --white:     #FFFFFF;

  --font-display: 'Roboto', system-ui, -apple-system, sans-serif;
  --font-ui:      'Inter', system-ui, -apple-system, sans-serif;

  --container: 1280px;
  --pad: 40px;
  --shadow-card: 4px 4px 16px rgba(0,0,0,0.08);
  --shadow-story: 4px 4px 16px rgba(0,0,0,0.25);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Sticky footer: gdy treść jest krótsza niż okno, czerwona stopka
     wypełnia stronę do samego dołu (bez białej przestrzeni). */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Landing (React) renderuje wszystko do #root — przenosimy na niego
   układ kolumnowy, żeby stopka mogła zejść na dół. */
#root {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  background: var(--white);
}
.hero-left {
  position: relative;
  padding: 0 var(--pad) 64px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.hero-inner { max-width: 545px; }

.hero-logo {
  position: relative;
  width: 180px;
  height: 180px;
  margin-bottom: 36px;
}
.hero-logo-box {
  position: absolute;
  inset: 0;
  background: var(--red);
}
.hero-logo img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: auto;
}

.eyebrow {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.5;
  letter-spacing: 2px;
  margin-bottom: 18px;
}
.hero h1 {
  margin: 0 0 26px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  line-height: 1.07;
  white-space: nowrap;
}
@media (max-width: 620px) {
  .hero h1 { white-space: normal; font-size: 34px; }
}
.hero-lead {
  margin: 0 0 30px;
  color: #1E1E1E;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
}
.hero-lead em { font-style: italic; font-weight: 700; }

.btn-hero {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--white);
  color: var(--red);
  outline: 3px solid var(--red);
  outline-offset: -3px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.btn-hero:hover { background: var(--red); color: var(--white); transform: translateY(-1px); }

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  opacity: .6;
  color: var(--gray-3);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.5;
}
.hero-note em { font-style: italic; }
.hero-note svg { flex: none; }

.hero-right {
  position: relative;
  min-height: 520px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 40px;
}
.hero-right img {
  width: 100%;
  height: 100%;
  max-height: 540px;
  object-fit: contain;
  object-position: center;
}

/* ============================================================
   SECTION SHELL
   ============================================================ */
.section { padding: 64px 0; }
.section-title {
  text-align: center;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}
.section-title em { font-style: italic; font-weight: 400; }

/* ============================================================
   AKTYWNE ZBIÓRKI
   ============================================================ */
.campaigns { padding: 25px 0 64px; }
.campaigns-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 6px 0 28px;
}
.wspiera-logo {
  height: 16px;
  width: auto;
  display: block;
  filter: grayscale(1);
}
.campaigns-sub span {
  color: #A3A3A3;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.chip {
  height: 36px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  background: var(--white);
  color: var(--ink);
  outline: 1px solid var(--line);
  outline-offset: -1px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  transition: background .15s ease, color .15s ease, outline-color .15s ease;
}
.chip:hover { outline-color: var(--ink); }
.chip.active {
  background: var(--ink);
  color: var(--white);
  outline-color: var(--ink);
}

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

/* Campaign card */
.card {
  background: var(--white);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.12); }
.card-media {
  height: 220px;
  background: var(--media-bg);
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.card-cat {
  color: var(--red);
  font-family: var(--font-ui);
  font-size: 11px;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.5;
  letter-spacing: 1px;
}
.card-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}
.card-desc {
  margin: 0;
  color: var(--gray);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.2;
}
.card-progress { padding-top: 13px; display: flex; flex-direction: column; gap: 8px; }
.bar {
  height: 4px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}
.bar i { display: block; height: 100%; background: var(--red); border-radius: 999px; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.amounts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gray);
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.card-actions {
  display: flex;
  gap: 8px;
  padding-top: 9px;
  margin-top: auto;
}
.btn-outline {
  flex: 1;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  outline: 1px solid var(--line);
  outline-offset: -1px;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s ease, outline-color .15s ease;
}
.btn-outline:hover { background: #FAFAFA; outline-color: var(--ink); }
.btn-red {
  flex: 1;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  transition: background .15s ease, transform .15s ease;
}
.btn-red:hover { background: var(--red-dark); transform: translateY(-1px); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
  font-size: 14px;
}

/* ============================================================
   JAK TO DZIAŁA
   ============================================================ */
.how {
  background: var(--sec-bg);
  padding: 48px 0 64px;
}
.how .section-title { margin-bottom: 44px; }
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
.how-step { position: relative; }
.how-num {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}
.how-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  min-height: 34px;
}
.how-head svg { flex: none; }
.how-arrow {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(calc(50% + 16px), -50%);
  display: flex;
  align-items: center;
  pointer-events: none;
}
.how-arrow svg { display: block; }
.how-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}
.how-step p {
  margin: 0;
  max-width: 378px;
  color: var(--ink);
  opacity: .65;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   ZREALIZOWANE (success stories)
   ============================================================ */
.stories {
  background: linear-gradient(180deg, #FAFAFA 0%, #FFFFFF 100%);
  padding: 32px 0 64px;
}
.stories-head { text-align: center; margin-bottom: 40px; }
.stories-head .section-title {
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 12px;
}
.stories-head p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
}
.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.story {
  background: var(--white);
  box-shadow: var(--shadow-story);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease;
}
.story:hover { transform: translateY(-4px); }
.story-media {
  position: relative;
  height: 200px;
  background: var(--media-bg);
  overflow: hidden;
}
.story-media img { width: 100%; height: 100%; object-fit: cover; }
.badge-done {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  background: var(--green);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.27;
  letter-spacing: .3px;
}
.story-body {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.story-label {
  color: var(--gray);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.5;
}
.story-title {
  margin: 3px 0 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}
.story-desc {
  margin: 0;
  color: var(--ink-60);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
}
.story-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line-3);
}
.story-foot .raised {
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
}
.story-foot .raised b { font-size: 15px; font-weight: 700; }
.story-foot .btn-outline { flex: none; width: 169px; }

/* ============================================================
   FAQ (formalne)
   ============================================================ */
.faq { padding: 64px 0; background: var(--white); }
.faq .section-title {
  font-family: var(--font-ui);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 48px;
}
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  border-top: 1px solid var(--line-2);
}
.faq-list .faq-item:last-child { border-bottom: 1px solid var(--line-2); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  text-align: left;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}
.faq-icon {
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  color: var(--ink);
  flex: none;
  transition: transform .2s ease;
}
.faq-a {
  overflow: hidden;
  max-height: 0;
  transition: max-height .28s ease, padding .28s ease;
}
.faq-item.open .faq-a {
  max-height: 240px;
  padding: 0 0 20px;
}
.faq-a p {
  margin: 0;
  max-width: 720px;
  color: var(--ink-65);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: linear-gradient(90deg, #FF0000 0%, #8B0000 100%);
  color: var(--white);
  padding: 60px 0 40px;
  /* Dosuwa stopkę do dołu strony w układzie kolumnowym (patrz body/#root). */
  margin-top: auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
}
.footer-logo {
  height: 30px;
  width: auto;
  display: block;
  margin-bottom: 18px;
}
.footer-addr p {
  margin: 0 0 4px;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
}
.footer-col h4 {
  margin: 0 0 16px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  line-height: 1.5;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a, .footer-col span {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  transition: opacity .15s ease;
}
.footer-col a:hover { opacity: .75; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.5;
}

/* ============================================================
   LOADING / ERROR
   ============================================================ */
.screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 70vh; gap: 16px; padding: 32px; text-align: center;
}
.spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--track); border-top-color: var(--red);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .grid, .stories-grid, .how-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .how-arrow { display: none; }
}
@media (max-width: 820px) {
  :root { --pad: 24px; }
  .hero { grid-template-columns: 1fr; }
  .hero-right { min-height: 320px; order: -1; }
  .hero h1 { font-size: 34px; }
}
@media (max-width: 640px) {
  .grid, .stories-grid, .how-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .card-actions { flex-direction: column; }
  .story-foot { flex-direction: column; align-items: flex-start; }
  .story-foot .btn-outline { width: 100%; }
  .section-title { font-size: 26px; }
}

/* ============================================================
   ZNAK MARKI NA PODSTRONACH (regulamin, RODO, zgłoś zbiórkę)
   Ten sam znak co .hero-logo na stronie głównej: czerwony kwadrat 180×180
   z samym wordmarkiem, bez tagline'u. Wymiary i plik muszą zgadzać się
   z .hero-logo — przy zmianie jednego poprawić drugie.
   Podstrony miały wcześniej po własnej kopii reguł (.reg-logo, .rodo-logo,
   .zg-logo) i to właśnie pozwoliło znakowi rozjechać się ze stroną główną.
   ============================================================ */
.brand-mark {
  position: relative;
  width: 180px;
  height: 180px;
  background: var(--red);
  margin-bottom: 36px;
}
.brand-mark img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: auto;
}
