/* Forma. Dark ink page, one tangerine accent, square corners everywhere.
   Fonts are system stacks (no font files are supplied or loaded). */

:root {
  --ink: #0e1014;
  --panel: #161920;
  --raise: #1d212a;
  --line: #2c313b;
  --edge: #6b7383;
  --paper: #eeece6;
  --mute: #a9aeb9;
  --accent: #ff6a2b;
  --accent-ink: #14100c;

  --display: "Avenir Next Condensed", "Helvetica Neue Condensed", "Arial Narrow", "Roboto Condensed", "Franklin Gothic Medium", "Arial", sans-serif;
  --text: "Gill Sans", "Gill Sans MT", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --num: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --pad: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 80px; }
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ol { margin: 0; padding: 0; }
ol { list-style: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button, input, select { font: inherit; color: inherit; border-radius: 0; }
button { cursor: pointer; }

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

.wrap { width: min(1360px, 100%); margin-inline: auto; padding-inline: var(--pad); }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 40;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}
.top__in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo {
  font: 800 30px/1 var(--display);
  letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none; color: var(--paper);
}
.logo::after { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--accent); margin-left: 4px; }
.top__link {
  color: var(--paper); text-decoration: none; padding: 10px 0; font-weight: 600;
  border-bottom: 2px solid var(--accent);
}
.top__link:hover { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border: 2px solid transparent;
  font-weight: 700; letter-spacing: 0.02em; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: #ff8452; }
.btn--line { background: transparent; border-color: var(--edge); color: var(--paper); min-height: 44px; padding: 0 20px; }
.btn--line:hover { border-color: var(--paper); }
.btn--wide { width: 100%; }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px); align-items: center;
  padding-block: clamp(32px, 5vw, 64px);
}
.hero h1 {
  font: 800 clamp(76px, 10.2vw, 148px)/0.88 var(--display);
  text-transform: uppercase; letter-spacing: -0.005em;
}
.hero h1 span { display: block; }
.hero h1 span:last-child { color: var(--accent); }
.hero__sub { max-width: 34ch; margin: 28px 0 32px; font-size: 20px; color: var(--mute); }
.hero__media { position: relative; }
.hero__media::before {
  content: ""; position: absolute; inset: 24px -16px -16px 24px; background: var(--accent); z-index: 0;
}
.hero__media img {
  position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; max-height: 520px; object-fit: cover; object-position: 30% 50%;
}

/* Programme */
.programme { padding-block: 40px 96px; scroll-margin-top: 64px; }
.programme h2 {
  font: 800 clamp(40px, 5vw, 64px)/1 var(--display); text-transform: uppercase; margin-bottom: 28px;
}

.tools {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px 220px; gap: 16px 20px; align-items: end;
  padding: 24px 0; border-top: 2px solid var(--paper);
}
.field { display: grid; gap: 8px; }
.field > label, .field > .label { font-size: 15px; font-weight: 600; color: var(--mute); }
.field input, .field select, .toggle {
  width: 100%; height: 54px; padding: 0 16px; background: var(--panel); border: 1px solid var(--edge); color: var(--paper);
}
.field input::placeholder { color: var(--mute); opacity: 1; }
.field input:hover, .field select:hover, .toggle:hover { border-color: var(--paper); }
.field input:focus-visible, .field select:focus-visible { outline-offset: 0; border-color: var(--accent); }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--paper); border-bottom: 2px solid var(--paper);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.toggle {
  display: flex; align-items: center; justify-content: space-between; font-weight: 700; text-align: left;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.toggle__n { font: 700 15px/1 var(--num); min-width: 28px; padding: 6px 8px; background: var(--raise); text-align: center; }
.toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.toggle[aria-pressed="true"] .toggle__n { background: var(--accent-ink); color: var(--paper); }

.status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-bottom: 20px; color: var(--mute); font-size: 15px; }
.status__total { color: var(--paper); font-weight: 600; }

/* Workshop rows */
.list { display: grid; gap: 20px; }
.row {
  position: relative;
  display: grid;
  grid-template-columns: 112px 300px minmax(0, 1fr) 190px;
  grid-template-areas: "when img body side";
  gap: 0 32px; align-items: stretch;
  padding: 20px; background: var(--panel);
  transition: background-color 0.25s;
}
.row:hover { background: var(--raise); }
.row:has(.open:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }

.when { grid-area: when; display: flex; flex-direction: column; justify-content: center; line-height: 1; }
.when__day { font: 800 84px/0.9 var(--display); letter-spacing: -0.01em; transition: color 0.2s; }
.when__mon { margin-top: 10px; font: 600 14px/1.2 var(--num); text-transform: uppercase; color: var(--mute); }
.row:hover .when__day { color: var(--accent); }

.row__img { grid-area: img; overflow: hidden; aspect-ratio: 3 / 2; background: var(--ink); }
.row__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.row:hover .row__img img { transform: scale(1.05); }

