@font-face {
  font-family: "Manic";
  src: url("../fonts/MANICRegular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Corpus Typewriter";
  src: url("../fonts/CorpusTypewriterRegular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Athelas";
  src: url("../fonts/Athelas-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #000000;
  --paper: #ffffff;
  --muted: #ffffff;
  --line: #ffffff;
  --font-body: "Corpus Typewriter", "Courier New", Courier, monospace;
  --font-display: "Manic", sans-serif;
  --font-quote: "Athelas", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  position: relative;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.site-chrome {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.55rem 6vw 1.6rem;
  background: var(--ink);
  border-bottom: 1px solid #000;
  isolation: isolate;
}
.site-header--mark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 0.45rem;
  padding-bottom: 1.4rem;
}
.mark {
  color: var(--paper);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
}
.mark-img img {
  display: block;
  width: min(330px, 82vw);
  height: auto;
  mix-blend-mode: screen;
}
html.site-eunoia .mark-img img {
  width: min(255px, 70vw);
}
html.site-analoguejoy .mark-img img {
  width: min(112px, 28vw);
  mix-blend-mode: normal;
}
main { padding: 0 0 4rem; max-width: none; }
.hero img,
.figure img,
.figure video {
  width: 100%;
  height: auto;
  display: block;
}
h1 { font-weight: 400; font-size: 1.15rem; margin: 1.5rem 6vw 0.75rem; }
.essay-date {
  font-family: var(--font-body);
  font-size: 0.65rem;
  margin: 0.35rem 6vw 0.7rem;
  padding: 0;
}
.essay h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.3vw, 2.35rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 0 6vw 0.85rem;
}
.essay-first {
  position: relative;
  display: inline-block;
  padding-bottom: 0.55em;
}
.essay-rule {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.12em;
  display: block;
  border: 0;
  border-top: 1px solid var(--paper);
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
}
.intro { color: var(--muted); max-width: none; padding: 0.55rem 6vw 0; font-size: 0.9rem; }
.block-paragraph,
.block-heading {
  font-size: 0.75rem;
}
.block { margin: 1.1rem 0; }
.block-heading,
.block-paragraph {
  padding: 0 6vw;
  max-width: none;
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}
.block-image:not(.block--full),
.block-video:not(.block--full) {
  padding: 0 6vw;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.block-image:not(.block--full) .figure,
.block-video:not(.block--full) .figure {
  width: 100%;
  max-width: 46rem;
}
.block-image:not(.block--full) .figure--portrait {
  max-width: min(26rem, 62vw);
}
.figure,
.figure figcaption {
  text-align: left;
}
.block--full,
.block-full_width_image,
.block-full_width_video,
.block-journal,
.block-vimeo {
  padding: 0;
  width: 80%;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}
.block--bleed,
.block-bleed_image,
.block-bleed_video {
  padding: 0;
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
.figure--bleed img,
.figure--bleed video,
.figure--full img,
.figure--full video {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}
.vimeo-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}
.vimeo-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.figure--bleed figcaption {
  padding: 0.55rem 6vw 0;
}
.block-quote {
  padding: 0;
  width: 100%;
  max-width: none;
  margin: 2.75rem 0;
}
.quote-box {
  color: var(--paper);
}
.quote-box blockquote {
  margin: 0;
}
.quote-text {
  font-family: var(--font-quote);
  font-size: clamp(1.35rem, 2.6vw, 2.05rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.01em;
  margin: 0;
}
.quote-text::before { content: "“"; }
.quote-text::after { content: "”"; }
.quote-author {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  margin-top: 1.25rem;
}
.quote-author::before {
  content: "– ";
}
.quote-box--centre {
  padding: 6.5rem 10vw;
  text-align: center;
}
.quote-box--centre .quote-copy {
  max-width: 36rem;
  margin: 0 auto;
  padding: 0;
}
.quote-box--image_left,
.quote-box--image_right,
.quote-box--video_left,
.quote-box--video_right {
  display: grid;
  grid-template-columns: minmax(11rem, 36%) minmax(0, 1fr);
  align-items: stretch;
  min-height: min(68vh, 34rem);
}
.quote-box--image_right,
.quote-box--video_right {
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 36%);
}
.quote-box--image_right .quote-media,
.quote-box--video_right .quote-media {
  order: 2;
}
.quote-box .quote-media {
  margin: 0;
  overflow: hidden;
  background: #000;
}
.quote-box .quote-media img,
.quote-box .quote-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.quote-box .quote-media figcaption {
  display: none;
}
.quote-box .quote-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.2rem 8%;
  text-align: center;
}
@media (max-width: 720px) {
  .quote-box--image_left,
  .quote-box--image_right,
  .quote-box--video_left,
  .quote-box--video_right {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .quote-box--image_right .quote-media,
  .quote-box--video_right .quote-media {
    order: 0;
  }
  .quote-box .quote-media {
    min-height: 16rem;
  }
}
.journal-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0c0b0a;
  overflow: hidden;
}
.journal-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
.block-image_text,
.block-video_text,
.block-two_images,
.block-three_images {
  padding: 0 6vw;
  max-width: none;
  margin: 1.75rem 0;
}
.image-text {
  display: grid;
  grid-template-columns: minmax(10rem, 38%) minmax(0, 1fr);
  gap: 1.5rem 2.5rem;
  align-items: start;
}
.image-text--right {
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 38%);
}
.image-text--right figure { order: 2; }
.image-text--right .image-text-copy { order: 1; }
.image-text-copy {
  font-size: 0.75rem;
  line-height: 1.5;
  max-width: none;
}
.video-text .figure video {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}
.video-text .figure--portrait {
  max-width: min(26rem, 62vw);
}
.block-two_images,
.block-three_images,
.block-four_images,
.block-five_images,
.block-six_images,
.block-tiles {
  padding: 0 6vw;
}
.image-row {
  display: grid;
  gap: 1.15rem;
  align-items: start;
}
.image-row--2 { grid-template-columns: 1fr 1fr; }
.image-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.image-row--4 { grid-template-columns: 1fr 1fr; }
.image-row--5,
.image-row--6 { grid-template-columns: 1fr 1fr 1fr; }
.image-row .figure img,
.image-zoom img {
  width: 100%;
  height: auto;
  display: block;
}
.image-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
@media (max-width: 720px) {
  .image-text,
  .image-text--right {
    grid-template-columns: 1fr;
  }
  .image-text--right figure,
  .image-text--right .image-text-copy {
    order: 0;
  }
  .image-row--2,
  .image-row--3,
  .image-row--4,
  .image-row--5,
  .image-row--6 {
    grid-template-columns: 1fr;
  }
}
.gallery-switch {
  display: flex;
  justify-content: flex-end;
  gap: 1.1rem;
  margin: 0 0 0.85rem;
}
.gallery-switch button {
  background: none;
  border: 0;
  color: var(--paper);
  font-family: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0;
  opacity: 0.38;
}
.gallery-switch button.is-on {
  opacity: 1;
}
.image-tiles {
  column-count: 3;
  column-gap: 0.45rem;
}
.image-tile {
  break-inside: avoid;
  margin: 0 0 0.45rem;
  padding: 0;
  border: 0;
  background: none;
  width: 100%;
  display: block;
  cursor: zoom-in;
}
.image-tile img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: bottom;
}
.image-carousel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.carousel-stage {
  position: relative;
}
.carousel-track {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 2.6rem;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex: 0 0 auto;
  scroll-snap-align: center;
  margin: 0;
  max-height: 72vh;
}
.carousel-open {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.carousel-slide img {
  max-height: 72vh;
  width: auto;
  height: auto;
  max-width: min(88vw, 56rem);
  display: block;
}
.carousel-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--paper);
  font-family: inherit;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  opacity: 0.7;
}
.carousel-nav--prev { left: 0; }
.carousel-nav--next { right: 0; }
.carousel-count,
.gallery-lightbox-count {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  margin: 0.7rem 0 0;
  opacity: 0.55;
  width: 100%;
}
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.2rem 3.4rem 2.4rem;
}
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}
.gallery-lightbox-frame {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
}
.gallery-lightbox-frame img {
  max-width: min(92vw, 1400px);
  max-height: 82vh;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}
