/* Visions by Ray: one-screen agency portfolio.
   Header across the top, a draggable strip of work along the bottom, everything else opens
   in panels. Menu shrinks the page into a card beside the other sections.
   Fonts are hosted in /fonts (SIL Open Font License) so the site loads fast and doesn't call Google.
   Placeholders (.todo, .ph) are purple so they're easy to find. */
@font-face { font-family: "Schibsted Grotesk"; src: url(../fonts/schibsted-grotesk-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url(../fonts/schibsted-grotesk-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Italianno"; src: url(../fonts/italianno-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: block; }

:root {
  --paper: #f8f6f2;       /* gallery-wall white */
  --ink: #141414;
  --grey: #6c6a66;
  --wash: #ebe9e3;        /* empty photo frames */
  --poster: #141414;      /* event poster tile */
  --poster-ink: #f8f6f2;
  --alt: #c9cfbd;         /* second type tile */
  --menu: #7a7965;        /* olive behind the shrunken page */
  --panel: #b3bea3;       /* sage panels */
  --panel-ink: #232b1c;
  --todo: #6a3cd6;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --script: "Italianno", "Snell Roundhand", cursive;
  --pad: max(16px, env(safe-area-inset-left, 0px));
  --gap: 10px;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --out: cubic-bezier(.2, .7, .1, 1);
  --small: clamp(.75rem, 3.6vw, .875rem);
  color-scheme: light;
}
@media (min-width: 900px) { :root { --small: .75rem; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d0d0c; --ink: #efede8; --grey: #9d9a94; --wash: #1a1a18;
    --poster: #efede8; --poster-ink: #0d0d0c; --alt: #2f3628;
    --menu: #34342b; --panel: #2a3322; --panel-ink: #d3dec4; --todo: #b9a2ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d0d0c; --ink: #efede8; --grey: #9d9a94; --wash: #1a1a18;
  --poster: #efede8; --poster-ink: #0d0d0c; --alt: #2f3628;
  --menu: #34342b; --panel: #2a3322; --panel-ink: #d3dec4; --todo: #b9a2ff;
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); overflow: hidden;
  font: 400 1rem/1.4 var(--sans); -webkit-font-smoothing: antialiased;
  transition: background .6s;
}
.menu-open body { background: var(--menu); }
a { color: inherit; text-decoration: none; }
p, h1, h2, dl, dd, ul, fieldset { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.todo {
  color: var(--todo); border: 1px dashed currentColor; border-radius: 3px;
  padding: 0 .3em; font-size: .9em; white-space: nowrap; text-transform: none; letter-spacing: 0;
}

/* the small uppercase voice */
.name, .lnk, .clock, .cap, .ft, .p-cap, .circle-label, .m-hd, .menu-foot, .p-kicker, .rows dt, .nums dt, label, .legend, .cursor {
  font-size: var(--small); line-height: 1.2; letter-spacing: .01em; text-transform: uppercase;
}

/* text that rolls up into place (.ri = mask, child = moving line) */
.ri { display: inline-block; overflow: hidden; vertical-align: top; }
.ri > span { display: inline-block; transition: transform .9s var(--out); }
.intro .ri > span { transform: translateY(110%); }
.intro.intro-head .hd .ri > span { transform: none; }
/* hover roll: the word slides up and a copy follows */
.roll { position: relative; }
.roll::after { content: attr(data-text); position: absolute; left: 0; top: 110%; }
.lnk .ri > .roll { transition: transform .45s var(--ease); }
.lnk:hover .ri > .roll { transform: translateY(-110%); }

/* ---------- Page ---------- */
.page {
  position: fixed; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper);
  transform-origin: 50% 50%;
  transition: transform .9s var(--ease);
}

/* ---------- Header ---------- */
.hd {
  position: relative; display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr) minmax(0, 1fr) 62px; align-items: start; gap: var(--gap);
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--pad) 0;
}
.name { display: block; }
.cycle { display: grid; overflow: hidden; }
.c-item { grid-area: 1 / 1; transform: translateY(105%); transition: transform .8s var(--ease); }
.c-item.is-on { transform: none; }
.c-item.is-out { transform: translateY(-105%); }
.intro .c-item.is-on { transform: translateY(105%); }
.intro.intro-head .c-item.is-on { transform: none; }
.mark { display: none; }
.links { display: contents; }
.links .lnk { justify-self: start; }
.clock { display: none; }
#clock i { font-style: normal; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.circle {
  position: absolute; right: var(--pad); top: calc(10px + env(safe-area-inset-top, 0px));
  width: 58px; height: 58px; border: 1px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center; transition: background .3s, color .3s, opacity .6s .9s;
}
.orbit { position: absolute; inset: 0; animation: spin 60s linear infinite; animation-delay: var(--sec, 0s); }
.dot { position: absolute; left: 50%; top: 6px; width: 7px; height: 7px; margin-left: -3.5px; border: 1px solid var(--ink); border-radius: 50%; }
@keyframes spin { to { transform: rotate(360deg); } }
.circle-label { opacity: 0; transition: opacity .3s; }
.circle:hover { background: var(--ink); color: var(--paper); }
.circle:hover .dot { border-color: var(--paper); }
.circle:hover .circle-label { opacity: 1; }
.intro .circle { opacity: 0; }
.intro.intro-head .circle { opacity: 1; }

