:root{
  --bg: #FFFFFF;
  --text: #1E293B;
  --muted: rgba(30,41,59,.78);
  --border: rgba(15,23,42,.12);

  --primary: #1640FF;
  --accent: #E61A4E;

  --shadow: 0 1.125rem 3.125rem rgba(2, 6, 23, .14);
  --shadow-soft: 0 0.625rem 1.5rem rgba(2, 6, 23, .10);

  --h: 3.25rem;          /* wysokość topbara */
  --container: 67.5rem;  /* 1080px */
  --pad: 1rem;           /* 16px */
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

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

/* =========================
   SKIP LINK (WCAG)
========================= */
.skip-link{
  position: absolute;
  left: 0.75rem;
  top: 0.625rem;
  z-index: 999;
  padding: 0.625rem 0.75rem;
  border-radius: 62.5rem;
  background: #fff;
  border: 0.0625rem solid var(--border);
  box-shadow: var(--shadow-soft);
  transform: translateY(-140%);
  transition: transform 140ms ease;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8125rem;
}
.skip-link:focus{ transform: translateY(0); }

/* =========================
   TOPBAR
========================= */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(1.125rem);

  /* USUWAMY SZARĄ KRESKĘ */
  border-bottom: 0;
}

.topbar__inner{
  height: var(--h);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
}

/* =========================
   BRAND / LOGO
========================= */
.brand{
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border-radius: 0.75rem;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}

.brand img{
  display: block;
  width: 5.5rem !important;  /* ustawione przez Ciebie */
  height: auto !important; /* dla pewności proporcji */
  max-width: none;
  max-height: none;
}

.brand img:hover{
  display: block;
  width: 7.5rem !important;  /* ustawione przez Ciebie */
  height: auto !important; /* dla pewności proporcji */
  max-width: none;
  max-height: none;

  transition: width 180ms ease-in, height 180ms ease-in;
  transition: width 180ms ease-out, height 180ms ease-out;
}

.brand:focus-visible{
  outline: 0.1875rem solid rgba(22,64,255,.30);
  outline-offset: 0.125rem;
}

/* =========================
   DESKTOP NAV LAYOUT
========================= */
.nav{
  display: flex;
  align-items: center;
  gap: 1.125rem;
}

.nav--desktop{
  flex: 1 1 auto;
  min-width: 0;
  justify-content: space-between;
}

.nav--mobile{
  display: none;
}

.nav__links{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex: 1 1 auto;
  min-width: 0;
}

.nav__actions{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}

