/* Hilow poster design system: tokens */
@font-face { font-family: 'Josefin Sans'; font-weight: 200; font-display: swap; src: url(/assets/fonts/josefin-sans-200.woff) format('woff'); }
@font-face { font-family: 'Bowlby One'; font-weight: 400; font-display: swap; src: url(/assets/fonts/bowlby-one.woff2) format('woff2'); }
@font-face { font-family: 'Jost'; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/jost-latin.woff2) format('woff2'); }

:root {
  /* Palette */
  --cobalt: #2F4BC4;
  --ochre: #C8963E;
  --cream: #EDE4D3;
  --teal: #2A9DB5;
  --red: #E0352B;
  --ink: #111111;
  --magenta: #C2398F;

  /* Gallery neutrals */
  --wall: #E2E1DD;
  --floor: #CFCDC8;
  --chip: #BDBCB7;
  --ink-muted: #A8A39A;   /* secondary text on --ink, 7.6:1 */

  /* Type */
  --font-thin: 'Josefin Sans', 'Futura', 'Century Gothic', sans-serif;
  --font-block: 'Bowlby One', 'Arial Black', Impact, sans-serif;
  --font-body: 'Jost', 'Futura', 'Avenir Next', 'Segoe UI', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.75rem;
  --text-display: clamp(2.75rem, 7vw, 5.5rem);
  --text-thin: clamp(2rem, 8vw, 7.5rem);
  --track-caps: 0.15em;

  /* Spacing */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --sidebar-w: 264px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
}

/* Paper grain over everything */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--ochre); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.caps { text-transform: uppercase; letter-spacing: var(--track-caps); font-size: var(--text-xs); font-weight: 500; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  padding: var(--s6) var(--s5);
  display: flex; flex-direction: column; gap: var(--s6);
  background: var(--ink);
  border-right: 1px solid #262626;
  z-index: 10;
}
.badge { display: block; width: 132px; height: 132px; }
.badge svg { width: 100%; height: 100%; display: block; }
.tagline { margin: 0; color: var(--ink-muted); }
.search label { display: block; margin-bottom: var(--s2); color: var(--ink-muted); }
.search input {
  width: 100%; height: 44px; padding: 0 var(--s3);
  background: transparent; color: var(--cream);
  border: 1px solid #3A3A3A; border-radius: 0;
  font: inherit; font-size: var(--text-sm);
}
.search input::placeholder { color: #7A766F; }
.search input:focus { outline: none; border-color: var(--ochre); }
.nav { display: flex; flex-direction: column; gap: var(--s1); }
.nav a {
  display: block; padding: var(--s2) 0;
  color: var(--cream); text-decoration: none;
  text-transform: uppercase; letter-spacing: 0.3em; font-size: var(--text-sm); font-weight: 500;
}
.nav a:hover { color: var(--ochre); }
.sidebar-foot { margin-top: auto; color: var(--ink-muted); }

.topbar { display: none; }

/* ---------- Main ---------- */
.main { margin-left: var(--sidebar-w); padding: var(--s6); }
.main > * + * { margin-top: var(--s6); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--wall);
  color: var(--ink);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 560px;
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18%; background: var(--floor); }
.hero-copy { position: relative; z-index: 1; padding: var(--s7) var(--s6) var(--s6); }
.hero h1 {
  font-family: var(--font-block); font-weight: 400;
  font-size: var(--text-display); line-height: 0.95;
  margin: 0 0 var(--s5);
}
.hero h1 span { display: inline-block; }
.hero h1 .w1 { transform: rotate(-3deg); }
.hero h1 .w2 { color: var(--cobalt); transform: rotate(2deg) translateX(0.3em); font-size: 1.25em; }
.hero h1 .w3 { color: var(--red); transform: rotate(-2deg); }
.hero p { max-width: 38ch; margin: 0 0 var(--s5); font-size: var(--text-lg); line-height: 1.5; }
.hero-art { position: relative; z-index: 1; display: flex; justify-content: center; align-items: flex-end; padding: var(--s5) var(--s5) 6%; }
.hero-art .print { width: min(100%, 380px); }
.hero-thin {
  position: relative; z-index: 1;
  grid-column: 1 / -1;
  margin: 0; padding: 0 var(--s5) var(--s2);
  font-family: var(--font-thin); font-weight: 200;
  font-size: var(--text-thin); line-height: 0.9; letter-spacing: 0.06em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .hero-copy { padding: var(--s8) var(--s7) var(--s6); }
}

/* ---------- Button ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--s5);
  background: var(--ink); color: var(--cream);
  border: 0; border-radius: 0;
  font-family: var(--font-body); font-weight: 600; font-size: var(--text-sm);
  text-transform: uppercase; letter-spacing: var(--track-caps); text-decoration: none;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}
.button:hover { background: var(--cobalt); color: var(--cream); }
.button--ochre { background: var(--ochre); color: var(--ink); }
.button--ochre:hover { background: var(--ink); color: var(--ochre); }

/* ---------- Section heading ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; padding-top: var(--s5); }
.section-head h2 {
  margin: 0;
  font-family: var(--font-thin); font-weight: 200;
  font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1; letter-spacing: 0.08em; text-transform: uppercase;
}
.section-head p { margin: 0; color: var(--ink-muted); }

/* ---------- Poster cards ---------- */
.gallery { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: var(--s6); grid-template-columns: 1fr; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .gallery { grid-template-columns: repeat(3, 1fr); } }