.gallery-lightbox-frame figcaption {
  text-align: center;
  margin-top: 0.7rem;
  font-size: 0.78rem;
}
.gallery-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: 0;
  color: var(--paper);
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  opacity: 0.7;
}
.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--paper);
  font-family: inherit;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  opacity: 0.7;
}
.gallery-lightbox-nav--prev { left: 0.6rem; }
.gallery-lightbox-nav--next { right: 0.6rem; }
body.gallery-open { overflow: hidden; }
@media (max-width: 820px) {
  .image-tiles { column-count: 2; }
}
@media (max-width: 520px) {
  .image-tiles { column-count: 1; }
  .carousel-track { padding: 0 1.8rem; }
}
.figure figcaption {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.55rem;
}
.figure--full figcaption { padding: 0; }
.prose :last-child { margin-bottom: 0; }
.prose a { color: var(--paper); }

.home--quiet { min-height: 40vh; }

.timeline {
  --stamp: 7.4rem;
  --rail: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding: 0.4rem 6vw 4.5rem;
}
.timeline-month {
  display: grid;
  grid-template-columns: var(--stamp) var(--rail) minmax(0, 1fr);
  column-gap: 0.15rem;
  align-items: start;
  position: relative;
}
.timeline-stamp {
  text-align: right;
  padding: 0.12rem 0.45rem 0 0;
}
.timeline-month-name,
.timeline-year {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1.25;
}
.timeline-year {
  margin-top: 0.12rem;
  opacity: 0.8;
}
.timeline-rail {
  position: relative;
  align-self: stretch;
  min-height: 100%;
}
.timeline-rail::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: -2.5rem;
  width: 1px;
  background: var(--paper);
  transform: translateX(-50%);
}
.timeline-month:first-child .timeline-rail::before {
  top: 0.42rem;
}
.timeline-month:last-child .timeline-rail::before {
  bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: 50%;
  top: 0.42rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--paper);
  transform: translateX(-50%);
  z-index: 1;
}
.timeline-cards,
.collection-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.55rem 1.35rem;
}
.collection-cards {
  padding: 1.4rem 6vw 4.5rem;
}
.essay-card {
  width: 9.25rem;
  color: var(--paper);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.essay-card-cover {
  position: relative;
  display: block;
  width: 9.25rem;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #141414;
}
.essay-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.essay-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0.4;
  transition: opacity 0.28s ease;
  pointer-events: none;
  z-index: 1;
}
.essay-card-pill,
.essay-card-member {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12rem 0.34rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.4rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
  background: rgba(12, 12, 12, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.22);
  pointer-events: none;
}
.essay-card:hover .essay-card-cover::after,
.essay-card:focus-visible .essay-card-cover::after {
  opacity: 0;
}
.essay-card-title {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.2;
  margin-top: 0.5rem;
}
.essay-card-read {
  display: block;
  font-style: italic;
  font-size: 0.6rem;
  letter-spacing: 0.02em;
  margin-top: 0.16rem;
  opacity: 0.82;
}
.essay-card:focus-visible {
  outline: 1px solid var(--paper);
  outline-offset: 4px;
}
@media (max-width: 640px) {
  .timeline {
    --stamp: 5.6rem;
  }
  .essay-card,
  .essay-card-cover {
    width: 7.6rem;
  }
}

