/* Next Tuesday Society, the night.
   A plum-black ground, fire red, a cream glow. The type comes from the EMBERS
   flyers: a wide extended sans for display, solid cream with a restrained glow
   or hollowed to a red outline; red caps labels; a red vertical bar carrying a
   date and a place; lowercase typewriter mono rotated along the edges. The
   body is a calm serif. Contour lines and film grain are the two textures,
   both used sparingly.
   Text colours: --cream, --ash and --fire-text are at least 4.5:1 on --plum,
   the lightest ground. --fire (the brand red) only reaches 4.4:1, so it draws
   shapes, the bar and large display type, never small text. On the red bar
   the text is --night at 19px bold, large text under WCAG, 4.4:1. */
:root {
  --night: #0b0709;
  --plum: #2a0a22;
  --plum-deep: #160a12;
  --cream: #ffe9d0;
  --ash: #c9ab9f;
  --fire: #e51d47;
  --fire-deep: #d71941;
  --fire-text: #ff2d5a;
  --ember: #f2591b;
  --spark: #4fd0d0;
  --hair: rgba(229, 29, 71, 0.28);
  --hair-soft: rgba(255, 233, 208, 0.12);

  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-text: "Literata", Georgia, "Times New Roman", serif;
  --font-mono: "Courier Prime", "Courier New", monospace;
  --font-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;

  --glow: 0 0 0.12em rgba(255, 200, 140, 0.55), 0 0 0.5em rgba(242, 89, 27, 0.45), 0 0 1.4em rgba(229, 29, 71, 0.3);
  --glow-soft: 0 0 0.3em rgba(242, 89, 27, 0.35), 0 0 1em rgba(229, 29, 71, 0.2);

  --gutter: 16px;
  --measure: 36rem;
  --bar: 34px;
  --topo: url("/night/topo.svg");
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 180ms ease-in both night-out;
}

::view-transition-new(root) {
  animation: 320ms cubic-bezier(0.2, 0, 0, 1) both night-in;
}

@keyframes night-out {
  to { opacity: 0; filter: brightness(0.4); }
}

@keyframes night-in {
  from { opacity: 0; filter: brightness(1.6) blur(6px); }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--night);
  color-scheme: dark;
  scrollbar-color: var(--fire-deep) var(--night);
}

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font-family: var(--font-text);
  font-size: 1.125rem;
  line-height: 1.6;
  font-kerning: normal;
  overflow-x: hidden;
}

::selection {
  background: var(--fire);
  color: var(--night);
}

:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
  border-radius: 2px;
}

a {
  color: inherit;
  text-decoration-color: var(--fire);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 160ms ease-out, color 160ms ease-out;
}

a:hover {
  color: #fff;
  text-decoration-color: var(--cream);
}

/* The hollow filters live in an inline <svg class="defs"> on every page. */
.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Film grain: a turbulence tile over everything, barely there. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.91 0 0 0 0 0.82 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
}

/* ---------- Masthead ---------- */

.masthead {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem 1.5rem;
  padding: calc(var(--gutter) + 2px) calc(var(--bar) + var(--gutter) + 8px) 0 var(--gutter);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  padding: 0.6rem 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.2rem;
  margin: 0 -0.4rem;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 0.45rem 0.4rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fire-text);
}

.nav a:hover,
.nav a[aria-current] {
  color: var(--cream);
  text-shadow: var(--glow-soft);
}

/* ---------- Hero: the entity's stage ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(90% 60% at 50% 30%, rgba(42, 10, 34, 0.9), transparent 70%),
    var(--night);
}

.hero.compact {
  min-height: 72vh;
  min-height: 72svh;
}

.hero.compact .hero-text {
  padding-bottom: 2rem;
}

.hero.compact .edge {
  display: none;
}

.hearth {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  cursor: grab;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  -webkit-mask-image: linear-gradient(#000 78%, transparent 100%);
  mask-image: linear-gradient(#000 78%, transparent 100%);
}

.hearth:active {
  cursor: grabbing;
}

/* The still tetrahedron for visitors without script. */
.hearth-still {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.hearth-still svg {
  width: min(70vw, 56vh);
  height: auto;
  filter: drop-shadow(0 0 18px rgba(229, 29, 71, 0.4));
}

.hero-text {
  position: relative;
  z-index: 2;
  padding: 0 calc(var(--bar) + var(--gutter) + 8px) clamp(2.5rem, 7vh, 5rem) var(--gutter);
  background: linear-gradient(transparent, rgba(11, 7, 9, 0.82) 45%, var(--night));
  padding-top: clamp(4rem, 14vh, 9rem);
  pointer-events: none;
}

.hero-text > * {
  pointer-events: auto;
  width: fit-content;
  max-width: 100%;
}

.hero-text,
.hearth {
  user-select: none;
  -webkit-user-select: none;
}

.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.display .lit {
  color: var(--cream);
  text-shadow: var(--glow);
}

.display .hollow {
  color: var(--fire);
  filter: url("#hollow");
}

.hero h1.display {
  font-size: clamp(2.5rem, 12.6vw, 6rem);
}

.hero h1.display.long {
  font-size: clamp(2rem, 9.4vw, 6rem);
}

.hero h1.display .lit,
.hero h1.display .hollow {
  display: block;
}

.threshold {
  max-width: 26rem;
  margin: 1.4rem 0 0;
  font-size: clamp(1.05rem, 1.2rem + 0.4vw, 1.4rem);
  line-height: 1.4;
  color: var(--cream);
  text-wrap: pretty;
}

.hint {
  margin: 1.2rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--ash);
}

