/* ------------------------------------------------------------------
   aNOther Festival
   Paper and ink. Bricolage Grotesque for the identity, Newsreader for
   the long-form pages. The rotating NO is the only ornament.
   ------------------------------------------------------------------ */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/fonts/Newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fff;
  --ink: #000;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text: "Newsreader", Georgia, "Times New Roman", serif;
  --page-pad: clamp(1.5rem, 3.9vw, 3.5rem);
  --display-width: 100%;
  --cap-height: 0.66;
  --spin-duration: 24s;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-line: cubic-bezier(0.22, 0.75, 0.25, 1);
}

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

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 18rem;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
p,
ul,
ol {
  margin-top: 0;
}

/* ------------------------------------------------------------------
   Skip link
   ------------------------------------------------------------------ */

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 0.85rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  line-height: 1;
  text-decoration: none;
  transform: translateY(-110%);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------
   The rotor

   NO sits in the normal inline flow. Its line box is exactly the cap
   height, so its transform origin is the optical centre of the two
   capitals. Rotating it never changes layout, the baseline, or the
   width of the word.
   ------------------------------------------------------------------ */

.rotor {
  display: inline-block;
  position: relative;
  margin-inline: 0.08em;
  line-height: var(--cap-height);
  vertical-align: baseline;
}

.rotor__spin {
  display: inline-block;
  line-height: var(--cap-height);
  transform-origin: 50% 50%;
  animation: rotor-spin var(--spin-duration) linear infinite;
  will-change: transform;
}

@keyframes rotor-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ------------------------------------------------------------------
   Shared navigation
   ------------------------------------------------------------------ */

.site-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3em;
  font-family: var(--font-display);
  font-weight: 600;
  font-stretch: 100%;
}

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 1.15em;
  padding-block: 0.11em;
  color: var(--ink);
  font-size: 1em;
  font-weight: inherit;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.site-nav__link > span {
  position: relative;
  display: inline-block;
}

/* Placed clear of the p descender in "Upcoming". */
.site-nav__link > span::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.21em;
  left: 0;
  height: 0.035em;
  min-height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 480ms var(--ease-line);
}

.site-nav__link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 0.05em;
}

.site-nav__link[aria-current="page"] {
  font-weight: 700;
}

.site-nav__link[aria-current="page"] > span::after,
.site-nav__link:hover > span::after {
  transform: scaleX(1);
}

/* ------------------------------------------------------------------
   Instagram
   ------------------------------------------------------------------ */

.social {
  line-height: 0;
}

.social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: -0.5rem;
  color: var(--ink);
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}

.social__icon {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  transition: transform 380ms var(--ease-out);
}

.social__link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

@media (hover: hover) {
  .social__link:hover .social__icon {
    transform: scale(1.08);
  }
}

/* ------------------------------------------------------------------
   Home
   ------------------------------------------------------------------ */

.home {
  min-height: 100vh;
  min-height: 100svh;
}

.home-stage {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--page-pad);
}

.home-wordmark {
  display: flex;
  align-items: center;
  width: 66vw;
  min-width: 0;
  container-type: inline-size;
}

.wordmark {
  width: 100%;
  margin: 0;
  font-family: var(--font-display);
  font-size: 25.4cqw;
  font-weight: 700;
  font-stretch: var(--display-width);
  line-height: 1.16;
  letter-spacing: 0.005em;
  font-optical-sizing: auto;
  white-space: nowrap;
}

.wordmark__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.wordmark__line {
  display: block;
  width: max-content;
  white-space: nowrap;
}


.wordmark__link:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 0.04em;
}

.home-nav {
  position: absolute;
  top: 50%;
  right: var(--page-pad);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transform: translateY(-50%);
}

.home .site-nav {
  font-size: clamp(2.4rem, 3.6vw, 4rem);
}

.home-social {
  position: absolute;
  right: var(--page-pad);
  bottom: var(--page-pad);
}

/* ------------------------------------------------------------------
   Subpage shell
   ------------------------------------------------------------------ */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: var(--page-pad) var(--page-pad) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-block: 0.12em;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2rem, 2.7vw, 2.5rem);
  font-weight: 700;
  font-stretch: 100%;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.brand .rotor {
  margin-inline: 0.1em;
}

.brand__text {
  display: inline-block;
}

.brand:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 0.16em;
}

.site-header .site-nav {
  flex-direction: row;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
  font-size: clamp(1rem, 1.25vw, 1.25rem);
}

.site-header .site-nav__link {
  min-height: 2.75rem;
  padding-block: 0.5em;
  justify-content: center;
  letter-spacing: 0;
}

.page-main {
  flex: 1;
  padding: 0 var(--page-pad);
}

.page-head {
  padding-top: clamp(3rem, 8vh, 7rem);
  padding-bottom: clamp(3rem, 8vh, 7rem);
}

.page-head__label {
  margin: 0 0 clamp(1rem, 2.2vh, 1.75rem);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 10.5rem);
  font-weight: 700;
  font-stretch: 100%;
  line-height: 0.85;
  letter-spacing: 0;
  font-optical-sizing: auto;
  text-wrap: balance;
}