/* --- Age gate (jdaniels + eunoia) --- */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 4rem;
  background: var(--ink);
  text-align: center;
  color: var(--paper);
}
html.age-ok .age-gate { display: none; }
html.site-gated:not(.age-ok),
html.login-needed {
  overflow: hidden;
}
html.site-gated:not(.age-ok) .site-chrome,
html.login-needed .site-chrome {
  visibility: hidden;
}

.age-gate-logo {
  display: block;
  width: min(420px, 82vw);
  height: auto;
  margin: 0 auto 2.75rem;
  mix-blend-mode: screen;
}
html.site-eunoia .age-gate-logo {
  width: min(310px, 72vw);
}

.age-gate-notice {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: clamp(0.72rem, 1.4vw, 0.82rem);
  letter-spacing: 0.04em;
}

.age-gate-question {
  margin: 0 0 1.85rem;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.age-gate-actions {
  display: flex;
  gap: 2.75rem;
  align-items: baseline;
  justify-content: center;
}

.age-gate-enter,
.age-gate-leave {
  color: var(--paper);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0 0 0.15rem;
  background: none;
  border: 0;
  font-family: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.age-gate-enter {
  border-bottom: 1px solid var(--paper);
}

.age-gate-leave {
  color: var(--muted);
}

.age-gate-enter:hover,
.age-gate-leave:hover {
  color: var(--paper);
}

.login-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 4rem;
  background: var(--ink);
  text-align: center;
  color: var(--paper);
}
html.age-ok.login-needed .login-panel,
.login-panel.is-visible {
  display: flex;
}

.login-form {
  width: min(22rem, 86vw);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.15rem;
  margin-bottom: 1.75rem;
}

.login-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  text-align: left;
}

.login-field span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.login-field input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--paper);
  color: var(--paper);
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: inherit;
  padding: 0.35rem 0;
  border-radius: 0;
  outline: none;
}

.login-form .age-gate-enter {
  align-self: center;
  margin-top: 0.5rem;
}

.login-passkey {
  background: none;
  border: 0;
  color: var(--paper);
  font-family: inherit;
  font-size: 0.92rem;
  letter-spacing: inherit;
  cursor: pointer;
  padding: 0;
}
.login-panel .age-gate-leave {
  display: inline-block;
  margin-top: 1.5rem;
}

.login-error {
  margin: 0;
  color: var(--paper);
  font-size: 0.8rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  align-self: stretch;
  gap: 0.45rem 1.05rem;
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.site-nav a,
.account-link {
  color: var(--paper);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.account-link:hover {
  border-bottom-color: var(--paper);
}
@media (max-width: 720px) {
  .site-nav {
    gap: 0.35rem 0.8rem;
    font-size: 0.64rem;
    margin-bottom: 0.4rem;
  }
}