@media (min-width: 900px) {
  .hd { grid-template-columns: repeat(4, 1fr); }
  .mark { display: block; margin-top: -6px; }
  .mark > span {
    display: inline-block; font: 400 3.4rem/.8 var(--script); padding: 0 .2em .1em 0;
    clip-path: inset(0 0 0 0); transition: clip-path 1.4s cubic-bezier(.5, 0, .3, 1) .2s;
  }
  .intro .mark > span { clip-path: inset(0 100% 0 0); }
  .intro.intro-head .mark > span { clip-path: inset(0 0 0 0); }
  .links { display: grid; justify-items: start; }
  .clock { display: block; }
  .circle { width: 54px; height: 54px; top: 12px; }
}

/* ---------- Strip ---------- */
.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.strip {
  --tw: min(78vw, calc((100svh - 250px) * .8));
  display: flex; gap: var(--gap); overflow-x: auto; overflow-y: hidden;
  padding: 0 var(--pad); scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-user-select: none; user-select: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip::after { content: ""; flex: 0 0 1px; margin-left: calc(var(--pad) - var(--gap) - 1px); }
@media (pointer: coarse) { .strip { scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); } .tile { scroll-snap-align: start; } }
@media (min-width: 900px) { .strip { --tw: min(calc((100vw - 2 * var(--pad) - 3 * var(--gap)) / 4), calc((100svh - 230px) * .8)); } }
.no-drag .drag-hint { visibility: hidden; }

.tile { flex: 0 0 var(--tw); }
.tile-in { display: grid; gap: 8px; }
.cap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.intro .cap .ri > span { transform: translateY(110%); }
.frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--wash);
  container-type: inline-size; transition: transform .5s var(--out);
}
.frame img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.strip.dragging .frame { transform: scale(.95); }
a.tile-in:hover .frame img { transform: scale(1.02); }
.intro .tile { opacity: 0; }

.ph {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  color: var(--todo); border: 1px dashed var(--todo); font-size: .75rem; text-transform: uppercase; line-height: 1.6;
}

/* the four cards: type designs that look finished now; add a photo and the text sits on top */
.card { display: grid; grid-template-rows: auto 1fr auto; padding: 7%; }
.card > p { position: relative; z-index: 1; }
.card > img { position: absolute; inset: 0; z-index: 0; }
.card:has(> img) { color: #fff; }
.card:has(> img)::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(to top, rgb(0 0 0 / .6), transparent 50%, transparent 75%, rgb(0 0 0 / .5)); }
.c-promo { background: var(--poster); color: var(--poster-ink); }
.c-rpl { background: var(--alt); color: var(--ink); }
.c-tax { background: var(--wash); color: var(--ink); }
.c-credit { background: var(--menu); color: #f8f6f2; }
.p-cap { font-size: max(.625rem, 3.6cqi); line-height: 1.3; }
.p-title { align-self: end; font-size: 15cqi; line-height: .9; letter-spacing: -.045em; font-weight: 500; margin-bottom: 6cqi; text-wrap: balance; }
.c-tax .p-title, .c-credit .p-title { font-size: 11.5cqi; line-height: .95; }
.card .todo { color: inherit; }

/* ---------- Footer ---------- */
.ft {
  display: flex; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap;
  padding: 14px var(--pad) calc(14px + env(safe-area-inset-bottom, 0px)); color: var(--ink);
  font-size: clamp(.875rem, 3.9vw, .9375rem); letter-spacing: .04em; line-height: 1.35;
}
.drag-hint { display: none; }
@media (min-width: 900px) { .drag-hint { display: block; } }
@media (max-width: 520px) { .ft { flex-direction: column; } }
.intro .ft { opacity: 0; }
.ft { transition: opacity .8s .2s; }

/* drag cursor (mouse only) */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none;
  padding: 8px 12px; border-radius: 999px; background: var(--ink); color: var(--paper);
  opacity: 0; transform: translate(-50%, -50%) scale(.6); transition: opacity .2s, transform .2s;
}
.cursor.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (pointer: coarse) { .cursor { display: none; } }

