/* rille – eigene Oberflaeche fuer Maloja */
@font-face { font-family: "Anybody"; src: url(fonts/anybody-latin.woff2) format("woff2"); font-weight: 100 900; font-stretch: 50% 150%; 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: "Anybody"; src: url(fonts/anybody-latin-ext.woff2) format("woff2"); font-weight: 100 900; font-stretch: 50% 150%; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,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; }
@font-face { font-family: "Hanken Grotesk"; src: url(fonts/hanken-grotesk-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; 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: "Hanken Grotesk"; src: url(fonts/hanken-grotesk-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+20A0-20C0,U+2C60-2C7F,U+A720-A7FF; }

:root {
  color-scheme: dark;
  --night: #17142e;      /* Grund: Nacht-Indigo */
  --sleeve: #221e40;     /* Flaechen, Huellen */
  --sleeve-2: #2c2752;
  --paper: #f2ede4;      /* Text */
  --muted: #a9a3c9;
  --faint: #6f6898;
  --line: rgba(242, 237, 228, .09);
  --vinyl-1: #2a2547;
  --vinyl-2: #0e0c1d;
  --groove: #3a3463;
  --accent: #ff6f9c;     /* wird zur Laufzeit aus dem Cover berechnet */
  --accent-soft: color-mix(in oklab, var(--accent) 22%, transparent);
  --display: "Anybody", "Hanken Grotesk", system-ui, sans-serif;
  --text: "Hanken Grotesk", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --night: #ecebf6;
    --sleeve: #ffffff;
    --sleeve-2: #e2e0f0;
    --paper: #1b1838;
    --muted: #57517e;
    --faint: #8d88ad;
    --line: rgba(27, 24, 56, .1);
    --vinyl-1: #2d2848;
    --vinyl-2: #121022;
    --groove: #423b6c;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--paper);
  font: 400 1.0625rem/1.55 var(--text);
  overflow-x: hidden;
  transition: background-color .8s var(--ease-out);
}
body::before { /* Hauch der Coverfarbe oben links */
  content: ""; position: fixed; inset: -20vh -20vw auto auto; width: 70vw; height: 70vh; pointer-events: none; z-index: -1;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  left: -15vw; top: -25vh; transition: background 1.2s var(--ease-out);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--night); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- Kopf */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: color-mix(in oklab, var(--night) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.top.scrolled { border-bottom-color: var(--line); }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.35rem/1 var(--display); font-stretch: 125%; letter-spacing: -.01em; }
.mark svg { width: 28px; height: 28px; transition: transform .9s var(--ease-out); }
.mark:hover svg { transform: rotate(200deg); }
.m-disc { fill: var(--vinyl-2); stroke: var(--groove); }
.m-groove { fill: none; stroke: var(--groove); stroke-width: 1; }
.m-label { fill: var(--accent); transition: fill .8s; }
.m-hole { fill: var(--night); }
.top nav { display: flex; gap: clamp(10px, 2.4vw, 28px); font-size: .95rem; }
.top nav a { text-decoration: none; color: var(--muted); padding: 4px 2px; position: relative; }
.top nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.top nav a:hover { color: var(--paper); }
.top nav a:hover::after, .top nav a.on::after { transform: scaleX(1); }
.top nav a.on { color: var(--paper); }

main { padding: 0 var(--gutter); max-width: 1240px; margin: 0 auto; }

/* ---------------------------------------------------------------- Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center;
  gap: clamp(24px, 5vw, 72px);
  min-height: min(66vh, 680px); padding: clamp(20px, 4vh, 48px) 0 clamp(16px, 3vh, 32px);
}
.now { min-width: 0; }
.now-state { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--muted); font-size: 1rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex: none; }
.is-playing .dot { background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: beat 1.6s ease-out infinite; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }

.now-title {
  margin: 0; font: 800 clamp(2.6rem, 7.2vw, 6.2rem)/.92 var(--display);
  font-stretch: 112%; letter-spacing: -.025em; text-wrap: balance; overflow-wrap: anywhere;
}
.now-title .w { display: inline-block; white-space: nowrap; }
.now-title .ch { display: inline-block; }
.now-title.roll .ch { animation: roll .7s var(--ease-spring) both; animation-delay: calc(var(--i) * 22ms); }
@keyframes roll { from { transform: translateY(.6em) rotate(8deg); opacity: 0; filter: blur(4px); } to { transform: none; opacity: 1; filter: none; } }
.now-meta { margin: 22px 0 0; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.now-artist { color: var(--paper); font-weight: 600; text-decoration-color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.now-album { color: var(--muted); }

/* Plattenspieler */
.deck { position: relative; aspect-ratio: 1.18; width: 100%; max-width: 620px; justify-self: end; }
.sleeve {
  position: absolute; left: 0; top: 8%; width: 70%; aspect-ratio: 1; border-radius: 6px; overflow: hidden;
  background: var(--sleeve-2);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.6), inset 0 0 0 1px var(--line);
  transform: rotate(-4deg); transition: transform 1s var(--ease-out);
}
.sleeve img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; }
.sleeve img.ok { opacity: 1; }
.sleeve::after { /* Papierkante */
  content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 92%, rgba(0,0,0,.35)); pointer-events: none;
}
.platter { position: absolute; right: 0; top: 0; width: 84%; aspect-ratio: 1; }
.record { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 26px 40px rgba(0,0,0,.45)); }
.record .groove { fill: none; stroke: var(--groove); transition: stroke .6s, stroke-width .3s var(--ease-out); }
.record .micro { fill: none; stroke: rgba(255,255,255,.035); stroke-width: .6; }
.record .hit { fill: none; stroke: transparent; stroke-width: 3.6; cursor: crosshair; pointer-events: stroke; }
.record .hit:hover + .groove, .record .groove.hl { stroke-width: 3.4; stroke: var(--paper) !important; }
.label-bg { fill: var(--accent); transition: fill .8s; }
.label-tint { fill: none; stroke: rgba(0,0,0,.35); stroke-width: 3; }
.label-text { font: 700 8.5px var(--display); font-stretch: 130%; letter-spacing: .12em; fill: rgba(255,255,255,.9); paint-order: stroke; stroke: rgba(0,0,0,.45); stroke-width: 2.2px; }
.spindle { fill: #d9d4ea; stroke: rgba(0,0,0,.4); }
.spin { transform-origin: 200px 200px; transform-box: view-box; }
.is-playing .spin { animation: spin 1.8s linear infinite; }  /* 33⅓ U/min */
@keyframes spin { to { transform: rotate(360deg); } }

.arm { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.arm-swing { transform-origin: 368px 40px; transform-box: view-box; transform: rotate(-26deg); transition: transform 1.4s var(--ease-spring); }
.is-playing .arm-swing { transform: rotate(0deg); }
.arm-base { fill: var(--sleeve-2); stroke: var(--line); }
.arm-pivot { fill: var(--muted); }
.arm-rod { fill: none; stroke: #cfcae3; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.arm-head { fill: var(--accent); transition: fill .8s; }

/* Einstieg: Platte rutscht aus der Huelle */
.deck .platter { transform: translateX(-38%) rotate(-120deg); opacity: 0; }
.deck.in .platter { transform: none; opacity: 1; transition: transform 1.3s var(--ease-out) .1s, opacity .4s .1s; }
.deck.in .sleeve { transform: rotate(-4deg) translateX(-2%); }

.tip {
  position: absolute; z-index: 5; pointer-events: none; white-space: nowrap;
  background: var(--paper); color: var(--night); font-size: .85rem; font-weight: 600;
  padding: 6px 10px; border-radius: 8px; transform: translate(-50%, calc(-100% - 12px));
}
.tip b { font-family: var(--display); font-stretch: 120%; }

/* ---------------------------------------------------------------- Zeitraum + Satz */
.summary { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; padding: 8px 0 18px; border-bottom: 1px solid var(--line); }
.range { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--sleeve); box-shadow: inset 0 0 0 1px var(--line); }
.range button { position: relative; z-index: 1; border: 0; background: none; padding: 8px 16px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: .95rem; transition: color .3s; }
.range button[aria-checked="true"] { color: var(--night); }
.range-ind { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px; background: var(--paper); transition: transform .5s var(--ease-spring), width .5s var(--ease-spring); }
.prose { margin: 0; flex: 1 1 320px; color: var(--muted); font-size: 1.1rem; max-width: 62ch; }
.prose strong { color: var(--paper); font-weight: 700; }

/* ---------------------------------------------------------------- Abschnitte */
.block { padding: clamp(40px, 7vh, 72px) 0 8px; position: relative; }
.block h2 { margin: 0 0 22px; font: 800 clamp(1.6rem, 3.2vw, 2.4rem)/1 var(--display); font-stretch: 140%; letter-spacing: -.02em; }
.more { margin-top: 18px; border: 0; background: var(--sleeve); box-shadow: inset 0 0 0 1px var(--line); padding: 10px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; transition: background .3s, transform .3s var(--ease-spring); }
.more:hover { background: var(--sleeve-2); transform: translateY(-2px); }
.empty { color: var(--muted); padding: 12px 0; }

/* Kuenstler: die Breite der Schrift ist der Anteil */
.artists { list-style: none; margin: 0; padding: 0; }
.artists li { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; align-items: baseline; gap: 14px; border-top: 1px solid var(--line); }
.artists li:last-child { border-bottom: 1px solid var(--line); }
.artists .rk { color: var(--faint); font: 600 .95rem var(--display); font-variant-numeric: tabular-nums; }
.artists .nm {
  display: block; padding: 10px 0 8px; text-decoration: none; min-width: 0;
  font-family: var(--display); font-size: clamp(1.5rem, 4.4vw, 3.4rem); line-height: 1.05; letter-spacing: -.02em;
  font-weight: var(--wg, 600); font-stretch: var(--wd, 100%);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .25s, font-stretch .5s var(--ease-out), transform .5s var(--ease-out);
}
.artists li:hover .nm { color: var(--accent); transform: translateX(10px); }
.artists .ct { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .95rem; }
.peek { position: fixed; z-index: 30; left: 0; top: 0; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; pointer-events: none;
  opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(-12deg); transition: opacity .25s, transform .45s var(--ease-spring);
  box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 0 0 4px var(--accent); background: var(--sleeve-2); }
.peek.show { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
.peek img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: none) { .peek { display: none; } }

/* Alben: Huelle mit Platte dahinter */
.albums { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(168px, 42vw), 1fr)); gap: 34px 26px; }
.album { position: relative; }
.album .holder { position: relative; display: block; aspect-ratio: 1; text-decoration: none; }
.album .disc { position: absolute; inset: 3%; border-radius: 50%;
  background: radial-gradient(circle, var(--a, var(--accent)) 0 17%, #111 17.5% 19%, transparent 19.5%), repeating-radial-gradient(circle, var(--vinyl-2) 0 2px, #1d1934 2px 3px);
  transition: transform .7s var(--ease-out); box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.album .cover { display: block; position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 4px; overflow: hidden; background: var(--sleeve-2); box-shadow: 0 14px 30px -14px rgba(0,0,0,.6), inset 0 0 0 1px var(--line); transition: transform .5s var(--ease-out); }
.album .holder:hover .disc, .album .holder:focus-visible .disc { transform: translateX(38%) rotate(160deg); }
.album .holder:hover .cover, .album .holder:focus-visible .cover { transform: translateX(-6%) rotate(-2deg); }
.album h3 { margin: 12px 0 0; font: 700 1.02rem/1.25 var(--text); overflow-wrap: anywhere; }
.album p { margin: 2px 0 0; color: var(--muted); font-size: .93rem; }
.album .badge { position: absolute; z-index: 2; top: -10px; left: -10px; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center;
  background: var(--paper); color: var(--night); font: 800 .9rem/1 var(--display); font-stretch: 120%; box-shadow: 0 6px 14px rgba(0,0,0,.3); }

/* Bilder & Ersatz */
.art { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.art.ok { opacity: 1; }
.gen { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 10%;
  background: conic-gradient(from calc(var(--h) * 1deg), hsl(var(--h) 60% 42%), hsl(calc(var(--h) + 60) 55% 30%), hsl(var(--h) 60% 42%));
  font: 800 1.1rem/1.05 var(--display); font-stretch: 130%; color: rgba(255,255,255,.92); overflow-wrap: anywhere; }

/* Titel */
.tracks { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.tracks li { display: grid; grid-template-columns: 2.2em 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 8px 0; border-top: 1px solid var(--line); position: relative; }
.tracks .rk { color: var(--faint); font: 600 .95rem var(--display); font-variant-numeric: tabular-nums; }
.thumb { display: block; flex: none; position: relative; width: 52px; height: 52px; border-radius: 4px; overflow: hidden; background: var(--sleeve-2); }
.thumb .gen { font-size: .7rem; padding: 4px; }
.tt { min-width: 0; }
.tt b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt span { display: block; color: var(--muted); font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tracks .bar { position: absolute; left: calc(2.2em + 66px); bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; width: 0; transition: width 1s var(--ease-out); }
.tracks .ct { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .95rem; }

/* Verlauf */
.day { margin: 0 0 26px; }
.day h3 { position: sticky; top: 58px; z-index: 2; margin: 0; padding: 8px 0; font: 700 1.05rem var(--display); font-stretch: 120%; color: var(--muted); background: color-mix(in oklab, var(--night) 90%, transparent); }
.day ul { list-style: none; margin: 0; padding: 0; }
.day li { display: grid; grid-template-columns: 3.4em 44px minmax(0, 1fr); align-items: center; gap: 14px; padding: 6px 0; }
.day time { color: var(--faint); font-variant-numeric: tabular-nums; font-size: .92rem; }
.day .thumb { width: 44px; height: 44px; }
.day li.fresh { animation: drop .9s var(--ease-spring) both; }
@keyframes drop { from { transform: translateY(-14px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

.foot { max-width: 1240px; margin: 56px auto 0; padding: 28px var(--gutter) 48px; border-top: 1px solid var(--line); color: var(--faint); font-size: .92rem; }
.foot p { max-width: 70ch; margin: 0; }

/* ---------------------------------------------------------------- Schmal */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 28px; padding-top: 20px; }
  .deck { order: -1; justify-self: center; max-width: 440px; }
  .now-title { font-size: clamp(2.2rem, 11vw, 3.6rem); }
}
@media (max-width: 560px) {
  .top nav { gap: 12px; font-size: .88rem; }
  .top nav a:nth-child(3) { display: none; }
  .artists li { grid-template-columns: 1.8em minmax(0, 1fr) auto; gap: 10px; }
  .tracks li { grid-template-columns: 1.6em 44px minmax(0, 1fr) auto; gap: 10px; }
  .tracks .bar { left: calc(1.6em + 54px); }
  .thumb { width: 44px; height: 44px; }
  .range button { padding: 8px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .deck .platter { transform: none; opacity: 1; }
}