.page-title--life {
  font-size: clamp(6rem, 16vw, 13rem);
  font-stretch: 100%;
  letter-spacing: 0;
}

/* ------------------------------------------------------------------
   Editorial sections
   ------------------------------------------------------------------ */

.entries {
  max-width: 68rem;
  padding-bottom: clamp(4rem, 10vh, 8rem);
}

.entry {
  display: grid;
  grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr);
  column-gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  padding-block: clamp(2rem, 4.5vh, 3.75rem);
}

.entry__label {
  margin: 0;
  padding-top: 0.45em;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.entry__body {
  min-width: 0;
}

.prose {
  max-width: 66ch;
  font-family: var(--font-text);
  font-size: clamp(1.125rem, 1.5vw, 1.3125rem);
  font-weight: 400;
  line-height: 1.55;
  text-wrap: pretty;
  overflow-wrap: break-word;
  orphans: 2;
  widows: 2;
}

.prose p {
  margin: 0 0 1.1em;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.19em;
  transition: text-decoration-thickness 180ms var(--ease-out);
}

.prose a:hover {
  text-decoration-thickness: 2px;
}

.prose a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 0.2em;
}

.people {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28em;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.35vw, 2.25rem);
  font-weight: 600;
  font-stretch: 100%;
  line-height: 1.2;
  letter-spacing: 0;
}

.people a {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
  transition: text-decoration-thickness 180ms var(--ease-out);
}

.people a:hover {
  text-decoration-thickness: 2px;
}

.people a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 0.14em;
}

.former-team {
  margin: 0;
  max-width: 40ch;
}

/* ------------------------------------------------------------------
   Upcoming / LIFE
   ------------------------------------------------------------------ */

.upcoming-intro {
  max-width: 66ch;
  padding-bottom: clamp(3rem, 7vh, 6rem);
}

.life-cloud {
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr);
  column-gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  width: 100%;
  max-width: 74rem;
  padding-block: clamp(4rem, 10vh, 8rem);
}

.life-cloud__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.5vw, 5.5rem);
  font-weight: 700;
  font-stretch: 100%;
  line-height: 0.85;
  letter-spacing: 0;
}

.life-cloud__list {
  columns: 2;
  column-gap: clamp(2rem, 4vw, 4rem);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.65vw, 1.5rem);
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.38;
  letter-spacing: 0;
}

.life-cloud__list li {
  break-inside: avoid;
  margin: 0 0 0.36em;
}

.life-cloud__list .life {
  font-weight: 700;
}

.life-cloud__list .ellipsis {
  letter-spacing: 0.12em;
}

/* ------------------------------------------------------------------
   Archive
   ------------------------------------------------------------------ */

.page-head--archive {
  padding-bottom: clamp(2rem, 4vh, 3.5rem);
}

.archive-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.5rem;
  margin: clamp(1.25rem, 2.5vh, 2rem) 0 0;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.archive-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 4vw, 4.5rem);
  row-gap: clamp(4rem, 7vw, 7rem);
  padding-bottom: clamp(4rem, 10vh, 8rem);
}

.archive-year {
  min-width: 0;
}

.archive-year--multi {
  grid-column: 1 / -1;
}

.archive-year__title {
  margin: 0 0 clamp(0.85rem, 1.5vw, 1.25rem);
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 3.4vw, 3.5rem);
  font-weight: 700;
  font-stretch: 100%;
  line-height: 0.9;
  letter-spacing: 0;
}

.archive-year__media {
  display: grid;
  grid-template-columns: 1fr;
}

.archive-year--multi .archive-year__media {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3.5rem);
  align-items: start;
}

.archive-item {
  margin: 0;
  min-width: 0;
}

.archive-item__link {
  display: block;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.archive-item__link img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper);
}

.archive-item__link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

.archive-item__caption {
  margin: 0.7rem 0 0;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.archive-source {
  max-width: 48ch;
  margin: 0;
  padding-bottom: clamp(4rem, 10vh, 8rem);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.5;
}

.archive-source a {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.archive-source a:hover {
  text-decoration-thickness: 2px;
}

.archive-source a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 0.2em;
}

/* ------------------------------------------------------------------
   Archive lightbox
   ------------------------------------------------------------------ */

html.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(1rem, 3vw, 3rem);
  border: 0;
  background: var(--ink);
  color: var(--paper);
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: var(--ink);
}

.lightbox__close {
  position: absolute;
  top: clamp(1rem, 3vw, 3rem);
  right: clamp(1rem, 3vw, 3rem);
  z-index: 1;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
  border: 0;
  background: none;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.lightbox__close:hover {
  text-decoration-line: underline;
  text-underline-offset: 0.2em;
}

.lightbox__close:focus,
.lightbox__close:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 4px;
}

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  max-width: 100%;
  max-height: 100%;
  margin: 0;
}

.lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw, 1400px);
  max-height: 76svh;
  object-fit: contain;
}

.lightbox__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.85rem;
  color: var(--paper);
  font-family: var(--font-display);
}

.lightbox__year {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  font-stretch: 100%;
  line-height: 1;
  letter-spacing: 0;
}