/* ---------- Intro frame ---------- */
.intro-frame {
  position: fixed; z-index: 25; left: 50%; top: 50%; width: clamp(96px, 9vw, 132px); aspect-ratio: 4 / 5;
  transform: translate(-50%, -50%); overflow: hidden; background: var(--wash); display: none;
}
.intro .intro-frame.on { display: block; }
.intro-frame > .frame { width: 100%; height: 100%; aspect-ratio: auto; }
.intro-frame .p-cap { font-size: 3.6cqi; }
.intro-frame .ph { font-size: 7cqi; }

/* ---------- Menu ---------- */
.menu { position: fixed; inset: 0; z-index: 20; }
.menu-close { position: absolute; z-index: 2; right: var(--pad); top: calc(16px + env(safe-area-inset-top, 0px)); color: #f8f6f2; }
.track {
  --s: .58; --cw: calc(100vw * var(--s)); --ch: calc(100svh * var(--s));
  position: absolute; inset: 0; display: flex; align-items: center; gap: 24px;
  padding-inline: calc((100vw - var(--cw)) / 2); overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.track::-webkit-scrollbar { display: none; }
.track::after { content: ""; flex: 0 0 1px; }
@media (min-width: 900px) { .track { --s: .5; gap: 32px; } }
.spacer, .mcard { flex: 0 0 var(--cw); height: var(--ch); scroll-snap-align: center; }
.spacer { background: transparent; }
.mcard {
  display: flex; flex-direction: column; justify-content: space-between; padding: 14px;
  background: var(--paper); color: var(--ink);
  opacity: 0; transform: translateX(40px); transition: opacity .6s var(--out), transform .8s var(--out);
}
.menu.on .mcard { opacity: 1; transform: none; }
.menu.on .mcard:nth-child(3) { transition-delay: .06s; } .menu.on .mcard:nth-child(4) { transition-delay: .12s; }
.menu.on .mcard:nth-child(5) { transition-delay: .18s; } .menu.on .mcard:nth-child(6) { transition-delay: .24s; }
.m-hd { font-size: .625rem; }
.m-title { font-size: max(2rem, calc(var(--cw) * .1)); line-height: .9; letter-spacing: -.045em; order: -1; margin-top: 18%; }
.mcard:hover .m-title { text-decoration: underline; text-decoration-thickness: .04em; text-underline-offset: .1em; }
.menu-foot { position: absolute; left: var(--pad); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); color: #f8f6f2; opacity: .85; }

/* ---------- Panels ---------- */
dialog.panel {
  width: min(100% - 32px, 640px); max-width: none; max-height: calc(100svh - 96px);
  margin: auto; padding: 18px 18px 28px; border: 0; overflow: auto; overscroll-behavior: contain;
  background: var(--panel); color: var(--panel-ink);
}
dialog.panel[open] { animation: panel-in .6s var(--out); }
dialog.panel::backdrop { background: rgb(0 0 0 / .4); animation: fade .4s; }
@keyframes panel-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
dialog.panel .todo { color: #3d1a99; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) dialog.panel .todo { color: var(--todo); } }
@media (min-width: 900px) { dialog.panel { padding: 22px 24px 32px; } }

.p-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.tabs { display: flex; gap: 14px; }
.tab { font-size: 1.05rem; text-underline-offset: 4px; }
.tab[aria-selected="true"] { text-decoration: underline; text-decoration-thickness: 1px; }
.p-h { font-weight: 400; font-size: clamp(3rem, 13vw, 5.4rem); line-height: .88; letter-spacing: -.05em; margin: clamp(28px, 6vw, 44px) 0 clamp(36px, 8vw, 64px); text-wrap: balance; }
.p-intro { margin-left: 33%; max-width: 30ch; margin-bottom: 36px; }
@media (max-width: 520px) { .p-intro { margin-left: 0; } }

.rows { border-top: 1px solid currentColor; }
.rows > div { display: grid; grid-template-columns: 33% 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 30%, transparent); }
.rows dt { padding-top: .2em; }
.rows dd .actions { display: flex; margin-top: 14px; }
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 16px; border-top: 1px solid currentColor; padding-top: 16px; }
.nums > div { display: flex; flex-direction: column; gap: 8px; }
.nums dd { font-size: clamp(2.6rem, 10vw, 4rem); line-height: 1; letter-spacing: -.05em; }
.nums dd .todo { font-size: 1rem; letter-spacing: 0; vertical-align: middle; }
.p-intro .todo { white-space: normal; }
.p-sub { font-size: var(--small); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; margin: 48px 0 12px; }
.actions.top { margin: -12px 0 0; }
.frame.video { aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--panel-ink) 10%, transparent); margin-bottom: 8px; }
.frame.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.panel .ph { color: inherit; border-color: currentColor; opacity: .7; }
.rows dd a { text-decoration: underline; text-underline-offset: 3px; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px;
  border: 1px solid currentColor; border-radius: 999px; background: var(--panel-ink); color: var(--panel);
  font-size: var(--small); text-transform: uppercase; letter-spacing: .01em; cursor: pointer;
  transition: background .25s, color .25s;
}
.btn:hover, .btn-line { background: transparent; color: var(--panel-ink); }
.btn-line:hover { background: var(--panel-ink); color: var(--panel); }

