/* Real One. A release page, not a landing page: true black, the video centred at full height, the name set huge
   behind it in the hook's amber (accent_of(the hook's palette), realone/lyrictext.py), one action: play with sound.
   The rest sits small in the black margins. One motion: the Real Receipt wipes the video grey and takes the
   colour out of the type, so the only colour left on the page is the filmed artist. */
:root {
  --amber: #f2a541;
  --edge: #0b0806;
  --ink: #ffffff;
  --soft: #cfccc6;
  --grey: #5c5c5c;
  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wipe: 720ms cubic-bezier(0.7, 0, 0.2, 1);
  --vw-film: calc(100svh * 9 / 16);
  --side: calc(50vw - var(--vw-film) / 2);
  --e: 0.04em;
  --ring: var(--e) 0 0 var(--edge), calc(var(--e) * -1) 0 0 var(--edge), 0 var(--e) 0 var(--edge),
    0 calc(var(--e) * -1) 0 var(--edge), calc(var(--e) * 0.7) calc(var(--e) * 0.7) 0 var(--edge),
    calc(var(--e) * -0.7) calc(var(--e) * 0.7) 0 var(--edge), calc(var(--e) * 0.7) calc(var(--e) * -0.7) 0 var(--edge),
    calc(var(--e) * -0.7) calc(var(--e) * -0.7) 0 var(--edge);
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) { :root { --wipe: 0ms; } }

