/* Scyllaris — scyllaris.com
   The page is an open lyric booklet: black uncoated stock, bone ink,
   one spot ink taken from the album cover. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --night: #0b0c16;          /* the table the booklet lies on */
  --stock: #121015;          /* black uncoated stock */
  --ink: #ece4d6;            /* bone ink */
  --ink-2: #b9b2a6;          /* secondary print, 8.9:1 on stock */
  --ink-3: #8f897f;          /* small print, 5.4:1 on stock */
  --rule: rgb(236 228 214 / 0.14);
  --spot: #f2b45c;           /* the cover's moon */
  --face: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --pad: clamp(24px, 4.2vw, 60px);
  color-scheme: dark;
  scrollbar-color: #3b3540 var(--night);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vh, 64px) var(--gutter) clamp(20px, 4vh, 40px);
  background: var(--night);
  color: var(--ink);
  font-family: var(--face);
  font-size: 1rem;
  line-height: 1.5;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* the cover's colour field, blurred and darkened, as Scyllaris paints its backdrop */
body::before {
  content: "";
  position: fixed;
  inset: -28%;
  z-index: -1;
  background:
    linear-gradient(rgb(8 9 18 / 0.16), rgb(8 9 18 / 0.16)),
    url("/img/field.webp") center 42% / cover no-repeat,
    var(--night);
}

::selection { background: rgb(242 180 92 / 0.38); color: #fff; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgb(242 180 92 / 0.55);
  text-underline-offset: 0.22em;
  transition: text-decoration-color 160ms ease-out, color 160ms ease-out;
}
a:hover { text-decoration-color: var(--spot); color: #fff; }
a:focus-visible {
  outline: 2px solid var(--spot);
  outline-offset: 3px;
  border-radius: 2px;
  text-decoration-color: transparent;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ booklet */

.booklet {
  position: relative;
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: url("/img/grain.webp") repeat, var(--stock);
  border-radius: 3px;
  box-shadow:
    0 2px 3px rgb(0 0 0 / 0.35),
    0 24px 60px -18px rgb(0 0 0 / 0.70),
    0 60px 120px -40px rgb(0 0 0 / 0.55);
}

/* the centre fold: a crease, not a border */
.booklet::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: calc(50% - 36px);
  width: 72px;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgb(0 0 0 / 0) 0%,
    rgb(0 0 0 / 0.22) 44%,
    rgb(0 0 0 / 0.42) 49.6%,
    rgb(255 248 236 / 0.07) 50.2%,
    rgb(0 0 0 / 0.16) 56%,
    rgb(0 0 0 / 0) 100%);
}

.panel {
  position: relative;
  padding: var(--pad);
  min-width: 0;
}

/* ---------------------------------------------------------- credits panel */

.credits { display: flex; flex-direction: column; }

.masthead {
  display: flex;
  align-items: center;
  gap: clamp(16px, 1.9vw, 26px);
}