/* form */
.booking { border-top: 1px solid currentColor; }
.rows-f { border: 0; display: grid; grid-template-columns: 33% 1fr; gap: 16px; padding: 14px 0 18px; border-bottom: 1px solid color-mix(in srgb, currentColor 30%, transparent); }
.legend { padding-top: .2em; }
.checks { display: grid; gap: 8px; }
.checks label { display: flex; align-items: center; gap: 12px; text-transform: none; font-size: 1rem; letter-spacing: 0; cursor: pointer; }
input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 16px; height: 16px; margin: 0;
  border: 1px solid currentColor; border-radius: 0; background: transparent; cursor: pointer;
}
input[type="checkbox"]:checked { background: currentColor; box-shadow: inset 0 0 0 3px var(--panel); }
.field { display: grid; grid-template-columns: 33% 1fr; gap: 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 30%, transparent); }
.field:focus-within { border-bottom-color: currentColor; }
.field input, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--sans); color: inherit; background: transparent;
  border: 0; border-radius: 0; padding: 4px 0; -webkit-appearance: none; appearance: none; outline: none;
}
.field textarea { resize: vertical; min-height: 72px; }
.field:has(:focus-visible) { box-shadow: 0 1px 0 currentColor; }
::placeholder { color: inherit; opacity: .55; }
@media (max-width: 520px) { .rows-f, .field, .rows > div { grid-template-columns: 1fr; gap: 6px; } }
.form-status { min-height: 1.4em; margin-top: 14px; font-size: .9rem; }
.hp { position: absolute; left: -9999px; }

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

/* =================================================================
   CASE PAGES: clicking a card turns it into its own scrolling page
   ================================================================= */
.cases { display: none; }
.page.is-case { overflow-y: auto; overscroll-behavior: contain; display: block; }
.page.is-case .stage, .page.is-case > .ft { display: none; }
.page.is-case .cases { display: block; }
.page.is-case .hd { position: sticky; top: 0; z-index: 6; background: var(--paper); padding-bottom: 12px; }

/* cards leaving the home screen */
.strip .tile { transition: opacity .45s var(--out), transform .6s var(--out); }
.strip.leaving .tile { opacity: 0; transform: translateY(16px); }
.strip.leaving .tile.is-picked { opacity: 1; transform: none; }
.strip.leaving .tile.is-picked .frame { visibility: hidden; }
.strip.leaving .cap .ri > span { transform: translateY(110%); }
.page > .ft { transition: opacity .4s; }
.leaving-home > .ft { opacity: 0; }

/* the flying copy of the card */
.fly { position: fixed; z-index: 26; margin: 0; pointer-events: none; aspect-ratio: auto; }

