@font-face {
  font-family:'The Dreamer';
  src:url('../fonts/The-Dreamer.woff') format('woff');
  font-weight:400;
  font-style:normal;
  font-display:swap;
}

:root {
  --paper:#efeded;
  --ink:#232520;
  --muted:#66685e;
  --perfect-purple:#8b18bc;
  --line:#b7b8ac;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--ink);
  background:var(--paper);
  font-synthesis:none;
}

* {
  box-sizing:border-box;
}

html {
  scroll-behavior:smooth;
}

body {
  margin:0;
  isolation:isolate;
}

/* A fixed layer keeps the cover artwork stable on desktop and mobile. */
body:before {
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background:var(--paper) url('../images/devilhood-background-latin.jpg') center center / cover no-repeat;
}

a {
  color:inherit;
}

/* Dark Reader changes text colours but cannot reliably recolour the paper image. */
html[data-darkreader-scheme="dark"] body:before {
  filter:brightness(.18) saturate(.6);
}
html[data-darkreader-scheme="dark"] .brand img {
  filter:invert(1);
}

button,input {
  font:inherit;
}

a:focus-visible,button:focus-visible,input:focus-visible {
  outline:3px solid var(--perfect-purple);
  outline-offset:5px;
}

.skip {
  position:fixed;
  top:-100px;
  left:20px;
  background:var(--ink);
  color:var(--paper);
  padding:14px;
  z-index:20;
}

.skip:focus {
  top:16px;
}

.masthead {
  margin:0 5%;
  min-height:116px;
  border-bottom:1px solid var(--ink);
  display:flex;
  align-items:center;
  gap:32px;
}

.brand img {
  width:190px;
  height:auto;
  display:block;
}

.mast-note {
  font-family:monospace;
  text-transform:uppercase;
  font-size:10px;
  letter-spacing:.12em;
  max-width:130px;
  line-height:1.6;
}

.masthead nav {
  display:flex;
  gap:30px;
  margin-left:auto;
  font-size:12px;
}

.masthead nav a {
  text-decoration:none;
}

.masthead nav a:hover {
  color:var(--perfect-purple);
}

.hero {
  position:relative;
  margin:0 5%;
  min-height:690px;
  padding:64px 0 55px;
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:center;
}

.hero-copy {
  position:relative;
  z-index:2;
}

.eyebrow {
  font:10px monospace;
  letter-spacing:.1em;
  text-transform:uppercase;
  margin:0 0 35px;
}

.signal-dot {
  display:inline-block;
  width:7px;
  height:7px;
  background:var(--perfect-purple);
  border-radius:50%;
  margin-right:10px;
}

h1 {
  font-size:clamp(66px,8.2vw,130px);
  font-weight:400;
  letter-spacing:-.075em;
  line-height:.92;
  margin:0;
}

.headline-plain {
  font-size:.85em;
}

h1 em {
  display:inline-block;
  padding-left:.22em;
  color:var(--perfect-purple);
  font-family:'The Dreamer',Georgia,serif;
  font-style:normal;
  letter-spacing:0;
  font-weight:400;
}

.intro {
  font-size:14px;
  line-height:1.7;
  margin:32px 0;
}

.explore {
  font:11px monospace;
  text-transform:uppercase;
  letter-spacing:.12em;
  text-decoration:none;
  display:inline-flex;
  gap:50px;
  align-items:center;
  border-bottom:1px solid;
  padding:0 0 12px;
}

.explore span {
  font-size:24px;
}

.art {
  position:relative;
  height:560px;
  transform:rotate(-8deg);
}

#contours {
  width:100%;
  height:100%;
  position:absolute;
  inset:0;
}

.art-photo {
  position:absolute;
  inset:20% 22% 18% 18%;
  background:url('../images/radiohead-background-twisted.jpg') center/cover;
  clip-path:polygon(25% 0,100% 12%,82% 85%,0 100%,12% 45%);
  mix-blend-mode:screen;
  opacity:0.5;
  transition:background-image .4s,opacity .4s;
  transform:rotate(12deg);
}

.art-label {
  position:absolute;
  bottom:1%;
  left:20%;
  font:9px monospace;
  letter-spacing:.1em;
}

.art-coordinate {
  position:absolute;
  top:42%;
  right:0;
  font:10px monospace;
  line-height:1.8;
}

