/* Między sztuką a nauką — laboratory catalog on poster paper */

:root {
  --bg: #f7f4ea;
  --bg-2: #efe9d8;
  --ink: #111110;
  --ink-soft: #2e2c28;
  --muted: #6a655c;
  --line: #cfc8b8;
  --paper: #fcfbf4;
  --grid: rgba(17, 17, 16, 0.11);
  --pill-yellow: #f2d23c;
  --pill-green: #8ec25a;
  --pill-blue: #6aa8d1;
  --accent-afekt: #c4a01a;
  --accent-bio: #4a7a38;
  --accent-sonic: #243044;
  --accent-final: #6aa8d1;
  --nav-h: 5.6rem;
  --rail-w: 4.25rem;
  --pad: clamp(1.25rem, 4vw, 4.5rem);
  --measure: 42rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Archivo", sans-serif;
  --font-body: "Archivo", sans-serif;
  --glitch-flower: url("assets/flower.jpg");
  --glitch-noise: url("assets/glitch-noise.jpg");
  --glitch-mass: url("assets/glitch-top.jpg");
  --glitch-br: url("assets/glitch-br.jpg");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  overflow-x: hidden;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.has-cursor {
  cursor: none;
}

body.has-cursor a,
body.has-cursor button,
body.has-cursor input {
  cursor: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
}

h1,
h2,
h3,
.nav__logo,
.hero__kicker,
.section-index,
.final__title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.9;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 1rem;
}

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

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Pills — soft, slightly irregular ovals like marker strokes */
.pill {
  display: inline-block;
  padding: 0.14em 0.58em 0.2em;
  border-radius: 72% 48% 64% 46% / 46% 62% 40% 58%;
  background: var(--pill-yellow);
  line-height: 1.05;
  font-weight: 800;
  transform: rotate(-1.3deg);
}

.pill--yellow { background: var(--pill-yellow); color: var(--ink); }
.pill--green {
  background: var(--pill-green);
  color: var(--ink);
  border-radius: 48% 70% 42% 62% / 58% 40% 60% 44%;
  transform: rotate(1.05deg);
}
.pill--blue {
  background: var(--pill-blue);
  color: var(--ink);
  border-radius: 60% 50% 58% 52% / 50% 58% 42% 55%;
  transform: rotate(-0.7deg);
}
.pill--ink {
  background: var(--ink);
  color: var(--bg);
  border-radius: 66% 44% 70% 48% / 44% 60% 40% 62%;
  transform: rotate(0.8deg);
}

/* Jagged pixelated masks */
.glitch-frame {
  clip-path: polygon(
    0% 10%, 6% 10%, 6% 0%, 22% 0%, 22% 8%, 38% 8%, 38% 0%, 62% 0%,
    62% 12%, 78% 12%, 78% 0%, 100% 0%, 100% 28%, 90% 28%, 90% 46%,
    100% 46%, 100% 72%, 86% 72%, 86% 100%, 54% 100%, 54% 88%,
    32% 88%, 32% 100%, 0% 100%, 0% 64%, 8% 64%, 8% 38%, 0% 38%
  );
}

.glitch {
  background-size: cover;
  background-position: center;
  image-rendering: auto;
  will-change: transform;
}

.glitch--flower {
  background-image: var(--glitch-flower);
  clip-path: polygon(
    0% 14%, 10% 14%, 10% 0%, 34% 0%, 34% 10%, 56% 10%, 56% 0%, 82% 0%,
    82% 16%, 100% 16%, 100% 48%, 88% 48%, 88% 70%, 100% 70%, 100% 100%,
    62% 100%, 62% 86%, 28% 86%, 28% 100%, 0% 100%, 0% 62%, 12% 62%, 12% 36%, 0% 36%
  );
}