/* hero: title bottom-left, artwork on the right half */
.case-hero {
  display: grid; gap: var(--gap); padding: 8px var(--pad) 16px;
  grid-template-columns: 1fr;
}
.case-media .frame { width: 100%; aspect-ratio: 4 / 5; }
.case-title h2 { font-weight: 400; font-size: clamp(3rem, 14vw, 7.4rem); line-height: .9; letter-spacing: -.05em; margin-top: 18px; }
.case-title h2 .ri { padding-bottom: .06em; }
.case-meta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 18px; }
.case-meta p { font-size: var(--small); text-transform: uppercase; line-height: 1.3; }
@media (min-width: 900px) {
  .case-hero {
    grid-template-columns: repeat(4, 1fr); height: calc(100svh - 76px); min-height: 520px;
  }
  .case-media { grid-column: 3 / 5; grid-row: 1; height: 100%; min-height: 0; }
  .case-media .frame { height: 100%; aspect-ratio: auto; }
  .case-title { grid-column: 1 / 3; grid-row: 1; align-self: end; }
  .case-title h2 { font-size: clamp(3.5rem, 6.6vw, 8rem); margin: 0; }
}
.case.entering .case-media { visibility: hidden; }
.case.entering .case-title .ri > span { transform: translateY(110%); }
.case-title .ri > span { transition: transform 1s var(--out); }
.case-title .case-meta .ri > span { transition-delay: .15s; }