.poster-card { --accent: var(--ochre); --accent-ink: var(--ink); }
.poster-card .wall {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--wall);
  overflow: hidden;
}
.poster-card .wall::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 15%; background: var(--floor); }
.print {
  position: relative; z-index: 1;
  display: block;
  transform-origin: 50% 100%;
  transform: perspective(900px) rotateX(3deg);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}
.print svg { display: block; width: 100%; height: auto; }
.poster-card .print { position: absolute; left: 16%; width: 68%; bottom: 9%; }
.chip {
  position: absolute; z-index: 2; left: var(--s4); bottom: var(--s4);
  padding: var(--s2) var(--s3);
  background: var(--chip); color: var(--ink);
  font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: var(--track-caps);
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.poster-card:hover .print, .poster-card:focus-within .print,
.hero:hover .print {
  transform: perspective(900px) rotateX(3deg) translateY(-4px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.22);
}
.poster-card:hover .chip, .poster-card:focus-within .chip { background: var(--accent); color: var(--accent-ink); }

.caption { padding: var(--s4) 0 0; }
.caption h3 { margin: 0 0 var(--s2); font-size: var(--text-lg); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; line-height: 1.3; }
.caption p { margin: 0 0 var(--s3); color: var(--cream); font-size: var(--text-sm); line-height: 1.6; max-width: 46ch; }
.caption a { font-size: var(--text-sm); font-weight: 500; text-transform: uppercase; letter-spacing: var(--track-caps); }
.caption a::after { content: " \2192"; }

.empty { display: none; padding: var(--s7) 0; color: var(--ink-muted); }
.empty.is-visible { display: block; }

/* ---------- Section blocks ---------- */
.block { padding: var(--s7) var(--s6); position: relative; overflow: hidden; }
.block h2, .block .block-title {
  margin: 0 0 var(--s5);
  font-family: var(--font-block); font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 3.75rem); line-height: 1;
}
.block h2 span, .block .block-title span { display: inline-block; }
.block p { max-width: 60ch; margin: 0 0 var(--s4); font-size: var(--text-lg); line-height: 1.55; }
.block p.caps { font-size: var(--text-xs); }
.block--cobalt { background: var(--cobalt); color: var(--cream); }       /* 5.4:1 */
.block--cobalt .tilt { color: var(--ochre); transform: rotate(-3deg); }
.block--cream { background: var(--cream); color: var(--ink); }           /* 15:1 */
.block--cream .tilt { color: var(--red); transform: rotate(2deg); }
.block .dots {
  position: absolute; right: -40px; top: -40px; width: 240px; height: 240px; border-radius: 50%;
  background-image: radial-gradient(circle, var(--ochre) 0 5px, transparent 5.5px);
  background-size: 22px 22px;
  pointer-events: none;
}
.block--cream .dots { background-image: radial-gradient(circle, var(--cobalt) 0 5px, transparent 5.5px); }
.block > *:not(.dots) { position: relative; }

.facts { display: grid; gap: var(--s5); grid-template-columns: 1fr; margin: var(--s6) 0; }
@media (min-width: 1024px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.facts dt { margin-bottom: var(--s2); }
.facts dd { margin: 0; font-size: var(--text-lg); line-height: 1.5; font-weight: 500; }
.block--cream a:not(.button) { color: var(--cobalt); }
.todo { background: #F7D9A0; border-bottom: 2px dashed var(--red); padding: 0 var(--s1); }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s4); padding: var(--s5) 0 var(--s4); color: var(--ink-muted); border-top: 1px solid #262626; }
.footer a { color: var(--ink-muted); }
.footer a:hover { color: var(--cream); }

/* ---------- Load-in ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 600ms var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 100ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
  .print, .chip, .button { transition: none; }
  .poster-card:hover .print, .poster-card:focus-within .print, .hero:hover .print { transform: perspective(900px) rotateX(3deg); }
}

/* ---------- Mobile: sidebar becomes top bar + menu ---------- */
@media (max-width: 899px) {
  .sidebar { display: none; }
  .sidebar.is-open {
    display: flex; position: fixed; inset: 64px 0 0 0; width: auto; border-right: 0; overflow-y: auto;
  }
  .sidebar.is-open .badge { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 20;
    height: 64px; padding: 0 var(--s4);
    background: var(--ink); border-bottom: 1px solid #262626;
  }
  .topbar .mini { display: flex; align-items: center; gap: var(--s3); color: var(--cream); text-decoration: none; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; }
  .topbar .mini svg { width: 40px; height: 40px; }
  .menu-button {
    min-height: 44px; padding: 0 var(--s4);
    background: transparent; color: var(--cream); border: 1px solid #3A3A3A; border-radius: 0;
    font: inherit; font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: var(--track-caps);
  }
  .main { margin-left: 0; padding: var(--s4); }
  .main > * + * { margin-top: var(--s5); }
  .hero { min-height: 0; }
  .hero-copy { padding: var(--s6) var(--s4) 0; }
  .block { padding: var(--s6) var(--s4); }
}
