@font-face { font-family: Lato; src: url(fonts/lato-regular.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Lato; src: url(fonts/lato-bold.woff2) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ink: #1d1d1d; --white: #fff; --caramel: #a87b4f; --cream: #fff0e1;
  --ok: #66745f; --bad: #9c3d37;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--cream); color: var(--ink); font-family: Lato, system-ui, -apple-system, 'Segoe UI', sans-serif; min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
.wrap { width: min(1320px, 100% - 48px); margin-inline: auto; }

/* ---------- nagłówek ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 32px; }
.logo img { display: block; height: 46px; width: auto; }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 999px; background: rgba(29, 29, 29, .07); color: var(--ink); font: 700 12px/1 Lato, sans-serif; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: background .2s; }
.pill:hover { background: rgba(29, 29, 29, .12); }
.pill:focus-visible { outline: 3px solid var(--caramel); outline-offset: 3px; }
.pill i { width: 9px; height: 9px; border-radius: 50%; background: #9a948b; }
.pill[data-s="ok"] i { background: var(--ok); }
.pill[data-s="part"] i { background: var(--caramel); }
.pill[data-s="off"] i { background: var(--bad); }
.pill[data-s="wait"] i { animation: blink 1s ease-in-out infinite; }

.hero { padding: clamp(40px, 8vw, 104px) 0 clamp(24px, 4vw, 48px); }
h1 { margin: 0; font-weight: 700; font-size: clamp(38px, 9vw, 128px); line-height: .94; letter-spacing: .035em; text-transform: uppercase; }
.hero p { margin: clamp(14px, 2vw, 24px) 0 0; max-width: 52ch; color: var(--caramel); font-size: clamp(16px, 1.7vw, 21px); line-height: 1.45; }

/* ---------- siatka kafli ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(252px, 1fr)); gap: clamp(22px, 2.6vw, 40px); align-items: start; padding: 28px 0 96px; }

/* Kafel w kształcie zakładki: kontener zapytań => wszystko (napisy, odstępy) skaluje się jednostką cqw razem z kaflem. */
.tile { display: block; position: relative; width: 100%; max-width: 350px; justify-self: center; container-type: inline-size; color: inherit; text-decoration: none; outline: none; -webkit-tap-highlight-color: transparent; animation: rise .8s var(--ease) both; animation-delay: calc(var(--n, 0) * 110ms); }
.tile:focus-visible { outline: 3px solid var(--caramel); outline-offset: 9px; border-radius: 8cqw; }
.tile[aria-disabled="true"] { pointer-events: none; opacity: .5; filter: grayscale(.6); }

.shadow { filter: drop-shadow(0 1.4cqw 1.8cqw rgba(29, 29, 29, .22)); transition: filter .45s var(--ease); }
.card { position: relative; aspect-ratio: 3 / 4; background: #111; clip-path: url(#bm); transition: transform .45s var(--ease); will-change: transform; }

.tab { position: absolute; top: 0; right: 0; width: 46.7%; height: 7.5%; display: flex; align-items: center; justify-content: flex-end; padding-right: 7.5%; color: var(--cream); font-size: 3.5cqw; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.tab::before { content: '— '; white-space: pre; opacity: .7; transition: opacity .3s, margin .35s var(--ease); margin-right: 0; }

.art { position: absolute; left: 8%; top: 13%; width: 84%; height: 45%; overflow: hidden; border-radius: 4.5cqw; background: #0b0b0b; }
.art svg { position: absolute; inset: -4%; width: 108%; height: 108%; transform: translate(calc(var(--mx, 0) * 1.4cqw), calc(var(--my, 0) * 1.4cqw)) scale(var(--zoom, 1)); transition: transform .6s var(--ease), filter .45s; filter: saturate(.9) brightness(.92); }
.art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, .66) 100%); pointer-events: none; }
.cap { position: absolute; z-index: 1; left: 7%; right: 7%; bottom: 8%; color: #fff; font-weight: 700; font-size: 4.9cqw; line-height: 1.22; text-shadow: 0 1px 10px rgba(0, 0, 0, .5); transform: translateY(1.6cqw); opacity: .9; transition: transform .45s var(--ease), opacity .3s; }

.word { position: absolute; left: 8%; right: 5%; top: 61.5%; color: #747474; font-size: 17.5cqw; line-height: 1.02; letter-spacing: -.045em; white-space: nowrap; transition: color .4s var(--ease), transform .45s var(--ease); }
.sub { position: absolute; left: 8.4%; right: 6%; top: 77.5%; color: #8c8c8c; font-size: 3.2cqw; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; transition: color .35s; }

.dots { position: absolute; left: 9%; top: 95.2%; display: flex; align-items: center; gap: 2cqw; }
.dots i { width: 2.7cqw; height: 2.7cqw; border-radius: 50%; background: #363636; transition: background .3s, transform .3s var(--ease); }
.dots i:first-child { background: #8a847b; }
.tile[data-s="up"] .dots i:first-child { background: #8fa384; }
.tile[data-s="down"] .dots i:first-child { background: #b9615a; }
.state { margin-left: 1.2cqw; color: #8c8c8c; font-size: 2.9cqw; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }

/* ---------- ruch: unoszenie, rozjaśnienie, zapalanie kropek, fala w rysunku ---------- */
.tile:hover .shadow, .tile:focus-visible .shadow { filter: drop-shadow(0 3.2cqw 3.6cqw rgba(29, 29, 29, .34)); }
.tile:hover .card, .tile:focus-visible .card { transform: translateY(-3.2cqw); }
.tile:active .card { transform: translateY(-1.2cqw) scale(.985); transition-duration: .12s; }
.tile:hover, .tile:focus-visible { --zoom: 1.08; }
.tile:hover .art svg, .tile:focus-visible .art svg { filter: saturate(1.25) brightness(1.18); }
.tile:hover .cap, .tile:focus-visible .cap { transform: none; opacity: 1; }
.tile:hover .word, .tile:focus-visible .word { color: #fff; transform: translateY(-.8cqw); }
.tile:hover .sub, .tile:focus-visible .sub { color: var(--caramel); }
.tile:hover .tab::before, .tile:focus-visible .tab::before { opacity: 1; margin-right: 1cqw; }
.tile:hover .dots i:nth-child(2), .tile:focus-visible .dots i:nth-child(2) { background: var(--caramel); transform: scale(1.25); transition-delay: .05s; }
.tile:hover .dots i:nth-child(3), .tile:focus-visible .dots i:nth-child(3) { background: var(--cream); transform: scale(1.25); transition-delay: .14s; }

.u { transform-box: fill-box; transform-origin: 50% 100%; }
[data-art="rings"] .u, [data-art="grid"] .u { transform-origin: 50% 50%; }
.tile:hover [data-art="bars"] .u, .tile:focus-visible [data-art="bars"] .u { animation: wave 1.7s ease-in-out infinite; animation-delay: calc(var(--i) * -62ms); }
.tile:hover [data-art="rings"] .u, .tile:focus-visible [data-art="rings"] .u { animation: ring 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -110ms); }
.tile:hover [data-art="lines"] .u, .tile:focus-visible [data-art="lines"] .u { animation: slide 2.2s ease-in-out infinite; animation-delay: calc(var(--i) * -90ms); }
.tile:hover [data-art="grid"] .u, .tile:focus-visible [data-art="grid"] .u { animation: dot 1.9s ease-in-out infinite; animation-delay: calc(var(--i) * -70ms); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: auto; padding: 22px 0 28px; border-top: 1px solid rgba(29, 29, 29, .14); color: rgba(29, 29, 29, .62); font-size: 13px; }

@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.45); } }
@keyframes ring { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.09); } }
@keyframes slide { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(9px); } }
@keyframes dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.7); } }

@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .logo img { height: 38px; }
  .grid { grid-template-columns: 1fr; padding-bottom: 64px; }
  .tile { max-width: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .art svg { transform: none; }
}