.cover {
  display: block;
  flex: none;
  width: clamp(76px, 7.2vw, 104px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 10px 24px -8px rgb(0 0 0 / 0.6);
}

.title {
  margin: 0;
  font-size: clamp(2.5rem, 4.3vw, 4.1rem);
  line-height: 0.92;
  font-weight: 860;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.subtitle {
  margin: 0.45em 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem);
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}

.release {
  margin: clamp(20px, 2.6vw, 30px) 0 0;
  padding-top: clamp(12px, 1.4vw, 16px);
  border-top: 1px solid var(--rule);
  font-size: clamp(0.98rem, 1.25vw, 1.12rem);
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.liner {
  margin: clamp(14px, 1.8vw, 22px) 0 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 1.25rem;
  font-size: 0.95rem;
}
.liner div { display: contents; }
.liner dt,
.liner dd {
  padding: 0.56rem 0 0.5rem;
  border-top: 1px solid var(--rule);
}
.liner dt {
  font-size: 0.7rem;
  line-height: 2.05;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.liner dd { margin: 0; color: var(--ink); line-height: 1.45; }

.colophon {
  margin-top: auto;
  padding-top: clamp(18px, 2.4vw, 28px);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.82rem;
  color: var(--ink-3);
}
.colophon svg { flex: none; width: 22px; height: 22px; }
.colophon p { margin: 0; }

/* ------------------------------------------------- lyric page: Scyllaris view */
/* A miniature of the real Scyllaris lyric view, built from the client's own
   recipe: feathered wipe, album-tinted sung-word glow, row hierarchy anchored
   at 30%, flowing row wave, held-note swell + aura, vocal bounce. */

@property --p { syntax: "<percentage>"; inherits: true; initial-value: -6%; }

@font-face {
  font-family: "Scyllaris Lyric";
  src: url("/fonts/noto-sans-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.stage {
  --tint: 242 205 111;               /* the cover's gold, as Scyllaris' Album Ink derives it */
  --dim: rgb(255 255 255 / 0.30);
  position: relative;
  container-type: inline-size;
  padding: 0;
  overflow: hidden;
  background: #000;
  border-radius: 0 3px 3px 0;
  min-height: 600px;
  display: flex;
  flex-direction: column;
}
.stage-art {
  position: absolute;
  inset: 0;
  background: url("/img/stage.webp") center / cover no-repeat;
  opacity: 0.75;
  transform: scale(1.3);
}
/* legibility for the page labels only */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgb(0 0 0 / 0.5), rgb(0 0 0 / 0) 14%),
    linear-gradient(rgb(0 0 0 / 0) 86%, rgb(0 0 0 / 0.55));
  z-index: 2;
}

.track {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  margin: 0;
  padding: var(--pad) var(--pad) 0;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.track .no { color: var(--spot); font-variant-numeric: tabular-nums; font-weight: 800; }
.track .sep { color: var(--ink-2); }

.lyrics-figure {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
}

.viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* rows pass under the page labels like the client's header, fading only
     inside the label and caption bands; every other row keeps its opacity */
  /* rows are fully gone by the bottom of the label band (plus a small gap)
     and ramp in below it, so no lyric ever touches the printed label */
  --band-top: calc(var(--pad) + 2.1rem);
  --band-bottom: calc(var(--pad) + 3.1rem);
  -webkit-mask-image: linear-gradient(rgb(0 0 0 / 0) var(--band-top), #000 calc(var(--band-top) + 34px),
                                      #000 calc(100% - var(--band-bottom) - 34px), rgb(0 0 0 / 0) calc(100% - var(--band-bottom)));
          mask-image: linear-gradient(rgb(0 0 0 / 0) var(--band-top), #000 calc(var(--band-top) + 34px),
                                      #000 calc(100% - var(--band-bottom) - 34px), rgb(0 0 0 / 0) calc(100% - var(--band-bottom)));
  transition: opacity 700ms ease;
}
.viewport.is-resetting { opacity: 0; }

.sheet {
  position: absolute;
  top: 0;
  left: var(--pad);
  right: var(--pad);
  margin: 0;
  padding: 0;
  will-change: transform;
}

.row {
  margin: 0.32em 0;
  padding: 0.04em 0;
  font-family: "Scyllaris Lyric", "Noto Sans", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 4.4cqi, 1.9rem);   /* column ≈ 18em, as measured in the client */
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--dim);
  transform: scale(0.97);
  transform-origin: left center;
  opacity: max(0.42, calc(1 - var(--d, 3) * 0.17));
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(.22, .61, .36, 1);
}
.row.on { transform: scale(1); opacity: 1; }
.row.veiled { opacity: 0; }
.row.sung, .row.on { color: #fff; }               /* static state, no script */
.sheet.is-live .row { color: var(--dim); }

/* feathered wipe: bright ink is a gradient-clipped copy of each word */
.w { position: relative; display: inline-block; white-space: nowrap; }
.w::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  white-space: pre;
  pointer-events: none;
  background: linear-gradient(90deg, #fff calc(var(--p) - 12%), rgb(255 255 255 / 0) calc(var(--p) + 6%));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* held notes: letters lift one by one as the wipe reaches them. Each letter is
   one unit (dim glyph + bright copy), so the two can never misregister; the
   bright copy's mask is laid out in word coordinates so the wipe stays continuous. */
.w.held { isolation: isolate; }
.w.held::after { content: none; }
.w.held .gl { position: relative; display: inline-block; transform-origin: center 80%; }
.w.held .gl.first { transform-origin: left 80%; }
.w.held .gl.last { transform-origin: right 80%; }
.w.held .gl .i {
  position: absolute;
  left: 0;
  top: 0;
  color: #fff;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(var(--p) - 12%), rgb(0 0 0 / 0) calc(var(--p) + 6%));
          mask-image: linear-gradient(90deg, #000 calc(var(--p) - 12%), rgb(0 0 0 / 0) calc(var(--p) + 6%));
  -webkit-mask-size: var(--ww, 100%) 100%;
          mask-size: var(--ww, 100%) 100%;
  -webkit-mask-position: calc(var(--gx, 0px) * -1) 0;
          mask-position: calc(var(--gx, 0px) * -1) 0;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}
/* the aura: a blurred, tinted copy of the letterforms behind the word, with
   room around it so the blur never meets its own box */
.w.held .aura {
  position: absolute;
  left: -0.5em;
  top: -0.5em;
  padding: 0.5em;
  z-index: -1;
  white-space: pre;
  color: rgb(var(--tint));
  -webkit-text-stroke: 0.07em rgb(var(--tint));
  filter: blur(0.28em);
  opacity: 0;
  pointer-events: none;
}

.caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 0 var(--pad) var(--pad);
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-2);
}

/* ------------------------------------------------------------- page foot */

.foot {
  width: min(1120px, 100%);
  margin-top: clamp(16px, 2.4vh, 26px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1.6rem;
  font-size: 0.8rem;
  color: #c9c2b6;
}
.foot p { margin: 0; }
.leaf-foot { width: min(760px, 100%); }

/* ------------------------------------------------------ small-print pages */

.leaf {
  width: min(760px, 100%);
  background: url("/img/grain.webp") repeat, var(--stock);
  border-radius: 3px;
  padding: var(--pad);
  box-shadow:
    0 2px 3px rgb(0 0 0 / 0.35),
    0 24px 60px -18px rgb(0 0 0 / 0.70);
}
.leaf .home {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.leaf .home svg { width: 26px; height: 26px; }
.leaf .home:hover { color: var(--ink); }
.leaf h1 {
  margin: clamp(26px, 4vw, 44px) 0 0;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 0.98;
  font-weight: 850;
  letter-spacing: -0.03em;
}
.leaf .lede {
  margin: 0.8em 0 0;
  font-size: 1.12rem;
  color: var(--ink-2);
  max-width: 60ch;
}
.leaf h2 {
  margin: 2.1em 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.leaf p, .leaf li { max-width: 66ch; color: var(--ink); }
.leaf h2 + p { margin-top: 0.65em; }
.leaf ul { padding-left: 1.1em; }
.leaf li + li { margin-top: 0.3em; }
.leaf .stamp {
  margin-top: 2.6em;
  font-size: 0.82rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.missing .numeral {
  display: block;
  font-size: clamp(5rem, 16vw, 6rem);
  line-height: 0.9;
  font-weight: 880;
  letter-spacing: -0.04em;
  color: var(--spot);
  font-variant-numeric: tabular-nums;
}

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

@media (max-width: 860px) {
  body { justify-content: flex-start; }
  .booklet { grid-template-columns: 1fr; }
  .booklet::before { display: none; }
  .stage { order: -1; min-height: min(70vh, 520px); border-radius: 3px 3px 0 0; }
  .row { font-size: clamp(1.15rem, 6.3cqi, 1.7rem); }   /* phone column ≈ 13.7em, as measured */
  /* stacked, the fold runs across the page between the two panels */
  .credits::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    top: -30px;
    height: 60px;
    pointer-events: none;
    background: linear-gradient(180deg,
      rgb(0 0 0 / 0) 0%,
      rgb(0 0 0 / 0.30) 49.4%,
      rgb(255 248 236 / 0.07) 50.2%,
      rgb(0 0 0 / 0.16) 57%,
      rgb(0 0 0 / 0) 100%);
  }
  .cover { width: 72px; }

  .foot { justify-content: flex-start; }
}

@media (max-width: 420px) {
  .liner { grid-template-columns: 1fr; }
  .liner dd { border-top: 0; padding-top: 0; }
  .liner dt { padding-bottom: 0.1rem; }
}

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