.row__body { grid-area: body; align-self: center; min-width: 0; }
.cat { font: 600 14px/1.2 var(--num); text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.row h3 { margin: 8px 0 10px; font: 800 clamp(34px, 3.4vw, 48px)/0.98 var(--display); text-transform: uppercase; }
.open { background: none; border: 0; padding: 0; text-align: left; text-transform: inherit; font: inherit; color: inherit; }
.open:focus-visible { outline: none; }
.open::after { content: ""; position: absolute; inset: 0; }
.row__desc { color: var(--mute); max-width: 52ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row__meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 14px; font-size: 15px; }

.row__side { grid-area: side; align-self: center; justify-self: end; display: grid; gap: 4px; justify-items: end; text-align: right; }
.price { font: 800 56px/1 var(--display); }
.seats { font-size: 15px; color: var(--mute); }
.quick {
  position: relative; z-index: 1; margin-top: 14px; min-height: 44px; padding: 0 18px;
  background: transparent; border: 1px solid var(--edge); font-weight: 700;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.quick:hover { border-color: var(--paper); }
.quick[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

@media (prefers-reduced-motion: no-preference) {
  .row { animation: rise 0.7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .hero h1 span { animation: rise 0.8s var(--ease) both; }
  .hero h1 span:last-child { animation-delay: 0.1s; }
  .hero__sub, .hero__copy .btn { animation: rise 0.8s var(--ease) 0.2s both; }
  .hero__media { animation: rise 0.9s var(--ease) 0.15s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* Empty and error */
.empty {
  display: grid; justify-items: start; gap: 12px; padding: 48px clamp(20px, 4vw, 48px);
  background: var(--panel); border-left: 6px solid var(--accent);
}
.empty h3 { font: 800 40px/1 var(--display); text-transform: uppercase; }
.empty p { color: var(--mute); max-width: 46ch; margin-bottom: 8px; }
.error { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 24px; background: var(--panel); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 36px; color: var(--mute); font-size: 15px; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; }
.logo--foot { font-size: 24px; color: var(--paper); }

/* Detail sheet */
.sheet {
  margin: 0 0 0 auto; width: min(760px, 100vw); max-width: none; height: 100dvh; max-height: none;
  padding: 0; border: 0; border-left: 1px solid var(--edge);
  background: var(--ink); color: var(--paper); overflow-y: auto; overscroll-behavior: contain;
}
.sheet::backdrop { background: rgb(6 7 9 / 0.72); }
.sheet[open] { display: flex; flex-direction: column; }
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: slide 0.45s var(--ease); }
  .sheet[open]::backdrop { animation: fade 0.3s ease; }
}
@keyframes slide { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet__bar {
  position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end;
  padding: 12px var(--pad); background: var(--ink); border-bottom: 1px solid var(--line);
}
.sheet__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.sheet__body { padding: 32px var(--pad) 24px; flex: 1; }
.sheet__body h2 { margin: 10px 0 18px; font: 800 clamp(48px, 7vw, 80px)/0.92 var(--display); text-transform: uppercase; }
.sheet__text { font-size: 19px; max-width: 56ch; color: var(--paper); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 32px; background: var(--line); border: 1px solid var(--line); }
.facts > div { background: var(--panel); padding: 16px 20px; }
.facts dt { font: 600 13px/1.2 var(--num); text-transform: uppercase; letter-spacing: 0.06em; color: var(--mute); }
.facts dd { margin-top: 6px; font: 700 24px/1.15 var(--display); letter-spacing: 0.01em; }
.sheet__act {
  position: sticky; bottom: 0; z-index: 2; padding: 16px var(--pad) calc(16px + env(safe-area-inset-bottom));
  background: var(--ink); border-top: 1px solid var(--line); display: grid; gap: 8px;
}
.sheet__act p { font-size: 15px; color: var(--mute); min-height: 1.4em; }
#save[aria-pressed="true"] { background: transparent; border-color: var(--accent); color: var(--accent); }
#save[aria-pressed="true"]:hover { background: var(--raise); }

/* Tablet and below */
@media (max-width: 1100px) {
  .row { grid-template-columns: 96px 240px minmax(0, 1fr); grid-template-areas: "when img body" "side side side"; gap: 16px 24px; }
  .row__side { justify-self: stretch; grid-template-columns: auto 1fr auto; align-items: center; justify-items: start; text-align: left; gap: 4px 16px; }
  .quick { margin-top: 0; justify-self: end; }
  .price { font-size: 44px; }
  .tools { grid-template-columns: minmax(0, 1fr) 220px 200px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .top__in { height: 56px; }
  .logo { font-size: 26px; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-block: 28px 40px; }
  .hero__sub { font-size: 18px; margin: 20px 0 24px; }
  .hero__media::before { inset: 14px -8px -10px 14px; }
  .hero__media img { aspect-ratio: 4 / 3; }
  .programme { padding-block: 24px 64px; }
  .tools { grid-template-columns: 1fr 1fr; padding: 20px 0; }
  .field--search { grid-column: 1 / -1; }
  .field input, .field select, .toggle { height: 52px; }
  .toggle { padding: 0 12px; }
  .status { flex-direction: column; }
  .row {
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-areas: "img img" "when body" "side side";
    gap: 16px 16px; padding: 12px 12px 16px;
  }
  .row__img { aspect-ratio: 16 / 10; }
  .when { justify-content: flex-start; }
  .when__day { font-size: 64px; }
  .row__body { align-self: start; }
  .row h3 { font-size: 36px; margin-top: 6px; }
  .row__side { padding-top: 12px; border-top: 1px solid var(--line); }
  .price { font-size: 38px; }
  .sheet { width: 100vw; border-left: 0; }
  .sheet__img img { aspect-ratio: 16 / 10; }
  .sheet__body { padding-top: 24px; }
  .facts > div { padding: 14px 14px; }
  .facts dd { font-size: 21px; }
}

@media (max-width: 380px) {
  .tools { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