.hint .cue {
  color: var(--fire-text);
}

/* The red vertical bar from the flyer: a date and a place, read bottom-up. */
.bar {
  position: absolute;
  top: 0;
  right: calc(var(--gutter) - 4px);
  bottom: 0;
  z-index: 3;
  width: var(--bar);
  background: var(--fire);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem 0;
  box-shadow: -2px 0 24px rgba(229, 29, 71, 0.25);
}

.bar span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: var(--night);
  white-space: nowrap;
}

.bar span .pipe {
  display: inline-block;
  margin: 0.9em 0;
  width: 0.12em;
  height: 1.1em;
  background: var(--night);
  vertical-align: middle;
}

/* The edge: lowercase mono up the left side, after the 2023 poster. */
.edge {
  position: absolute;
  left: 4px;
  top: 8.5rem;
  z-index: 3;
  transform: rotate(180deg);
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--ash);
  white-space: nowrap;
  pointer-events: none;
}

/* ---------- Sections ---------- */

main {
  position: relative;
  z-index: 1;
}

.section {
  position: relative;
  padding: clamp(4rem, 10vh, 7rem) var(--gutter);
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
}

.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  width: 3rem;
  height: 1px;
  background: var(--fire);
}

.label {
  margin: 0 0 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fire-text);
}

.label .mark {
  margin-right: 0.6em;
  color: var(--fire-text);
}

.statement {
  margin: 0 0 1.2rem;
  font-size: clamp(1.35rem, 1.1rem + 1.4vw, 1.9rem);
  line-height: 1.3;
  font-weight: 400;
  text-wrap: pretty;
}

.section p {
  margin: 0 0 1.1rem;
  text-wrap: pretty;
}

.section p.quiet,
.quiet {
  color: var(--ash);
}

.call {
  margin: 1.6rem 0 0.6rem;
  font-size: 1.25rem;
  line-height: 1.4;
  font-style: italic;
}

.onward {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fire-text);
  padding: 0.5rem 0;
}

.onward::after {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin-left: 0.7em;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-0.1em) rotate(45deg);
  transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
}

.onward:hover {
  color: var(--cream);
  text-shadow: var(--glow-soft);
}

.onward:hover::after {
  transform: translate(0.3em, -0.1em) rotate(45deg);
}

/* The whisper: a line revealed on tap. The spark, used once. */
.whisper {
  margin-top: 1.2rem;
}

.whisper summary {
  display: inline-block;
  cursor: pointer;
  list-style: none;
  padding: 0.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--ash);
}

.whisper summary::-webkit-details-marker {
  display: none;
}

.whisper summary::after {
  content: " ?";
  color: var(--fire-text);
}

.whisper[open] summary::after {
  content: " .";
}

.whisper p {
  margin: 0.3rem 0 0;
  color: var(--spark);
  font-style: italic;
}

.whisper[open] p {
  animation: whisper-in 500ms cubic-bezier(0.2, 0, 0, 1) both;
}

@keyframes whisper-in {
  from { opacity: 0; filter: blur(4px); transform: translateY(4px); }
}

/* The wide word: a display line that sits in the body flow. */
.wide {
  margin: 0 0 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 1rem + 5.5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.wide em {
  font-style: normal;
  color: var(--cream);
  text-shadow: var(--glow);
}

/* The EMBERS band on the home page: contours behind the hollow word. */
.band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(180deg, var(--night), var(--plum-deep) 40%, var(--night));
}

.band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, var(--fire), var(--ember));
  -webkit-mask-image: var(--topo);
  mask-image: var(--topo);
  -webkit-mask-size: 600px 900px;
  mask-size: 600px 900px;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  opacity: 0.5;
}

