@font-face {
  font-family: 'Fredoka';
  src: url('fonts/Fredoka-Full-v3.ttf') format('truetype');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #1f265e;
  --brand-soft: #eef1ff;
  --text: #1f265e;
  --muted: #3b4280;
  --surface: #ffffff;
  --surface-soft: #f7f8ff;
  --line: #ced5ff;
  --line-strong: #b7c0ff;
  --radius-md: 14px;
  --radius-pill: 999px;
  --bg: #eceaf4;
  --row-w: 760px;
  --content-width: min(920px, calc(100% - 100px));
  --text-on-dark: #dce1ff;
  --form-border: #9ca9f0;
  --form-bg: #f4f6ff;
  --form-focus-border: #dbe2ff;
  --form-focus-ring: #dde4ff54;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--text);
  font-family: 'Fredoka', sans-serif;
  background: var(--bg);
  line-height: 1.58;
}

.navy {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
  background: var(--brand);
  border-top: 1px solid #445097;
  border-bottom: 1px solid #445097;
  box-shadow: 0 20px 38px #12173f4a;
}

.navy-inner {
  position: relative;
  z-index: 1;
  width: var(--content-width);
  margin: 0 auto;
  padding: 80px 0;
}

.header {
  min-height: clamp(420px, 62vh, 580px);
}

.header-shell {
  position: relative;
  z-index: 1;
  width: var(--content-width);
  margin: 0 auto;
  padding: 24px 0 80px;
  min-height: inherit;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: stretch;
  gap: 30px;
}

.header-top {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
}

.header-brand {
  line-height: 0;
}

.header-mark {
  width: clamp(70px, 7vw, 88px);
  height: auto;
}

.header-nav {
  justify-self: end;
  display: grid;
  grid-auto-flow: column;
  gap: 16px;
  font-size: 1rem;
  align-items: center;
}

.header-nav a {
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}

.header-hero {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  gap: 0;
  margin-top: 8px;
}

.header-copy h1 {
  margin: 0 auto 12px;
  text-align: center;
  color: var(--white);
  max-width: 34ch;
  text-wrap: balance;
}

.header-copy p {
  margin: 0 auto;
  max-width: 56ch;
  font-size: 1.1rem;
  color: var(--text-on-dark);
  text-align: center;
  text-wrap: pretty;
}

.container {
  width: var(--content-width);
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.container > section {
  padding: 60px 0;
}

#jak-dzialamy {
  padding-top: 0;
}

#kontakt {
  padding: 0;
  margin-top: 12px;
}

h1,
h2 {
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 18px;
  text-align: center;
}

p {
  font-size: 1rem;
}

h1 {
  font-size: 2.4rem;
  line-height: 1.15;
}

h2 {
  font-size: 1.4rem;
  margin: 0 0 48px;
}

.updates-banner {
  width: 100%;
  margin: 12px auto 34px;
  display: grid;
  justify-content: center;
}

.updates-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 12px 24px;
  color: var(--brand);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
}

.updates-arrow {
  font-size: 1rem;
}



#o-fundacji > div {
  display: grid;
  gap: 20px;
}

#o-fundacji > div > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  max-width: var(--row-w);
  margin: 0 auto clamp(28px, 3.5vw, 45px);
}

#o-fundacji p {
  margin: 0;
  max-width: 36ch;
}

#o-fundacji img {
  display: block;
  width: 280px;
  height: auto;
  margin: 0 auto;
  mix-blend-mode: multiply;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.process-step {
  margin: 0;
  padding: 24px;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.025);
  display: grid;
  gap: 10px;
  aspect-ratio: 1;
}

.process-step strong {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #16206e;
}

.process-step span {
  color: var(--muted);
  font-size: 1rem;
}



#kontakt h2 {
  color: var(--white);
  margin: 0 0 24px;
}

#kontakt form {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 14px;
}

#kontakt form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-on-dark);
}

