:root {
  --primary: #533afd;
  --primary-hover: #665efd;
  --ink: #061b31;
  --body: #17263a;
  --muted: #50617a;
  --surface: #f8fafd;
  --surface-strong: #e5edf5;
  --white: #ffffff;
  --orange: #ff6118;
  --green: #15be53;
  --border: #dce5ee;
  --shadow-card: rgba(23, 23, 23, 0.06) 0 3px 6px;
  --shadow-hover: rgba(23, 23, 23, 0.08) 0 15px 35px;
  --focus: rgba(99, 91, 255, 0.12) 0 0 0 3px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--body);
  background: var(--white);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

body.menu-open {
  overflow: hidden;
}

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

a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(83, 58, 253, 0.45);
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  max-width: 880px;
  margin-bottom: 24px;
  font-size: 56px;
  font-weight: 300;
}

h2 {
  margin-bottom: 20px;
  font-size: 36px;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  z-index: 30;
  top: 8px;
  left: 8px;
  padding: 12px 16px;
  color: var(--white);
  background: var(--ink);
  border-radius: 4px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(220, 229, 238, 0.85);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
}

.nav-row {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 164px;
  height: 40px;
  background: linear-gradient(90deg, #1e73d8 0 25%, var(--ink) 25% 100%);
  -webkit-mask: url("logo-fundacja-digi.png") center / contain no-repeat;
  mask: url("logo-fundacja-digi.png") center / contain no-repeat;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--ink);
  border-radius: 4px;
  font-size: 14px;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--primary);
  background: var(--surface);
  text-decoration: none;
}

.nav-cta {
  color: var(--white) !important;
  background: var(--primary) !important;
}

.nav-cta:hover {
  background: var(--primary-hover) !important;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 24px;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: var(--white);
  background: #0b1930;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(6, 27, 49, 0.98) 0%, rgba(6, 27, 49, 0.84) 52%, rgba(6, 27, 49, 0.2) 100%);
}

.hero-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #17263a url("archive-1.webp") 68% center / cover no-repeat;
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 650px;
  display: flex;
  align-items: center;
  padding: 96px 0;
}

.hero-copy {
  width: min(690px, 64%);
}

.hero h1,
.hero h2 {
  color: var(--white);
}

.hero p {
  max-width: 650px;
  margin-bottom: 32px;
  color: #dce6f0;
  font-size: 20px;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-note {
  position: absolute;
  z-index: 3;
  right: 32px;
  bottom: 32px;
  max-width: 290px;
  padding: 12px 16px;
  color: #dce6f0;
  background: rgba(6, 27, 49, 0.88);
  border-left: 3px solid var(--orange);
  font-size: 13px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  color: var(--white);
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  color: var(--white);
  background: var(--primary-hover);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--ink);
  background: var(--white);
  border-color: var(--border);
}

.button.secondary:hover {
  color: var(--primary);
  background: var(--surface);
}

.button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.menu-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.section {
  padding: 88px 0;
}

.section.compact {
  padding: 64px 0;
}

.section.surface {
  background: var(--surface);
}

.section.dark {
  color: #dce6f0;
  background: var(--ink);
}

.section.dark h2,
.section.dark h3 {
  color: var(--white);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 40px;
}

.section-heading p {
  color: var(--muted);
  font-size: 18px;
}

.section.dark .section-heading p {
  color: #b9c9d9;
}

.about-mission {
  padding-bottom: 0;
}

.about-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 72px;
  padding-bottom: 64px;
}

.about-intro h2 {
  max-width: 540px;
  margin-bottom: 0;
}

.about-copy p {
  color: var(--muted);
  font-size: 18px;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.about-pillar {
  min-height: 250px;
  padding: 36px 32px 48px;
  border-right: 1px solid var(--border);
}

.about-pillar:first-child {
  border-left: 1px solid var(--border);
}

.about-pillar span {
  display: block;
  margin-bottom: 32px;
  color: var(--primary);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.about-pillar p {
  margin-bottom: 0;
  color: var(--muted);
}

.about-scope p:not(.eyebrow) {
  color: #b9c9d9;
  font-size: 18px;
}

.about-list li {
  color: #dce6f0;
  border-color: #25364a;
}

.team-profile {
  display: grid;
  grid-template-columns: minmax(380px, 480px) minmax(0, 1fr);
  align-items: center;
  gap: 64px;
}

.team-portrait {
  margin: 0;
}

.team-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.team-bio {
  max-width: 680px;
}

.team-bio h3 {
  margin-bottom: 24px;
  font-size: 38px;
}

.team-bio p:not(.eyebrow) {
  color: var(--muted);
  font-size: 18px;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  min-height: 100%;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.card-number {
  display: block;
  margin-bottom: 20px;
  color: var(--primary);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}

.link-card {
  color: inherit;
}

.link-card:hover {
  text-decoration: none;
}

.link-card .learn-more {
  display: inline-block;
  margin-top: 12px;
  color: var(--primary);
}

.check-list,
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.plain-list li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--border);
}

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

.plain-list li::before {
  position: absolute;
  top: 17px;
  left: 4px;
  width: 8px;
  height: 8px;
  content: "";
  background: var(--orange);
  border-radius: 50%;
}

.check-list li:last-child,
.plain-list li:last-child {
  border-bottom: 0;
}

.process-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.process-step {
  min-height: 230px;
  padding: 28px;
  background: var(--white);
}

.process-step strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.process-step span {
  display: block;
  margin-bottom: 36px;
  color: var(--primary);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.media-placeholder {
  min-height: 440px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  overflow: hidden;
  color: var(--white);
  background: #17263a;
  border-radius: 8px;
}

.media-image {
  min-height: 440px;
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--surface-strong);
  border-radius: 8px;
}

.media-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.media-image.position-left img {
  object-position: 35% center;
}

.media-image.position-right img {
  object-position: 68% center;
}

.media-placeholder::before {
  position: absolute;
  width: 62%;
  height: 58%;
  top: 17%;
  left: 19%;
  content: "";
  background: #e7ded0;
  border: 16px solid #34445a;
  transform: rotate(2deg);
}

.media-placeholder::after {
  position: absolute;
  width: 74px;
  height: 74px;
  top: 10%;
  left: calc(50% - 37px);
  content: "";
  background: #0c1420;
  border: 14px solid var(--orange);
  border-radius: 50%;
}

.media-caption {
  position: relative;
  z-index: 2;
  max-width: 340px;
  padding: 12px 16px;
  background: rgba(6, 27, 49, 0.88);
  border-left: 3px solid var(--orange);
  font-size: 14px;
}

.metric-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.metric {
  padding: 32px;
  background: var(--white);
}

.metric strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 22px;
}

