/* ---------- fonts ---------- */

@font-face {
  font-family: "Hi Melody";
  src: url("../fonts/hi-melody.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens ---------- */

:root {
  --blue: #3e78b2;
  --cream: #f3efe0;
  --forest: #32533d;
  --sage: #a9cbb7;
  --orange: #e77801;

  /* The poster's blue and orange do not reach reading contrast on cream at small sizes. */
  --blue-ink: #2f6396;
  --orange-text: #c46200; /* large text only */

  --font-hand: "Hi Melody", "Segoe Print", cursive;
  --font-text: "Montserrat", "Verdana", sans-serif;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --edge: clamp(1.75rem, 6.5vw, 6rem);
  --art-gap: clamp(4.5rem, 11vw, 10.5rem);
  --tile: 1.5rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--forest) var(--cream);
  background: #b6c3ac;
}

/* The poster's artwork stays still; the torn paper strips scroll across it. */
body {
  position: relative;
  margin: 0;
  color: var(--forest);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-x: clip;
}
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100lvh;
  background: url("../img/art-wash.webp") var(--art-pos, 50% 20%) / cover no-repeat;
}
body[data-page="program"] { --art-pos: 100% 0%; }
body[data-page="workshops"] { --art-pos: 0% 0%; }
body[data-page="contributors"] { --art-pos: 60% 100%; }
body[data-page="location"] { --art-pos: 30% 60%; }

img, video, iframe { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
button { font: inherit; color: inherit; }

a {
  color: var(--blue-ink);
  font-weight: 600;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1.5px;
  transition: color 0.2s var(--ease-out);
}
a:hover { color: var(--forest); text-decoration-thickness: 2.5px; }

::selection { background: var(--orange); color: var(--cream); }
::-webkit-scrollbar { width: 0.75rem; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--forest); border: 3px solid var(--cream); border-radius: 999px; }

:focus-visible {
  outline: 3px solid var(--forest);
  outline-offset: 3px;
  border-radius: 4px;
}
main:focus { outline: none; }

.wrap { width: 100%; }

.skip-link {
  position: absolute;
  z-index: 20;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--cream);
  color: var(--forest);
  border-radius: 999px;
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; }

.sample-notice {
  padding: 0.4rem var(--gutter);
  background: var(--forest);
  color: var(--cream);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}

.load-error {
  max-width: 44rem;
  margin: 8rem auto;
  padding: 2rem var(--gutter);
  background: var(--cream);
  text-align: center;
}

/* ---------- torn paper strips ---------- */

.strip {
  position: relative;
  margin-top: calc(var(--art-gap) + var(--edge));
  padding: clamp(1.5rem, 3.5vw, 3.25rem) max(var(--gutter), calc(50% - 36rem));
  background: var(--cream);
}
.strip::before,
.strip::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--edge);
  background: url("../img/torn-top-1.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}
.strip::before { bottom: calc(100% - 1px); }
.strip::after { top: calc(100% - 1px); background-image: url("../img/torn-bottom-1.svg"); }
.strip:nth-of-type(even)::before { background-image: url("../img/torn-top-2.svg"); }
.strip:nth-of-type(even)::after { background-image: url("../img/torn-bottom-2.svg"); }

.strip + .strip { margin-top: calc(var(--art-gap) + 2 * var(--edge)); }
.strip:nth-of-type(3n) { --art-gap: clamp(3rem, 6vw, 5.5rem); }

/* ---------- type ---------- */

.display,
.section-title {
  font-family: var(--font-hand);
  font-weight: 400;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  transform: skewX(-6deg);
  transform-origin: left bottom;
}

.display {
  font-size: clamp(4.75rem, 11vw, 10rem);
  line-height: 0.92;
  margin-left: -0.07em;
  text-wrap: balance;
}
.display--page { font-size: clamp(4rem, 10vw, 8.5rem); line-height: 1; }

.section-title {
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
  font-size: clamp(3rem, 6.2vw, 5.25rem);
  line-height: 1;
  text-wrap: balance;
}

.prose { max-width: 68ch; }
.prose p + p { margin-top: 1.1em; }

.frame { width: 100%; height: auto; }
.frame,
.route__img { -webkit-mask: url("../img/torn-frame-1.svg") center / 100% 100% no-repeat; mask: url("../img/torn-frame-1.svg") center / 100% 100% no-repeat; }
.entry:nth-child(3n + 2) .frame,
.route:nth-child(even) .route__img { -webkit-mask-image: url("../img/torn-frame-2.svg"); mask-image: url("../img/torn-frame-2.svg"); }
.entry:nth-child(3n) .frame,
.route:nth-child(3) .route__img { -webkit-mask-image: url("../img/torn-frame-3.svg"); mask-image: url("../img/torn-frame-3.svg"); }

/* ---------- header ---------- */

#site-header { position: absolute; z-index: 10; top: 0; left: 0; right: 0; }

.site-header {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  padding: clamp(0.75rem, 1.6vw, 1.25rem) var(--gutter);
}

.brand {
  flex: none;
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.2vw, 1rem);
  color: var(--forest);
  text-decoration: none;
}
.brand:hover { color: var(--forest); }
.brand__logo {
  width: clamp(4.25rem, 7vw, 6rem);
  height: auto;
  aspect-ratio: 1;
  transition: transform 0.6s var(--ease-out);
}
.brand:hover .brand__logo { transform: rotate(-6deg); }
.brand__name {
  display: grid;
  font-size: clamp(1rem, 1.7vw, 1.5rem);
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 0 0.6em rgb(243 239 224 / 0.85);
}