.band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(75% 75% at 50% 50%, rgba(11, 7, 9, 0.1), var(--night) 100%);
}

/* Genres and names: red caps, right-aligned, after the flyer. */
.caps-list {
  margin: 1.6rem 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fire-text);
  line-height: 1.9;
}

/* Contact block */
.contact {
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 1.05rem;
}

.contact li {
  margin: 0.2rem 0;
}

.contact a {
  text-decoration-color: var(--hair);
}

/* ---------- Footer ---------- */

.colophon {
  position: relative;
  z-index: 1;
  margin-top: clamp(2rem, 8vh, 5rem);
  padding: 2.5rem var(--gutter) 5.5rem;
  border-top: 1px solid var(--hair);
  font-size: 0.95rem;
  color: var(--ash);
}

.colophon-inner {
  max-width: var(--measure);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  align-items: baseline;
}

.colophon p {
  margin: 0;
}

.colophon a {
  text-decoration-color: var(--hair);
}

.signature {
  flex-basis: 100%;
  margin-top: 1.4rem !important;
  color: var(--cream);
  font-style: italic;
}

.signature .emoji {
  font-family: var(--font-emoji);
  font-style: normal;
  margin-right: 0.3em;
}

/* ---------- Events: the poster wall ---------- */

.wall {
  position: relative;
  padding: 0 calc(var(--bar) + var(--gutter) + 1rem) 2rem var(--gutter);
}

.wall h2 {
  margin: clamp(3rem, 8vh, 5rem) 0 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 1rem + 2.4vw, 2.2rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fire);
  filter: url("#hollow-thin");
}

.posters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.poster {
  position: relative;
  display: grid;
  grid-template-columns: var(--bar) 1fr;
  min-height: 15rem;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(42, 10, 34, 0.85), transparent 60%),
    var(--plum-deep);
  border: 1px solid rgba(229, 29, 71, 0.1);
  overflow: hidden;
  transition: border-color 220ms ease-out, transform 320ms cubic-bezier(0.2, 0, 0, 1), box-shadow 320ms ease-out;
}

.poster:hover {
  border-color: rgba(229, 29, 71, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -20px rgba(229, 29, 71, 0.5);
}

.poster.upcoming::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--fire);
  -webkit-mask-image: var(--topo);
  mask-image: var(--topo);
  -webkit-mask-size: 420px 630px;
  mask-size: 420px 630px;
  -webkit-mask-position: 40% 20%;
  mask-position: 40% 20%;
  opacity: 0.3;
  pointer-events: none;
}

.poster .date {
  margin: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.9rem 0;
  background: var(--fire);
  color: var(--night);
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
}

.poster .body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.1rem 1.2rem;
}

.poster h3 {
  margin: 0 0 0.8rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--cream);
  text-wrap: balance;
}

.poster.upcoming h3 {
  text-shadow: var(--glow-soft);
}

.poster.gathering h3 {
  color: var(--cream);
  filter: url("#hollow");
}

.poster .line {
  margin: 0 0 auto;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ash);
}

.poster .place {
  margin: 1.2rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--ash);
}

.poster .place .kind {
  color: var(--fire-text);
}

/* ---------- The volumes (NOT NOT PHILO) ---------- */

.volumes {
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.volume {
  display: grid;
  grid-template-columns: var(--bar) 1fr;
  background: var(--plum-deep);
  border: 1px solid rgba(229, 29, 71, 0.18);
}

.volume .date {
  margin: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.9rem 0;
  background: var(--fire);
  color: var(--night);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
}

.volume .body {
  padding: 1.1rem 1.1rem 1.2rem;
}

.volume h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.volume .question {
  margin: 0 0 0.5rem;
  font-style: italic;
  font-size: 1.1rem;
}

.volume p:last-child {
  margin-bottom: 0;
  color: var(--ash);
  font-size: 1rem;
}

/* ---------- Responsive ---------- */

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
    --bar: 40px;
  }

  .nav a {
    padding: 0.6rem 0.55rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .hero-text {
    padding-right: calc(var(--bar) + var(--gutter) + 1rem);
  }

  .hero h1.display,
  .hero h1.display.long {
    font-size: clamp(3.4rem, 7.2vw, 6rem);
  }

  .hero h1.display .hollow {
    display: inline;
  }

  .threshold {
    max-width: 30rem;
  }

  .edge {
    left: calc(var(--gutter) - 14px);
    font-size: 0.82rem;
  }
}

@media (min-width: 1080px) {
  :root {
    --gutter: 48px;
  }

  .hero-text {
    max-width: 62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }

  .whisper[open] p {
    animation: none;
  }

  .poster,
  .onward::after {
    transition: none;
  }
}