.page-hero {
  padding: 88px 0 72px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  max-width: 880px;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 20px;
}

.callout {
  padding: 36px;
  color: var(--white);
  background: var(--primary);
  border-radius: 8px;
}

.callout h2,
.callout h3 {
  color: var(--white);
}

.callout p {
  max-width: 760px;
  color: #f0efff;
}

.callout .button.secondary {
  color: var(--primary);
}

.warning-note {
  padding: 20px 24px;
  color: #6f2f0d;
  background: #fff2eb;
  border-left: 4px solid var(--orange);
  border-radius: 4px;
}

.audience-intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
}

.contact-details {
  padding: 32px;
  color: #dce6f0;
  background: var(--ink);
  border-radius: 8px;
}

.contact-details h2,
.contact-details h3,
.contact-details a {
  color: var(--white);
}

.contact-details dl {
  margin: 28px 0 0;
}

.contact-details dt {
  margin-top: 20px;
  color: #9fb3c7;
  font-size: 13px;
}

.contact-details dd {
  margin: 4px 0 0;
}

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

.field.full {
  grid-column: 1 / -1;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #273951;
  font-size: 14px;
}

input,
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  color: var(--body);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.form-status {
  min-height: 28px;
  margin: 16px 0 0;
  color: var(--muted);
}

.form-status.success {
  color: #087a35;
}

.form-status.error {
  color: #a33414;
}

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

.checkbox-field {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 10px;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.checkbox-field label {
  margin: 0;
}

.contact-email a {
  font-size: 18px;
  font-weight: 600;
}

.policy-hero {
  min-height: auto;
}

.policy-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 760px);
  align-items: start;
  gap: 64px;
}

.policy-nav {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.policy-nav strong {
  margin-bottom: 8px;
}

.policy-nav a {
  color: var(--muted);
  font-size: 14px;
}

.policy-text section {
  margin-bottom: 56px;
  scroll-margin-top: 110px;
}

.policy-text h2 {
  font-size: 30px;
}

.policy-text p,
.policy-text li {
  color: var(--muted);
}

.policy-updated {
  margin-bottom: 40px;
  font-size: 14px;
}

.site-footer {
  padding: 56px 0 28px;
  color: #b9c9d9;
  background: #061321;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 40px;
}

.site-footer h3,
.site-footer strong {
  color: var(--white);
}

.site-footer a {
  display: block;
  min-height: 36px;
  color: #dce6f0;
}

.site-footer address {
  margin: 10px 0 14px;
  font-style: normal;
}

.footer-registers {
  margin-bottom: 14px;
}

.footer-registers span {
  display: block;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #25364a;
  color: #8da3b8;
  font-size: 13px;
}

@media (max-width: 940px) {
  h1 {
    font-size: 44px;
  }

  .nav-links {
    position: fixed;
    inset: 77px 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 20px 24px 28px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-hover);
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-copy {
    width: 78%;
  }

  .hero-scene {
    left: 0;
    background-position: 70% center;
  }

  .grid-4,
  .process-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audience-intro,
  .contact-layout,
  .policy-layout,
  .team-profile,
  .about-intro {
    grid-template-columns: 1fr;
  }

  .about-pillars {
    grid-template-columns: 1fr;
  }

  .about-pillar,
  .about-pillar:first-child {
    min-height: auto;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    border-left: 1px solid var(--border);
  }

  .policy-nav {
    position: static;
  }

  .team-profile {
    gap: 36px;
  }

  .team-portrait {
    width: min(100%, 560px);
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 32px), var(--container));
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 29px;
  }

  .brand-logo {
    width: 148px;
    height: 36px;
  }

  .hero,
  .hero-inner {
    min-height: 690px;
  }

  .hero-inner {
    align-items: flex-start;
    padding-top: 72px;
  }

  .hero-copy {
    width: 100%;
  }

  .hero p {
    font-size: 18px;
  }

  .hero-scene {
    inset: 0;
    opacity: 1;
    background-position: 68% center;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(6, 27, 49, 1) 0%, rgba(6, 27, 49, 0.94) 52%, rgba(6, 27, 49, 0.34) 100%);
  }

  .hero-note {
    right: 16px;
    bottom: 16px;
    left: 16px;
    max-width: none;
  }

  .section {
    padding: 64px 0;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .process-rail,
  .metric-band,
  .form-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .process-step {
    min-height: auto;
  }

  .media-placeholder {
    min-height: 340px;
  }

  .media-image {
    min-height: 340px;
  }

  .button-row .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