.lightbox__label {
  font-size: 0.75rem;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

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

.site-footer {
  display: flex;
  justify-content: flex-end;
  padding: clamp(5rem, 12vh, 9rem) var(--page-pad) var(--page-pad);
}

/* ------------------------------------------------------------------
   First paint
   ------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  .wordmark__line,
  .home .site-nav__link,
  .page-title,
  .brand {
    animation: rise 900ms var(--ease-out) backwards;
  }

  .wordmark__line:nth-child(2) {
    animation-delay: 80ms;
  }

  .home .site-nav__link:nth-child(1) { animation-delay: 140ms; }
  .home .site-nav__link:nth-child(2) { animation-delay: 210ms; }
  .home .site-nav__link:nth-child(3) { animation-delay: 280ms; }

  .home .social,
  .page-head__label,
  .entry,
  .upcoming-intro,
  .life-cloud,
  .archive-copy {
    animation: settle 700ms var(--ease-out) 100ms backwards;
  }

  .page-title {
    animation-delay: 140ms;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.14em);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rotor__spin {
    animation: none;
  }

  .wordmark__line,
  .home .site-nav__link,
  .page-title,
  .brand,
  .home .social,
  .page-head__label,
  .entry,
  .upcoming-intro,
  .life-cloud,
  .archive-copy {
    animation: none;
  }

  .site-nav__link > span::after,
  .social__icon,
  .prose a,
  .people a {
    transition-duration: 0.01ms;
  }
}

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

@media (min-width: 46.001rem) and (max-width: 52rem) {
  .home-stage {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto auto;
    row-gap: 1.5rem;
    align-items: stretch;
  }

  .home-wordmark {
    width: 100%;
    align-self: center;
  }

  .home-nav {
    position: static;
    grid-row: 2;
    align-self: end;
    transform: none;
  }

  .home .site-nav {
    font-size: clamp(2.25rem, 6.5vw, 3rem);
  }

  .home-social {
    position: static;
    grid-row: 3;
    justify-self: end;
  }
}

@media (max-width: 46rem) {
  .home-stage {
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
  }

  .home-wordmark {
    width: 100%;
  }

  .home-nav {
    position: absolute;
    top: auto;
    right: var(--page-pad);
    bottom: calc(var(--page-pad) + 4.5rem);
    transform: none;
  }

  .home .site-nav {
    font-size: clamp(2.25rem, 9.2vw, 2.75rem);
  }

  .home .site-nav__link {
    min-height: 2.75rem;
  }

  .social__link {
    margin: -0.625rem;
  }

  .social__icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding-bottom: 0;
  }

  .brand {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  .site-header .site-nav {
    flex-wrap: wrap;
    gap: 1.25rem;
  }

  .page-head {
    padding-top: clamp(2.5rem, 7vh, 4.5rem);
    padding-bottom: clamp(2.5rem, 7vh, 4rem);
  }

  .page-title {
    font-size: clamp(4rem, 15vw, 6rem);
  }

  .page-title--life {
    font-size: clamp(6.5rem, 28vw, 9rem);
  }

  .entries {
    padding-bottom: 3rem;
  }

  .entry {
    grid-template-columns: 1fr;
    row-gap: 1rem;
    padding-block: 1.75rem;
  }

  .entry__label {
    padding-top: 0;
  }

  .people {
    font-size: clamp(1.5rem, 7vw, 1.9rem);
  }

  .prose {
    font-size: 1.125rem;
    line-height: 1.58;
  }

  .life-cloud {
    grid-template-columns: 1fr;
    row-gap: 2.25rem;
    padding-block: clamp(3rem, 8vh, 5rem);
  }

  .life-cloud__title {
    font-size: clamp(3rem, 15vw, 4.5rem);
  }

  .life-cloud__list {
    columns: 1;
    font-size: 1.125rem;
    line-height: 1.38;
  }

  .page-head--archive {
    padding-bottom: 2.5rem;
  }

  .archive-gallery {
    grid-template-columns: 1fr;
    row-gap: 3.5rem;
  }

  .archive-year--multi {
    grid-column: auto;
  }

  .archive-year--multi .archive-year__media {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .archive-year__title {
    margin-bottom: 0.85rem;
  }

  .archive-source {
    font-size: 0.9375rem;
  }

  .site-footer {
    padding-top: 4rem;
  }
}

@media (max-width: 46rem) and (max-height: 40rem) {
  .home-stage {
    justify-content: flex-start;
    row-gap: 1.25rem;
  }

  .home-wordmark {
    flex: 1;
    align-items: center;
  }

  .home-nav {
    position: static;
    align-self: flex-end;
    transform: none;
  }

  .home .site-nav {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }

  .home .site-nav__link {
    min-height: 2.75rem;
  }

  .home .social {
    position: static;
    align-self: flex-end;
  }
}

@media (max-width: 24rem) {
  :root {
    --page-pad: 1.125rem;
  }

  .page-title {
    font-size: 3.5rem;
  }

  .page-title--life {
    font-size: 5.5rem;
  }

  .life-cloud__list {
    font-size: 1.0625rem;
  }
}
