:root{
  --bg: #081227;
  --bg2:#06102a;
  --glass: rgba(8,18,39,.55);
  --glass2: rgba(8,18,39,.72);

  --text:#fff;
  --muted: rgba(255,255,255,.78);
  --border: rgba(255,255,255,.14);

  --accent:#2aa7ff;
  --radius: 18px;
  --container: 1120px;

  --header-h: 78px;
}

*{ box-sizing:border-box; }
html{
  scroll-behavior:smooth;
  scroll-padding-top: calc(var(--header-h) - 8px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;

  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

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

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

.skip-link{
  position:absolute;
  left:-999px;
  top: 12px;
  padding:10px 12px;
  background:#000;
  color:#fff;
  border-radius:10px;
  z-index:9999;
}
.skip-link:focus{ left:12px; }

.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;
}

/* ===== SYSTEM POZYCJONOWANIA Tylko HERO) ===== */
.pos{
  --mx: 0px;
  --my: 0px;
  transform: translate(var(--mx), var(--my));
}

/* X */
.mx-150{ --mx: clamp(0px, 6vw, 150px); }

/* Y */
.my-20 { --my: clamp(0px, 1.5vw, 20px); }
.my-100{ --my: clamp(10px, 5vw, 120px); }
.my-200{ --my: clamp(5px, 8.5vw, 180px); }

/* ikonki */
.icon-img-onas{
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.icon-img{
  width: 35px;
  height: 35px;
  object-fit: contain;
}
.arrow-img{
  width: 30px;
  height: 30px;
  object-fit: contain;
}

/* tel/mail link tylko na mobile */
.link-mobile{ display:none; }
.link-desktop{ display:inline; }

@media (max-width: 980px){
  .link-mobile{ display:inline; }
  .link-desktop{ display:none; }
}

.nav-link:focus-visible,
.doc-btn:focus-visible,
.to-top:focus-visible,
.nav-toggle:focus-visible,
.link:focus-visible{
  outline: 2px solid rgba(42,167,255,.9);
  outline-offset: 3px;
}

/* blokada scrolla przy otwartym menu mobile */
body.no-scroll{
  overflow: hidden;
  overscroll-behavior: none;
}

/* NAVBAR */
.site-header{
  position: sticky;
  top:0;
  z-index: 1000;
  height: var(--header-h);
  display:flex;
  align-items:center;

  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.10);
  transition: background .18s ease, box-shadow .18s ease;
}
.site-header.is-scrolled{
  background: var(--glass2);
  box-shadow: 0 10px 34px rgba(0,0,0,.35);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content: flex-start;
  gap: 30px;
  width: 100%;
}

.brand{
  display:flex;
  align-items:center;
  text-decoration:none;
  flex: 0 0 auto;
  margin-left: clamp(10px, 8vw, 150px);
}
.brand img{
  height: 65px;
  width:auto;
  max-width: 100%;
  border-radius: 0;
  background: transparent;
  padding: 0;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.25));
}

.nav{
  margin-left: 0;
  position: relative;
}

.nav-list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  gap: 30px;
}
.nav-link{
  color: rgba(255,255,255,.92);
  text-decoration:none;
  font-weight: 850;
  padding: 10px 10px;
  border-radius: 12px;
  transition: transform .14s ease, background .14s ease, color .14s ease;
}
.nav-link:hover{
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
}
.nav-link.is-active{
  color:#fff;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
}

.nav-toggle{
  display:none;
  margin-left:auto;
  appearance:none;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color:#fff;
  border-radius: 14px;
  padding: 12px 12px;
  cursor:pointer;
}

.burger{
  position: relative;
  width: 22px;
  height: 16px;
  display: block;
}
.burger::before,
.burger::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255,255,255,.9);
  border-radius: 999px;
}
.burger::before{ top: 0; }
.burger::after{ bottom: 0; }
.burger{
  background: linear-gradient(
    to bottom,
    transparent 7px,
    rgba(255,255,255,.9) 7px,
    rgba(255,255,255,.9) 9px,
    transparent 9px
  );
}

/* HERO */
.hero{
  min-height: calc(100svh - var(--header-h));
  display:flex;
  align-items:flex-start;

  /*fallback */
  background-image: url("../img/tlo.png");
  background-size: cover;
  background-position: center;
  background-repeat:no-repeat;
  position: relative;

  padding-bottom: 40px;
}

@supports (background-image: image-set(url("x.webp") type("image/webp"))){
  .hero{
    background-image: image-set(
      url("../img/tlo.webp") type("image/webp"),
      url("../img/tlo.png") type("image/png")
    );
  }
}