body[data-page="index"] .brand__logo { width: clamp(5.5rem, 11vw, 10rem); }

.site-nav {
  margin-left: auto;
  padding: 0.2rem clamp(1rem, 1.6vw, 1.5rem);
  border-radius: var(--tile);
  background: var(--cream);
}
.nav-list { display: flex; gap: clamp(0.9rem, 2vw, 1.75rem); }
.nav-list a {
  display: block;
  padding-block: 0.55rem;
  color: var(--forest);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: underline transparent 2px;
  text-underline-offset: 0.35em;
  transition: text-decoration-color 0.25s var(--ease-out);
}
.nav-list a:hover { text-decoration-color: var(--blue-ink); }
.nav-list a[aria-current="page"] { text-decoration-color: var(--orange); }

.ticket-button {
  flex: none;
  display: inline-block;
  padding: 0.75em 1.35em;
  border-radius: 999px;
  background: var(--blue-ink);
  color: var(--cream);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 6px 16px rgb(50 83 61 / 0.28);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background-color 0.25s var(--ease-out);
}
.ticket-button:hover { color: var(--cream); background: var(--forest); transform: translateY(-2px); box-shadow: 0 10px 22px rgb(50 83 61 / 0.36); }
.ticket-button:active { transform: translateY(0); }
.ticket-button:focus-visible { border-radius: 999px; }
.ticket-button--large { padding: 0.8em 1.4em; font-size: clamp(1.125rem, 2.1vw, 1.75rem); }

body[data-page="index"] .site-header > .ticket-button { display: none; }

.nav-toggle {
  display: none;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
  color: var(--forest);
  cursor: pointer;
}

/* ---------- home hero: the poster's composition ---------- */

.hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100svh;
  padding-top: clamp(9rem, 14vw, 13rem);
}

.hero__strip { margin-top: var(--edge); padding-block: clamp(0.5rem, 1.5vw, 1.5rem); }

.hero__intro {
  margin-top: clamp(0.75rem, 1.5vw, 1.25rem);
  color: var(--orange-text);
  font-size: clamp(1.625rem, 4.1vw, 3.75rem);
  font-weight: 400;
  line-height: 1.2;
}

.hero__subtitle {
  margin-top: clamp(0.5rem, 1vw, 1rem);
  color: var(--blue);
  font-size: clamp(1.5rem, 2.75vw, 2.5rem);
  font-weight: 400;
  line-height: 1.25;
  text-transform: uppercase;
  text-wrap: balance;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-top: var(--edge);
  padding: clamp(1.75rem, 3vw, 3rem) max(var(--gutter), calc(50% - 36rem)) clamp(1.5rem, 3vw, 3rem);
}

