/* ===== Liquid Glass (styl iOS 26) ===== */
:root {
  color-scheme: light;
  --bg1: #dfe9ff; --bg2: #f5e6ff; --bg3: #ffe7d6;
  --text: #14161f; --muted: #5b6070;
  --glass: rgba(255, 255, 255, .42);
  --glass-strong: rgba(255, 255, 255, .62);
  --edge: rgba(255, 255, 255, .85);
  --edge-dim: rgba(255, 255, 255, .25);
  --shadow: 0 18px 50px rgba(40, 50, 110, .18);
  --accent: #0a84ff;
  --blob1: #3aa0ff; --blob2: #ff6fb5; --blob3: #8a6bff;
  --r: 32px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg1: #12123a; --bg2: #231f6b; --bg3: #0e2430;
  --blob1: #6c63e6; --blob2: #2fa3b5; --blob3: #a1647f;
  --text: #f6f7ff; --muted: #b9bde0;
  --glass: rgba(130, 120, 235, .24);
  --glass-strong: rgba(145, 135, 245, .38);
  --edge: rgba(255, 255, 255, .42);
  --edge-dim: rgba(255, 255, 255, .14);
  --shadow: 0 18px 50px rgba(5, 5, 30, .5);
  --accent: #4da3ff;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(135deg, var(--bg1), var(--bg2) 55%, var(--bg3));
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Tło: pływające kolorowe plamy, które szkło rozmywa */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .65; animation: float 22s ease-in-out infinite alternate; }
.bg i:nth-child(1) { width: 46vmax; height: 46vmax; background: var(--blob1); top: -12%; left: -10%; }
.bg i:nth-child(2) { width: 38vmax; height: 38vmax; background: var(--blob2); top: 25%; right: -12%; animation-delay: -7s; }
.bg i:nth-child(3) { width: 42vmax; height: 42vmax; background: var(--blob3); bottom: -18%; left: 20%; animation-delay: -13s; }
@keyframes float { to { transform: translate(6vmax, -5vmax) scale(1.15); } }

/* Szkło */
.glass {
  background: var(--glass);
  backdrop-filter: blur(26px) saturate(190%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  border-radius: var(--r);
  border: 1px solid var(--edge-dim);
  box-shadow:
    var(--shadow),
    inset 0 1.5px 0 var(--edge),
    inset 0 -1px 0 var(--edge-dim),
    inset 1.5px 0 1px -1px var(--edge),
    inset -1.5px 0 1px -1px var(--edge);
  position: relative;
}

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* Nawigacja */
.nav {
  position: sticky; top: 14px; z-index: 10;
  display: flex; align-items: center; gap: 6px;
  width: min(1120px, 100% - 40px); margin: 14px auto 0;
  padding: 8px 10px 8px 20px; border-radius: 999px;
}
.logo { font-weight: 700; letter-spacing: -.02em; font-size: 1.1rem; margin-right: auto; color: var(--text); text-decoration: none; }
.logo span { color: var(--accent); }
.nav a.link { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 14px; border-radius: 999px; transition: background .2s; }
.nav a.link:hover { background: var(--glass-strong); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; font-size: 1.1rem;
  background: var(--glass-strong); color: var(--text);
  box-shadow: inset 0 1px 0 var(--edge);
  transition: transform .2s;
}
.icon-btn:hover { transform: scale(1.08) rotate(15deg); }

/* Hero */
.hero { padding: 90px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); letter-spacing: -.04em; line-height: 1.05; font-weight: 800; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #0a84ff, #bf5af2, #ff6482);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); font-size: clamp(1.05rem, 2.4vw, 1.3rem); max-width: 560px; margin: 18px auto 0; }

/* Wyszukiwarka i filtry */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 30px 0 22px; }
.search {
  flex: 1 1 240px; display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px;
}
.search input { all: unset; flex: 1; color: var(--text); font-size: 1rem; }
.search input::placeholder { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--edge-dim);
  background: var(--glass); color: var(--text);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 var(--edge); transition: all .2s;
}
.chip:hover { background: var(--glass-strong); }
.chip.active { background: var(--accent); color: #fff; border-color: transparent; }
.chip.static { cursor: default; }
.count { color: var(--muted); font-size: .9rem; margin-left: auto; }

/* Siatka kafelków */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.tile {
  display: flex; flex-direction: column; overflow: hidden; padding: 10px;
  text-decoration: none; color: var(--text);
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.3), box-shadow .35s;
  animation: pop .6s cubic-bezier(.2, .9, .3, 1.2) backwards;
}
.tile:nth-child(2) { animation-delay: .08s; } .tile:nth-child(3) { animation-delay: .16s; }
.tile:nth-child(4) { animation-delay: .24s; } .tile:nth-child(5) { animation-delay: .32s; }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.94); } }
.tile::after { /* poświata pod kursorem */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .35), transparent 65%);
}
.tile:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px) scale(1.02); }

