/* ==========================================================================
   Rap & Rhapsody — reset, fonts, typographic primitives
   ========================================================================== */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-variable-latin.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2-variations');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

/* --- Reset --------------------------------------------------------------- */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-stretch: var(--wdth-text);
  font-weight: 400;
  font-size: var(--step-0);
  line-height: var(--lh-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

p, h1, h2, h3, h4, li, blockquote { overflow-wrap: break-word; }

ul, ol { list-style: none; padding: 0; }

a { color: inherit; text-decoration: none; }

/* --- Focus ---------------------------------------------------------------
   Visible on every band. Two-tone so it reads on dark and paper alike. */

:focus-visible {
  outline: 2px solid var(--fg-accent);
  outline-offset: 3px;
}

/* --- Typographic primitives ---------------------------------------------- */

.byq-display {
  font-stretch: var(--wdth-display);
  font-weight: 900;
  font-size: var(--display);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  text-wrap: balance;
}

.byq-h1 {
  font-stretch: var(--wdth-display);
  font-weight: 900;
  font-size: var(--step-5);
  line-height: var(--lh-display);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  text-wrap: balance;
}

.byq-h2 {
  font-stretch: var(--wdth-heading);
  font-weight: 800;
  font-size: var(--step-4);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-heading);
  text-transform: uppercase;
  text-wrap: balance;
}

.byq-h3 {
  font-stretch: var(--wdth-heading);
  font-weight: 700;
  font-size: var(--step-2);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}

.byq-lede {
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: var(--measure);
  text-wrap: pretty;
}

.byq-prose {
  max-width: var(--measure);
  text-wrap: pretty;
}

.byq-prose + .byq-prose { margin-top: var(--s-4); }

/* Small tracked mono label. Julia Krantz's device: the interface speaks
   quietly in monospace so the photography can speak loudly. */
.byq-label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--fg-muted);
}

.byq-label--accent { color: var(--fg-accent); }

/* Oversized section numeral — Berlin Biennale's numbered marker, doubling
   as scroll wayfinding. */
.byq-numeral {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: var(--tracking-label);
  color: var(--fg-accent);
  display: block;
}

.byq-muted { color: var(--fg-muted); }
.byq-accent { color: var(--fg-accent); }

/* --- Layout primitives --------------------------------------------------- */

.byq-band {
  background: var(--bg);
  color: var(--fg);
  padding-block: var(--section-pad);
  position: relative;
}

.byq-band--flush { padding-block: 0; }

.byq-container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

.byq-container--wide {
  width: min(100% - (var(--gutter) * 2), var(--container-wide));
  margin-inline: auto;
}

.byq-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-8) var(--s-7);
}

@media (max-width: 52rem) {
  .byq-grid-2col { grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
}

.byq-rule {
  border: 0;
  border-top: var(--hairline) solid var(--rule);
  margin: 0;
}

.byq-stack > * + * { margin-top: var(--s-5); }

/* --- Buttons -------------------------------------------------------------
   Outlined pill, accent-only. Berlin Biennale's secondary-pill role: the
   accent lives in the border and the label, never as a fill. */

.byq-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 44px;
  padding: var(--s-3) var(--s-6);
  border: var(--hairline) solid var(--fg-accent);
  border-radius: var(--radius-pill);
  color: var(--fg-accent);
  background: transparent;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

.byq-btn:hover,
.byq-btn:focus-visible {
  background: var(--fg-accent);
  color: var(--bg);
}

.byq-btn--solid {
  background: var(--fg-accent);
  color: var(--bg);
}

.byq-btn--solid:hover,
.byq-btn--solid:focus-visible {
  background: transparent;
  color: var(--fg-accent);
}

/* Square utility link with a trailing arrow — Julia Krantz's bare text link. */
.byq-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--fg-accent);
  border-bottom: var(--hairline) solid currentColor;
  padding-bottom: 2px;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.byq-link:hover { opacity: 0.6; }

/* --- Utilities ------------------------------------------------------------ */

.byq-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Keeps a hyphenated compound ("hip-hop") from breaking at its hyphen. */
.byq-nowrap { white-space: nowrap; }

.byq-skip-link {
  position: absolute;
  top: var(--s-4);
  left: var(--s-4);
  z-index: var(--z-modal);
  padding: var(--s-3) var(--s-5);
  background: var(--lavender);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  transform: translateY(-200%);
  transition: transform var(--dur-fast) var(--ease-out);
}

.byq-skip-link:focus { transform: translateY(0); }

/* --- Reduced motion -------------------------------------------------------
   Every scroll effect has a real static fallback, defined alongside it in
   sections.css. Here we only neutralise the global smooth-scroll and any
   incidental transitions. */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
