/* ============================================================
   RASTER 27 — Basel. Swiss International Style.
   Three colours. One family. 8 px baseline. 12 columns.
   ============================================================ */

:root {
  --paper: #F4F4F2;
  --ink: #111111;
  --red: #E8290B;
  --margin: 48px;
  --gutter: 24px;
  --topbar-h: 48px;
}
@media (max-width: 1023px) {
  :root { --margin: 32px; --gutter: 16px; }
}
@media (max-width: 599px) {
  :root { --margin: 16px; }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.011em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

::selection { background: var(--red); color: var(--paper); }

.red { color: var(--red); }

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

/* ---------- layout primitives ---------- */

.wrap { padding-inline: var(--margin); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}
@media (max-width: 599px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  font-size: 16px;
  line-height: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.topnav {
  display: flex;
  gap: 24px;
}
.topnav a {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.topnav a:hover { color: var(--red); }
.topnav .nav-register { color: var(--red); }
.topnav .nav-register:hover { color: var(--ink); }
@media (max-width: 599px) {
  .topbar { gap: 16px; }
  .topnav { gap: 12px; }
  .topnav a { letter-spacing: 0.04em; font-size: 11px; }
  .topnav a:nth-child(2),
  .topnav a:nth-child(4) { display: none; }
}

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

.hero {
  position: relative;
  height: calc(100svh - var(--topbar-h));
  min-height: 520px;
  overflow: hidden;
}

.hero-meta {
  padding-top: 32px;
  row-gap: 32px;
}

.hero-title {
  grid-column: 1 / 7;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero-title .de {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero-facts {
  grid-column: 8 / 10;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.hero-motto { grid-column: 10 / 13; }
.motto {
  font-size: 24px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.motto-sub {
  margin-top: 16px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

@media (max-width: 1023px) {
  .hero-title { grid-column: 1 / 13; }
  .hero-facts { grid-column: 1 / 5; }
  .hero-motto { grid-column: 6 / 13; }
}
@media (max-width: 599px) {
  .hero-meta { padding-top: 32px; row-gap: 24px; }
  .hero-title { grid-column: 1 / 5; }
  .hero-facts { grid-column: 1 / 3; font-size: 14px; line-height: 24px; }
  .hero-motto { grid-column: 3 / 5; }
  .motto { font-size: 16px; line-height: 24px; }
}

.hero-word {
  position: absolute;
  left: var(--margin);
  bottom: 0;
  font-size: 40vw;
  line-height: 0.76;
  font-weight: 900;
  letter-spacing: -0.05em;
  transform: translateY(30%);
  will-change: transform;
}
.hero-word span { display: block; }
@media (max-width: 599px) {
  .hero-word { font-size: 64vw; }
}

/* page-load: the poster is cropped into place */
@media (prefers-reduced-motion: no-preference) {
  .hero-word {
    transform: translateY(70%);
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .hero-meta > * {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .hero-meta > *:nth-child(2) { transition-delay: 0.08s; }
  .hero-meta > *:nth-child(3) { transition-delay: 0.16s; }
  body.loaded .hero-word { transform: translateY(30%); }
  body.loaded .hero-meta > * { opacity: 1; transform: none; }
}

/* ---------- section scaffolding ---------- */

section { padding-block: 96px 64px; }
@media (max-width: 599px) {
  section { padding-block: 64px 48px; }
}

.eyebrow {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

h2 {
  font-size: 48px;
  line-height: 56px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
@media (max-width: 599px) {
  h2 { font-size: 32px; line-height: 40px; }
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-top: 8px solid var(--ink);
  padding-top: 16px;
  margin-bottom: 48px;
}
@media (max-width: 599px) {
  .section-head { flex-direction: column; align-items: flex-start; margin-bottom: 32px; }
}

/* ---------- manifesto ---------- */

.manifesto .grid { row-gap: 48px; border-top: 8px solid var(--ink); padding-top: 16px; }
.manifesto .eyebrow { grid-column: 1 / 3; }
.manifesto-body { grid-column: 4 / 10; }
.lede {
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.tracks {
  grid-column: 10 / 13;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.track dt {
  font-size: 16px;
  line-height: 24px;
  font-weight: 800;
}
.track dd {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}
.tletter { display: inline-block; min-width: 16px; }

@media (max-width: 1023px) {
  .manifesto .eyebrow { grid-column: 1 / 13; }
  .manifesto-body { grid-column: 1 / 10; }
  .tracks { grid-column: 1 / 13; flex-direction: row; gap: var(--gutter); }
  .track { flex: 1; }
}
@media (max-width: 599px) {
  .manifesto .eyebrow { grid-column: 1 / 5; }
  .manifesto-body { grid-column: 1 / 5; }
  .lede { font-size: 24px; line-height: 32px; }
  .tracks { grid-column: 1 / 5; flex-direction: column; }
}

/* ---------- programme / timetable ---------- */

.sorter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}
.sorter-label {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 8px;
}
.sortbtn {
  font: inherit;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
}
.sortbtn[aria-pressed="true"] {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}
.sortbtn[aria-pressed="false"]:hover { color: var(--red); border-color: var(--red); }
.sortbtn:active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.timetable { position: relative; }

.thead {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 48px 0 8px;
  border-bottom: 2px solid var(--ink);
}
.thead:first-of-type { padding-top: 0; }
.thead .thead-note { font-weight: 500; letter-spacing: 0.02em; text-transform: none; }

.session {
  display: grid;
  grid-template-columns: 40px 64px 48px 32px minmax(0, 1.1fr) minmax(0, 1.5fr) 88px;
  column-gap: 16px;
  align-items: baseline;
  padding-block: 16px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
}
.s-n, .s-time, .s-day {
  font-size: 12px;
  line-height: 24px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.s-track {
  font-size: 16px;
  line-height: 24px;
  font-weight: 800;
}
.s-speaker {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.s-speaker em {
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  margin-left: 8px;
}
.s-title { font-size: 16px; line-height: 24px; font-weight: 400; }
.s-kind {
  font-size: 12px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
}
.session.is-rebel .s-speaker,
.session.is-rebel .s-title { color: var(--red); }
.session.is-keynote .s-kind { font-weight: 800; }
.session:hover .s-n { color: var(--red); font-weight: 700; }

@media (max-width: 1023px) {
  .session {
    grid-template-columns: 40px 64px 48px 32px minmax(0, 1fr) 80px;
    row-gap: 0;
  }
  .s-title { grid-column: 5 / 6; grid-row: 2; }
  .s-speaker { grid-column: 5 / 6; }
  .s-kind { grid-column: 6; }
}
@media (max-width: 599px) {
  .session {
    grid-template-columns: 40px 56px 1fr 56px;
    row-gap: 0;
    padding-block: 16px;
  }
  .s-n { grid-column: 1; grid-row: 1; }
  .s-time { grid-column: 2; grid-row: 1; }
  .s-day { display: none; }
  .s-track { grid-column: 4; grid-row: 1; text-align: right; }
  .s-speaker { grid-column: 1 / 4; grid-row: 2; }
  .s-title { grid-column: 1 / 5; grid-row: 3; }
  .s-kind { grid-column: 3; grid-row: 1; text-align: right; }
}

.table-note {
  margin-top: 24px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
}

/* the one act of rebellion */
.rebel {
  position: absolute;
  top: 56%;
  left: -4%;
  width: 108%;
  z-index: 5;
  pointer-events: none;
  transform: rotate(-7deg);
  transform-origin: center;
}
.rebel-rule {
  display: block;
  border-top: 2px solid var(--red);
}
.rebel-title {
  position: absolute;
  top: 8px;
  left: 3%;
  font-size: 24px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--red);
  background: var(--paper);
  padding-inline: 8px;
}
@media (max-width: 599px) {
  .rebel-title { font-size: 16px; line-height: 16px; left: 4%; }
}

/* ---------- speakers ---------- */

.speaker-index {
  list-style: none;
  columns: 3;
  column-gap: var(--gutter);
}
.speaker-index li {
  break-inside: avoid;
  border-top: 1px solid var(--ink);
  padding-block: 16px;
  display: flex;
  flex-direction: column;
}
.speaker-index strong {
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
}
.speaker-index li span {
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
}
.speaker-index .refs {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
}
@media (max-width: 1023px) { .speaker-index { columns: 2; } }
@media (max-width: 599px) { .speaker-index { columns: 1; } }

/* ---------- tickets ---------- */

.passes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pass {
  display: flex;
  border: 1px solid var(--ink);
  background: var(--paper);
}
.pass-main { flex: 1; padding: 24px; min-width: 0; }
.pass-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.pass-name {
  font-size: 24px;
  line-height: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.pass-price {
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.pass-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  margin-bottom: 24px;
}
.pass-fields dt {
  font-size: 10px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pass-fields dd {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}
.pass-cta {
  font: inherit;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.pass-cta:hover { border-color: var(--red); color: var(--red); }

.pass-stub {
  width: 168px;
  flex: none;
  border-left: 2px dashed var(--ink);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.stub-code {
  font-size: 16px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.stub-price {
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stub-gate {
  font-size: 10px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (max-width: 599px) {
  .pass { flex-direction: column; }
  .pass-stub {
    width: auto;
    border-left: 0;
    border-top: 2px dashed var(--ink);
    flex-direction: row;
    align-items: baseline;
  }
}

/* ---------- register form ---------- */

.register {
  margin-top: 96px;
  border-top: 8px solid var(--ink);
  padding-top: 16px;
  row-gap: 48px;
}
.register-h {
  grid-column: 1 / 4;
  font-size: 48px;
  line-height: 56px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.reg-passes {
  grid-column: 4 / 13;
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
}
.reg-passes legend {
  font-size: 10px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.reg-passes label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  cursor: pointer;
}
.reg-passes input[type="radio"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
}
.reg-passes input[type="radio"]:checked { background: var(--red); border-color: var(--red); }
.reg-passes input[type="radio"]:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.reg-field { grid-column: span 6; }
.reg-field label {
  display: block;
  font-size: 10px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.reg-field input {
  width: 100%;
  font: inherit;
  font-size: 24px;
  line-height: 32px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 8px 0;
}
.reg-field input:focus-visible {
  outline: none;
  border-bottom: 2px solid var(--red);
  padding-bottom: 7px;
}
.reg-field input.invalid { border-bottom: 2px solid var(--red); padding-bottom: 7px; }

.reg-actions {
  grid-column: 1 / 13;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.reg-submit {
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 16px 48px;
  background: var(--red);
  color: var(--paper);
  border: 0;
  cursor: pointer;
}
.reg-submit:hover { background: var(--ink); }
.reg-note { font-size: 16px; line-height: 24px; font-weight: 500; }

@media (max-width: 1023px) {
  .register-h { grid-column: 1 / 13; }
  .reg-passes { grid-column: 1 / 13; }
}
@media (max-width: 599px) {
  .register { margin-top: 64px; row-gap: 32px; }
  .register-h { grid-column: 1 / 5; font-size: 32px; line-height: 40px; }
  .reg-passes { grid-column: 1 / 5; flex-direction: column; gap: 8px; }
  .reg-field { grid-column: 1 / 5; }
  .reg-actions { grid-column: 1 / 5; }
  .reg-submit { width: 100%; }
}

/* ---------- venue ---------- */

.venue-grid { row-gap: 48px; }
.venue-address {
  grid-column: 1 / 5;
  font-style: normal;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.venue-how { grid-column: 6 / 11; }
.route { grid-column: 1 / 13; position: relative; padding-top: 8px; }
.route-line { border-top: 2px solid var(--ink); }
.route-stops {
  display: flex;
  justify-content: space-between;
}
.stop {
  position: relative;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
}
.stop::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 0;
  width: 8px;
  height: 16px;
  background: var(--ink);
}
.stop:last-child { text-align: right; align-items: flex-end; }
.stop:last-child::before { left: auto; right: 0; background: var(--red); }
.stop:nth-child(2) { text-align: center; align-items: center; }
.stop:nth-child(2)::before { left: 50%; margin-left: -4px; }
.stop-name { font-size: 16px; line-height: 24px; font-weight: 700; }
.stop-note { font-size: 12px; line-height: 16px; font-weight: 400; }

@media (max-width: 599px) {
  .venue-address { grid-column: 1 / 5; }
  .venue-how { grid-column: 1 / 5; }
  .route { grid-column: 1 / 5; }
}

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

.colophon {
  background: var(--ink);
  color: var(--paper);
  padding-block: 96px 32px;
}
.colophon .grid { row-gap: 48px; }
.colo-mark {
  grid-column: 1 / 5;
  font-size: 32px;
  line-height: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.colo-specs { grid-column: 5 / 10; }
.colo-contact { grid-column: 10 / 13; }
.colo-h {
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.colophon p { font-size: 12px; line-height: 16px; font-weight: 400; }
.colophon a { color: var(--paper); }
.colophon a:hover { color: var(--red); }
.colophon :focus-visible { outline-color: var(--paper); }

.credit {
  margin-top: 96px;
  padding-top: 16px;
  border-top: 1px solid var(--paper);
  font-size: 12px;
  line-height: 16px;
}

@media (max-width: 1023px) {
  .colo-mark { grid-column: 1 / 13; }
  .colo-specs { grid-column: 1 / 8; }
  .colo-contact { grid-column: 9 / 13; }
}
@media (max-width: 599px) {
  .colo-mark { grid-column: 1 / 5; }
  .colo-specs { grid-column: 1 / 5; }
  .colo-contact { grid-column: 1 / 5; }
  .credit { margin-top: 64px; }
}

/* ---------- grid toggle + overlay ---------- */

.grid-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  width: 56px;
  height: 56px;
  font: inherit;
  font-size: 10px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--paper);
  cursor: pointer;
}
.grid-toggle[aria-pressed="true"] { background: var(--red); }

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}
.go-baselines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(232, 41, 11, 0.35) 0,
    rgba(232, 41, 11, 0.35) 1px,
    transparent 1px,
    transparent 8px
  );
}
.go-cols {
  position: absolute;
  inset: 0;
}
.go-cols span {
  position: relative;
  background: rgba(232, 41, 11, 0.06);
  border-inline: 1px solid rgba(232, 41, 11, 0.45);
}
.go-cols span::before {
  content: attr(data-n);
  position: absolute;
  top: 56px;
  left: 4px;
  font-size: 10px;
  line-height: 16px;
  font-weight: 700;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.go-spec {
  position: absolute;
  left: var(--margin);
  bottom: 24px;
  font-size: 10px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--red);
  color: var(--paper);
  padding: 4px 8px;
}

/* ---------- FLIP helper ---------- */

.session.flip {
  transition: transform 0.48s cubic-bezier(0.2, 0, 0, 1);
}
@media (prefers-reduced-motion: no-preference) {
  .thead.appear {
    animation: thead-in 0.4s ease both;
  }
  @keyframes thead-in {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}
