/* Cp3rap — one page, second design.
 *
 * What changed from the first design, following Astra's review of 2026-09-21:
 *   - The first screen does the job: the name, the art, AND the way to listen, with no scroll.
 *   - Restraint. One solid button style, one glow on the page (the PULSE phone), labels in
 *     sentence case, and quiet space around each piece of work.
 *   - Each kind of work gets its own shape: a record sleeve, a phone, video cards, a gallery.
 *
 * Unchanged on purpose: the palette from the game's css/themes.css, the two self-hosted
 * fonts, and zero third-party requests.
 */

@font-face {
  font-family: "Syne";
  src: url("fonts/syne.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #07040e;
  --bg-2: #110822;
  --panel: rgba(14, 7, 28, 0.74);
  --line: rgba(190, 140, 255, 0.2);

  --accent: #8b2cff;
  --accent-deep: #6f1fe0;
  --accent-soft: #c084fc;
  --green: #39ff14;
  --magenta: #ff2d9a;

  --text: #f5efff;
  --muted: #a898c4;

  --display: "Syne", "Segoe UI", system-ui, sans-serif;
  --body: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;

  --page: 74rem;
  --gap: clamp(4rem, 10vh, 7.5rem);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 70; padding: 0.8rem 1.2rem; background: var(--bg-2); color: var(--text); }
.skip:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Film grain, lighter than before: texture, not an effect. */
.grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0.09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- shared type and buttons ------------------------------------------------------------ */

.kicker { margin: 0 0 0.6rem; color: var(--accent-soft); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; }

.section-title {
  margin: 0; font-family: var(--display); font-weight: 800;
  font-size: clamp(2.2rem, 7vw, 4.4rem); line-height: 0.98; letter-spacing: -0.02em;
}

/* One solid primary style. White on #8b2cff is 5.4:1, and the hover goes darker, never lighter. */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.35rem; border-radius: 999px; border: 0;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.8rem 1.3rem; border-radius: 999px;
  border: 1px solid var(--accent-soft); color: var(--text); font-weight: 600; text-decoration: none;
  transition: background-color 0.2s ease;
}
.btn-secondary:hover { background: rgba(139, 44, 255, 0.18); }

.icon-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--text); transition: border-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { border-color: var(--accent-soft); }

.text-link {
  display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 0.3em;
}
.text-link:hover { text-decoration-color: var(--accent-soft); }

/* Brand marks are the real logo files, masked so they take the surrounding colour. */
.i {
  display: inline-block; width: 1.3em; height: 1.3em; background-color: currentColor;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
}
.i-spotify { -webkit-mask-image: url("icons/spotify.svg"); mask-image: url("icons/spotify.svg"); }
.i-apple   { -webkit-mask-image: url("icons/applemusic.svg"); mask-image: url("icons/applemusic.svg"); }
.i-youtube { -webkit-mask-image: url("icons/youtube.svg"); mask-image: url("icons/youtube.svg"); }
.i-itch    { -webkit-mask-image: url("icons/itchdotio.svg"); mask-image: url("icons/itchdotio.svg"); }
/* Each platform's mark in its own colour, all the time: the icon says where a link goes before
   any word does. */