/* Pasek postępu, przycisk „do góry”, link „przejdź do treści” */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 10; width: 48px; height: 48px; opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .3s, transform .3s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 40; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; transition: top .2s; }
.skip:focus { top: 12px; }
.hero .greet { color: var(--muted); font-weight: 600; font-size: .95rem; max-width: none; margin: 0 0 14px; text-transform: capitalize; }
.tile:hover::after { opacity: 1; }
.tile:active { transform: scale(.98); }
.tile:focus-visible, .btn:focus-visible, .chip:focus-visible, .icon-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.art {
  position: relative; aspect-ratio: 16 / 10; border-radius: calc(var(--r) - 10px);
  overflow: hidden; display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art .icon { font-size: clamp(3.4rem, 9vw, 5rem); filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .3)); z-index: 1; transition: transform .4s; }
.tile:hover .icon { transform: scale(1.15) rotate(-6deg); }
.orb { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .22); backdrop-filter: blur(6px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
.o1 { width: 90px; height: 90px; top: -20px; right: 12%; }
.o2 { width: 54px; height: 54px; bottom: 14%; left: 10%; }

/* Zegar flip */
.art.flip { container-type: inline-size; }
.flipclock { display: flex; align-items: center; gap: 1.6cqw; z-index: 1; }
.flipclock .card {
  position: relative; display: grid; place-items: center;
  width: 10cqw; aspect-ratio: 0.72; border-radius: 1.8cqw;
  background: linear-gradient(#ffffff 50%, #eceef8 50%);
  box-shadow: 0 1.2cqw 3cqw rgba(60, 70, 140, .18), inset 0 1px 0 #fff;
  color: #14163a; font-size: 9cqw; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1;
  transition: transform .4s;
}
.flipclock .card::after { /* linia podziału kartki */
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; transform: translateY(-1px);
  background: rgba(90, 100, 150, .45);
}
.tile:hover .flipclock .card:nth-child(odd) { transform: translateY(-3px); }
.flipclock .sep { display: grid; gap: 2.4cqw; margin: 0 .4cqw; }
.flipclock .sep i { width: 1.4cqw; height: 1.4cqw; border-radius: 50%; background: #6b6f86; }

/* Okno z opisem */
.modal {
  border: 1px solid var(--edge-dim); padding: 12px; width: min(900px, 100% - 32px); max-height: calc(100dvh - 40px);
  overflow: hidden; overscroll-behavior: contain; color: var(--text); margin: auto; background: var(--glass-strong);
}
.modal::backdrop { background: rgba(20, 22, 40, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html:has(dialog[open]) { overflow: hidden; }
.modal[open] { animation: pop .4s cubic-bezier(.2, .9, .3, 1.2); }
.modal-x { position: absolute; top: 20px; right: 20px; z-index: 2; width: 36px; height: 36px; font-size: .9rem; }
#modalBody { display: flex; gap: 8px; align-items: flex-start; }
.modal-art { flex: 0 0 46%; }
.modal-art.shot { flex: 0 0 auto; padding: 8px 0 8px 8px; }
.modal-art.shot img { width: auto; max-width: 100%; max-height: min(600px, calc(100dvh - 60px)); display: block; border-radius: 22px; box-shadow: 0 12px 30px rgba(40, 50, 110, .25); }
.modal-text { flex: 1; min-width: 0; }
@media (max-width: 720px) {
  #modalBody { flex-direction: column; }
  .modal-art.shot { display: none; }
  .modal-text h2 { font-size: 1.5rem; }
  .modal-text ul { font-size: .85rem; gap: 5px; }
}
.modal-text { padding: 20px 16px 12px; display: grid; gap: 10px; }
.modal-text h2 { font-size: 1.9rem; letter-spacing: -.03em; }
.modal-text p { color: var(--muted); }
.modal-text ul { padding-left: 20px; display: grid; gap: 8px; color: var(--muted); font-size: .95rem; }
.modal-text .actions { margin-top: 10px; }

.tile-body { padding: 16px 12px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pill { align-self: flex-start; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.tile h3 { font-size: 1.4rem; letter-spacing: -.02em; }
.tile p { color: var(--muted); font-size: .95rem; }
.go { margin-top: auto; padding-top: 10px; font-weight: 600; color: var(--accent); }

.empty { text-align: center; color: var(--muted); padding: 40px; }

/* Sekcje */
section { margin-top: 90px; }
section > h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.03em; margin-bottom: 20px; }
.card { padding: 32px; }
.card p { color: var(--muted); font-size: 1.05rem; max-width: 65ch; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.contact-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600;
  padding: 13px 24px; border-radius: 999px; color: var(--text);
  background: var(--glass-strong); border: 1px solid var(--edge-dim);
  box-shadow: inset 0 1px 0 var(--edge); transition: transform .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px rgba(10, 132, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .5); }

footer { text-align: center; color: var(--muted); padding: 70px 0 40px; font-size: .9rem; }

/* Podstrona projektu */
.detail { padding: 50px 0 0; display: grid; gap: 22px; }
.detail .hero-card { padding: 12px; overflow: hidden; }
.detail .art { aspect-ratio: 21 / 9; }
.detail .art .icon { font-size: clamp(4rem, 12vw, 8rem); }
.detail h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.035em; line-height: 1.1; margin: 6px 0 14px; }
.detail ul { padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }
.detail h2 { font-size: 1.3rem; margin-bottom: 14px; }
.chips.row { display: flex; gap: 8px; flex-wrap: wrap; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.next { display: flex; justify-content: space-between; align-items: center; padding: 22px 30px; text-decoration: none; color: var(--text); transition: transform .3s; }
.next:hover { transform: translateY(-3px); }
.next small { display: block; color: var(--muted); }
.next strong { font-size: 1.3rem; }
.back { display: inline-block; margin-top: 30px; }

@media (max-width: 640px) {
  .nav a.link { display: none; }
  .hero { padding-top: 60px; }
  .card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* Fallback dla przeglądarek bez backdrop-filter */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-strong); }
}

/* ===== Dark: grafika kafelka Ticklo (cały kadr zrzutu 486x137) ===== */
.art.flip { aspect-ratio: 462 / 108; }
:root[data-theme="dark"] .art.flip { aspect-ratio: 486 / 137; }
.art .light-only, .art .dark-only { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.art .dark-only { display: none; }
:root[data-theme="dark"] .art .light-only { display: none; }
:root[data-theme="dark"] .art .dark-only { display: block; }

/* ===== Karuzela zrzutów w oknie opisu ===== */
.carousel { position: relative; height: min(600px, calc(100dvh - 76px)); aspect-ratio: 568 / 888; }
.carousel img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 22px; box-shadow: 0 12px 30px rgba(5, 5, 30, .35); animation: pop .35s ease; }
.car-btn { position: absolute; top: 50%; translate: 0 -50%; width: 38px; height: 38px; font-size: 1.3rem; line-height: 1; padding: 0 0 3px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: rgba(20, 20, 50, .45); color: #fff; }
.car-btn.prev { left: 8px; } .car-btn.next { right: 8px; }
.dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .45); transition: all .25s; }
.dots i.on { width: 22px; border-radius: 4px; background: #fff; }
.modal-art.shot img { max-height: none; }

/* ===== Dłuższa strona: sekcje pod kafelkami ===== */
.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2, .9, .3, 1); }
.js .reveal:not(.in) { opacity: 0; transform: translateY(34px); }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.sec-head p { color: var(--muted); font-size: 1.1rem; margin-top: 8px; }
.sec-head h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.stat { padding: 28px 22px; text-align: center; }
.stat b { display: block; font-size: clamp(2.6rem, 6vw, 3.6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1;
  background: linear-gradient(135deg, var(--accent), #bf5af2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-weight: 600; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.feat { padding: 28px; transition: transform .3s; }
.feat:hover { transform: translateY(-6px); }
.feat .ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.7rem; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .1)); box-shadow: inset 0 1px 0 var(--edge); }
.feat h3 { font-size: 1.25rem; letter-spacing: -.02em; margin-bottom: 6px; }
.feat p { color: var(--muted); font-size: .98rem; }
.gallery { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.gallery figure { width: min(280px, 100%); padding: 10px; transition: transform .35s; }
.gallery figure:hover { transform: translateY(-8px) rotate(-1deg); }
.gallery img { width: 100%; display: block; border-radius: 24px; }
.gallery figcaption { text-align: center; color: var(--muted); font-weight: 600; padding: 12px 0 4px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; counter-reset: s; }
.step { padding: 28px; counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-weight: 800; margin-bottom: 14px;
  background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(10, 132, 255, .45); }
.step h3 { font-size: 1.2rem; margin-bottom: 6px; }
.step p { color: var(--muted); }
.faq { display: grid; gap: 12px; max-width: 760px; margin: 0 auto; }
.faq details { padding: 4px 24px; border-radius: 24px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--accent); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 18px; }
.cta { text-align: center; padding: clamp(36px, 7vw, 70px) 24px; background: linear-gradient(135deg, rgba(10, 132, 255, .38), rgba(191, 90, 242, .32)); }
.cta h2 { margin-bottom: 10px; }
.cta p { color: var(--muted); font-size: 1.1rem; margin-bottom: 26px; }

/* ===== Projekt "wkrótce" ===== */
b.soon { font-weight: 800; color: #ffd36b; letter-spacing: .06em; }
.art.calc svg { width: 100%; height: 100%; }
.detail .first { display: grid; gap: 22px; }
.detail .first.soon-page { min-height: calc(100dvh - 130px); align-content: center; }
.detail .first.soon-page .art { aspect-ratio: 21 / 8; }
.scroll-hint { color: var(--muted); font-weight: 600; animation: nudge 1.8s ease-in-out infinite; align-self: center; }
@keyframes nudge { 50% { transform: translateY(5px); } }
#groups { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: 20px; }
#groups[hidden] { display: none; }
#groups h2 { font-size: 1.5rem; letter-spacing: -.02em; margin-bottom: 16px; }
#groups ul { gap: 12px; }

/* ===== Przełącznik "W skrócie" ===== */
.seg { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; margin-top: 22px; max-width: 100%; }
.seg button { font: inherit; font-weight: 600; cursor: pointer; border: 0; padding: 10px 22px; border-radius: 999px; background: transparent; color: var(--text); transition: all .25s; }
.seg button:hover { background: var(--glass-strong); }
.seg button.on { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(10, 132, 255, .4); }
.seg button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.panel[hidden] { display: none; }
.panel > section:first-child { margin-top: 20px; }
.calc-fig { width: min(520px, 100%) !important; }
.calc-fig .art { aspect-ratio: 16 / 10; }
@media (max-width: 520px) { .seg button { padding: 10px 14px; font-size: .9rem; } }

/* Karuzela: stały kadr, strzałki zawsze przy krawędzi zdjęcia */
.carousel img { object-fit: cover; object-position: top center; }
.car-btn:hover { transform: scale(1.1); }
.car-btn.prev { left: 8px; right: auto; } .car-btn.next { right: 8px; left: auto; }

.car-btn { display: grid; place-items: center; padding: 0; }

.car-btn.next svg { transform: translateX(3px); }

/* Okno opisu: czipy z hasłami (bez przewijania) */
.modal-art:not(.shot) .art { aspect-ratio: 16 / 10; }
@media (max-width: 720px) { .modal-art:not(.shot) { display: none; } }

/* Kalkulator: zrzuty o różnych proporcjach */
.carousel.fit { aspect-ratio: auto; width: 440px; height: min(520px, calc(100dvh - 76px)); background: rgba(8, 8, 30, .35); border-radius: 22px; }
.carousel.fit img { object-fit: contain; object-position: center; box-shadow: none; }
.shots { columns: 3 300px; column-gap: 22px; }
.shots figure { break-inside: avoid; margin: 0 0 22px; padding: 10px; transition: transform .35s; }
.shots figure:hover { transform: translateY(-6px); }
.shots img { width: 100%; display: block; border-radius: 22px; }
.shots figcaption { text-align: center; color: var(--muted); font-weight: 600; font-size: .92rem; padding: 12px 6px 4px; }

/* Przełącznik: trzy zakładki */
.seg { flex-wrap: wrap; justify-content: center; border-radius: 28px; }
