/* ═══════════════════════════════════════════════════════
   New Science Lab — arkusz wspólny dla wszystkich podstron
   Kolory, typografia i komponenty przeniesione z obecnej
   strony newsciencelab.com (materialy/11_styl_i_zasoby.md)
══════════════════════════════════════════════════════ */

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

/* ─── ZMIENNE ─── */
:root {
  --bg:     #080808;
  --fg:     #ffffff;
  --dim:    rgba(255,255,255,.70);
  --dimmer: rgba(255,255,255,.32);
  --label:  rgba(255,255,255,.38);
  --div:    rgba(255,255,255,.13);
  --g1:     #28BEDC;   /* brand cyan */
  --g2:     #5B7CE8;   /* brand blue-violet */
  --g3:     #9B80E8;   /* violet */
  --err:    #e05c6a;
  --nav-h:  68px;
  --grad:   linear-gradient(90deg, #28BEDC 0%, #5B7CE8 55%, #9B80E8 100%);
}

/* ─── BAZA ─── */
body {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--g1); }

a { color: inherit; text-decoration: none; }
img, video, svg { max-width: 100%; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 56px; }

:focus-visible { outline: 2px solid var(--g1); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 900;
  background: #0f0f0f; color: #fff; padding: 12px 20px;
  border: 1px solid var(--div); border-radius: 4px; font-size: 14px;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ═══════════════ NAWIGACJA ═══════════════ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  height: var(--nav-h);
  transition: background .4s;
}
#nav.bg { background: rgba(8,8,8,.92); backdrop-filter: blur(16px); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; line-height: 1; }
.nav-logo svg { height: 28px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  font-size: 14px; font-weight: 300; color: var(--dim);
  letter-spacing: .01em; transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--fg); }

/* Rozmiar dziedziczy z `.nav-links a` (14 px) — tak samo jak na obecnej
   stronie, gdzie własna deklaracja `.lang-switch` też była przesłonięta. */
.lang-switch {
  font-weight: 500; letter-spacing: .08em;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; text-decoration: none;
  border: 1px solid rgba(91,124,232,.4); border-radius: 4px;
  padding: 3px 8px; transition: border-color .2s;
}
.lang-switch:hover { border-color: rgba(91,124,232,.8); }

.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.burger span { display: block; width: 22px; height: 1px; background: var(--fg); transition: all .28s; }
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mob-menu {
  display: none; flex-direction: column;
  background: #0f0f0f; border-top: 1px solid var(--div);
  padding: 16px 56px 28px;
}
.mob-menu.open { display: flex; }
.mob-menu a {
  font-size: 16px; font-weight: 300; color: var(--dim);
  padding: 14px 0; border-bottom: 1px solid var(--div); transition: color .2s;
}
.mob-menu a:last-child { border-bottom: none; }
.mob-menu a:hover, .mob-menu a.active { color: var(--fg); }
.mob-menu a.lang-mob {
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; font-weight: 500;
}