.i-spotify { color: #1ed760; }
.i-apple   { color: #fa243c; }
.i-youtube { color: #ff0033; }
.i-itch    { color: #fa5c5c; }

/* YouTube gets a filled button so it stands out. White on #cc0000 is 5.9:1, and 5.0:1 on hover. */
.btn-youtube {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 1.6rem; border-radius: 999px;
  background: #cc0000; color: #fff; font-weight: 700; font-size: 1.05rem; text-decoration: none;
  box-shadow: 0 10px 32px rgba(204, 0, 0, 0.35);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-youtube:hover { background: #e00000; transform: translateY(-2px); box-shadow: 0 14px 40px rgba(224, 0, 0, 0.45); }
.btn-youtube .i-youtube { color: #fff; }

/* --- top bar ------------------------------------------------------------------------------ */

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 3.6rem; padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(7, 4, 14, 0.62); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}

.topbar-mark { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.topbar-mark img { border-radius: 7px; }
.topbar-mark span { font-family: var(--display); font-weight: 800; letter-spacing: 0.06em; }

.topbar-nav { display: flex; gap: clamp(0.8rem, 2.4vw, 1.8rem); font-size: 0.95rem; }
.topbar-nav a { color: var(--muted); text-decoration: none; padding: 0.4rem 0; }
.topbar-nav a:hover { color: var(--text); }

@media (max-width: 30rem) {
  .topbar-mark span { display: none; }       /* the badge alone, so all five links fit */
  .topbar-nav { gap: 0.95rem; font-size: 0.92rem; }
}

/* --- the first screen ------------------------------------------------------------------------ */

.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }

.hero-art, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art img { object-fit: cover; object-position: 64% 26%; }

/* Dark where the words sit, clear across her face. */
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 4, 14, 0.5) 0%, rgba(7, 4, 14, 0) 22%, rgba(7, 4, 14, 0) 42%, rgba(7, 4, 14, 0.9) 78%, var(--bg) 100%);
}

.hero-inner {
  position: relative; width: 100%; max-width: var(--page); margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem) clamp(1.25rem, 4vh, 2.5rem);
  display: grid; gap: 0.9rem; align-items: end;
}

.wordmark { margin: 0; width: min(100%, 34rem); }
.wordmark svg { display: block; width: 100%; height: auto; }
.wordmark text { font-family: var(--display); font-weight: 800; font-size: 215px; fill: var(--text); }

.ekg { display: block; width: min(100%, 34rem); height: 34px; }
.ekg path {
  fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke; stroke-dasharray: 700;
  animation: trace 5s ease-in-out infinite;
}
.ekg.racing path { animation-duration: 1.1s; stroke-width: 3.5; }

@keyframes trace {
  0% { stroke-dashoffset: 700; opacity: 0.35; }
  40%, 80% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -700; opacity: 0.35; }
}

/* The listening card: part of the first screen on every device. */
.now {
  display: grid; grid-template-columns: auto 1fr; gap: 0.8rem 1rem; align-items: center;
  padding: 0.9rem; border-radius: 18px; border: 1px solid var(--line);
  background: var(--panel); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  max-width: 34rem;
}
.now-cover { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; }
.now-text .kicker { margin-bottom: 0.15rem; }
.now h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 1.55rem; line-height: 1.05; }
.now h2 span { font-family: var(--body); font-weight: 500; font-size: 0.95rem; color: var(--muted); }
.now-actions { grid-column: 1 / -1; display: flex; gap: 0.6rem; align-items: center; }
/* The button takes whatever room the two icons leave, so all three stay on one row on a phone. */
.now-actions .btn-primary { flex: 1 1 0; min-width: 0; white-space: nowrap; }

@media (max-width: 30rem) {
  .now-actions .btn-primary { padding: 0.8rem 0.9rem; font-size: 0.95rem; }
}

@media (min-width: 54rem) {
  .hero-inner { grid-template-columns: 1fr auto; column-gap: 3rem; }
  .wordmark, .ekg { grid-column: 1; }
  .now { grid-column: 2; grid-row: 1 / span 2; align-self: end; width: 26rem; }
  .hero-art img { object-position: 60% 30%; }
}

/* --- the release, laid out like the inside of a sleeve --------------------------------------- */

.sleeve { max-width: var(--page); margin: 0 auto; padding: var(--gap) clamp(1rem, 4vw, 2rem); }
.sleeve-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 54rem) { .sleeve-grid { grid-template-columns: minmax(18rem, 26rem) 1fr; } }

.sleeve-cover img { border-radius: 8px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7); }

.sleeve-title { margin: 0 0 1rem; font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 10vw, 6rem); line-height: 0.9; letter-spacing: -0.02em; }
.sleeve-blurb { margin: 0 0 1.8rem; max-width: 32rem; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); }