.margin-note {
  position:absolute;
  right:-3%;
  top:48%;
  writing-mode:vertical-rl;
  font:8px monospace;
  letter-spacing:.13em;
}

.section-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:28px;
}

.section-heading h2 {
  font-size:26px;
  font-weight:400;
  letter-spacing:-.04em;
  margin:0;
}

.section-heading>span {
  font:10px monospace;
  text-transform:uppercase;
  letter-spacing:.1em;
}

.worlds {
  padding:40px 5% 60px;
  border-top:1px solid var(--ink);
}

.world-list {
  border-top:1px solid var(--ink);
}

.world {
  display:grid;
  grid-template-columns:70px 1fr 230px 35px;
  align-items:center;
  gap:20px;
  text-decoration:none;
  padding:28px 0;
  border-bottom:1px solid var(--line);
  transition:padding .25s,color .25s,background .25s;
}

.world-number {
  font:12px monospace;
  color:var(--perfect-purple);
}

.world-name {
  font-size:clamp(25px,3.5vw,48px);
  letter-spacing:-.05em;
}

.world-name-strong {
  font-weight:600;
}

.world-type {
  font:10px monospace;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:var(--muted);
}

.world-arrow {
  font-size:30px;
  font-weight:200;
}

.world:hover,.world:focus-visible {
  color:var(--perfect-purple);
  padding-left:18px;
  background:rgba(139,24,188,.06);
}

.postscript {
  font:400 40px 'The Dreamer',Georgia,serif;
  margin:50px 0 0;
}

.postscript span {
  font-family:Georgia,serif;
  float:right;
  font-size:70px;
  line-height:.5;
  color:var(--perfect-purple);
}

.footer {
  margin:0 5%;
  padding:25px 0;
  border-top:1px solid var(--ink);
  display:flex;
  justify-content:space-between;
  gap:20px;
  font:10px monospace;
  color:var(--muted);
}

.motion-toggle {
  border:0;
  border-bottom:1px solid;
  background:none;
  color:inherit;
  padding:0 0 4px;
  cursor:pointer;
}

.archive-main {
  padding:65px 5%;
}

.archive-intro {
  display:grid;
  grid-template-columns:1.3fr 1fr;
  gap:60px;
  align-items:end;
}

.archive-intro h1 {
  font-size:clamp(65px,9vw,130px);
}

.archive-intro p:not(.eyebrow) {
  line-height:1.7;
  max-width:390px;
  font-size:14px;
}

.archive-intro .eyebrow {
  max-width:none;
}

.archive-nav {
  display:flex;
  flex-wrap:wrap;
  gap:12px 24px;
  margin:50px 0 35px;
  font:11px monospace;
}

.archive-nav a {
  text-decoration:none;
  border-bottom:1px solid var(--line);
  padding-bottom:5px;
}

.archive-tools {
  border-top:1px solid var(--ink);
  padding:25px 0;
  display:flex;
  align-items:center;
  gap:20px;
}

.archive-tools label {
  font:11px monospace;
  text-transform:uppercase;
}

.archive-tools input {
  background:transparent;
  color:var(--ink);
  border:1px solid var(--line);
  padding:12px;
  width:min(420px,100%);
  border-radius:0;
}

.archive-tools p {
  font:11px monospace;
  color:var(--muted);
}

.archive-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:50px 65px;
}

.collection {
  scroll-margin-top:30px;
  border-top:2px solid var(--ink);
  padding-top:20px;
  min-width:0;
}

.collection h2 {
  font-size:32px;
  font-weight:400;
  letter-spacing:-.04em;
  margin:0 0 22px;
}

.collection h2 a {
  text-decoration:none;
}

.error-main {
  padding:80px 5%;
  max-width:1100px;
}

.error-main h1 {
  font-size:clamp(54px,7vw,100px);
}

.error-main .intro {
  max-width:480px;
}

.error-contact {
  margin-top:36px;
  font:11px monospace;
}

.collection-artwork {
  display:block;
  width:288px;
  max-width:100%;
  height:auto;
  margin:-6px 0 24px;
}

.collection-number {
  font:10px monospace;
  color:var(--perfect-purple);
  display:block;
  margin-bottom:12px;
}

.track {
  font-size:13px;
  line-height:1.9;
  border-bottom:1px solid var(--line);
  padding:9px 0;
}

