/* MarKyxx.com — one stylesheet, no frameworks.
   Colours are variables: change the accent in config.php (site.accent). */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #7c5cff;
  --bg: #0b0b10;
  --bg-2: #101018;
  --surface: #15151e;
  --surface-2: #1d1d28;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f5fa;
  --muted: #a9a9bc;
  --radius: 18px;
  --radius-sm: 12px;
  --gutter: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Outfit", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(900px 500px at -10% 30%, rgba(56, 189, 248, 0.07), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Browsers without color-mix(): plain background glow */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  body {
    background-image: radial-gradient(1200px 600px at 85% -10%, rgba(124, 92, 255, 0.16), transparent 70%);
  }
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; letter-spacing: -0.01em; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.sr, .skip:not(:focus) {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  background: var(--text); color: var(--bg);
  padding: 10px 14px; border-radius: 10px; font-weight: 600;
}

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

/* ---------- Watermark: faint tiled logo drifting diagonally ---------- */
.wm {
  position: fixed;
  top: -60%; left: -60%;
  width: 220%; height: 220%;
  z-index: -1;
  pointer-events: none;
  background-repeat: repeat;
  background-size: 260px auto;   /* tile width; height follows the image */
  opacity: 0.035;
  transform: rotate(-20deg);
  animation: mk-drift 80s linear infinite;
  will-change: transform;
}
@keyframes mk-drift {
  from { transform: rotate(-20deg) translate3d(0, 0, 0); }
  to   { transform: rotate(-20deg) translate3d(-260px, 0, 0); }   /* one tile width = seamless loop */
}

/* ---------- Header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 11, 16, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.top__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
/* Wide wordmark logo: fixed height, width follows the logo's own proportions */
.brand__logo { height: 40px; width: auto; max-width: min(240px, 55vw); object-fit: contain; flex: none; }
.brand__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.top__nav { display: flex; gap: 8px; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color .15s, border-color .15s;
}
.pill:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.3); }
.pill--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill--accent:hover { background: var(--accent); filter: brightness(1.1); }

/* ---------- Release page: back link / breadcrumb ---------- */
.brand-h1 { margin: 0; font-size: inherit; line-height: 0; }
.back { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 18px; }
.back--end { justify-content: center; margin: 36px 0 0; }
.crumbs { color: var(--muted); font-size: 0.92rem; }
.crumbs a { color: var(--text); text-underline-offset: 3px; }

/* ---------- Home: short intro under the releases (for people and search engines) ---------- */
.intro { margin: 48px auto 0; max-width: 760px; text-align: center; }
.intro__tag { margin: 0; font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.intro__text { margin: 8px 0 0; color: var(--muted); }
.intro__text a { color: var(--text); text-underline-offset: 3px; }
.notice { margin: 0 0 18px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.blurb { margin: 0 0 18px; font-size: 1.05rem; line-height: 1.65; }
.about-line { margin: 18px 0 0; color: var(--muted); font-size: 0.9rem; }
.hero__title a { color: inherit; text-decoration: none; }
.hero__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* ---------- Hero: latest release ---------- */
main { padding-top: 28px; padding-bottom: 48px; }

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
}
.hero__art { width: 100%; max-width: 440px; margin-inline: auto; }
.hero__title { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 750; margin: 6px 0 6px; overflow-wrap: anywhere; }
.hero__body { min-width: 0; }
.hero__extra { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; margin-top: 16px; }
.hero__extra .tracks { flex: 1 1 260px; }

@media (min-width: 800px) {
  .hero {
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 36px;
    padding: 28px;
  }
  .hero__art { position: sticky; top: 92px; }
}

.eyebrow { margin: 0; }
.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.badge--new { background: var(--accent); color: #fff; }
.badge--soon { background: #fbbf24; color: #1a1300; }

.meta { color: var(--muted); margin: 0 0 18px; font-size: 0.98rem; }
.muted { color: var(--muted); margin: 0; }

/* ---------- Cover art ---------- */
.cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
}
.cover--hero { border-radius: calc(var(--radius) + 2px); box-shadow: 0 30px 70px -25px rgba(0, 0, 0, 0.85); }
.cover--empty {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #111);
  font-family: var(--display);
  font-size: 5rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
}
/* Older Safari without aspect-ratio */
@supports not (aspect-ratio: 1 / 1) {
  .cover--empty { height: 0; padding-bottom: 100%; position: relative; }
  .cover--empty span { position: absolute; inset: 0; display: grid; place-items: center; }
}

/* ---------- Platform buttons ---------- */
.dsps { display: grid; gap: 8px; }
.dsps--hero { gap: 10px; }
@media (min-width: 1000px) {
  .dsps--hero { grid-template-columns: 1fr 1fr; }
}

.dsp {
  --dsp: #888;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 14px 0 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
  transition: border-color .15s, background-color .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.dsp:hover { border-color: var(--dsp); background: var(--surface-2); }
.dsp:active { transform: scale(0.985); }
.dsp__dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--dsp);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04), 0 0 14px var(--dsp);
  flex: none;
}
.dsp__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsp__verb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  flex: none;
}
.dsp:hover .dsp__verb { background: var(--dsp); color: #0b0b10; }
.dsp__verb svg { width: 12px; height: 12px; }
.dsps--hero .dsp { min-height: 56px; font-size: 1.05rem; }

/* ---------- Release grid ---------- */
.releases { margin-top: 56px; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 18px;
}
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 12px;
  min-width: 0;
}
.card__head { display: flex; flex-direction: column; color: inherit; text-decoration: none; border-radius: var(--radius); }
.card__head .meta { display: block; }
.card__head:hover .card__title { text-decoration: underline; text-underline-offset: 4px; }
.card__head .cover { transition: transform .2s; }
.card__head:hover .cover { transform: scale(1.015); }
.card__info { display: block; padding: 14px 4px 14px; min-width: 0; }
.card__body { padding: 0 4px 4px; display: flex; flex-direction: column; flex: 1; }
/* Phones: small cover beside the title so more releases fit on screen */
@media (max-width: 639px) {
  .card { padding: 12px; }
  .card__head { flex-direction: row; align-items: center; gap: 14px; margin-bottom: 12px; }
  .card__head .cover { width: 96px; flex: none; border-radius: 12px; }
  .card__head .cover--empty { font-size: 2.4rem; height: 96px; }
  .card__info { padding: 0; }
  .card .card__info .meta { margin-bottom: 0; }
  .card__body { padding: 0; }
}
.card__title { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; overflow-wrap: anywhere; }
.card .meta { margin-bottom: 14px; }
.card__foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-top: auto; padding-top: 12px; }
.card__foot .tracks { flex: 1 1 180px; }