.facts { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 1.8rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts div { padding: 0.8rem 1.4rem 0.8rem 0; margin-right: 1.4rem; }
.facts div + div { padding-left: 1.4rem; border-left: 1px solid var(--line); }
.facts dt { font-size: 0.8rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

/* On a narrow phone the three facts do not fit on one row, and the third used to wrap under the
   first still wearing a middle column's divider and indent. There they become a short list of
   label-and-value rows instead. */
@media (max-width: 40rem) {
  .facts { display: block; }
  .facts div, .facts div + div { display: flex; justify-content: space-between; gap: 1rem; margin: 0; padding: 0.75rem 0; border-left: 0; }
  .facts div + div { border-top: 1px solid var(--line); }
  .facts dd { text-align: right; }
}

.links { display: flex; flex-wrap: wrap; gap: 0.9rem 1.6rem; margin: 0; }

/* --- the 25-second preview ------------------------------------------------------------------- */

/* `hidden` must win over the display rules below; without this, visitors with JavaScript off
   would see play buttons that do nothing. */
.preview-btn[hidden], .preview-body[hidden] { display: none; }

.preview-btn {
  display: inline-grid; place-items: center; flex: none; width: 52px; height: 52px;
  border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.preview-btn:hover { background: var(--accent-deep); transform: scale(1.05); }
.preview-btn svg { width: 22px; height: 22px; fill: currentColor; }
.preview-btn .ico-pause, .preview-btn.is-playing .ico-play { display: none; }
.preview-btn.is-playing .ico-pause { display: block; }

/* The small one sitting on the cover in the first-screen card. */
.now-cover-wrap { position: relative; width: 76px; height: 76px; }
.preview-btn--overlay {
  position: absolute; inset: 0; margin: auto; width: 38px; height: 38px;
  background: rgba(7, 4, 14, 0.72); border: 1px solid rgba(255, 255, 255, 0.4);
}
.preview-btn--overlay svg { width: 16px; height: 16px; }

.preview { display: flex; align-items: center; gap: 1rem; max-width: 30rem; margin: 0 0 1.8rem; }
.preview-body { flex: 1; }
.preview-label { display: flex; justify-content: space-between; margin: 0 0 0.45rem; font-weight: 600; }
.preview-time { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.preview-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.preview-bar span { display: block; width: 0; height: 100%; background: var(--green); transition: width 0.25s linear; }
.preview-native { width: 100%; }
.js-preview .preview-native { display: none; }

/* --- PULSE, shown playing ---------------------------------------------------------------------- */

.play {
  padding: var(--gap) clamp(1rem, 4vw, 2rem);
  background: radial-gradient(60rem 40rem at 70% 50%, rgba(139, 44, 255, 0.16), transparent 70%), var(--bg);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.play-grid { max-width: var(--page); margin: 0 auto; display: grid; gap: 3rem; align-items: center; }
@media (min-width: 54rem) { .play-grid { grid-template-columns: 1fr auto; } }

.play-line { margin: 1rem 0 0.6rem; max-width: 30rem; font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); }
.play-sub { margin: 0 0 1.6rem; color: var(--muted); }

/* The only glow on the page, so the eye goes to the game. */
.phone {
  justify-self: center; width: min(17.5rem, 72vw); padding: 10px; border-radius: 38px;
  background: #0d0719; border: 1px solid rgba(190, 140, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 90px rgba(139, 44, 255, 0.35);
}
.phone-screen { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 28px; background: #000; }

/* --- watch --------------------------------------------------------------------------------------- */

.watch, .art { max-width: var(--page); margin: 0 auto; padding: var(--gap) clamp(1rem, 4vw, 2rem); }
.watch-head, .art-head { margin-bottom: 2rem; }

.watch-grid { display: grid; gap: 1.6rem; }
@media (min-width: 48rem) { .watch-grid { grid-template-columns: 1fr 1fr; } }

.watch-card { position: relative; display: block; text-decoration: none; }
.watch-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; transition: transform 0.35s ease; }
.watch-card:hover img { transform: scale(1.015); }
.watch-kind { display: block; margin: 0.9rem 0 0.2rem; color: var(--accent-soft); font-size: 0.85rem; font-weight: 600; }
.watch-card h3 { margin: 0 0 0.3rem; font-family: var(--display); font-weight: 800; font-size: 1.45rem; line-height: 1.1; }
.watch-card p { margin: 0; color: var(--muted); }

/* Loud on purpose: nobody should mistake a placeholder for the finished thing. */
.placeholder-badge {
  position: absolute; top: 0.7rem; left: 0.7rem; z-index: 2; padding: 0.25rem 0.65rem; border-radius: 999px;
  background: var(--magenta); color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}

.more { margin: 2rem 0 0; }

/* --- art ------------------------------------------------------------------------------------------ */

.art-line { margin: 0.8rem 0 0; color: var(--muted); }
/* The square portrait leads, spanning two rows beside two wide pieces; the other two wide pieces
   share the row beneath. Two 16:9 frames plus a gap are almost exactly one square's height, so
   everything ends level. Wide pieces are held to 16:9, so their slightly different source shapes
   do not break the rows. New pieces go in as ordinary items and flow into the same grid. */
.art-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; max-width: 60rem; }
.art-grid li { margin: 0; min-height: 0; }
.art-grid li:not(.tall) img { aspect-ratio: 16 / 9; object-fit: cover; }
.art-grid .tall { grid-row: span 2; }
.art-grid .tall .art-item, .art-grid .tall img { height: 100%; }
.art-grid .tall img { object-fit: cover; }
.art-item { display: block; overflow: hidden; border-radius: 10px; }
.art-item img { width: 100%; transition: transform 0.4s ease; }
.art-item:hover img { transform: scale(1.03); }

.lightbox { max-width: 92vw; max-height: 90vh; padding: 0; border: 0; border-radius: 12px; background: #000; color: var(--text); }
.lightbox::backdrop { background: rgba(4, 2, 9, 0.88); }
.lightbox img { max-width: 92vw; max-height: 82vh; width: auto; height: auto; }
.lightbox-close {
  display: block; width: 100%; padding: 0.8rem; border: 0; background: var(--bg-2);
  color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}

/* --- about and contact ------------------------------------------------------------------------------- */

.about { max-width: var(--page); margin: 0 auto; padding: var(--gap) clamp(1rem, 4vw, 2rem); border-top: 1px solid var(--line); }
.about-grid { display: grid; gap: 2.4rem; align-items: center; }
@media (min-width: 54rem) { .about-grid { grid-template-columns: 1.15fr 1fr; gap: 3.5rem; } }

.about-art { margin: 0; }
.about-art img { border-radius: 12px; }
.about-art figcaption { margin-top: 0.8rem; color: var(--muted); font-size: 0.92rem; }

.bio-text { margin: 0 0 1.2rem; font-size: clamp(1.15rem, 1rem + 0.8vw, 1.6rem); line-height: 1.45; }
.bio-sign { margin: 0; color: var(--muted); letter-spacing: 0.04em; }
.heart { color: var(--magenta); }

.contact { max-width: 40rem; margin: 0 auto; padding: var(--gap) 1.5rem; text-align: center; border-top: 1px solid var(--line); }
.contact-avatar { width: 96px; height: 96px; margin: 0 auto 1.2rem; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.contact-title { margin: 0 0 1.2rem; font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 5vw, 2.6rem); }
.contact-line { margin: 0 0 0.7rem; }
/* The address at a readable, ordinary size, so it never breaks in the middle of "gmail". */
.contact-addr { margin: 0; color: var(--muted); user-select: all; }

.foot { max-width: var(--page); margin: 0 auto; padding: 2.4rem 1.5rem 3.2rem; text-align: center; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }
.foot-mark { width: 84px; margin: 0 auto 1rem; }
.foot p { margin: 0 0 0.35rem; }
.fine { color: var(--muted); }   /* full colour now: at 70% opacity it measured 3.7:1 */

/* --- reveal on scroll, and anyone who asked for less motion ----------------------------------------- */

.js-motion .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js-motion .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ekg path { animation: none; stroke-dasharray: none; }
  .btn-primary, .btn-secondary, .btn-youtube, .preview-btn, .preview-bar span, .watch-card img, .art-item img { transition: none; }
  .btn-primary:hover, .btn-youtube:hover, .preview-btn:hover, .watch-card:hover img, .art-item:hover img { transform: none; }
}