/* body */
.case-body { display: grid; grid-template-columns: 1fr; gap: 0 var(--gap); padding: 40px var(--pad) 0; }
.statement { font-size: clamp(1.5rem, 2.6vw, 2.5rem); line-height: 1.12; letter-spacing: -.025em; max-width: 24ch; }
.statement .todo { white-space: normal; }
.c-sec { display: grid; gap: 14px; margin-top: clamp(64px, 10vw, 128px); }
.c-label { font-size: var(--small); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; color: var(--grey); }
@media (min-width: 900px) {
  .case-body { grid-template-columns: repeat(4, 1fr); padding-top: clamp(64px, 9vw, 120px); }
  .statement, .case-body > .c-content { grid-column: 3 / 5; }
  .c-sec { grid-column: 1 / 5; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
  .c-sec .c-label { grid-column: 1; }
  .c-sec .c-content { grid-column: 3 / 5; }
}
.case .rows, .case .nums { border-top-color: var(--ink); }
.case .rows dt, .case .nums dt { color: var(--grey); }
.case .btn { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.case .btn:hover, .case .btn-line { background: transparent; color: var(--ink); }
.case .btn-line:hover { background: var(--ink); color: var(--paper); }
.case .frame.video { background: var(--wash); }
.case .ph { color: var(--todo); border-color: var(--todo); opacity: 1; }

/* photo gallery: two offset images */
.c-gallery { display: grid; gap: 40px var(--gap); margin-top: clamp(80px, 12vw, 160px); }
.c-gallery figure { margin: 0; display: grid; gap: 8px; }
@media (min-width: 900px) {
  .c-gallery { grid-column: 1 / 5; grid-template-columns: repeat(4, 1fr); align-items: start; }
  .c-gallery figure:first-child { grid-column: 1 / 3; }
  .c-gallery figure:last-child { grid-column: 4 / 5; margin-top: 40%; }
}

/* next page link */
.next { display: grid; gap: 10px; margin: clamp(96px, 14vw, 180px) 0 clamp(48px, 8vw, 96px); }
.next-t { font-size: clamp(2.6rem, 9vw, 7rem); line-height: .9; letter-spacing: -.05em; }
.next:hover .next-t { text-decoration: underline; text-decoration-thickness: .04em; text-underline-offset: .1em; }
@media (min-width: 900px) { .next { grid-column: 1 / 5; } }
.case > .ft { border-top: 1px solid var(--wash); }

/* Close pill on case pages */
.case-close {
  position: fixed; z-index: 15; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-size: var(--small); text-transform: uppercase; transition: opacity .4s, transform .5s var(--out);
}
.in-case .case-close { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.menu-open .case-close { opacity: 0; pointer-events: none; }

/* ---------- photos on cards ---------- */
.card > img.portrait { object-position: 72% 30%; }
.c-flyer { padding: 0; background: #0e2a14; }
.c-flyer > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.c-flyer::after { display: none; }
.case-media .c-flyer > img { object-fit: contain; }           /* never crop the flyer's text on the page */
.case-media .c-flyer { background: var(--poster); }

/* ---------- "Who's behind it" roles: clear, one per row ---------- */
.roles { border-top: 1px solid var(--ink); }
.roles li { display: grid; gap: 4px; padding: 22px 0 24px; border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.role { font-size: var(--small); text-transform: uppercase; letter-spacing: .01em; color: var(--grey); }
.role-name { font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.05; letter-spacing: -.03em; margin-top: 4px; }
.role-desc { font-size: 1.05rem; line-height: 1.45; max-width: 40ch; margin-top: 6px; }

/* ---------- events ---------- */
.event-name { font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1; letter-spacing: -.035em; margin-bottom: 22px; }

/* easier reading on the pages */
.case .rows dd { font-size: 1.05rem; line-height: 1.45; }
.case .rows > div { padding: 16px 0; }
.in-case.close-hidden .case-close { opacity: 0; transform: translate(-50%, 20px); pointer-events: none; }
.case > .ft { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }

/* events card: big date, outlined */
.c-events { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); grid-template-rows: auto 1fr auto; }
.c-events .s-big { align-self: end; font-size: 40cqi; line-height: .8; letter-spacing: -.06em; margin: 0 0 7cqi -.03em; }

/* Richie's photo on the promotion page: smaller, in the open space beside the intro */
.c-portrait { margin: 40px 0 0 auto; width: 64%; }
.c-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 72% 35%; }
@media (min-width: 900px) {
  .c-portrait { grid-column: 1 / 3; grid-row: 1; justify-self: center; margin: 6px 0 0; width: min(68%, 420px); }
}
.nums.one { grid-template-columns: 1fr; }
.nums.one dd { font-size: clamp(2.6rem, 6vw, 4.6rem); }
@media (min-width: 900px) { .c-intro { grid-column: 3 / 5; grid-row: 1; align-self: start; } }

/* events card on the home strip: "Events" big, promoted by underneath */
.c-events { grid-template-rows: 1fr auto; }
.c-events .s-big { font-size: 27cqi; letter-spacing: -.05em; margin: 0 0 4cqi -.02em; }

/* event list: flyer in the open space on the left, details on the right */
.events { display: contents; }
.c-sec.event { align-items: start; }
.ev-flyer { margin: 0 0 24px; width: 82%; }
.ev-flyer img { width: 100%; height: auto; display: block; }
.event .c-label { margin-bottom: 8px; display: block; }
.no-events { font-size: 1.15rem; margin-top: 48px; }
@media (min-width: 900px) {
  .c-sec.event { grid-template-columns: repeat(4, 1fr); }
  .ev-flyer { grid-column: 1 / 3; grid-row: 1; justify-self: center; width: min(68%, 420px); margin: 0; }
  .c-sec.event .c-content { grid-column: 3 / 5; grid-row: 1; }
  .no-events { grid-column: 3 / 5; }
}
.case .fine { font-size: .85rem; color: var(--grey); margin-top: 18px; }
.case .fine .todo { white-space: normal; }
.c-sec .role-desc { margin: 0; }

/* ---------- all home cards follow the Events card: one big word (same size on every card) + subtext ---------- */
.card:has(> .s-big) { grid-template-rows: 1fr auto; }
.card .s-big {
  align-self: end; font-size: 18cqi; line-height: .9; letter-spacing: -.05em; font-weight: 400;
  margin: 0 0 4cqi -.02em;
}
.c-events .s-big { font-size: 18cqi; }

/* the promotion page card text rolls in after the card lands */
.case-media .ri > span { transition: transform 1s var(--out); }
.case-media .p-title .ri > span { transition-delay: .08s; }
.case-media .p-cap:last-child .ri > span { transition-delay: .16s; }
.case.entering .case-media .ri > span { transform: translateY(110%); }

/* ---------- round button: Richie's logo, slowly spinning ---------- */
.circle { overflow: hidden; border: 0; }
.spin-logo {
  position: absolute; inset: -4%; width: 108%; height: 108%; max-width: none; border-radius: 50%;
  object-fit: cover; animation: spin 14s linear infinite;
}
.circle:hover .spin-logo { animation-play-state: paused; }
.circle-label {
  position: relative; z-index: 1; color: #fff; background: rgb(0 0 0 / .65);
  width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%;
}
.circle:hover { background: transparent; }

/* script mark now reads "Visions by Ray" */
@media (min-width: 900px) { .mark > span { font-size: 3.4rem; line-height: .9; white-space: nowrap; } }

/* ---------- YouTube: thumbnail first, the player loads on press ---------- */
.yt { display: block; width: 100%; padding: 0; border: 0; cursor: pointer; background: #000; }
.yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.yt:hover img { opacity: .85; }
.yt-play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; background: rgb(255 255 255 / .92);
}
.yt-play::after {
  content: ""; position: absolute; left: 31px; top: 24px;
  border-left: 22px solid #000; border-top: 14px solid transparent; border-bottom: 14px solid transparent;
}
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