.track a {
  font:10px monospace;
  text-decoration:none;
  color:var(--perfect-purple);
  display:inline-block;
  margin-left:8px;
  border-bottom:1px solid transparent;
}

.track a:hover {
  border-bottom-color:var(--perfect-purple);
}

.description {
  font-size:11px;
  line-height:1.8;
  color:var(--muted);
  margin-top:22px;
}

.description a {
  text-decoration-thickness:1px;
  text-underline-offset:3px;
}

.no-results {
  font-family:monospace;
  padding:30px 0;
}

.player {
  margin:0 5% 30px;
  padding:24px;
  border:1px solid var(--ink);
}

.player p {
  font:12px monospace;
  margin:0 0 16px;
}

.player audio {
  width:100%;
}

.play-track {
  border:1px solid var(--line);
  background:transparent;
  color:var(--ink);
  font:10px monospace;
  cursor:pointer;
  margin-left:10px;
  padding:3px 7px;
}

.play-track:hover {
  background:var(--ink);
  color:var(--paper);
}

[hidden] {
  display:none!important;
}

@media(max-width:800px) {
  .eyebrow-author {
    display:block;
    white-space:nowrap;
    margin-top:6px;
  }
  .masthead {
    gap:15px;
    min-height:95px;
    flex-wrap:wrap;
    padding:18px 0;
  }
  .brand img {
    width:150px;
  }
  .mast-note {
    display:none;
  }
  .masthead nav {
    gap:16px;
    font-size:11px;
  }
  .hero {
    padding-top:40px;
    min-height:600px;
  }
  .eyebrow {
    font-size:8px;
    max-width:220px;
    line-height:1.8;
  }
  .art {
    height:420px;
    margin-left:-90px;
    margin-right:-15px;
    opacity:.8;
  }
  .hero-copy h1 {
    font-size:76px;
  }
  .intro {
    max-width:270px;
    font-size:12px;
  }
  .world {
    grid-template-columns:30px 1fr 25px;
    gap:15px;
    padding:22px 0;
  }
  .world-type {
    display:none;
  }
  .world-arrow {
    font-size:24px;
  }
  .section-heading>span {
    font-size:8px;
  }
  .archive-intro {
    grid-template-columns:1fr;
    gap:25px;
  }
  .archive-grid {
    gap:35px;
  }
  .archive-tools {
    flex-wrap:wrap;
  }
  .footer {
    flex-wrap:wrap;
    line-height:1.6;
  }
  .footer>span:nth-child(2) {
    display:none;
  }
}

@media(max-width:520px) {
  .hero {
    display:block;
    min-height:680px;
    overflow:hidden;
  }
  .hero-copy h1 {
    font-size:75px;
  }
  .art {
    position:absolute;
    top:210px;
    left:35%;
    width:320px;
    height:410px;
    opacity:.45;
    z-index:0;
  }
  .intro,.explore {
    position:relative;
    z-index:2;
  }
  .intro {
    margin-top:35px;
  }
  .margin-note {
    display:none;
  }
  .section-heading {
    align-items:end;
  }
  .section-heading>span {
    max-width:90px;
    text-align:right;
    line-height:1.6;
  }
  .world-name {
    font-size:28px;
  }
  .archive-grid {
    grid-template-columns:1fr;
  }
  .archive-main {
    padding-top:45px;
  }
  .archive-intro h1 {
    font-size:72px;
  }
  .archive-tools input {
    width:100%;
  }
  .postscript {
    font-size:32px;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto;
  }
  *,*:before,*:after {
    transition:none!important;
    animation:none!important;
  }
}

body.motion-paused {
  scroll-behavior:auto;
}

.player {
  position:fixed;
  bottom:16px;
  left:5%;
  right:5%;
  margin:0;
  z-index:12;
  background:var(--paper);
  box-shadow:0 8px 40px #23252033;
}

.player #close-player {
  float:right;
  background:none;
  border:0;
  color:var(--perfect-purple);
  font:11px monospace;
  cursor:pointer;
}

.player #playback-status:empty {
  display:none;
}

.player #playback-status {
  margin:12px 0 0;
  line-height:1.6;
}