/* ═══════════════ SEPARATOR SEKCJI ═══════════════ */
.sec-div { position: relative; padding-top: 24px; }
.anim-hline { height: 2px; position: relative; overflow: hidden; margin-top: 10px; }
.anim-hline::before {
  content: ''; position: absolute; top: 0; left: 0; height: 2px; width: 200%;
  background: repeating-linear-gradient(90deg,
    #28BEDC 0%, #5B7CE8 9.5%, #9B80E8 17%, #28BEDC 23%,
    rgba(40,190,220,0) 29%, rgba(40,190,220,0) 50%);
  animation: hlineSweep 7s linear infinite;
}
@keyframes hlineSweep { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes hlineSweepRev { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.anim-hline.rev::before {
  background: repeating-linear-gradient(90deg,
    rgba(40,190,220,0) 0%, rgba(40,190,220,0) 21%,
    #28BEDC 29%, #9B80E8 37.5%, #5B7CE8 47.5%, #28BEDC 50%);
  animation-name: hlineSweepRev;
}

/* ═══════════════ HERO ═══════════════ */
.s-hero {
  position: relative; z-index: 1;
  padding-top: calc(var(--nav-h) + 96px);
  padding-bottom: 24px;
}
/* Krótki nagłówek strony — duża skala */
.hero-headline {
  font-size: clamp(2.4rem, 5vw, 5.6rem);
  font-weight: 300; line-height: 1.18; letter-spacing: -.025em;
  color: var(--fg); margin-bottom: 10px;
}
/* Długi nagłówek zdaniowy — mniejsza skala, jak h1 obecnej strony */
.hero-headline.long { font-size: clamp(1.54rem, 3.2vw, 3.58rem); max-width: 1120px; }
/* Wyróżnienie gradientowe wewnątrz nagłówka. Domyślnie w linii, w wariancie
   .block zajmuje cały wiersz (jak na obecnej stronie). */
.hero-headline .grad {
  display: inline-block; font-weight: 200;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-headline .grad.block { display: block; }
.hero-lead {
  font-size: clamp(19px, 1.68vw, 22px);
  font-weight: 300; line-height: 1.38; color: var(--dim);
  max-width: 880px;
}
.hero-lead + .hero-lead { margin-top: 24px; }
.hero-lead strong { color: #fff; font-weight: 400; }

/* Etykieta etapu w hero */
.stage-tag {
  display: inline-block; margin-top: 28px;
  font-size: 12px; font-weight: 300; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim);
  border: 1px solid rgba(91,124,232,.4); border-radius: 4px;
  padding: 7px 14px;
}

/* ═══════════════ PRZYCISKI ═══════════════ */
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 44px; align-items: center; }
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 14px 32px;
  font-family: inherit; font-size: 18px; font-weight: 400;
  cursor: pointer; letter-spacing: -.01em; text-align: center;
  background: var(--bg); color: #fff;
  border: none; border-radius: 4px;
  position: relative;
  transition: opacity .2s, transform .2s;
}
.btn-primary::before, .btn-secondary::before {
  content: ''; position: absolute; inset: 0;
  border-radius: 4px; padding: 1.5px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.btn-secondary { color: rgba(255,255,255,.82); }
.btn-primary:hover, .btn-secondary:hover { opacity: .8; transform: translateY(-2px); }

/* ═══════════════ SEKCJE TREŚCI ═══════════════ */
.s-content { position: relative; z-index: 1; padding: 60px 0 24px; }

h2.s-h2, .s-h2 {
  font-size: clamp(1.07rem, 2.24vw, 2.51rem);
  font-weight: 300; line-height: 1.18; letter-spacing: -.025em;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 32px;
}
h3.s-h3, .s-h3 {
  font-size: clamp(19px, 1.68vw, 22px);
  font-weight: 400; line-height: 1.3; letter-spacing: -.01em;
  color: #fff; margin-bottom: 20px;
}
.s-body { font-size: clamp(19px, 1.68vw, 22px); font-weight: 300; line-height: 1.45; color: var(--dim); max-width: 880px; }
.s-body + .s-body { margin-top: 24px; }
.s-body strong { color: #fff; font-weight: 400; }
/* Wyróżnienie liczby w zwykłym akapicie samym kolorem, bez zmiany grubości
   (decyzja NSL z 19.09 dla liczb rynku CAE na podstronie Dla inwestorów).
   Zapis `.s-body .hi`, nie samo `.hi` — samo `.hi` ma specyficzność (0,1,0),
   czyli tyle co `.s-body`, i o wyniku decydowałaby kolejność w pliku. */
.s-body .hi { color: var(--fg); }
.s-note { font-size: 15px; font-weight: 300; line-height: 1.7; color: var(--label); max-width: 780px; }

/* ═══════════════ RAMKA Z LICZBAMI (rynek CAE) ═══════════════ */
.fact-box {
  position: relative; border-radius: 8px;
  padding: 36px 40px; margin: 44px 0; max-width: 880px;
  background: rgba(255,255,255,.03);
}
.fact-box::before {
  content: ''; position: absolute; inset: 0; border-radius: 8px; padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
/* Uwaga: reguła musi być zapisana jako `.fact-box p.fact-figs`, bo samo
   `.fact-figs` przegrywa specyficznością z `.fact-box p` niżej i rozmiar
   liczb nie zadziała. */
.fact-box p.fact-figs {
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  font-size: clamp(1.8rem, 3.4vw, 3rem); font-weight: 200;
  letter-spacing: -.03em; line-height: 1.1; margin-bottom: 16px;
  color: var(--fg);
}
.fact-figs .fig {
  background: linear-gradient(90deg, var(--g1), var(--g2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.fact-figs .arrow { color: var(--fg); font-size: .6em; }
.fact-figs .yr { font-size: .38em; color: var(--dim); font-weight: 300; letter-spacing: 0; }
.fact-box p { font-size: clamp(19px, 1.68vw, 22px); font-weight: 300; line-height: 1.5; color: var(--dim); }
.fact-box p.fact-src { font-size: 12px; }
.fact-src { margin-top: 18px; font-size: 12px; font-weight: 300; color: var(--label); line-height: 1.65; }
.fact-src a { font-size: 12px; color: var(--dimmer); text-decoration: underline; word-break: break-all; }
.fact-src a:hover { color: var(--g1); }

/* ═══════════════ LISTA Z KROPKĄ GRADIENTOWĄ ═══════════════ */
.dot-list { list-style: none; display: flex; flex-direction: column; gap: 28px; margin-top: 36px; }
.dot-item { display: flex; align-items: flex-start; gap: 18px; }
.dot-bullet {
  flex-shrink: 0; margin-top: 8px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); position: relative;
}
.dot-bullet::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%; padding: 1.5px;
  background: linear-gradient(135deg, #28BEDC 0%, #5B7CE8 55%, #9B80E8 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.dot-num {
  flex-shrink: 0; margin-top: 2px; min-width: 32px;
  font-size: 28px; font-weight: 500; line-height: 1.25;
  background: linear-gradient(135deg, #28BEDC 0%, #5B7CE8 55%, #9B80E8 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.dot-body { max-width: 880px; }
.dot-body h4 {
  font-size: 20px; font-weight: 500; color: #fff;
  letter-spacing: -.01em; margin-bottom: 8px; line-height: 1.3;
}
.dot-body p { font-size: clamp(19px, 1.68vw, 22px); font-weight: 300; color: var(--dim); line-height: 1.40; }
.dot-list.tight { gap: 18px; }
.dot-list.tight .dot-body h4 {
  font-size: clamp(19px, 1.68vw, 22px); font-weight: 300; color: var(--fg); margin-bottom: 0;
}

/* ═══════════════ KAFLE ═══════════════ */
.tiles {
  display: grid; gap: 24px; margin-top: 40px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.tile {
  border: 1px solid var(--div); border-radius: 8px;
  padding: 28px 26px; background: rgba(255,255,255,.02);
  transition: border-color .25s, background .25s;
}
.tile:hover { border-color: rgba(91,124,232,.5); background: rgba(255,255,255,.04); }
.tile h4 {
  font-size: 19px; font-weight: 500; letter-spacing: -.01em;
  line-height: 1.3; margin-bottom: 12px;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.tile p { font-size: 15px; font-weight: 300; line-height: 1.65; color: var(--dim); }

/* Kafle z liczbami */
.stat-tiles {
  display: grid; gap: 20px; margin-top: 40px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.stat-tile {
  border-top: 1px solid var(--div); padding-top: 22px;
}
/* Rozmiar liczb zmniejszony do 80% na polecenie NSL z 19.09:
   3,6rem → 2,88rem, wariant .small 2,6rem → 2,08rem. */
.stat-tile .num {
  display: block;
  font-size: clamp(1.92rem, 3.2vw, 2.88rem); font-weight: 200;
  letter-spacing: -.04em; line-height: 1; margin-bottom: 12px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-tile .num.small { font-size: clamp(1.44rem, 2.24vw, 2.08rem); }
.stat-tile .cap { font-size: 15px; font-weight: 300; line-height: 1.6; color: var(--dim); }

/* ═══════════════ SIATKA ZESPOŁU ═══════════════ */
.person { margin-bottom: 48px; max-width: 880px; }
.person .name {
  font-size: clamp(1.1rem, 1.8vw, 2rem); font-weight: 300;
  letter-spacing: -.025em; line-height: 1.2; margin-bottom: 6px;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
/* Rola i bio w tej samej skali co `.s-body` i `.hero-lead` — tak jak na
   obecnej stronie, gdzie bio jedzie na `.hero-lead`. Wcześniej były o stopień
   mniejsze i odstawały od reszty serwisu. */
.person .role {
  font-size: clamp(19px, 1.68vw, 22px); font-weight: 500; color: #fff;
  letter-spacing: -.01em; line-height: 1.3; margin-bottom: 12px;
}
.person .bio { font-size: clamp(19px, 1.68vw, 22px); font-weight: 300; line-height: 1.45; color: var(--dim); }

/* ═══════════════ ZAPROSZENIE / CTA BLOKI ═══════════════ */
.invite { display: flex; flex-direction: column; gap: 44px; margin-top: 40px; }
.invite-item { border-top: 1px solid var(--div); padding-top: 28px; max-width: 880px; }
.invite-item p { font-size: clamp(19px, 1.68vw, 22px); font-weight: 300; line-height: 1.42; color: var(--dim); margin-bottom: 22px; }

/* ═══════════════ MEDIA ═══════════════ */
.media { margin: 40px 0; border-radius: 4px; overflow: hidden; background: #000; }
.media img { display: block; width: 100%; height: auto; }
.media video { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #000; }
/* Osadzony film (Vimeo) — proporcja trzymana tak samo jak przy <video>, bez skryptu. */
.media iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
.media-cap { margin-top: 12px; font-size: 13px; font-weight: 300; color: var(--label); }
.award { display: flex; align-items: flex-start; gap: 48px; margin-top: 40px; flex-wrap: wrap; }
.award-btn {
  flex-shrink: 0; padding: 0; border: none; background: none;
  cursor: zoom-in; line-height: 0; border-radius: 8px;
  transition: opacity .2s;
}
.award-btn:hover { opacity: .82; }
.award-btn img { width: 200px; height: 288px; object-fit: cover; border-radius: 8px; display: block; }

/* ─── Lightbox ─── */
#lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.88);
  align-items: center; justify-content: center; cursor: zoom-out;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 94vw; max-height: 92vh; display: block; border-radius: 6px; cursor: default; }
#lightbox .lb-close {
  position: absolute; top: 20px; right: 28px; z-index: 10000;
  background: none; border: none; cursor: pointer;
  color: #fff; font-size: 36px; line-height: 1; opacity: .8;
  font-family: inherit; transition: opacity .2s;
}
#lightbox .lb-close:hover { opacity: 1; }

/* ═══════════════ FORMULARZ ═══════════════ */
.cform { margin-top: 36px; max-width: 680px; display: flex; flex-direction: column; gap: 24px; }
.cf-field { display: flex; flex-direction: column; gap: 8px; }
.cf-label { font-size: 18px; font-weight: 400; color: rgba(255,255,255,.7); letter-spacing: .01em; }
.cf-req { color: var(--g1); }
.cf-input {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; color: #fff;
  font-family: inherit; font-size: 17px; font-weight: 300;
  padding: 14px 18px; outline: none;
  transition: border-color .2s, background .2s;
  width: 100%;
}
.cf-input::placeholder { color: rgba(255,255,255,.28); }
.cf-input:focus { border-color: var(--g1); background: rgba(255,255,255,.07); }
.cf-input.cf-error { border-color: var(--err); }
.cf-select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,.4)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px;
}
.cf-select option { background: #0e1117; color: #fff; }
.cf-textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.cf-clause { margin-top: 12px; font-size: 13px; font-weight: 300; color: rgba(255,255,255,.45); line-height: 1.6; max-width: 680px; }
.cf-clause a { color: rgba(255,255,255,.6); text-decoration: underline; }
.cf-clause a:hover { color: var(--g1); }
.cf-status { margin-top: 16px; font-size: 18px; font-weight: 300; line-height: 1.5; display: none; }
.cf-hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.addr { margin-top: 40px; font-size: 17px; font-weight: 300; line-height: 1.8; color: var(--dim); }
.addr a { text-decoration: underline; }
.addr a:hover { color: var(--g1); }

/* ═══════════════ STOPKA ═══════════════ */
footer { position: relative; z-index: 1; border-top: 1px solid var(--div); padding: 36px 0; margin-top: 40px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.f-copy { font-size: 15px; font-weight: 300; color: var(--label); line-height: 1.7; }
.f-links { display: flex; gap: 24px; }
.f-links a { font-size: 15px; font-weight: 300; color: var(--label); transition: color .2s; }
.f-links a:hover { color: var(--fg); }

/* ═══════════════ ANIMACJE WEJŚCIA ═══════════════ */
.fade { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.fade.in { opacity: 1; transform: none; }
.fd1 { transition-delay: .08s; }
.fd2 { transition-delay: .18s; }
.fd3 { transition-delay: .28s; }
.fd4 { transition-delay: .38s; }

/* Animacja pasków rozdzielających zostaje także przy ograniczonym ruchu —
   tak jak na obecnej stronie. Wyłączamy tylko przewijanie i wjazd sekcji. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade { opacity: 1; transform: none; transition: none; }
}

/* ═══════════════ RESPONSYWNOŚĆ ═══════════════ */
@media (max-width: 1024px) {
  .wrap { padding: 0 36px; }
  .mob-menu { padding: 16px 36px 28px; }
}
@media (max-width: 768px) {
  .wrap { padding: 0 24px; }
  .nav-links { display: none; }
  .burger { display: flex; }
  .mob-menu { padding: 16px 24px 24px; }

  .s-hero { padding-top: calc(var(--nav-h) + 56px); padding-bottom: 40px; }
  .hero-headline { font-size: clamp(2.2rem, 9vw, 3.4rem); }
  .hero-headline.long { font-size: clamp(1.5rem, 6.2vw, 2.2rem); }
  .hero-lead { max-width: 100%; }

  .sec-div { padding-top: 40px; }
  .s-content { padding: 48px 0 20px; }

  .fact-box { padding: 28px 24px; }
  .tiles { grid-template-columns: 1fr; }
  .stat-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 20px; }
  .mob-menu { padding: 16px 20px 24px; }
  .stat-tiles { grid-template-columns: 1fr; }
  .award-btn img { width: 150px; height: 216px; }
}