#kontakt form input,
#kontakt form textarea {
  width: 100%;
  border: 1px solid var(--form-border);
  border-radius: 12px;
  font-family: 'Fredoka', sans-serif;
  background: var(--form-bg);
  color: var(--brand);
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  padding: 13px 14px;
  font-size: 1.04rem;
  box-shadow: inset 0 1px 0 #ffffff;
}

#kontakt form input:focus-visible,
#kontakt form textarea:focus-visible {
  outline: none;
  border-color: var(--form-focus-border);
  box-shadow:
    0 0 0 3px var(--form-focus-ring),
    inset 0 1px 0 #ffffff;
}

#kontakt form textarea {
  min-height: 130px;
  resize: vertical;
}

#kontakt form button {
  justify-self: center;
  width: fit-content;
  max-width: 100%;
  padding: 12px 24px;
  margin-top: 4px;
  background: var(--surface);
  color: var(--brand);
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  cursor: pointer;
}

a {
  color: var(--brand);
  font-weight: bold;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.footer-container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  padding: 80px 4px 60px;
  align-items: start;
  width: var(--content-width);
  margin: 0 auto;
}

.footer-logo {
  width: 70px;
  height: auto;
}

.footer-right {
  text-align: right;
}

.legal-data {
  margin: 0;
  color: var(--muted);
}

.footer-nav {
  margin: 0 0 10px;
}

.footer-container > div > .legal-data:first-child {
  margin-bottom: 10px;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 16px;
}

.modal-actions .modal-close-main {
  margin-top: 0;
}

.share-bar-modal {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.share-bar-modal a {
  display: inline-block;
  padding: 5px 12px;
  background: var(--surface);
  color: var(--brand);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
}

.share-bar-modal a:hover {
  text-decoration: underline;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-md);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 60px 48px 72px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.5rem;
  cursor: pointer;
  color: #f4f5ff;
  padding: 4px;
  line-height: 1;
}

#summary-body h1,
#documents-body h1 {
  margin: 0 0 20px;
  text-align: left;
  font-size: 1.8rem;
  line-height: 1.15;
  font-weight: 700;
  color: var(--brand);
}

#summary-body p {
  margin: 0 0 16px;
  font-size: 1rem;
  color: var(--text);
}

#summary-body p:last-child {
  margin-bottom: 0;
}

#summary-body .summary-hero {
  position: relative;
  margin: -60px -48px 24px -48px;
  background: var(--brand);
}

#summary-body .summary-hero img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

#summary-body .summary-hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  pointer-events: none;
  z-index: 0;
}

#summary-body .summary-hero h1 {
  position: absolute;
  bottom: 20px;
  left: 48px;
  margin: 0;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.modal-close-main {
  justify-self: center;
  margin-top: 24px;
  padding: 12px 24px;
  background: var(--brand);
  color: var(--white);
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

#documents-body table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

#documents-body th,
#documents-body td {
  padding: 10px 0;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  line-height: 1.58;
  color: var(--text);
}

#documents-body th {
  font-weight: 700;
  color: var(--brand);
}

#documents-body tr:last-child td {
  border-bottom: none;
}

#documents-body a:hover {
  text-decoration: underline;
}

@media (max-width: 960px) {
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .header-nav {
    grid-auto-flow: row;
    justify-self: start;
    gap: 12px;
  }

  .header-nav a {
    padding: 8px 0;
  }
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-right {
    text-align: center;
  }

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

@media (max-width: 600px) {
  .header {
    min-height: 470px;
  }

  .header-shell {
    padding: 18px 0 24px;
    gap: 22px;
  }

  .updates-link {
    gap: 12px;
    padding: 13px 18px;
  }

  .updates-text {
    font-size: clamp(1rem, 4.3vw, 1.2rem);
  }

  .navy-inner {
    padding: 24px 16px;
  }

  #kontakt form button {
    width: fit-content;
  }

}