/* Experimental portal viewer. The ordinary world links remain available. */
.art-trigger {
  position:absolute;
  width:32px;
  height:32px;
  transform:translate(-50%,-50%);
  border:0;
  border-radius:50%;
  padding:0;
  background:transparent;
  cursor:pointer;
  z-index:2;
}
.art-trigger::before, .art-trigger::after, .portal-signal::before {
  content:"";
  position:absolute;
  width:14.4px;
  height:14.4px;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  border:1.4px solid var(--perfect-purple);
  border-radius:50%;
  box-sizing:border-box;
}
.art-trigger::before { z-index:1; background:transparent; transition:background-color .8s ease; }
.art-trigger:hover::before, .art-trigger:focus-visible::before {
  background:var(--perfect-purple);
}
.art-trigger::after {
  z-index:0;
  border:0;
  opacity:0;
  box-shadow:0 0 22px 10px #000b;
  transition:opacity .8s ease;
  animation:portal-hover-glow 2.4s ease-in-out infinite;
  pointer-events:none;
}
.art-trigger:hover::after, .art-trigger:focus-visible::after { opacity:1; }
html { scrollbar-gutter:stable; }
.portal-open { overflow:hidden; }
.portal-open .art-trigger::before, .portal-open .art-trigger::after { visibility:hidden; }
.portal-open .art-photo { opacity:0; transition:opacity .5s ease; }
.portal-viewer { position:fixed; inset:0; width:100vw; z-index:100; }
.portal-image {
  position:absolute;
  left:0;
  top:0;
  width:var(--portal-start-width,100vw);
  height:var(--portal-start-height,100vh);
  display:block;
  background-size:cover;
  background-position:center;
  transform-origin:0 0;
  opacity:0;
  clip-path:var(--portal-start-clip,polygon(25% 0,100% 12%,82% 85%,0 100%,12% 45%));
  transition:none;
}
.portal-viewer.is-entering .portal-image {
  opacity:.5;
  transition:opacity .5s ease;
}
.portal-viewer.is-expanded .portal-image {
  width:100vw;
  height:100vh;
  transition:width 1.6s cubic-bezier(.45,0,.2,1),height 1.6s cubic-bezier(.45,0,.2,1),transform 1.6s cubic-bezier(.45,0,.2,1),opacity 1.6s ease,clip-path 1.6s cubic-bezier(.45,0,.2,1);
  background-color:#000;
  opacity:1;
  clip-path:polygon(0 0,100% 0,100% 100%,0 100%,0 45%);
}
.portal-signal { position:absolute; width:32px; height:32px; transform:translate(-50%,-50%); pointer-events:none; opacity:1; transition:opacity .5s ease; }
.portal-signal::before { background:var(--portal-signal-fill,transparent); transition:background-color .8s ease; }
.is-entering .portal-signal::before { background:var(--perfect-purple); animation:portal-pulse 2.4s ease-in-out .8s infinite; }
.portal-viewer.is-complete .portal-signal { opacity:0; }
@keyframes portal-hover-glow {
  0%,100% { box-shadow:0 0 0 0 #0000; }
  50% { box-shadow:0 0 22px 10px #000b; }
}
@keyframes portal-pulse {
  0%,100% { box-shadow:0 0 0 0 #0000; transform:translate(-50%,-50%) scale(1); }
  50% { box-shadow:0 0 22px 10px #000b; transform:translate(-50%,-50%) scale(1.2); }
}
.portal-close,.portal-caption button { border:1px solid #ffffff88; background:#151515cc; color:#fff; padding:12px 18px; cursor:pointer; }
.portal-close { position:absolute; top:24px; right:24px; }
.portal-caption { position:absolute; bottom:0; left:0; right:0; display:flex; align-items:center; justify-content:center; gap:24px; padding:50px 24px 20px; color:white; background:linear-gradient(transparent,#000c); pointer-events:none; opacity:0; transition:opacity .6s ease; font:11px monospace; }
.portal-caption button { pointer-events:auto; font-size:22px; }
.portal-caption p { margin:8px 0; text-align:center; }
.portal-caption .portal-name { font-size:16px; }
.is-expanded .portal-caption { opacity:1; }
.motion-paused .portal-viewer *, .motion-paused .portal-viewer *::before { transition:none; animation:none; }
.motion-paused .art-trigger::before, .motion-paused .art-trigger::after { transition:none; animation:none; }
@media(max-width:520px) { .portal-caption { gap:10px; padding:40px 12px 16px; } .portal-caption button { padding:8px 12px; } .portal-caption .portal-name { font-size:12px; } .portal-caption p { font-size:9px; } }