.glitch--noise {
  background-image: var(--glitch-noise);
  clip-path: polygon(
    0 0, 70% 0, 70% 12%, 100% 12%, 100% 44%, 78% 44%, 78% 70%,
    100% 70%, 100% 100%, 24% 100%, 24% 78%, 0 78%, 0 42%, 16% 42%, 16% 18%, 0 18%
  );
}

.glitch--mass {
  background-image: var(--glitch-mass);
  clip-path: polygon(
    8% 0, 100% 0, 100% 38%, 86% 38%, 86% 62%, 100% 62%, 100% 100%,
    18% 100%, 18% 76%, 0 76%, 0 28%, 8% 28%
  );
}

.glitch--final-a {
  background-image: var(--glitch-br);
  clip-path: polygon(
    0 0, 80% 0, 80% 18%, 100% 18%, 100% 60%, 70% 60%, 70% 100%,
    0 100%, 0 55%, 14% 55%, 14% 22%, 0 22%
  );
}

.glitch--final-b {
  background-image: var(--glitch-mass);
  clip-path: polygon(
    20% 0, 100% 0, 100% 100%, 10% 100%, 10% 68%, 0 68%, 0 30%, 20% 30%
  );
}

/* Cursor */
.cursor {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  pointer-events: none;
  mix-blend-mode: difference;
}

body.has-cursor .cursor {
  display: block;
}