* { box-sizing: border-box; }
html, body { margin: 0; background: #000; color: var(--ink); }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); }

.page { position: relative; height: 100vh; height: 100svh; overflow: hidden; }

/* the name, split around the video: REAL in the left margin, ONE in the right, the artist between them */
.card { position: absolute; z-index: 0; inset: 0; margin: 0; pointer-events: none; font-family: var(--display); font-weight: 400;
  text-transform: uppercase; color: var(--amber); font-size: min(calc(var(--side) * 0.4), 34vh); line-height: 0.8;
  letter-spacing: 0.01em; transition: color var(--wipe); user-select: none; }
.card span { position: absolute; top: 50%; transform: translateY(-52%); width: var(--side); text-align: center; white-space: nowrap; }
.card span:first-child { left: 0; }
.card span:last-child { right: 0; }

/* the video: centred, full height, no frame */
.film { position: absolute; z-index: 1; left: 50%; top: 0; transform: translateX(-50%); height: 100%; aspect-ratio: 9 / 16; }
.frame { position: absolute; inset: 0; cursor: pointer; background: #000; }
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
#v-receipt { clip-path: inset(0 100% 0 0); transition: clip-path var(--wipe); pointer-events: none; }
.edge { position: absolute; top: 0; bottom: 0; left: 0; width: 3px; background: var(--ink); opacity: 0;
  transition: transform var(--wipe), opacity 120ms; pointer-events: none; }

.play { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); min-height: 64px; padding: 0 34px;
  background: #000; color: var(--ink); border: 0; cursor: pointer; white-space: nowrap;
  font-family: var(--display); font-size: min(4.2vh, 34px); text-transform: uppercase; letter-spacing: 0.04em; }
.play span { color: var(--amber); margin-right: 8px; font-size: 0.8em; }
.play:hover { color: var(--amber); }
.play[hidden], .sound[hidden] { display: none; }
.sound { position: absolute; right: 0; bottom: 0; min-height: 44px; min-width: 44px; padding: 10px 16px; background: none; border: 0;
  color: var(--ink); font-family: var(--display); font-size: 20px; text-transform: uppercase; letter-spacing: 0.03em;
  text-shadow: var(--ring); cursor: pointer; }

/* the margins: a line, the receipt, the way out */
.words { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.words > * { pointer-events: auto; }
.said { position: absolute; left: 4vw; top: 5vh; margin: 0; width: calc(var(--side) - 7vw);
  font-family: var(--display); text-transform: uppercase; font-size: min(3.4vh, 2vw); line-height: 1.05; }
.said span { display: block; }
.said span + span { color: var(--amber); transition: color var(--wipe); }
.what { display: none; }

.receipt { position: absolute; left: 4vw; bottom: 5vh; width: calc(var(--side) - 7vw); padding: 0; background: none; border: 0;
  color: inherit; text-align: left; cursor: pointer; font: inherit; min-height: 44px; }
.r-label { display: block; font-family: var(--display); text-transform: uppercase; font-size: min(2.8vh, 1.6vw); line-height: 1; }
.r-label::after { content: "  \2192"; color: var(--amber); }
.r-num { display: block; margin-top: 1vh; font-size: clamp(13px, min(1.8vh, 1vw), 17px); line-height: 1.4; color: var(--soft); }
.r-num b { font-family: var(--display); font-weight: 400; font-size: 1.9em; color: var(--amber); vertical-align: -0.12em;
  transition: color var(--wipe); }

.go { position: absolute; right: 4vw; bottom: 5vh; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.go a { display: inline-flex; align-items: flex-end; min-height: 44px; padding: 0 0 3px; color: var(--ink); text-decoration: none;
  border-bottom: 3px solid var(--amber); font-family: var(--display); text-transform: uppercase; font-size: min(3.4vh, 1.9vw);
  letter-spacing: 0.02em; }
.go a:hover { color: var(--amber); }
.go a[hidden] { display: none; }

.credits { position: absolute; right: 4vw; top: 5vh; width: calc(var(--side) - 7vw); text-align: right; }
.credit { margin: 0; font-size: 11px; line-height: 1.5; color: #8f8c86; letter-spacing: 0.02em; }
.credit.made { margin-top: 8px; }

.receipt:focus-visible, .go a:focus-visible, .play:focus-visible, .sound:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }

/* the Real Receipt */
html[data-receipt="1"] #v-receipt { clip-path: inset(0 0 0 0); }
html[data-receipt="1"] .card, html[data-receipt="1"] .r-num b, html[data-receipt="1"] .said span + span { color: var(--grey); }
html[data-receipt="1"] .edge { opacity: 1; transform: translateX(calc(var(--fw, 400px) - 3px)); }
html[data-receipt="1"] .r-label::after { content: ""; }

.test-banner { position: fixed; left: 0; right: 0; top: 0; z-index: 5; padding: 10px 16px; background: #ffd400; color: #000;
  font: 600 13px/1.4 var(--body); max-height: 30vh; overflow: auto; }
.test-banner strong { margin-right: 10px; }
.test-banner ul { margin: 4px 0 0; padding-left: 18px; }

/* phone: the first screen is the video with the name on it; one scroll reaches the rest */
@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  .page { height: auto; overflow: visible; }
  /* phone: the title is a black band above the film, so it never sits on his head or on the video's own lyrics */
  .card { position: relative; z-index: 2; inset: auto; display: block; transform: none; white-space: nowrap;
    padding: calc(env(safe-area-inset-top, 0px) + 2.2svh) 6vw 1.2svh; font-size: 17vw; line-height: 0.86; text-shadow: none; pointer-events: none; }
  .film { position: relative; left: 0; transform: none; width: 100%; height: calc(100vh - 14.62vw - 3.4vh); height: calc(100svh - 14.62vw - 3.4svh); aspect-ratio: auto; }
  .card span { position: static; transform: none; width: auto; display: inline; }
  .play { bottom: 9svh; font-size: 22px; }
  .words { position: static; padding: 7svh 7vw calc(env(safe-area-inset-bottom, 0px) + 6svh); pointer-events: auto; }
  .said, .receipt, .go, .credits { position: static; width: auto; text-align: left; }
  .credits { margin-top: 3svh; }
  .said { font-size: 10vw; }
  .what { display: block; margin: 1.6svh 0 0; font-size: 16px; line-height: 1.4; color: var(--soft); }
  .receipt { display: block; margin-top: 4svh; }
  .r-label { font-size: 10vw; }
  .r-num { font-size: 15px; }
  .go { align-items: flex-start; margin-top: 3.4svh; }
  .go a { font-size: 7vw; }
  .credit { font-size: 12px; }
  .credit.made { margin-top: 0.6svh; }
}