.hero-overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.18));
}
.hero-grid{
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 18px 0 120px;

  display: grid;
  grid-template-columns: 1.12fr .88fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "copy ."
    "docs docs";
  column-gap: 26px;
}
.hero-left{ grid-area: copy; }
.hero-copy{
  max-width: 920px;
  margin-left: clamp(0px, 4vw, 120px);
}
.hero-title{
  margin:0 0 14px;
  font-size: clamp(2.0rem, 3.3vw, 3.4rem);
  letter-spacing: .6px;
  text-shadow: 0 16px 44px rgba(0,0,0,.45);
  white-space: nowrap;
}
.hero-subtitle{
  margin:0 0 18px;
  font-size: clamp(1.05rem, 2.0vw, 1.8rem);
  color: rgba(255,255,255,.92);
  white-space: nowrap;
  max-width: 80ch;
}
.hero-bullets{
  margin: 0 0 24px;
  padding-left: 20px;
  font-size: clamp(1.0rem, 1.1vw, 1.15rem);
  color: rgba(255,255,255,.92);
  max-width: 78ch;
}
.hero-bullets li{ margin: 10px 0; }

.hero-docs{
  grid-area: docs;
  width: 100%;
  max-width: 1200px;
  margin: clamp(30px, 6vh, 90px) auto 0;
  justify-self: center;

  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (min-height: 900px) and (min-width: 1400px){
  .hero-docs{
    margin: clamp(70px, 12vh, 180px) auto 0;
  }
}

.doc-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 100%;
  padding: 28px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color:#fff;
  font-weight: 900;
  font-size: clamp(1.0rem, 1.05vw, 1.18rem);
  text-decoration:none;
  letter-spacing:.2px;
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
  position: relative;
  overflow:hidden;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease;
  text-align:center;
  white-space: normal;
}
.doc-btn::before{
  content:"";
  position:absolute;
  top:-60%;
  left:-40%;
  width: 60%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: rotate(18deg) translateX(-120%);
  transition: transform .55s ease;
}
.doc-btn:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.26);
  box-shadow: 0 18px 50px rgba(0,0,0,.32);
}
.doc-btn:hover::before{
  transform: rotate(18deg) translateX(240%);
}

/* SEKCJE */
.section{ padding: 64px 0; }
.section-dark{ background: transparent; }

.section-titlebar{
  display:flex;
  align-items:center;
  margin-bottom: 18px;
}
.section-pill{
  display:flex;
  align-items:center;

  width: 100%;
  padding: 14px clamp(20px, 5vw, 80px);

  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing:.4px;

  background: rgba(10,30,90,.70);
  border: 1px solid rgba(255,255,255,.10);
}

/* MISJA/WIZJA/ZASADY */
.mission-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 14px 0 26px;
}
.mission-card{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 18px;
  text-align:center;
  box-shadow: 0 14px 34px rgba(0,0,0,.20);
}
.mission-icon{
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  background: rgba(42,167,255,.10);
  border: 1px solid rgba(42,167,255,.20);
}
.mission-card h3{ margin: 4px 0 10px; font-weight: 900; }
.mission-card p{ margin:0; color: rgba(255,255,255,.80); }

/* O NAS */
.about-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 34px;
}
.about-block--right{ justify-self: end; }
.about-head{
  margin:0 0 10px;
  color: var(--accent);
  letter-spacing:.6px;
  font-weight: 900;
}
.about-block p{
  margin:0 0 12px;
  color: rgba(255,255,255,.86);
  max-width: 72ch;
}
.small{ font-size: .92rem; color: rgba(255,255,255,.72); }

/* ZESPÓŁ */
.team-profile{
  display:grid;
  grid-template-columns: 390px 1fr;
  gap: 26px;
  align-items:start;
  margin-top: 15px;
}
.team-photo{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 15px;
  overflow:hidden;
  box-shadow: 0 15px 30px rgba(0,0,0,.20);
}
.team-photo img{
  width:100%;
  height:auto;
  object-fit: contain;
  aspect-ratio: 3 / 4;
  max-height: clamp(260px, 45vw, 420px);
}
.team-name{
  padding: 14px 16px;
  font-weight: 900;
  font-size: 1.55rem;
  color: var(--accent);
  background: rgba(0,0,0,.10);
  text-align:center;
}
.team-bio{
  color: rgba(255,255,255,.86);
  font-size: 1.05rem;
}
.team-bio--top{ padding-top: clamp(0px, 2vw, 36px); }
.team-bio p{ margin: 0 0 16px; }

.team-bottom{
  margin-top: 22px;
  color: rgba(255,255,255,.86);
  max-width: 92ch;
}
.team-bottom p{ margin: 0 0 14px; }
.team-invite{ margin-top: 10px; }