/* Highlight a release reached from a shared link */
.card:target, .card.is-focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }

/* ---------- Disclosure: more platforms / tracklist ---------- */
details > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  user-select: none;
  -webkit-user-select: none;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .15s;
}
details[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
details > summary:hover { color: var(--text); border-color: var(--line-strong); }

.more { margin-top: 8px; }
.more > summary { width: 100%; justify-content: center; }
.more[open] > .dsps { margin-top: 8px; }

.tracks ol {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: t;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.tracks li {
  counter-increment: t;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.tracks li:first-child { border-top: 0; }
.tracks li span:first-child::before { content: counter(t) ". "; color: var(--muted); font-variant-numeric: tabular-nums; }
.tracks__len { color: var(--muted); font-variant-numeric: tabular-nums; }

.share {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.share:hover { color: var(--text); border-color: var(--line-strong); }
.share.is-done { color: #4ade80; border-color: rgba(74, 222, 128, 0.5); }

/* ---------- Empty state / plain pages ---------- */
.empty { text-align: center; padding: 18vh 0; }
.empty h1 { font-size: clamp(2.5rem, 9vw, 5rem); }
.empty p { color: var(--muted); }

.page__box {
  max-width: 720px;
  margin-inline: auto;
  padding: 28px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
}
.page__box h1 { font-size: clamp(2rem, 6vw, 2.8rem); margin-bottom: 14px; }

.prose { font-size: 1.07rem; line-height: 1.7; }
.prose p { margin: 0 0 1em; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose img { border-radius: var(--radius); margin: 8px 0 18px; }

/* ---------- About overlay ---------- */
.about {
  width: min(680px, calc(100vw - 24px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-2);
  color: var(--text);
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.8);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.about::backdrop { background: rgba(5, 5, 9, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.about[open] { animation: mk-pop .2s ease-out; }
@keyframes mk-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.about__box { position: relative; padding: 28px 22px 18px; }
.about__box h2 { font-size: clamp(1.7rem, 5vw, 2.3rem); margin: 0 48px 14px 0; }
.about__close {
  position: absolute;
  top: 12px; right: 12px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.about__close:hover { background: var(--surface-2); }
html.no-scroll, html.no-scroll body { overflow: hidden; }

/* On phones the overlay becomes a bottom sheet */
@media (max-width: 600px) {
  .about {
    width: 100vw;
    max-width: 100vw;
    margin: auto 0 0;
    max-height: 90vh;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .about[open] { animation: mk-sheet .25s ease-out; }
  @keyframes mk-sheet { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
}

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }
.foot__in { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.social a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 0.92rem;
}
.social a:hover { border-color: var(--line-strong); background: var(--surface); }
.foot__small { color: var(--muted); font-size: 0.85rem; margin: 0; }
.foot__label { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.social--pages a { border-color: var(--line-strong); background: var(--surface); }

/* ---------- Small phones ---------- */
@media (max-width: 380px) {
  :root { --gutter: 12px; }
  .brand__logo { height: 34px; }
  .pill { padding: 0 12px; }
  .hero { padding: 12px; }
}

/* ---------- Accessibility & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wm { animation: none; }
  .about[open] { animation: none; }
  * { transition: none !important; }
}
@media (prefers-contrast: more) {
  :root { --muted: #d6d6e2; --line: rgba(255, 255, 255, 0.3); }
  .wm { display: none; }
}
@media print {
  .wm, .top, .share, .foot, .about { display: none !important; }
  body { background: #fff; color: #000; }
}