.cursor__ring,
.cursor__dot {
  position: absolute;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cursor__ring {
  width: 28px;
  height: 28px;
  border: 1px solid #efeae0;
}

.cursor__dot {
  width: 5px;
  height: 5px;
  background: #efeae0;
}

.cursor.is-hot .cursor__ring {
  width: 48px;
  height: 48px;
}

/* Loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-content: center;
  gap: 1.5rem;
  background: var(--bg);
  text-align: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
}

.loader__kicker {
  position: relative;
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.loader__title {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.055em;
}

.loader__title span {
  display: block;
}

.loader__index {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--muted);
}

.loader__index li.is-on {
  color: var(--ink);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas:
    "logo cluster desktop cta"
    "logo cluster desktop toggle";
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.15rem;
  min-height: var(--nav-h);
  padding: 0.55rem var(--pad);
  margin-left: 0;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
}

.nav__logo {
  grid-area: logo;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  font-size: 0.72rem;
  line-height: 1.05;
  letter-spacing: 0.06em;
}

.nav__cluster {
  grid-area: cluster;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.85rem;
  max-width: 26rem;
  font-size: 0.62rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}

.nav__cluster-label {
  flex-basis: 100%;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.54rem;
}

.nav__cluster a {
  text-decoration: none;
  text-underline-offset: 0.15em;
}

.nav__cluster a:hover,
.nav__cluster a:focus-visible {
  text-decoration: underline;
}

.nav__ig {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.nav__desktop {
  grid-area: desktop;
  justify-self: end;
}

.nav__desktop ul {
  display: flex;
  justify-content: flex-end;
  gap: 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__desktop a {
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  position: relative;
}

.nav__desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav__desktop a:hover::after,
.nav__desktop a:focus-visible::after {
  transform: scaleX(1);
}

.nav__cta {
  grid-area: cta;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 0.45rem 0.8rem;
}

.nav__toggle {
  grid-area: toggle;
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  position: relative;
  touch-action: manipulation;
}

.nav__toggle span {
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  height: 1px;
  background: var(--ink);
}

.nav__toggle span:first-child { top: 0.85rem; }
.nav__toggle span:last-child { bottom: 0.85rem; }

.nav__toggle[aria-expanded="true"] span:first-child {
  top: 1.15rem;
  transform: rotate(28deg);
}

.nav__toggle[aria-expanded="true"] span:last-child {
  bottom: 1.15rem;
  transform: rotate(-28deg);
}

.menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 35;
  background: var(--bg);
  padding: 2rem var(--pad);
}

.menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu a {
  display: block;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.5rem);
  font-weight: 800;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}

/* Timeline rail */
.rail {
  display: none;
}

.rail a {
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 0.35rem 0;
}

.rail a.is-active,
.rail a:hover,
.rail a:focus-visible {
  color: var(--ink);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  align-content: end;
  padding: 1.25rem var(--pad) 2.2rem;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__collage {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero__collage .glitch {
  position: absolute;
}

.glitch--flower {
  right: 2%;
  top: 4%;
  width: min(48vw, 36rem);
  height: min(58vh, 32rem);
  background-image: var(--glitch-flower);
  background-size: 190% auto;
  background-position: 8% 28%;
}

.glitch--noise {
  right: 0;
  top: -2%;
  width: min(34vw, 24rem);
  height: min(34vh, 18rem);
  opacity: 0.95;
}

.glitch--mass {
  right: 6%;
  bottom: 8%;
  width: min(32vw, 22rem);
  height: min(36vh, 18rem);
  opacity: 0.9;
}

.hero__kicker,
.hero__title,
.hero__lead,
.hero__facts,
.hero__scroll {
  position: relative;
  z-index: 2;
}

.hero__kicker {
  margin: 0 0 0.8rem;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  font-weight: 600;
}

.hero__title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(3.6rem, 14vw, 11.5rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  isolation: isolate;
  text-shadow:
    0 0 0.06em var(--bg),
    0 0 0.2em color-mix(in srgb, var(--bg) 50%, transparent);
}

.hero__scrim {
  display: none;
}

.hero__title span {
  display: block;
}

.hero__lead {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  font-size: 1.05rem;
}

.hero__facts {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0 0;
  max-width: 54rem;
}

.hero__facts div {
  margin: 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--ink);
}

.hero__facts div:nth-child(1) { grid-column: 1 / 5; }
.hero__facts div:nth-child(2) { grid-column: 5 / 9; }
.hero__facts div:nth-child(3) { grid-column: 9 / 13; }

.hero__facts dt {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__facts dd {
  margin: 0.25rem 0 0;
}

.hero__scroll {
  position: absolute;
  right: var(--pad);
  bottom: 2.2rem;
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
}

/* Intro */
.intro,
.audience,
.network,
.program,
.module,
.contact {
  position: relative;
  padding: clamp(4rem, 10vw, 8rem) var(--pad);
}

.section-index {
  margin: 0 0 1.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  font-weight: 600;
}

.intro__stage {
  display: grid;
  gap: clamp(3rem, 12vh, 8rem);
  min-height: 180vh;
}

.intro__line {
  margin: 0;
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.intro__line--body {
  max-width: 22ch;
  font-size: clamp(1.4rem, 3.4vw, 2.4rem);
  font-weight: 600;
}

/* Audience */
.audience h2,
.network h2,
.program h2,
.contact h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.8rem, 8vw, 6.5rem);
}

.audience__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
}

.audience__card {
  background: var(--bg);
  padding: 1.6rem;
}

.audience__kind {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.audience__who {
  margin: 0.8rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.audience__note {
  margin: 0;
}

.audience__pointer {
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.audience__pointer a,
.contact a,
.footer a {
  text-underline-offset: 0.2em;
}

.contact__label,
.filters__group-label {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Network */
.network__words {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 52rem;
}

.network__words button {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  padding: 0.1rem 0;
  transition: color 0.3s;
}

.network__words button.is-on {
  color: var(--accent-afekt);
}

/* Program */
.program__lede,
.contact__lede {
  max-width: var(--measure);
  margin: 0 0 2rem;
}

.map-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.15em;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-underline-offset: 0.22em;
  touch-action: manipulation;
}

/* Calendar — exhibition grid, mobile first */
.cal {
  margin: 0 0 2.75rem;
  overflow-x: clip;
}

.cal__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.cal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 7vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.cal__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.cal__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cal__mark {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  flex: 0 0 0.7rem;
  border: 1px solid var(--ink);
}

.cal__mark--warsztat {
  border-radius: 1px;
  background: var(--bg);
}

.cal__mark--panel {
  border-radius: 50%;
  background: var(--ink);
}

.cal__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.cal__tab.is-active {
  background: var(--ink);
  color: var(--bg);
}

.cal__months {
  display: grid;
  gap: 1.5rem;
}

.cal.is-oct .cal__month--nov,
.cal.is-nov .cal__month--oct {
  display: none;
}

.cal__month-name {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
}

.cal__weekdays,
.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.cal__table caption {
  text-align: left;
}

.cal__table thead th {
  font-weight: 600;
}

.cal__table tbody td {
  border: 1px solid var(--ink);
  padding: 0;
  vertical-align: top;
  background: var(--bg);
  height: 48px;
}

.cal__weekdays {
  margin-bottom: 0.25rem;
}

.cal__weekday {
  text-align: center;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.2rem 0;
}

.cal__grid {
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
}

.cal__pad,
.cal__day {
  min-height: 48px;
  background: var(--bg);
}

.cal__pad {
  padding: 0.28rem 0.22rem 0.22rem;
  background: color-mix(in srgb, var(--bg-2) 80%, var(--bg));
}

.cal__pad .cal__num {
  color: var(--muted);
  font-weight: 600;
}

.cal__day {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  min-height: 48px;
  padding: 0.28rem 0.22rem 0.22rem;
  text-align: left;
  touch-action: manipulation;
}

.cal__num {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.cal__day-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.cal__day .cal__mark {
  width: 0.55rem;
  height: 0.55rem;
  flex-basis: 0.55rem;
}

.cal__day--afekt {
  background: color-mix(in srgb, var(--pill-yellow) 58%, var(--bg));
}

.cal__day--bio {
  background: color-mix(in srgb, var(--pill-green) 52%, var(--bg));
}

.cal__day--sonic {
  background: var(--ink);
  color: var(--bg);
}

.cal__day--sonic .cal__mark {
  border-color: var(--bg);
}

.cal__day--sonic .cal__mark--warsztat {
  background: transparent;
}

.cal__day--sonic .cal__mark--panel {
  background: var(--bg);
}

.cal__day--final {
  background: var(--pill-blue);
  color: var(--ink);
}

.cal__day--final .cal__mark {
  border-color: var(--ink);
}

.cal__day--final .cal__mark--panel {
  background: var(--ink);
}

.cal__day.is-selected {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
  z-index: 1;
}

.cal__day--sonic.is-selected {
  outline-color: var(--bg);
}

.cal__day--final.is-selected {
  outline-color: var(--ink);
}

.cal__detail {
  margin-top: 1rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  min-height: 4.5rem;
}

.cal__detail-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.cal__detail-date {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.cal__detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.cal__detail-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  min-height: 44px;
  padding: 0.55rem 0.15rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.cal__detail-list a:hover,
.cal__detail-list a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.cal__detail-time {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.cal__detail-type {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cal__detail-title {
  flex: 1 1 12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cal__fallback {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

@media (min-width: 768px) {
  .cal__tabs {
    display: none;
  }

  .cal.is-oct .cal__month--nov,
  .cal.is-nov .cal__month--oct {
    display: block;
  }

  .cal__months {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .audience__grid {
    grid-template-columns: 1fr 1fr;
  }

  .meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
  }
}

.filters {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 2.5rem;
}

.filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter,
.btn,
.specimen__toggle,
.audio-toggle,
.cal__tab {
  border: 1px solid var(--ink);
  padding: 0.55rem 0.85rem;
  min-height: 44px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  transition: background 0.25s, color 0.25s;
  touch-action: manipulation;
}

.filter.is-active,
.btn:hover,
.specimen__toggle:hover,
.audio-toggle[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.filter--afekt.is-active {
  background: var(--pill-yellow);
  color: var(--ink);
  border-color: var(--pill-yellow);
}

.filter--bio.is-active {
  background: var(--pill-green);
  color: var(--ink);
  border-color: var(--pill-green);
}

.filter--sonic.is-active {
  background: var(--ink);
  color: var(--bg);
}

.filter--final.is-active {
  background: var(--pill-blue);
  color: var(--ink);
  border-color: var(--pill-blue);
}

.program__map {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.program__map-item {
  background: var(--bg);
  border: 1px solid var(--ink);
}

.program__map-item--afekt { grid-column: 1 / 8; grid-row: 1; }
.program__map-item--bio { grid-column: 6 / 13; grid-row: 2; }
.program__map-item--sonic { grid-column: 1 / 7; grid-row: 3; }
.program__map-item--final { grid-column: 7 / 13; grid-row: 3; }

.program__map a {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
  padding: 1.4rem 1.2rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.85rem);
  font-weight: 800;
}

.program__map span:first-child {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
}

.program__map .pill {
  font-size: 0.92em;
}

/* Modules */
.module {
  --module-accent: var(--ink);
  border-top: 1px solid var(--line);
}

.module--afekt { --module-accent: var(--accent-afekt); }
.module--bio { --module-accent: var(--accent-bio); }
.module--sonic { --module-accent: var(--accent-sonic); }

.module h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.module__stage {
  position: relative;
  height: 28vh;
  min-height: 160px;
  margin: 0 0 2.5rem;
  overflow: hidden;
  background:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  background-color: color-mix(in srgb, var(--bg-2) 70%, transparent);
}

.module__stage canvas,
.afekt-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.afekt-path {
  fill: none;
  stroke: var(--accent-afekt);
  stroke-width: 1.1;
  stroke-linecap: round;
  opacity: 0.7;
}

.module__kicker {
  margin: 0.4rem 0 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--module-accent);
}

.module--afekt .module__kicker,
.module--afekt .specimen__index {
  color: #5a4808;
}

.audio-toggle {
  display: inline-flex;
  visibility: visible;
  opacity: 1;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  margin: 0.9rem 0 0.35rem;
  min-width: 5.5rem;
  min-height: 44px;
  background: var(--paper);
  color: var(--ink);
}

/* Specimens */
.specimen {
  max-width: 54rem;
  margin: 0 0 2.25rem;
  padding: 1.4rem 0 1.8rem;
  border-top: 1px solid var(--line);
}

.specimen__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-bottom: 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.specimen__index {
  color: var(--module-accent, var(--muted));
}

.specimen h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 3.4vw, 2.7rem);
  max-width: 22ch;
}

.meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem 1.5rem;
  margin: 0 0 1.1rem;
}

.meta dt {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta dd {
  margin: 0.15rem 0 0;
}

.specimen__body {
  max-width: var(--measure);
  margin-top: 1rem;
}

.specimen.is-open .specimen__toggle {
  background: var(--ink);
  color: var(--bg);
}

.specimen.is-filtered-out {
  display: none;
}

/* Final / Na przekór */
.module--final {
  background: var(--ink);
  color: var(--bg);
  --module-accent: var(--accent-final);
  overflow: hidden;
}

.module--final .section-index {
  color: #b7b1a6;
}

.final__glitch-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.38;
}

.final__glitch-bg .glitch {
  position: absolute;
}

.glitch--final-a {
  top: -8%;
  right: -4%;
  width: min(48vw, 28rem);
  height: min(42vh, 22rem);
}

.glitch--final-b {
  left: -6%;
  bottom: 8%;
  width: min(36vw, 20rem);
  height: min(30vh, 16rem);
}

.final__title {
  position: relative;
  margin: 0;
  font-size: clamp(4.5rem, 16vw, 12rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.82;
}

.final__title span {
  display: block;
}

.final__title .pill {
  margin-left: 6vw;
  font-size: 0.72em;
}

.final__glitch {
  position: relative;
  margin: 1rem 0 3rem;
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  opacity: 0.45;
  white-space: nowrap;
}

.specimen--invert {
  position: relative;
  border-top-color: #3a3732;
}

.specimen--invert .meta dt,
.specimen--invert .specimen__tags {
  color: #b7b1a6;
}

.module--final .filter,
.module--final .specimen__toggle,
.module--final .btn {
  border-color: var(--bg);
  color: var(--bg);
}

.module--final .specimen__toggle:hover,
.module--final .specimen.is-open .specimen__toggle {
  background: var(--bg);
  color: var(--ink);
}

.module--final :focus-visible {
  outline-color: var(--bg);
}

/* Contact / footer */
.contact__form {
  scroll-margin-top: calc(var(--nav-h) + 0.75rem);
  margin: 0 0 2.4rem;
  max-width: var(--measure);
  padding: 1.35rem 1.2rem 1.45rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
}

.contact__form-lede {
  margin: 0 0 1.15rem;
  max-width: var(--measure);
  color: var(--ink-soft);
}

.contact__form .btn--solid {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  font-weight: 700;
}

.contact__form .btn--solid:hover,
.contact__form .btn--solid:focus-visible {
  background: var(--bg);
  color: var(--ink);
}

@media (min-width: 480px) {
  .contact__form {
    padding: 1.5rem 1.5rem 1.65rem;
  }

  .contact__form .btn--solid {
    width: auto;
    min-width: 13.5rem;
  }
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 2.4rem;
}

.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn--solid {
  background: var(--ink);
  color: var(--bg);
}

.btn--ghost {
  background: transparent;
}

.btn.is-copied {
  background: var(--ink);
  color: var(--bg);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 70rem;
}

.contact__grid p {
  margin: 0.15rem 0;
}

.contact__qr figcaption {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.footer {
  padding: 3rem var(--pad) 2rem;
  border-top: 1px solid var(--line);
}

.footer__giant {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10vw, 8rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.85;
}

.footer__year {
  margin: 0.6rem 0 1.5rem;
  font-size: clamp(2rem, 6vw, 4rem);
  font-family: var(--font-display);
  font-weight: 800;
}

.footer__partners {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.8rem;
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.footer__legal {
  margin: 0 0 1.2rem;
  max-width: 46rem;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--muted);
}

.footer__nav {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
}

.footer__nav a {
  text-decoration: none;
}

.footer__nav a:hover,
.footer__nav a:focus-visible {
  text-decoration: underline;
}

/* Desktop rail + custom cursor */
@media (min-width: 960px) {
  body {
    padding-left: var(--rail-w);
  }

  .nav {
    margin-left: calc(var(--rail-w) * -1);
    padding-left: calc(var(--rail-w) + var(--pad));
    grid-template-columns: auto minmax(0, 1.1fr) auto auto;
    grid-template-areas: "logo cluster desktop cta";
  }

  .nav__toggle {
    display: none;
  }

  .rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: var(--rail-w);
    height: 100vh;
    z-index: 45;
    padding: calc(var(--nav-h) + 0.6rem) 0 1.2rem;
    border-right: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
  }

  .rail__label {
    margin: 0 0 1rem;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
  }

  .rail ol {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .contact__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 959px) {
  :root {
    --nav-h: 5.6rem;
  }

  .nav {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo toggle"
      "cluster cluster";
    padding-top: 0.4rem;
    padding-bottom: 0.35rem;
  }

  .nav__desktop,
  .nav__cta {
    display: none;
  }

  .nav__toggle {
    display: inline-block;
    justify-self: end;
  }

  .nav__cluster {
    max-width: none;
  }

  .hero__facts,
  .program__map {
    grid-template-columns: 1fr;
  }

  .program__map {
    gap: 0.85rem;
  }

  .hero__facts div:nth-child(1),
  .hero__facts div:nth-child(2),
  .hero__facts div:nth-child(3),
  .program__map-item--afekt,
  .program__map-item--bio,
  .program__map-item--sonic,
  .program__map-item--final {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .program__map a {
    min-height: 44px;
    align-items: center;
    gap: 0.65rem 0.85rem;
    padding: 1.05rem 1rem;
  }

  .glitch--flower {
    width: min(32vw, 8rem);
    height: 3.4rem;
    right: -18%;
    top: 0;
    opacity: 0.38;
    background-position: 22% 10%;
  }

  .hero::after,
  .hero__scrim {
    content: "";
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
      to bottom,
      color-mix(in srgb, var(--bg) 72%, transparent) 0%,
      color-mix(in srgb, var(--bg) 94%, transparent) 12%,
      var(--bg) 24%,
      var(--bg) 100%
    );
  }

  .hero__collage {
    -webkit-mask-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.4) 0%,
      rgba(0, 0, 0, 0.12) 5%,
      transparent 11%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.4) 0%,
      rgba(0, 0, 0, 0.12) 5%,
      transparent 11%,
      transparent 100%
    );
  }

  .hero__title {
    filter: none;
    text-shadow:
      0 0 0.12em var(--bg),
      0 0 0.32em var(--bg),
      0 0 0.6em var(--paper),
      0.04em 0.05em 0 var(--paper);
  }

  .glitch--noise {
    width: 42vw;
    height: 16vh;
  }

  .glitch--mass {
    display: none;
  }

  .rail {
    display: block;
    position: relative;
    top: auto;
    z-index: 5;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0  var(--pad);
    overscroll-behavior-x: contain;
  }

  .rail__label {
    display: none;
  }

  .rail ol {
    display: flex;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    width: max-content;
  }

  .rail a {
    writing-mode: horizontal-tb;
    transform: none;
    white-space: nowrap;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.45rem;
  }

  .hero__scroll {
    position: static;
    margin-top: 1.5rem;
  }
}

@media (max-width: 720px) {
  .intro__line {
    max-width: none;
  }

  .module__stage {
    height: 22vh;
  }

  .hero__title {
    font-size: clamp(2.85rem, 16vw, 4.4rem);
  }

  .glitch--flower {
    height: 2.6rem;
    width: min(28vw, 6.5rem);
  }

  .hero__kicker {
    text-shadow: 0 0 0.7em var(--bg);
  }

  .final__title {
    font-size: clamp(3.2rem, 18vw, 5.5rem);
  }

  .final__glitch {
    white-space: normal;
    letter-spacing: 0.16em;
  }

  .audience h2,
  .network h2,
  .program h2,
  .contact h2 {
    font-size: clamp(2.2rem, 12vw, 4rem);
  }

  .final__title .pill {
    margin-left: 0;
  }

  .cal__day {
    padding: 0.22rem 0.12rem 0.18rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .loader.is-done {
    display: none;
  }

  .hero__scroll {
    animation: none;
  }

  .glitch {
    will-change: auto;
  }
}

@keyframes scroll-loop {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(6px); opacity: 1; }
}

.hero__scroll {
  animation: scroll-loop 2.4s ease-in-out infinite;
}

@media (hover: hover) and (pointer: fine) {
  .glitch-frame {
    transition: clip-path 0.45s steps(5);
  }

  .glitch-frame:hover {
    clip-path: polygon(
      0% 6%, 10% 6%, 10% 0%, 30% 0%, 30% 10%, 48% 10%, 48% 0%, 72% 0%,
      72% 8%, 100% 8%, 100% 36%, 88% 36%, 88% 58%, 100% 58%, 100% 100%,
      46% 100%, 46% 86%, 18% 86%, 18% 100%, 0% 100%, 0% 52%, 12% 52%, 12% 24%, 0% 24%
    );
  }

  .cal__day:hover {
    outline: 1px solid var(--ink);
    outline-offset: -1px;
  }

  .cal__day--sonic:hover {
    outline-color: var(--bg);
  }

  .cal__day--final:hover {
    outline-color: var(--ink);
  }
}