.hero__when {
  display: grid;
  font-size: clamp(1.625rem, 3.3vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 0 0.45em rgb(243 239 224 / 0.8);
}

/* ---------- inner page heads ---------- */

.page-head { padding-top: clamp(8rem, 13vw, 12rem); }
.page-head__strip { margin-top: var(--edge); padding-block: clamp(0.5rem, 1.5vw, 1.5rem) clamp(0.75rem, 1.5vw, 1.5rem); }
.page-head__lead {
  max-width: 34ch;
  margin-top: 1rem;
  color: var(--orange-text);
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.25;
  text-wrap: pretty;
}
.page-head__note {
  max-width: 68ch;
  margin-top: 1rem;
  color: var(--blue-ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ---------- home: routes ---------- */

.routes__stage {
  --trail-mode: horizontal;
  position: relative;
  padding-top: 3.25rem;
}

.routes__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.75rem, 2vw, 1.75rem);
}
.route:nth-child(even) { margin-top: clamp(1rem, 2.5vw, 2rem); }

.route__link {
  display: block;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: transform 0.5s var(--ease-out);
}
.route__link:hover { transform: translateY(-6px); }
.route__link:focus-visible { border-radius: 0.5rem; }

.route__img { width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; }

.route__label {
  display: block;
  margin-top: 0.5rem;
  color: var(--blue);
  font-family: var(--font-hand);
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
}

.trail {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.trail__line {
  fill: none;
  stroke: var(--orange);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.trail.is-drawn .trail__line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s var(--ease-out); }
.trail__stop { fill: var(--orange); stroke: var(--cream); stroke-width: 2; }
.trail__marker { fill: var(--blue-ink); stroke: var(--cream); stroke-width: 3; opacity: 0; }
.trail.is-drawn .trail__marker { opacity: 1; transition: opacity 0.4s 1.2s; }

/* ---------- home: about ---------- */

.pillars {
  display: grid;
  grid-template-columns: 5fr 4fr 5fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  font-size: 1rem;
}
.pillar { min-width: 0; }
.pillar__title {
  margin-bottom: 0.5rem;
  color: var(--orange-text);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
}

/* ---------- home: cohort, media, faq, sponsors ---------- */

.cohort__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.frame--wide { aspect-ratio: 5 / 3; object-fit: cover; }

.media__stage {
  aspect-ratio: 2 / 1;
  border-radius: var(--tile);
  overflow: hidden;
  background: var(--sage);
}
.media__stage img, .media__stage video { width: 100%; height: 100%; object-fit: cover; }

.media__thumbs { display: flex; gap: 0.75rem; margin-top: 0.875rem; }
.media__thumb {
  flex: 0 1 8rem;
  aspect-ratio: 2 / 1;
  padding: 0;
  border: 0;
  border-radius: 0.625rem;
  background: none;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out);
}
.media__thumb img { width: 100%; height: 100%; object-fit: cover; }
.media__thumb:hover { transform: translateY(-2px); }
.media__thumb[aria-pressed="true"] { outline: 3px solid var(--blue-ink); outline-offset: 2px; }

.faq__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 3.5vw, 2.75rem) clamp(2rem, 6vw, 5rem);
}
.faq__item dt { font-size: 1.1875rem; font-weight: 700; line-height: 1.35; }
.faq__item dd { max-width: 52ch; margin-top: 0.4rem; }
.faq { scroll-margin-top: 6rem; }

.sponsors__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem) clamp(1rem, 3vw, 2rem);
  align-items: center;
}
.sponsor { font-size: clamp(1.125rem, 2vw, 1.5rem); font-weight: 700; line-height: 1.3; }
.sponsor img { max-height: 5rem; object-fit: contain; }

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

.planning__lead { margin-bottom: clamp(2rem, 4vw, 3rem); }

.planning__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.planning__img { aspect-ratio: 1; object-fit: cover; }

.day { position: relative; padding: 0 0 clamp(1.5rem, 2.5vw, 2rem) 2.25rem; }
.day::before {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.8rem;
  bottom: -0.8rem;
  border-left: 3px dotted var(--orange);
}
.day:last-child { padding-bottom: 0; }
.day:last-child::before { display: none; }
.day::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 1.05rem;
  height: 1.05rem;
  border: 3px solid var(--cream);
  border-radius: 50%;
  background: var(--orange);
}
.day__label { font-size: clamp(1.25rem, 2.1vw, 1.625rem); font-weight: 700; line-height: 1.35; }
.slot { line-height: 1.5; }
.slot__time { margin-right: 0.5em; color: var(--blue-ink); font-weight: 700; font-variant-numeric: tabular-nums; }

.activities__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
}
.activity__title { margin-bottom: 0.4rem; color: var(--orange-text); font-size: clamp(1.5rem, 2.2vw, 1.875rem); font-weight: 500; line-height: 1.2; }

