/* EscapeVerse – wybór poziomu / kursu (Angielski, Informatyka): kwadratowe kafelki „liquid glass”.
   Kolor kafelka: --c (poświata, ikona), --t (tekst akcentu, kontrast na jasnym szkle).
   Lekkie: bez backdrop-filter i filter: blur (miękkość z gradientów), animacje tylko transform/opacity, bez var() w klatkach; ruch wyłączony przy prefers-reduced-motion. */
.lg-stage { position: relative; isolation: isolate; }
.lg-orbs { position: absolute; inset: -6% -4%; z-index: -1; pointer-events: none; }
.lg-orbs span { position: absolute; width: 50%; aspect-ratio: 1; border-radius: 50%; opacity: .5; }
.lg-orbs span:nth-child(1) { left: 0; top: 4%; background: radial-gradient(closest-side, var(--o1), transparent); animation: lg-orb1 16s ease-in-out infinite alternate; }
.lg-orbs span:nth-child(2) { left: 28%; top: 30%; background: radial-gradient(closest-side, var(--o2), transparent); animation: lg-orb2 19s ease-in-out infinite alternate; }
.lg-orbs span:nth-child(3) { right: 0; top: 0; background: radial-gradient(closest-side, var(--o3), transparent); animation: lg-orb3 22s ease-in-out infinite alternate; }
body:not(.light) .lg-orbs span { opacity: .3; }
@keyframes lg-orb1 { to { transform: translate(18%, 22%) scale(1.15); } }
@keyframes lg-orb2 { to { transform: translate(-16%, -18%) scale(.9); } }
@keyframes lg-orb3 { to { transform: translate(-20%, 26%) scale(1.1); } }

.lg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.lg-grid--bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.lg-tile { --ink: #0F1628; --sub: #4A5468; position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: .8rem;
  aspect-ratio: 1; min-width: 0; padding: 1.5rem; border-radius: 30px; color: var(--ink); text-decoration: none;
  background: linear-gradient(150deg, rgba(255,255,255,.86) 0%, rgba(255,255,255,.5) 100%);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -10px 24px -18px color-mix(in srgb, var(--c) 45%, transparent),
    0 24px 50px -28px color-mix(in srgb, var(--c) 60%, transparent), 0 2px 8px rgba(15,22,40,.05);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition: transform .55s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease;
  animation: lg-in .8s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--i, 0) * 90ms + 60ms);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; container-type: inline-size; }
body:not(.light) .lg-tile { --ink: #F0F4FF; --sub: #A6B0C3;
  background: linear-gradient(150deg, rgba(30,38,60,.82) 0%, rgba(14,19,34,.72) 100%); border-color: rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -10px 24px -18px color-mix(in srgb, var(--c) 60%, transparent), 0 24px 50px -28px rgba(0,0,0,.7); }
@keyframes lg-in { from { opacity: 0; translate: 0 26px; scale: .95; } }

/* szklana krawędź: jaśniejsza u góry z lewej, kolorowa u dołu z prawej */
.lg-tile::after { content: ''; position: absolute; inset: 0; z-index: 3; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,0) 38%, rgba(255,255,255,0) 62%, color-mix(in srgb, var(--c) 70%, #fff));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
body:not(.light) .lg-tile::after { background: linear-gradient(135deg, rgba(255,255,255,.4), rgba(255,255,255,0) 38%, rgba(255,255,255,0) 62%, color-mix(in srgb, var(--c) 80%, transparent)); }
/* odblask światła – idzie za kursorem (ev-picker.js ustawia --mx/--my) */
.lg-tile::before { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; opacity: .55; transition: opacity .4s ease;
  background: radial-gradient(circle at var(--mx, 22%) var(--my, 0%), rgba(255,255,255,.75), rgba(255,255,255,0) 46%); }
body:not(.light) .lg-tile::before { background: radial-gradient(circle at var(--mx, 22%) var(--my, 0%), rgba(255,255,255,.18), rgba(255,255,255,0) 46%); }

/* kolorowa „ciecz” pod szkłem */
.lg-glow { position: absolute; z-index: -1; right: -22%; bottom: -26%; width: 78%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--c) 0%, color-mix(in srgb, var(--c) 40%, transparent) 45%, transparent 70%); opacity: .5;
  animation: lg-drift 9s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -2.3s); }