/* KONTAKT */
.contact-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items:start;
  margin-top: 14px;
}
.contact-left p{
  color: rgba(255,255,255,.86);
  max-width: 78ch;
}

.contact-cards{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  white-space: nowrap;
}
.contact-card{
  background: rgba(6,16,42,.78);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 18px;
  min-height: 140px;
  display:flex;
  gap: 14px;
  align-items:center;
  box-shadow: 0 14px 34px rgba(0,0,0,.25);
}
.contact-icon{
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}
.contact-label{
  color: rgba(255,255,255,.90);
  font-weight: 650;
  overflow-wrap: anywhere;
}
.link{ color: #fff; text-underline-offset: 3px; }
.link:hover{ color: rgba(255,255,255,.85); }

/* STOPKA */
.footer{ padding: 36px 0 54px; background: transparent; }
.footer-panel{
  background: rgba(6,16,42,.88);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 0;
  padding: 28px 22px 18px;
  box-shadow: 0 18px 44px rgba(0,0,0,.28);
}
.footer-brand{
  display:grid;
  place-items:center;
  gap: 10px;
  margin-bottom: 18px;
}
.footer-brand img{
  height: 54px;
  width:auto;
  filter: brightness(1.05) drop-shadow(0 10px 24px rgba(0,0,0,.35));
}
.footer-sub{
  color: rgba(255,255,255,.80);
  font-weight: 650;
  text-align:center;
}
.footer-cols{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.footer-col{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 10px;
  color: rgba(255,255,255,.86);
  text-align:center;
  white-space: nowrap;
}
.footer-ico{
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display:grid;
  place-items:center;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}
.footer-copy{
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.10);
  text-align:center;
  color: rgba(255,255,255,.75);
}

/* floating arrow */
.to-top{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(8,18,39,.78);
  box-shadow: 0 18px 44px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  display:grid;
  place-items:center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
}
.to-top.is-visible{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* RESPONSYWNOŚĆ */

@media (max-width: 980px){
  :root{ --header-h: 74px; }

  .site-header{
  position: sticky;
  top: 0;
  left: auto;
  right: auto;
  }
  body{ padding-top: 0; }


  .header-inner{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand{
    margin-left: 0;
    flex: 0 0 auto;
  }
  .brand img{
    height: auto;
    width: clamp(150px, 55vw, 220px);
    max-width: 100%;
  }

  .nav-toggle{
    display: inline-flex;
    margin-left: auto;
    margin-right: 6px;
    order: 2;
    z-index: 4000;
  }

  .nav{
    order: 3;
    flex: 0 0 auto;
    overflow: visible;
  }

  .nav-list{
    position: fixed;
    left: 16px;
    right: 16px;
    top: calc(var(--header-h) + 10px);

    width: auto;
    max-width: none;
    margin: 0;

    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 12px;

    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(8,18,39,.92);
    box-shadow: 0 18px 44px rgba(0,0,0,.40);

    max-height: calc(100svh - var(--header-h) - 24px);
    overflow: auto;

    z-index: 9999;
  }
  .nav-list.is-open{ display: flex; }

  .nav-link{ padding: 14px 12px; }

  .hero-grid{
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "docs";
  }
  .hero-copy{ margin-left: 0; }

  .hero-title,
  .hero-subtitle{
    white-space: normal;
  }

  .hero{
    --bg-x: 55%;
    --bg-y: 55%;
    background-position: var(--bg-x) var(--bg-y);
	overflow-x: clip;
  }

  .hero-docs{
    margin-top: 26px;
    grid-template-columns: 1fr;
  }

  .mission-grid{ grid-template-columns: 1fr; }
  .about-grid{ grid-template-columns: 1fr; }
  .about-block--right{ justify-self: start; }

  .team-profile{ grid-template-columns: 1fr; }
  .team-photo{
    max-width: 420px;
    margin: 0 auto;
  }

  .contact-grid{ grid-template-columns: 1fr; }
  .contact-cards{
    grid-template-columns: 1fr;
    white-space: normal;
  }

  .footer-cols{ grid-template-columns: 1fr 1fr; }
  .footer-col{ white-space: normal; }

  .to-top{
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 2000;
  }
}

@media (max-width: 520px){
  .footer-cols{ grid-template-columns: 1fr; }

  .team-photo{ max-width: 300px; }

  .hero{ background-position: 84% 60%; }

  .brand img{
    width: clamp(140px, 62vw, 200px);
  }

  .header-inner{
    padding-left: 12px;
    padding-right: 12px;
  }
  .nav-list{
    left: 12px;
    right: 12px;
  }

  .to-top{
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
}