/* ---------- workshops and contributors ---------- */

.entry {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 1.25rem clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  scroll-margin-top: 1rem;
  border-top: 1px solid rgb(50 83 61 / 0.22);
}
.entry:first-child { padding-top: 0; border-top: 0; }
.entry:last-child { padding-bottom: 0; }
.entry:nth-child(even) .entry__img { order: 2; }

.entry__img { aspect-ratio: 4 / 3; object-fit: cover; }
.entries--people .entry__img { aspect-ratio: 1; max-width: 26rem; justify-self: center; }

.entry__head { grid-column: 1 / -1; }
/* Names are set in Montserrat: the hand face has no accented capitals. */
.entry__name {
  font-size: clamp(1.75rem, 3.3vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.entry__by { display: inline-block; margin-top: 0.25rem; font-size: 1.125rem; font-weight: 700; }
.entry__link { margin-top: 1.1em; font-weight: 600; }

/* ---------- location ---------- */

.map__frame { width: 100%; height: clamp(22rem, 46vw, 36rem); border: 0; border-radius: var(--tile); }
.map__pending { position: relative; display: grid; place-items: center; height: clamp(22rem, 46vw, 36rem); }
.map__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--tile); }
.map__note { position: relative; max-width: 34ch; padding: 1rem 1.5rem; border-radius: var(--tile); background: var(--cream); text-align: center; text-wrap: balance; }

.venue__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(3rem, 6vw, 5rem);
}
.venue__name { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.2; }
.venue__address { margin-top: 0.25rem; color: var(--blue-ink); font-weight: 600; }
.venue__prose { margin-top: 1.5rem; }
.venue__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem clamp(1.5rem, 3vw, 2.5rem); margin-top: 2rem; font-size: 1rem; }
.venue__details dt { font-weight: 700; }
.venue__details dd { margin-top: 0.25rem; }
.venue__tickets { scroll-margin-top: 1rem; }
.venue__tickets p + p { margin-top: 1em; }
.venue__tickets-text { font-weight: 700; }

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

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: var(--edge);
  padding: clamp(3rem, 7vw, 6rem) var(--gutter) clamp(2rem, 4vw, 3.5rem);
}
.site-footer__logo { width: 4.5rem; height: auto; aspect-ratio: 1; }
.copyright { font-weight: 700; text-shadow: 0 0 0.6em rgb(243 239 224 / 0.9); }

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

@media (max-width: 62rem) {
  .site-header { flex-wrap: wrap; }
  .site-nav { order: 4; flex-basis: 100%; display: none; margin-left: 0; padding: 0.5rem 1.25rem; }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { padding-block: 0.7rem; width: fit-content; font-size: 1rem; }
  .ticket-button { margin-left: auto; }
  .site-header > .ticket-button + .nav-toggle { margin-left: 0; }
  .nav-toggle { display: grid; }
  .pillars, .activities__list { grid-template-columns: 1fr; }
  .pillar, .activity { max-width: 68ch; }
  .planning__grid { grid-template-columns: 1fr; }
  .planning__img { aspect-ratio: 16 / 10; }
}

@media (max-width: 47.99rem) {
  body::before { background-image: url("../img/art-wash-small.webp"); }
  .routes__stage { --trail-mode: vertical; padding-top: 0; padding-left: 2rem; }
  .routes__grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .route:nth-child(even) { margin-top: 0; }
  .route__img { aspect-ratio: 4 / 3; }
  .route__label { font-size: 2.75rem; }
  .cohort__grid, .faq__list, .venue__grid, .venue__details, .entry { grid-template-columns: 1fr; }
  .entry:nth-child(even) .entry__img { order: 0; }
  .media__stage { aspect-ratio: 4 / 3; }
  .sponsors__list { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 8.5rem; }
  .page-head { padding-top: 9.5rem; }
  body:not([data-page="index"]) .brand__name { display: none; }
  .hero__subtitle { font-size: 1.5rem; }
  .brand__name { font-size: 0.9375rem; }
  .ticket-button { font-size: 0.875rem; padding-inline: 1.1em; }
  .ticket-button--large { font-size: 1.125rem; }
}

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

/* ---------- work in progress ---------- */

.wip__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.wip__actions .ticket-button { margin-left: 0; }
.ticket-button--quiet { background: var(--forest); }
.ticket-button--quiet:hover { background: var(--blue-ink); }