.lg-glow + .lg-glow { right: auto; bottom: auto; left: -30%; top: -34%; width: 64%; opacity: .22; animation-duration: 12s; }
body:not(.light) .lg-glow { opacity: .42; }
@keyframes lg-drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-14%, -10%) scale(1.12); } 100% { transform: translate(-4%, -22%) scale(.94); } }
/* przebłysk szkła przy najechaniu */
.lg-sheen { position: absolute; inset: -20% auto -20% 0; z-index: 2; width: 45%; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-120%) skewX(-18deg); }

.lg-top, .lg-foot { position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.lg-mid { position: relative; z-index: 4; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.lg-ico { display: grid; place-items: center; width: 54px; height: 54px; flex: none; border-radius: 18px; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 78%, #fff), var(--c));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -3px 8px color-mix(in srgb, var(--c) 60%, #000 10%), 0 10px 22px -10px var(--c); }
.lg-ico svg { width: 26px; height: 26px; animation: lg-float 6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.4s); }
@keyframes lg-float { 0%, 100% { transform: translateY(1px) rotate(0deg); } 50% { transform: translateY(-2px) rotate(-6deg); } }
.lg-chip { padding: .32rem .72rem; border-radius: 999px; font: 700 .72rem/1 'Inter', sans-serif; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  color: var(--t); background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.85); box-shadow: 0 2px 8px -4px rgba(15,22,40,.2); }
body:not(.light) .lg-chip { color: color-mix(in srgb, var(--c) 55%, #fff); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); box-shadow: none; }

.lg-big { margin: 0; font: 700 min(5.2rem, 27cqi)/.92 'Space Grotesk', sans-serif; letter-spacing: -.04em; white-space: nowrap;
  background: linear-gradient(135deg, var(--t) 10%, color-mix(in srgb, var(--t) 55%, var(--c)) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
body:not(.light) .lg-big { background-image: linear-gradient(135deg, #fff 0%, color-mix(in srgb, var(--c) 60%, #fff) 100%); }
.lg-big--word { font-size: min(3rem, 17cqi); }
.lg-big--long { font-size: min(3rem, 12.5cqi); }
.lg-sub { font: 600 1rem/1.35 'Inter', sans-serif; color: var(--sub); }
.lg-pills { display: flex; flex-wrap: wrap; gap: .4rem; min-width: 0; }
.lg-pills span { padding: .3rem .62rem; border-radius: 999px; font: 600 .78rem/1.1 'Inter', sans-serif; color: var(--ink);
  background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); }
body:not(.light) .lg-pills span { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); }
.lg-go { display: grid; place-items: center; width: 44px; height: 44px; flex: none; margin-left: auto; border-radius: 50%; color: var(--t);
  background: rgba(255,255,255,.65); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 6px 16px -8px rgba(15,22,40,.3);
  transition: transform .45s cubic-bezier(.2,.8,.2,1), background .3s ease, color .3s ease; }
body:not(.light) .lg-go { color: #fff; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); box-shadow: none; }
.lg-go svg { width: 18px; height: 18px; }
.lg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* duży kafelek (Pracownia Informatyki): 2×2 + rysunek w tle */
/* Pracownia Informatyki: szeroki baner nad kursami Stron www */
.lg-tile--hero { grid-column: 1 / -1; aspect-ratio: auto; min-height: 250px; padding: 2rem; }
.lg-tile--hero .lg-ico { width: 64px; height: 64px; border-radius: 21px; }
.lg-tile--hero .lg-ico svg { width: 30px; height: 30px; }
.lg-tile--hero .lg-big--word { font-size: min(3.4rem, 9cqi); white-space: normal; }
.lg-tile--hero .lg-sub { font-size: 1.1rem; }
.lg-art { position: absolute; z-index: 1; right: 9%; bottom: -14%; width: min(24%, 230px); color: var(--c); opacity: .16; pointer-events: none; animation: lg-art 10s ease-in-out infinite alternate; }
body:not(.light) .lg-art { opacity: .2; }
@keyframes lg-art { from { transform: translateY(0) rotate(-6deg); } to { transform: translateY(-5%) rotate(3deg); } }

@media (hover: hover) and (pointer: fine) {
  .lg-tile:hover { --ty: -6px; box-shadow: inset 0 1px 0 rgba(255,255,255,.95), inset 0 -10px 24px -18px color-mix(in srgb, var(--c) 45%, transparent),
    0 34px 60px -26px color-mix(in srgb, var(--c) 75%, transparent), 0 2px 8px rgba(15,22,40,.05); }
  body:not(.light) .lg-tile:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.26), inset 0 -10px 24px -18px color-mix(in srgb, var(--c) 70%, transparent), 0 34px 60px -24px color-mix(in srgb, var(--c) 55%, transparent); }
  .lg-tile:hover::before { opacity: 1; }
  .lg-tile:hover .lg-sheen { animation: lg-sheen .9s cubic-bezier(.3,.7,.3,1); }
  .lg-tile:hover .lg-go { transform: translateX(4px) scale(1.06); color: #fff; background: var(--c); border-color: transparent; }
}
@keyframes lg-sheen { 0% { opacity: 0; transform: translateX(-120%) skewX(-18deg); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateX(260%) skewX(-18deg); } }
.lg-tile:active { --ty: 0px; transition-duration: .15s; }
.lg-tile:active .lg-go { transform: scale(.92); }
.lg-tile:focus-visible { outline: 3px solid var(--t); outline-offset: 4px; }

@media (max-width: 1000px) {
  .lg-grid--bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg-art { width: 30%; top: 14%; }
}
@media (max-width: 900px) {
  .lg-grid--en { grid-template-columns: 1fr; }
  .lg-grid--en .lg-tile { aspect-ratio: 16 / 7; }
  .lg-grid--en .lg-big { font-size: min(5.2rem, 15cqi); }
}
@media (max-width: 720px) {
  .lg-grid--en .lg-tile { aspect-ratio: auto; min-height: 220px; }
  .lg-grid--en .lg-big { font-size: min(5.2rem, 22cqi); }
  .lg-grid { gap: 1rem; }
  .lg-tile { padding: 1.25rem; border-radius: 26px; }
  .lg-tile--hero { padding: 1.5rem; }
}
@media (max-width: 520px) {
  .lg-grid--bento .lg-tile:not(.lg-tile--hero) { aspect-ratio: auto; min-height: 168px; padding: 1rem; border-radius: 22px; gap: .4rem; }
  .lg-grid--bento .lg-tile:not(.lg-tile--hero) .lg-ico { width: 42px; height: 42px; border-radius: 14px; }
  .lg-grid--bento .lg-tile:not(.lg-tile--hero) .lg-ico svg { width: 21px; height: 21px; }
  .lg-grid--bento .lg-tile:not(.lg-tile--hero) .lg-chip { display: none; }
  .lg-grid--bento .lg-tile:not(.lg-tile--hero) .lg-sub { font-size: .8rem; }
  .lg-grid--bento .lg-tile:not(.lg-tile--hero) .lg-go { width: 34px; height: 34px; }
  .lg-tile--hero { min-height: 250px; }
}
@media (prefers-reduced-motion: reduce) {
  .lg-tile, .lg-orbs span, .lg-glow, .lg-ico svg, .lg-art { animation: none !important; }
  .lg-tile { transition: box-shadow .3s ease; transform: none !important; }
  .lg-tile:hover .lg-sheen { animation: none; }
}

/* nagłówek kolejnej grupy kafelków (np. Informatyka → „Więcej z informatyki”) */
.lg-heading { margin: 2.6rem 0 1rem; font: 700 clamp(1.25rem, 2.4vw, 1.6rem) 'Space Grotesk', sans-serif; color: var(--text); text-align: left; }
.lg-heading::after { content: ''; display: block; width: 56px; height: 3px; margin-top: .45rem; border-radius: 3px; background: linear-gradient(90deg, var(--blue), var(--purple)); }
/* długa nazwa, która może przejść do drugiej linii (np. „Cyberbezpieczeństwo”) */
.lg-big--wrap { white-space: normal; font-size: min(2.6rem, 13cqi); line-height: 1; hyphens: manual; }

/* Informatyka → „Więcej z informatyki”: baner Druk 3D na całą szerokość, pod nim 2 kafelki (AI, Cyberbezpieczeństwo) po pół szerokości – bez pustego miejsca w rzędzie */
.lg-grid--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg-grid--pair .lg-tile:not(.lg-tile--hero) { aspect-ratio: auto; min-height: 230px; }