/* =========================
   LINKI + BUTTON "Szkoły"
   1:1 identyczny wygląd
========================= */
.nav__link{
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;

  height: var(--h);
  display: inline-flex;
  align-items: center;

  padding: 0 0.375rem;
  border-radius: 0.625rem;

  font-size: 0.875rem;
  line-height: 1;
  color: rgba(30,41,59,.86);
  text-decoration: none;

  font-weight: 450;
  font-family: inherit;

  transition: font-weight 180ms ease, color 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

/* button musi mieć jawnie to samo (nie "inherit") */
.nav__link--button{
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;

  height: var(--h);
  display: inline-flex;
  align-items: center;

  padding: 0 0.375rem;
  border-radius: 0.625rem;

  font: inherit;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1;
  color: rgba(30,41,59,.86);
  font-weight: 450;

  cursor: pointer;
  transition: font-weight 180ms ease, color 180ms ease;
}

/* hover: tylko bold (bez tła) */
.nav__link:hover,
.nav__link--button:hover{
  color: var(--text);
  font-weight: 650;
}

.nav__link:focus-visible,
.nav__link--button:focus-visible{
  outline: 0.1875rem solid rgba(22,64,255,.28);
  outline-offset: 0.125rem;
  color: var(--text);
}

.nav__dropdown{
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav__dropdown.is-open > .nav__link,
.nav__dropdown.is-open > .nav__link--button,
.nav__dropdown:focus-within > .nav__link,
.nav__dropdown:focus-within > .nav__link--button{
  color: var(--text);
  font-weight: 650;
}

/* =========================
   MEGA MENU (desktop)
========================= */
.mega{
  position: fixed;
  left: 0;
  right: 0;
  top: var(--h);

  opacity: 0;
  transform: translateY(-0.375rem) scale(0.992);
  pointer-events: none;

  transition: opacity 160ms ease, transform 160ms ease;
}

.nav__dropdown.is-open .mega,
.nav__dropdown:focus-within .mega{
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

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

.mega__inner{
  margin-top: 0.75rem;
  background: rgba(255,255,255,.965);
  backdrop-filter: saturate(195%) blur(2rem);
  border: 0.0625rem solid var(--border);
  border-radius: 1.125rem;
  box-shadow: var(--shadow);
  padding: 1.25rem;

  display: grid;
  grid-template-columns: 1fr 2.2fr 1.1fr;
  gap: 1.375rem;
}

/* tytuły bez wcięć */
.mega__title{
  margin: 0 0 0.625rem;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 650;
  color: rgba(30,41,59,.58);
}

/* headline może mieć underline, ale z płynną animacją */
.mega__headline{
  display: inline-block;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1.12;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;

  /* underline jako background -> płynne przejście */
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 0.125rem;
  transition: background-size 180ms ease;
}
.mega__headline:hover{
  background-size: 100% 0.125rem;
}
.mega__headline:focus-visible{
  outline: 0.1875rem solid rgba(22,64,255,.28);
  outline-offset: 0.1875rem;
  border-radius: 0.625rem;
}

/* lista szkół */
.schools{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}

.schools__col,
.mega__list{
  margin: 0;
  padding: 0;
  list-style: none;
}

/* linki w mega menu: bez wcięć, wyrównane z tytułem */
.schools__col a,
.mega__list a{
  display: block;
  padding: 0.375rem 0;
  margin: 0.125rem 0;

  font-size: 0.875rem;
  line-height: 1.2;
  color: rgba(30,41,59,.86);
  text-decoration: none;

  font-weight: 450;
  transition: color 150ms ease, font-weight 180ms ease;
}

.schools__col a:hover,
.mega__list a:hover{
  color: var(--text);
  font-weight: 650;
}

.schools__col a:focus-visible,
.mega__list a:focus-visible{
  outline: 0.1875rem solid rgba(22,64,255,.28);
  outline-offset: 0.125rem;
  border-radius: 0.5rem;
}

/* =========================
   MOBILE MENU (Apple-like)
========================= */
.mobile[hidden]{ display:none; }
.mobile{
  position: fixed;
  inset: 0;
  z-index: 100;
}

.mobile__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,.28);
}

.mobile__panel{
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.965);
  backdrop-filter: saturate(195%) blur(2rem);
  transform: translateY(-0.625rem);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile.is-open .mobile__panel{
  transform: translateY(0);
  opacity: 1;
}

.mobile__top{
  height: 3.5rem;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.mobile__spacer{
  width: 2.25rem;
  height: 2.25rem;
}

.mobile__nav{
  padding: 1rem var(--pad) 1.75rem;
  display: grid;
  gap: 0.375rem;
}

/* duże linki jak Apple */
.mobile__item{
  display: block;
  text-decoration: none;
  color: var(--text);
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: -0.02em;
  padding: 0.25rem 0;
}

.mobile__item:focus-visible{
  outline: 0.1875rem solid rgba(22,64,255,.28);
  outline-offset: 0.25rem;
  border-radius: 0.5rem;
}

/* =========================
   REKRUTACJA (desktop)
   - taka sama wielkość i grubość jak Kontakt/Szkoły
   - niebieska, podkreślona, ikona PO PRAWEJ tuż obok (jak spacja)
   - hover: jeszcze grubsza
========================= */
.nav__rekrutacja{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;           /* prawie jak spacja */
  height: var(--h);
  padding: 0 0.375rem;    /* 1:1 jak linki */

  font-family: inherit;
  font-size: 0.875rem;    /* 1:1 jak .nav__link */
  line-height: 1;

  color: var(--primary);
  font-weight: 450;       /* 1:1 jak .nav__link */

  text-decoration-line: underline;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 0.125rem;
  text-underline-offset: 0.2em;

  transition: font-weight 180ms ease, color 180ms ease, text-decoration-thickness 180ms ease;
}

.nav__rekrutacja:hover{
  font-weight: 650;       /* 1:1 jak hover linków */
}

.nav__rekrutacja:focus-visible{
  outline: 0.1875rem solid rgba(22,64,255,.28);
  outline-offset: 0.125rem;
  border-radius: 0.5rem;
}

/* ikona: wysokość ~ "tekst + underline" i bez podkreślenia */
.nav__rekrutacjaIcon{
  width: 1.1rem;
  height: 1.1rem;
  display: block;
  flex: 0 0 auto;
}

/* =========================
   REKRUTACJA (mobile)
   - ma wyglądać jak reszta (Kontakt/Szkoły)
   - niebieska, bez podkreślenia
   - ikona obok tekstu (jak spacja)
========================= */
.mobile__rekrutacja{
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;            /* jak spacja */
  justify-content: flex-start;

  text-decoration: none;
  color: var(--primary);

  font-size: 2rem;         /* 1:1 jak .mobile__item */
  line-height: 1.1;
  font-weight: 650;        /* 1:1 jak .mobile__item */
  letter-spacing: -0.02em;

  padding: 0.25rem 0;      /* 1:1 jak .mobile__item */
}

.mobile__rekrutacja:hover{
  font-weight: 700;
}

.mobile__rekrutacja:focus-visible{
  outline: 0.1875rem solid rgba(22,64,255,.28);
  outline-offset: 0.25rem;
  border-radius: 0.5rem;
}

.mobile__rekrutacjaIcon{
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  flex: 0 0 auto;
}

/* =========================
   ICON BUTTONS
========================= */
.iconbtn{
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 62.5rem;
  border: 0.0625rem solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.70);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.iconbtn:focus-visible{
  outline: 0.1875rem solid rgba(22,64,255,.28);
  outline-offset: 0.125rem;
}

.iconbtn__bars{
  width: 1rem;
  height: 0.625rem;
  position: relative;
}

.iconbtn__bars::before,
.iconbtn__bars::after{
  content:"";
  position:absolute;
  left:0; right:0;
  height: 0.125rem;
  border-radius: 0.125rem;
  background: rgba(30,41,59,.85);
}

.iconbtn__bars::before{ top: 0; }
.iconbtn__bars::after{ bottom: 0; }

.iconbtn__x{
  width: 0.875rem;
  height: 0.875rem;
  position: relative;
}

.iconbtn__x::before,
.iconbtn__x::after{
  content:"";
  position:absolute;
  inset: 0;
  margin: auto;
  width: 0.875rem;
  height: 0.125rem;
  border-radius: 0.125rem;
  background: rgba(30,41,59,.85);
}

.iconbtn__x::before{ transform: rotate(45deg); }
.iconbtn__x::after{ transform: rotate(-45deg); }

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 53.75rem){
  .nav--desktop{ display:none; }
  .nav--mobile{ display:flex; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; scroll-behavior: auto !important; }
}

/* HERO RPM (wrzuć do ./css/base.css albo ./css/hero.css) */

.heroRpm{
  padding: 3.5rem 0 2.5rem;
  background: #fff;
}

.heroRpm__inner{
  max-width: var(--container, 67.5rem);
  margin: 0 auto;
  padding: 0 var(--pad, 1rem);
  text-align: center;
}

/* Kicker */
.heroRpm__kicker{
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: rgba(30,41,59,.78);
  text-transform: lowercase;
}

/* Title */
.heroRpm__title{
  margin: 0;
  line-height: 1;
  font-size: clamp(3.25rem, 8.5vw, 5.75rem);
  color: var(--text, #1E293B);
  text-transform: lowercase;
}

.heroRpm__titleA{
  font-family: "Geologica", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 500;
}

/* CTA */
.heroRpm__cta{
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.heroBtn{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;

  height: 2.75rem;
  padding: 0 1rem;

  border-radius: 0.75rem;
  text-decoration: none;

  font-family: "Geologica", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 600;
  text-transform: lowercase;

  transition: transform 140ms ease, filter 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.heroBtn:hover{ filter: brightness(0.98); transform: translateY(-0.0625rem); }
.heroBtn:active{ transform: translateY(0.0625rem); }

.heroBtn:focus-visible{
  outline: 0.1875rem solid rgba(22,64,255,.28);
  outline-offset: 0.125rem;
}

.heroBtn--green{ background: #00C853; color: #fff; }
.heroBtn--magenta{ background: #E61A4E; color: #fff; }
.heroBtn--blue{ background: #1640FF; color: #fff; }

.heroBtn__icon{
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.heroBtn__icon img{
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

/* Ilustracja */
.heroRpm__art{
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}
.heroRpm__art img{
  width: min(56rem, 100%);
  height: auto;
  display: block;
}

/* =========================
   “ŻYCIE”: delikatne pływanie
========================= */
/* Buttons: lewo↔prawo (różne fazy) */
.heroBtn--float1{ will-change: transform; animation: ctaFloatX 4.8s ease-in-out infinite; }
.heroBtn--float2{ will-change: transform; animation: ctaFloatX 5.6s ease-in-out infinite; animation-delay: -0.8s; }
.heroBtn--float3{ will-change: transform; animation: ctaFloatX 5.2s ease-in-out infinite; animation-delay: -1.2s; }

@keyframes ctaFloatX{
  0%,100%{ transform: translateX(-0.22rem); }
  50%{ transform: translateX(0.22rem); }
}

/* Art: góra↕dół */
.heroRpm__art img{
  will-change: transform;
  animation: heroFloatY 6.5s ease-in-out infinite;
}

@keyframes heroFloatY{
  0%,100%{ transform: translateY(-0.28rem); }
  50%{ transform: translateY(0.28rem); }
}

/* =========================
   WJAZD (staged entry)
   Sterowany klasą .is-ready na sekcji
========================= */
.heroRpm [data-hero-item]{
  opacity: 0;
  transform: translateY(0.75rem);
  filter: blur(0.25rem);
  will-change: opacity, transform, filter;
}

.heroRpm.is-ready [data-hero-item]{
  animation: heroIn 650ms cubic-bezier(.2,.8,.2,1) forwards;
}

.heroRpm.is-ready [data-hero-item="kicker"]{ animation-delay: 60ms; }
.heroRpm.is-ready [data-hero-item="title"]{ animation-delay: 160ms; }
.heroRpm.is-ready [data-hero-item="cta"]{ animation-delay: 280ms; }
.heroRpm.is-ready [data-hero-item="art"]{ animation-delay: 420ms; }

@keyframes heroIn{
  to{
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Mobile */
@media (max-width: 53.75rem){
  .heroRpm{ padding: 2.75rem 0 2.25rem; }
  .heroRpm__kicker{ font-size: 1rem; }
  .heroBtn{ height: 2.4rem; padding: 0 0.9rem; }
}

/* WCAG: reduced motion */
@media (prefers-reduced-motion: reduce){
  .heroRpm [data-hero-item]{
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }
  .heroBtn--float1,
  .heroBtn--float2,
  .heroBtn--float3,
  .heroRpm__art img{
    animation: none !important;
  }
}

/* HERO: szerszy niż nawigacja */
.heroRpm__inner--wide{
  max-width: 78rem;         /* było 67.5rem */
}

/* stage: kontrola pionowych odległości */
.heroRpm__stage{
  display: grid;
  justify-items: center;
  text-align: center;
}

/* Kicker większy jak w mocku */
.heroRpm__kicker{
  margin: 0 0 0.9rem;
  font-size: 2rem;       /* było 1.125rem */
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: rgba(30,41,59,.78);
}

/* H1 największy, szeroki i „odważny” wizualnie */
.heroRpm__title{
  margin: 0;
  line-height: 1;
  letter-spacing: -0.055em;

  /* większe i bardziej „wide” */
  font-size: clamp(7rem, 10.2vw, 10rem); /* było max 5.75rem */
  max-width: 78rem;                           /* żeby mógł być szerszy niż nav */
  padding-bottom: 1rem;
  z-index: 3;               /* nad obrazkiem */
}

/* CTA: niżej od H1 (zdrowy oddech), ale bliżej obrazka */
.heroRpm__cta{
  margin-top: 1.15rem;      /* był 1.25rem - minimalnie bliżej H1, ale dalej „zdrowo” */
  gap: 0.75rem;
}

/* Overlap CTA na obrazek jak w projekcie */
.heroRpm__cta--over{
  position: relative;
  z-index: 3;               /* nad obrazkiem */
  margin-bottom: -8.05rem;  /* powoduje lekkie nachodzenie na ilustrację */
}

/* Ilustracja bliżej CTA */
.heroRpm__art{
  margin-top: -4rem;      /* było 1.5rem -> dużo bliżej */
  position: relative;
  z-index: 1;
}

.heroRpm__art img{
  width: min(60rem, 100%);  /* trochę większa, żeby proporcje jak w mocku */
}

/* Mobile tuning */
@media (max-width: 53.75rem){
  .heroRpm__inner--wide{ max-width: 67.5rem; }
  .heroRpm__kicker{ font-size: 1.1rem; }
  .heroRpm__title{ font-size: clamp(3.8rem, 11vw, 4.6rem); }
  .heroRpm__cta--over{ margin-bottom: -0.7rem; }
  .heroRpm__art{ margin-top: 0.15rem; }
}


/* =========================
   RPM — O POROZUMIENIU (with life)
========================= */

.rpm-about2{
  padding: clamp(2.75rem, 5.5vw, 4.5rem) 0;
}

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

.rpm-about2__head{ max-width: 56rem; }

.rpm-about2__kicker{
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-kicker);
}

.rpm-about2__title{
  margin: 0 0 0.75rem;
  font-size: clamp(1.85rem, 3.25vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 750;
  color: var(--text);
  text-transform: lowercase;
}

.rpm-about2__lead{
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 450;
  color: var(--text-muted);
  text-transform: lowercase;
}

.rpm-about2__grid{
  margin-top: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.875rem;
}

/* Accent colors */
:root{
  --rpm-green: #00C853;
  --rpm-magenta: #E61A4E;
  --rpm-blue: var(--primary);
}

/* Cards */
.rpm2-card{
  border: 0.0625rem solid var(--border);
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.1rem 1.15rem;
  box-shadow: 0 0.5rem 1.25rem rgba(2, 6, 23, .06);

  display: grid;
  gap: 0.55rem;
  align-content: start;

  /* Magnet vars (set by JS) */
  --tx: 0px;
  --ty: 0px;
  --rx: 0deg;
  --ry: 0deg;

  transform: translate3d(var(--tx), var(--ty), 0) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  will-change: transform;

  transition:
    transform 140ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

/* Hover state still “premium” */
.rpm2-card:hover{
  box-shadow: 0 0.85rem 1.9rem rgba(2, 6, 23, .12);
}

.rpm2-card:focus-within{
  outline: 0.1875rem solid rgba(22,64,255,.18);
  outline-offset: 0.1875rem;
}

/* Highlight accent (desktop rotation + hover/focus overrides) */
.rpm2-card.is-highlight{
  border-color: rgba(22,64,255,.22);
}

.rpm2-card.is-highlight[data-accent="green"]{ border-color: color-mix(in srgb, var(--rpm-green) 65%, rgba(15,23,42,.18)); }
.rpm2-card.is-highlight[data-accent="magenta"]{ border-color: color-mix(in srgb, var(--rpm-magenta) 65%, rgba(15,23,42,.18)); }
.rpm2-card.is-highlight[data-accent="blue"]{ border-color: color-mix(in srgb, var(--rpm-blue) 70%, rgba(15,23,42,.18)); }

.rpm2-card__title{
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
  text-transform: lowercase;
}

.rpm2-card__text{
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.7;
  font-weight: 450;
  color: var(--text-muted);
  text-transform: lowercase;
}

/* Stats (plain, hover makes number blue) */
.rpm2-statsPlain{
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
  padding-top: 1rem;
}

.rpm2-stat{ text-align: left; }

.rpm2-stat__value{
  font-size: clamp(1.85rem, 2.8vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--text);
  transition: color 160ms ease;
}

.rpm2-stat__label{
  margin-top: 0.4rem;
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 520;
  color: var(--text-kicker);
  text-transform: lowercase;
}

.rpm2-stat:hover .rpm2-stat__value,
.rpm2-stat:focus-within .rpm2-stat__value{
  color: var(--primary);
}

/* Responsive */
@media (max-width: 62rem){
  .rpm-about2__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rpm2-statsPlain{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 53.75rem){
  .rpm-about2__head{
    text-align: center;
    margin-inline: auto;
  }

  .rpm-about2__grid{ grid-template-columns: 1fr; }

  .rpm2-statsPlain{
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .rpm2-stat{ text-align: center; }

  /* Mobile: stałe akcentowe bordery 1/2/3 */
  .rpm2-card{ border-width: 0.125rem; }
  .rpm2-card:nth-child(1){ border-color: color-mix(in srgb, var(--rpm-green) 70%, rgba(15,23,42,.14)); }
  .rpm2-card:nth-child(2){ border-color: color-mix(in srgb, var(--rpm-magenta) 70%, rgba(15,23,42,.14)); }
  .rpm2-card:nth-child(3){ border-color: color-mix(in srgb, var(--rpm-blue) 75%, rgba(15,23,42,.14)); }

  /* Mobile: magnet off (JS też to respektuje, ale CSS dodatkowo) */
  .rpm2-card{
    transform: none !important;
  }
}

/* WCAG: reduced motion */
@media (prefers-reduced-motion: reduce){
  .rpm2-card{
    transition: box-shadow 180ms ease, border-color 180ms ease;
    transform: none !important;
  }
}

/* 1) usuń lowercase z tych miejsc (albo nadpisz) */
.rpm-about2__title,
.rpm-about2__lead,
.rpm2-card__title,
.rpm2-card__text,
.rpm2-stat__label{
  text-transform: none;
}

/* 2) Mobile border: cieńszy + tylko na aktywnej karcie */
@media (max-width: 53.75rem){
  /* usuń/nie używaj już:
     .rpm2-card:nth-child(1/2/3){ border-color: ... } */

  .rpm2-card{
    border-width: 0.0625rem;      /* było 0.125rem -> za grubo */
    border-color: var(--border);  /* domyślnie neutral */
  }

  .rpm2-card.is-highlight{
    border-width: 0.09375rem;     /* lekko grubszy, ale nadal subtelny */
  }

  .rpm2-card.is-highlight[data-accent="green"]{ border-color: rgba(0,200,83,.55); }
  .rpm2-card.is-highlight[data-accent="magenta"]{ border-color: rgba(230,26,78,.55); }
  .rpm2-card.is-highlight[data-accent="blue"]{ border-color: rgba(22,64,255,.55); }

  /* 3) Liczby większe na mobile */
  .rpm2-stat__value{
    font-size: 3rem;              /* było clamp -> za małe na mob */
    letter-spacing: -0.04em;
  }

  .rpm2-stat__label{
    font-size: 1.05rem;
    font-weight: 600;
  }
}

/* =========================
   RPM — CO ROBIMY (kafelki inicjatyw)
========================= */

.rpm-do{
  padding: clamp(2.75rem, 5.5vw, 4.5rem) 0;
}

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

.rpm-do__head{
  max-width: 58rem;
}

.rpm-do__kicker{
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-kicker);
}

.rpm-do__title{
  margin: 0 0 0.85rem;
  font-size: clamp(1.95rem, 3.4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 750;
  color: var(--text);
}

.rpm-do__lead{
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 450;
  color: var(--text-muted);
}

/* Grid:
   - teraz: 2 kafelki w rzędzie (szersze)
   - docelowo: 3 kafelki w rzędzie
   CSS automatycznie to ogarnie: dla >= 3 elementów przejdzie na 3 kolumny
*/
.rpm-do__grid{
  margin-top: clamp(1.25rem, 3vw, 2rem);
  display: grid;
  gap: 0.875rem;

  /* domyślnie 2 kolumny */
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Gdy będą 3 inicjatywy, na szerokim ekranie przełącz na 3 kolumny */
@media (min-width: 62rem){
  .rpm-do__grid:has(> :nth-child(3)){
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Karta */
.rpm-initiative{
  border-radius: 1.25rem;
}

.rpm-initiative__link{
  display: grid;
  grid-template-rows: auto 1fr;

  border: 0.0625rem solid var(--border);
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  text-decoration: none;

  box-shadow: 0 0.5rem 1.25rem rgba(2, 6, 23, .06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.rpm-initiative__link:hover{
  transform: translateY(-0.125rem);
  box-shadow: 0 0.85rem 1.9rem rgba(2, 6, 23, .12);
}

.rpm-initiative__link:focus-visible{
  outline: 0.1875rem solid rgba(22,64,255,.22);
  outline-offset: 0.1875rem;
}

/* Obrazek */
.rpm-initiative__media{
  aspect-ratio: 16 / 9;
  background: rgba(15,23,42,.04);
}

.rpm-initiative__media img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Body */
.rpm-initiative__body{
  padding: 1.05rem 1.1rem 1.15rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.rpm-initiative__title{
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 750;
  color: var(--text);
}

.rpm-initiative__subtitle{
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  font-weight: 600;
  color: rgba(30,41,59,.78);
}

.rpm-initiative__desc{
  margin: 0.15rem 0 0;
  font-size: 0.98rem;
  line-height: 1.7;
  font-weight: 450;
  color: var(--text-muted);
}

/* “Więcej” jak link, ale w karcie */
.rpm-initiative__more{
  margin-top: 0.4rem;
  font-size: 0.95rem;
  font-weight: 650;
  color: rgba(30,41,59,.78);
  text-decoration: underline;
  text-decoration-color: rgba(30,41,59,.45);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.1em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.rpm-initiative__link:hover .rpm-initiative__more{
  color: var(--text);
  text-decoration-color: rgba(30,41,59,.65);
}

/* Mobile: karty pod sobą */
@media (max-width: 53.75rem){
  .rpm-do__head{ text-align: left; }
  .rpm-do__grid{ grid-template-columns: 1fr; }
}

/* ============ Emote rain: local (w kafelku) + global (na górze strony) ============ */

.rpm-initiative__link{
  position: relative; /* kotwica dla local layer */
}

/* LOCAL layer: tylko w obrębie kafelka */
.rpm-emotes{
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
  z-index: 3;
}

/* GLOBAL layer: na górze strony */
.rpm-emotes-global{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 42vh;              /* “na górze strony” */
  overflow: hidden;
  pointer-events: none;
  z-index: 9999;             /* ponad UI */
}

/* wspólne */
.rpm-emote{
  position: absolute;
  top: -3rem;
  left: 0;
  width: var(--s, 1.6rem);
  height: var(--s, 1.6rem);
  opacity: 0.98;
  transform: translate3d(0,0,0) rotate(var(--r, 0deg));
  will-change: transform, opacity;
  filter: drop-shadow(0 0.45rem 0.95rem rgba(2,6,23,.20));
}

/* LOCAL: mocniej w dół */
.rpm-emote--local{
  animation: rpmEmoteFallLocal var(--d, 720ms) linear forwards;
  animation-delay: var(--delay, 0ms);
}

/* GLOBAL: delikatniej, ale wyraźnie na topie */
.rpm-emote--global{
  animation: rpmEmoteFallGlobal var(--d, 820ms) linear forwards;
  animation-delay: var(--delay, 0ms);
  opacity: 0.92;
}

/* keyframes: local leci głębiej (bardziej widoczne) */
@keyframes rpmEmoteFallLocal{
  0%   { transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate3d(0, 220%, 0) rotate(calc(var(--r, 0deg) + 360deg)); opacity: 0; }
}

/* keyframes: global leci w dół topowego obszaru */
@keyframes rpmEmoteFallGlobal{
  0%   { transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate3d(0, 55vh, 0) rotate(calc(var(--r, 0deg) + 300deg)); opacity: 0; }
}

/* WCAG */
@media (prefers-reduced-motion: reduce){
  .rpm-emotes,
  .rpm-emotes-global{ display: none; }
}


/* ===== Clamp: max 3 linie + równa wysokość kart ===== */

/* Upewniamy się, że body karty ma stały układ i “Więcej” trzyma się dołu */
.rpm-initiative__body{
  display: grid;
  grid-template-rows: auto auto 1fr auto; /* title, subtitle, desc (rozciąga), more */
  gap: 0.55rem;
  align-content: start;
}

/* Opis: zwykły szary, nie niebieski */
.rpm-initiative__desc{
  margin: 0.15rem 0 0;
  font-size: 0.98rem;
  line-height: 1.7;
  font-weight: 450;
  color: var(--text-muted);
}

/* Clamp do 3 linijek */
.rpm-clamp-3{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Jeśli przeglądarka nie wspiera line-clamp, to fallback: max-height */
@supports not (-webkit-line-clamp: 3){
  .rpm-clamp-3{
    max-height: calc(1.7em * 3);
    overflow: hidden;
  }
}

/* “Więcej” domyślnie szare, na hover całej karty robi się niebieskie */
.rpm-initiative__more{
  margin-top: 0.35rem;
  font-size: 0.95rem;
  font-weight: 650;
  color: rgba(30,41,59,.72);
  text-decoration: underline;
  text-decoration-color: rgba(30,41,59,.35);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.1em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.rpm-initiative__link:hover .rpm-initiative__more{
  color: var(--primary);
  text-decoration-color: rgba(22,64,255,.55);
}

/* Focus też (WCAG) */
.rpm-initiative__link:focus-visible .rpm-initiative__more{
  color: var(--primary);
  text-decoration-color: rgba(22,64,255,.55);
}

/* ===== Clamp: max 3 linie + równa wysokość kart ===== */

/* Upewniamy się, że body karty ma stały układ i “Więcej” trzyma się dołu */
.rpm-initiative__body{
  display: grid;
  grid-template-rows: auto auto 1fr auto; /* title, subtitle, desc (rozciąga), more */
  gap: 0.55rem;
  align-content: start;
}

/* Opis: zwykły szary, nie niebieski */
.rpm-initiative__desc{
  margin: 0.15rem 0 0;
  font-size: 0.98rem;
  line-height: 1.7;
  font-weight: 450;
  color: rgba(30,41,59,.78);
}

/* Clamp do 3 linijek */
.rpm-clamp-3{
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Jeśli przeglądarka nie wspiera line-clamp, to fallback: max-height */
@supports not (-webkit-line-clamp: 3){
  .rpm-clamp-3{
    max-height: calc(1.7em * 3);
    overflow: hidden;
  }
}

/* “Więcej” domyślnie szare, na hover całej karty robi się niebieskie */
.rpm-initiative__more{
  margin-top: 0.35rem;
  font-size: 0.95rem;
  font-weight: 650;
  color: rgba(30,41,59,.72);
  text-decoration: underline;
  text-decoration-color: rgba(30,41,59,.35);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.1em;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.rpm-initiative__link:hover .rpm-initiative__more{
  color: var(--primary);
  text-decoration-color: rgba(22,64,255,.55);
}

/* Focus też (WCAG) */
.rpm-initiative__link:focus-visible .rpm-initiative__more{
  color: var(--primary);
  text-decoration-color: rgba(22,64,255,.55);
}



html, body{
  overflow-x: hidden;
  max-width: 100%;
}

@media (max-width: 53.75rem){
  html, body{
    overflow-x: hidden;
    max-width: 100%;
  }

  /* iOS Safari: ogranicza “gumowe” przeciąganie w poziomie */
  body{
    overscroll-behavior-x: none;
    position: relative;
  }
}
