/* ============================================================
   PEGEL — fictional techno & house club · demo one-pager
   Greyscale only. The WebGL water surface is decoration.
   ============================================================ */

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('fonts/roboto-mono-variable-latin.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --fg: #e8e8e8;
  --muted: #8a8a8a;
  --line: rgba(232, 232, 232, 0.14);
  --gutter: clamp(16px, 4vw, 48px);
  --mono: 'Roboto Mono', ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--fg); color: var(--bg); }

a { color: inherit; }

:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }

/* ---------- water layer ---------- */

#gl {
  position: fixed;
  inset: 0;
  z-index: 0;
  /* Static fallback when WebGL or JS is unavailable */
  background:
    radial-gradient(120% 80% at 70% 20%, #1c1c1c 0%, transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(255,255,255,0.035) 13px 14px),
    var(--bg);
}

#gl canvas { display: block; width: 100%; height: 100%; }

.nav, main, .footer { position: relative; z-index: 1; }

/* ---------- utility ---------- */

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.label {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.label--muted { color: var(--muted); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--gutter);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(10, 10, 10, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav__brand {
  font-weight: 700;
  letter-spacing: 0.3em;
  text-decoration: none;
}

.nav nav { display: flex; gap: clamp(16px, 3vw, 36px); }

.nav nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}
.nav nav a:hover, .nav nav a:focus-visible { color: var(--fg); }

.nav__meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.bpm {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fg);
  animation: beat calc(60s / 124) infinite;
}

@keyframes beat {
  0% { opacity: 1; transform: scale(1); }
  60%, 100% { opacity: 0.2; transform: scale(0.6); }
}

/* ---------- hero ---------- */

/* Chrome fallback for the wordmark; replaced by 3D letters when WebGL runs */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__word {
    background: linear-gradient(180deg,
      #3a3a3a 0%, #bdbdbd 30%, #ffffff 49%,
      #050505 51%, #1c1c1c 62%, #6e6e6e 80%, #e0e0e0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.gl-type .hero__word { background: none; color: transparent; }

.hero {
  min-height: calc(100svh - 70px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px var(--gutter) 40px;
  pointer-events: none;           /* let the pointer reach the water */
}
.hero a { pointer-events: auto; }

.hero h1 {
  margin: 24px 0 0;
  --stretch: 1.35;                /* read by main.js for the 3D letters */
  font-size: clamp(3rem, 19vw, 14rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.02em;
  margin-left: -0.04em;
  transform: scaleX(var(--stretch));
  transform-origin: 0 0;
}

.lead {
  max-width: 42ch;
  margin: 32px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.4vw, 17px);
}

.hero__next {
  display: flex;
  gap: clamp(24px, 5vw, 64px);
  margin: 48px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 560px;
}

.hero__next dt, .specs dt, .visit dt {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero__next dd { margin: 4px 0 0; font-size: 15px; }

.hero__hint {
  margin: auto 0 0;
  padding-top: 60px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  visibility: hidden;             /* only shown once the water is running */
}
.gl .hero__hint { visibility: visible; }
.hint--touch { display: none; }
@media (hover: none) {
  .hint--pointer { display: none; }
  .hint--touch { display: inline; }
}

/* ---------- sections ---------- */

.section {
  padding: clamp(80px, 12vw, 160px) var(--gutter) 0;
}

.section__head {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--fg);
}

.section__head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ---------- program ---------- */

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

.program li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 160px 80px;
  gap: 16px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, 0);
  transition: background 0.25s, padding 0.25s;
}
.program li:hover { background: rgba(232, 232, 232, 0.04); }

.program time { font-size: 12px; letter-spacing: 0.08em; color: var(--muted); }
.program__acts { font-size: clamp(15px, 1.6vw, 20px); font-weight: 400; line-height: 1.4; }
.program__genre, .program__time {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.program__time { text-align: right; }

/* ---------- room ---------- */

.room {
  display: grid;
  grid-template-columns: 80px minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  padding-top: 32px;
}

.room__text {
  grid-column: 2;
  margin: 0;
  max-width: 48ch;
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 300;
}

.specs, .visit { margin: 0; }
.specs { padding-left: clamp(0px, 4vw, 48px); }
.specs div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.specs div:first-child { padding-top: 4px; }
.specs dd { margin: 0; }

/* ---------- visit ---------- */

.visit {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 16px;
  padding: 32px 0 0 96px;
}
.visit dd { margin: 10px 0 0; }

/* ---------- footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: clamp(100px, 14vw, 180px);
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.footer p { margin: 0; }
.footer a { text-decoration: none; transition: color 0.2s; }
.footer a:hover, .footer a:focus-visible { color: var(--fg); }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .program li { grid-template-columns: 80px minmax(0, 1fr) 70px; }
  .program__genre { display: none; }
  .room { grid-template-columns: 1fr; }
  .room__text { grid-column: 1; }
  .specs { padding-left: 0; }
  .visit { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 0; }
  .section__head { grid-template-columns: 48px 1fr auto; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .nav { flex-wrap: wrap; row-gap: 10px; }
  .nav nav { order: 3; width: 100%; justify-content: space-between; }
  .program li { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .program time { grid-column: 1; }
  .program__time { grid-column: 2; grid-row: 1; }
  .program__acts { grid-column: 1 / -1; }
  .visit { grid-template-columns: 1fr; }
  .hero__next { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bpm { animation: none; }
  * { transition: none !important; }
}
