/* =========================================================
   B19 — Jędrzej Wencka
   Glitch / test-card aesthetic
   ========================================================= */

:root {
  --black: #000;
  --white: #fff;
  --green: #00ff00;
  --lime: #7dff3a;
  --blue: #0001ff;
  --red: #ff2a12;
  --magenta: #ff2bd6;
  --cyan: #45e6ff;
  --yellow: #fff03a;

  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Courier New", Courier, monospace;

  --gutter: clamp(16px, 2vw, 28px);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img, canvas, svg { display: block; max-width: 100%; }

.mono {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* triangles used as UI glyphs */
.tri { display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle; border: 5px solid transparent; }
.tri.up    { border-bottom: 8px solid currentColor; border-top-width: 0; }
.tri.down  { border-top: 8px solid currentColor; border-bottom-width: 0; }
.tri.right { border-left: 8px solid currentColor; border-right-width: 0; }

/* =================== HEADER =================== */
.header {
  position: sticky; top: 0; z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 40px;
  padding: 22px var(--gutter) 10px;
  background: var(--black);
  min-height: var(--header-h);
}
.logo { color: var(--green); font-size: 22px; letter-spacing: 0.18em; line-height: 1; }
.logo span { font-size: 0.7em; vertical-align: middle; }
.nav { display: flex; gap: 42px; padding-top: 4px; }
.nav a { position: relative; transition: color .15s; }
.nav a:hover, .nav a.is-active { color: var(--green); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--green);
}
.header-right { text-align: right; }
.tagline { margin: 0; font-size: 11px; line-height: 1.7; }
.social { display: flex; gap: 14px; justify-content: flex-end; margin-top: 18px; }
.social a { width: 20px; height: 20px; transition: color .15s; }
.social a:hover { color: var(--green); }
.burger { display: none; width: 44px; height: 32px; flex-direction: column; justify-content: space-between; padding: 6px 0; }
.burger span { display: block; height: 2px; background: var(--white); }
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
  background: var(--black);
  display: flex; flex-direction: column; gap: 28px;
  padding: 40px var(--gutter);
  font-size: 28px;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu a:hover { color: var(--green); }
.mobile-menu .mm-social { justify-content: flex-start; gap: 22px; margin-top: 20px; }
.mobile-menu .mm-social a { width: 28px; height: 28px; }

/* =================== HERO =================== */
.hero { background: var(--black); }
.hero-title { position: relative; padding: 4vw var(--gutter) 0; }
.hero-name { margin: 0; font-size: clamp(16px, 2vw, 29px); letter-spacing: 0.02em; }
.hero-b19 {
  margin: -0.1em 0 -0.04em;
  text-align: center;
  font-weight: 400;
  font-size: clamp(140px, 26vw, 380px);
  line-height: 1;
  letter-spacing: -0.02em;
  position: relative;
}
/* RGB split glitch on the giant B19 */
.hero-b19::before, .hero-b19::after {
  content: attr(data-glitch);
  position: absolute; inset: 0;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
}
.hero-b19::before { color: #f00; }
.hero-b19::after  { color: #0ff; }
.hero-b19.glitching::before { opacity: .9; animation: glitchA .35s steps(2) both; }
.hero-b19.glitching::after  { opacity: .9; animation: glitchB .35s steps(2) both; }
@keyframes glitchA {
  0%   { transform: translate(-6px, 0); clip-path: inset(10% 0 60% 0); }
  50%  { transform: translate(5px, 0);  clip-path: inset(55% 0 20% 0); }
  100% { transform: translate(-3px, 0); clip-path: inset(30% 0 40% 0); }
}
@keyframes glitchB {
  0%   { transform: translate(6px, 0);  clip-path: inset(65% 0 5% 0); }
  50%  { transform: translate(-5px, 0); clip-path: inset(15% 0 70% 0); }
  100% { transform: translate(3px, 0);  clip-path: inset(40% 0 30% 0); }
}

.bars-wrap { position: relative; height: clamp(320px, 60vw, 780px); overflow: hidden; background: #000; }
.bars { width: 100%; height: 100%; }
.standby {
  position: absolute; left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  background: #111;
  border: 3px solid #222;
  padding: 0.6em 1.4em;
  box-shadow: 0 0 0 3px #000;
}
.standby span {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  color: #fff;
  font-size: clamp(16px, 2.6vw, 38px);
  letter-spacing: 0.14em;
  text-shadow: 2px 0 #f0f, -2px 0 #0ff;
  white-space: nowrap;
}
.transport {
  display: flex; align-items: center; gap: 14px;
  padding: 14px var(--gutter);
  border-top: 1px solid #222;
  font-size: 11px;
}
.transport .timecode { margin-left: auto; }
.tp-btn { font-size: 10px; letter-spacing: -1px; }
.rec-dot { width: 9px; height: 9px; border: 1.5px solid #fff; border-radius: 50%; }
.paused .rec-dot { background: var(--red); border-color: var(--red); }

/* =================== STATEMENT =================== */
.statement {
  display: grid; place-items: center;
  min-height: 70vh;
  padding: 80px var(--gutter);
  text-align: center;
}
.statement p {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(18px, 2.2vw, 30px);
  line-height: 1.6;
  letter-spacing: 0.06em;
}
.statement .caret { display: inline-block; width: .6em; background: var(--green); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* =================== SECTION BAR =================== */
.section-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  border-top: 1px solid #1c1c1c;
  font-size: 11px;
}
.section-bar.dark { color: #000; border-top: 0; }

/* =================== SERVICES =================== */
.services { position: relative; padding-bottom: 40px; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  padding: 40px var(--gutter) 60px;
}
.service { text-align: center; }
.viz { width: 100%; max-width: 300px; aspect-ratio: 1; margin: 0 auto 36px; }
.service h3, .service .service-title { font-weight: 400; font-size: clamp(22px, 2vw, 28px); letter-spacing: 0.02em; margin: 0 0 22px; }
.service p { margin: 0 auto; max-width: 36ch; font-size: 16px; line-height: 1.75; color: #eee; }
.coords {
  display: flex; flex-direction: column; gap: 4px;
  padding: 0 var(--gutter);
  font-size: 10px;
  position: relative;
}
.coords b { font-weight: 700; }
.crosshair { position: absolute; right: var(--gutter); bottom: 0; width: 36px; color: #fff; }

/* =================== WORK =================== */
.work { background: var(--black); padding-bottom: 100px; }
.work-filters { display: flex; gap: 18px; }
.work-filters button { opacity: .5; transition: opacity .15s, color .15s; letter-spacing: inherit; }
.work-filters button:hover { opacity: 1; }
.work-filters button.is-active { opacity: 1; color: var(--green); }
.work-title {
  margin: 30px var(--gutter) 50px;
  font-weight: 400;
  font-size: clamp(48px, 9vw, 140px);
  line-height: .95;
  letter-spacing: -0.02em;
}
.work-list { list-style: none; margin: 0; padding: 0 var(--gutter); counter-reset: work; }
.work-item {
  display: grid;
  grid-template-columns: 70px 1.6fr 1fr 140px 80px 120px;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid #262626;
  position: relative;
  transition: background .15s, color .15s;
}
.work-item:last-child { border-bottom: 1px solid #262626; }
.work-item:hover { background: #0b0b0b; }
.work-item:hover .wi-title { color: var(--green); }
.wi-num { font-family: var(--mono); font-weight: 700; font-size: 12px; color: #777; }
.wi-title { font-size: clamp(18px, 1.8vw, 26px); line-height: 1.2; transition: color .15s; }
.wi-title small { display: block; font-size: 14px; color: #999; margin-top: 4px; }
.wi-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--mono); font-weight: 700; font-size: 10px; letter-spacing: .08em;
  padding: 3px 7px; border: 1px solid currentColor;
}
.tag.prod   { color: var(--magenta); }
.tag.rec    { color: var(--red); }
.tag.mix    { color: var(--cyan); }
.tag.master { color: var(--yellow); }
.wi-genre, .wi-year { font-family: var(--mono); font-weight: 700; font-size: 11px; color: #aaa; text-transform: uppercase; letter-spacing: .08em; }
.wi-play {
  justify-self: end;
  font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: .1em;
  border: 1px solid #fff; padding: 8px 12px;
  transition: background .15s, color .15s;
}
.wi-play:hover { background: var(--green); color: #000; border-color: var(--green); }
.work-item.is-hidden { display: none; }
.work-item.is-current .wi-title { color: var(--green); }
.work-item.is-current .wi-num { color: var(--green); }
.work-item.is-current .wi-play { background: var(--green); color: #000; border-color: var(--green); }
.wi-play.is-off { opacity: .3; pointer-events: none; }

/* artist names link to their Bandcamp */
.artist-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.35); transition: color .15s, text-decoration-color .15s; }
.artist-link::after { content: " ↗"; font-size: .6em; vertical-align: super; opacity: .6; }
.artist-link:hover { color: var(--green); text-decoration-color: var(--green); }
.deck-title .artist-link { text-underline-offset: 3px; }

/* =================== AUDIO DECK =================== */
.deck {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid;
  grid-template-columns: 52px minmax(160px, 260px) 1fr auto auto 32px;
  align-items: center; gap: 18px;
  padding: 12px var(--gutter);
  background: #000;
  border-top: 1px solid #00ff00;
  box-shadow: 0 -10px 30px rgba(0,0,0,.6);
}
.deck[hidden] { display: none; }
body.deck-open { padding-bottom: 80px; }
.deck-play {
  width: 52px; height: 52px; border: 1px solid #fff; font-size: 16px; letter-spacing: -1px;
  transition: background .15s, color .15s;
}
.deck-play:hover { background: var(--green); color: #000; border-color: var(--green); }
.deck-title { font-size: 16px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-roles { display: flex; gap: 5px; margin-top: 6px; }
.deck-roles .tag { font-size: 9px; padding: 2px 5px; }
.deck-wave { width: 100%; height: 48px; cursor: pointer; touch-action: none; }
.deck-time { font-size: 11px; color: #aaa; white-space: nowrap; }
.deck-q { display: flex; border: 1px solid #333; }
.deck-q button { padding: 7px 10px; font-size: 10px; letter-spacing: .08em; color: #777; }
.deck-q button + button { border-left: 1px solid #333; }
.deck-q button.is-active { background: #fff; color: #000; }
.deck-q button[data-deck-q="flac"].is-active { background: var(--green); }
.deck-close { font-size: 14px; color: #777; }
.deck-close:hover { color: #fff; }
.work-empty { padding: 40px 0; color: #777; font-family: var(--mono); font-size: 12px; }

/* embed accordion (YouTube / Spotify) — opens under its row */
.work-embed {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
  list-style: none;
}
.work-embed.is-open { grid-template-rows: 1fr; }
.work-embed-inner { overflow: hidden; min-height: 0; }
.work-embed iframe {
  display: block; border: 0;
  margin: 6px auto 24px;             /* centered under the row */
  background: #111;
}
.work-embed iframe.is-video { width: min(360px, 100%); aspect-ratio: 16 / 9; }
.work-embed iframe.is-audio { width: min(520px, 100%); }
.work-item.is-open { border-bottom-color: transparent; }
.work-item.is-open .wi-play { border-color: var(--green); color: var(--green); }

/* =================== ABOUT =================== */
.about { display: grid; grid-template-columns: 1fr 1fr; background: #fff; color: #000; }
.about-left { padding: 18px var(--gutter) 80px; }
.about-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px;
  font-size: 11px; margin-bottom: 70px;
}
.about-bar div { display: flex; flex-direction: column; gap: 6px; }
.about-bar .r { text-align: right; }
.about h2 { font-weight: 400; font-size: clamp(34px, 3vw, 46px); margin: 0 0 24px; }
.about p { margin: 0; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.55; max-width: 32em; }
.about-right { background: var(--lime); display: grid; place-items: center; padding: 40px; min-height: 520px; }
.viz-disc { width: min(100%, 520px); aspect-ratio: 1; }

/* =================== CALIBRATION =================== */
.calibration { overflow: hidden; }
.cal-row { overflow: hidden; white-space: nowrap; }
.cal-red  { background: var(--red);  color: #000; border-bottom: 3px solid #000; }
.cal-blue { background: var(--blue); color: #fff; }
.cal-track {
  display: inline-flex; align-items: center; gap: 0.35em;
  font-weight: 300;
  font-size: clamp(56px, 8vw, 120px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  padding: 0.05em 0;
  animation: marquee 22s linear infinite;
  will-change: transform;
}
.cal-track.reverse { animation-direction: reverse; animation-duration: 26s; }
.cal-track span { padding: 0 .1em; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.pill { display: inline-block; width: 2.4em; height: .78em; border-radius: .16em; flex: none; }
.pill-rainbow {
  background: linear-gradient(90deg, #ff2bd6, #ff3b30, #ffd60a, #34ff5a, #00e5ff, #3a3bff, #ff2bd6);
  background-size: 200% 100%;
  animation: hue 4s linear infinite;
  filter: blur(1px) saturate(1.2);
}
@keyframes hue { to { background-position: 200% 0; } }
.pill-noise { background: #777 url("../assets/noise.svg"); background-size: 120px; animation: noiseShift .25s steps(3) infinite; }
@keyframes noiseShift { 33% { background-position: 40px 17px; } 66% { background-position: -23px 51px; } }

/* =================== CONTACT =================== */
.contact { background: #fff; color: #000; padding-bottom: 120px; }
.contact-body {
  display: flex; align-items: center; gap: clamp(30px, 5vw, 80px);
  padding: 120px var(--gutter) 0;
}
.glyph { width: clamp(110px, 13vw, 180px); flex: none; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; font-size: clamp(18px, 1.8vw, 24px); }
.contact-list a { background-image: linear-gradient(#000, #000); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .25s; }
.contact-list a:hover { background-size: 100% 1px; }

/* =================== FOOTER =================== */
.footer {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px;
  padding: 40px var(--gutter) 60px;
  font-size: 11px;
}
.footer nav { display: flex; flex-direction: column; gap: 14px; }
.footer nav a:hover, .footer nav a.is-active { color: var(--green); }
.footer-mid { text-decoration: none; }
.footer-right { display: flex; flex-direction: column; gap: 14px; text-align: right; }
.footer-right a { text-decoration: underline; text-underline-offset: 3px; }
.footer-right a:hover { color: var(--green); }

/* =================== LANGUAGE SWITCH =================== */
.header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 22px; margin-top: 18px; }
.header-tools .social { margin-top: 0; }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .12em; }
.lang-switch a { color: #777; padding: 2px 0; transition: color .15s; }
.lang-switch a:hover { color: #fff; }
.lang-switch a.is-active { color: var(--green); }
.lang-switch .sep { color: #444; }
.header-mobile { display: none; align-items: center; gap: 22px; justify-self: end; }
.footer-mid { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.footer-lang .lang-switch, .footer-lang { font-size: 11px; }
.footer-lang a { color: #777; } .footer-lang a.is-active { color: var(--green); } .footer-lang .sep { color: #444; margin: 0 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* long Polish standby text may wrap on small screens */
html[lang="pl"] .standby { width: max-content; max-width: 88vw; }
html[lang="pl"] .standby span { white-space: normal; text-align: center; }

/* =================== RESPONSIVE =================== */
@media (max-width: 1100px) {
  .work-item { grid-template-columns: 50px 1.6fr 1fr 70px 110px; }
  .wi-genre { display: none; }
}
@media (max-width: 900px) {
  .nav, .header-right { display: none; }
  .burger { display: flex; }
  .header-mobile { display: flex; }
  .header { grid-template-columns: 1fr auto; align-items: center; padding-bottom: 18px; }
  .services-grid { grid-template-columns: 1fr; gap: 80px; }
  .about { grid-template-columns: 1fr; }
  .about-right { min-height: 0; padding: 50px 24px; }
  .work-item { grid-template-columns: 36px 1fr auto; grid-template-areas: "n t p" "n r r"; row-gap: 12px; }
  .wi-num { grid-area: n; align-self: start; padding-top: 6px; }
  .wi-title { grid-area: t; }
  .wi-roles { grid-area: r; }
  .wi-play { grid-area: p; }
  .wi-year { display: none; }
  .work-embed iframe { width: 100% !important; }
  .footer { grid-template-columns: 1fr 1fr; }
  .footer-mid { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 760px) {
  .deck {
    grid-template-columns: 44px 1fr auto 24px;
    grid-template-areas: "p i q c" "w w w w" "t t t t";
    gap: 8px 12px; padding: 10px var(--gutter) 12px;
  }
  .deck-play { grid-area: p; width: 44px; height: 44px; }
  .deck-info { grid-area: i; min-width: 0; }
  .deck-wave { grid-area: w; height: 40px; }
  .deck-time { grid-area: t; text-align: right; margin-top: -4px; }
  .deck-q { grid-area: q; }
  .deck-close { grid-area: c; }
  .deck-roles { display: none; }
  body.deck-open { padding-bottom: 150px; }
}
@media (max-width: 560px) {
  .contact-body { flex-direction: column; align-items: flex-start; padding-top: 60px; }
  .about-bar { grid-template-columns: 1fr 1fr; }
  .about-bar > div:nth-child(2) { display: none; }
  .work-filters { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .cal-track, .pill-rainbow, .pill-noise { animation: none; }
  html { scroll-behavior: auto; }
}
