/* VART — VARTDISTORT
   Mobile-first. The desktop layout (> 768px) is a single non-scrolling
   screen: full-bleed cover, tracklist bottom-right, social row bottom-left. */

:root {
  --ink: #1a1a1a;
  --paper: #f0ece8;
  --dark: #0c0c0c;
  --accent: #67070c;
  --grain-opacity: 0.07;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--dark);
}

body {
  -webkit-font-smoothing: antialiased;
  font-family: 'TT Hoves Pro Trial', 'TT Hoves Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--ink);
}

a { color: var(--ink); }
a:hover { color: #000; }

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- keyframes ---------- */

@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, 1%); }
  50%  { transform: translate(1%, -2%); }
  75%  { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

@keyframes trackWave {
  0%   { opacity: 0; transform: translateX(32px); }
  60%  { opacity: 1; transform: translateX(-6px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes trackWaveL {
  0%   { opacity: 0; transform: translateX(-32px); }
  60%  { opacity: 1; transform: translateX(6px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* ---------- film grain ---------- */

.grain {
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 60;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix type='saturate' values='0'/></filter><rect width='300' height='300' filter='url(%23n)'/></svg>");
  animation: grainShift 0.6s steps(4) infinite;
}

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

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
}

.logo {
  height: 22px;
  width: auto;
  display: block;
  fill: #000;
}

/* ---------- cursor-chasing video link (desktop only) ---------- */

.bubble { display: none; }

/* ---------- page ---------- */

.site {
  position: relative;
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero { position: relative; }

.hero__img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
}

.video {
  padding: 20px;
}

.video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

/* ---------- tracklist ---------- */

.tracks-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 20px 28px;
}

.tracks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  font-size: 16px;
  text-transform: capitalize;
  text-decoration: none;
  color: var(--ink);
  opacity: 0;
  animation: trackWave 0.7s var(--ease-out) forwards;
  animation-delay: var(--d, 0.3s);
}

.track__num {
  font-size: 0.7em;
  letter-spacing: 0;
}

.track__title { letter-spacing: 0.08em; }

.track__e {
  font-size: 0.6em;
  letter-spacing: 0;
  border: 1px solid var(--ink);
  padding: 1px 3px;
  line-height: 1;
}

.track__dur {
  font-size: 0.7em;
  letter-spacing: 0;
}

/* ---------- social links ---------- */

.links {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 24px 16px 32px;
  border-top: 1px solid rgba(26, 26, 26, 0.25);
}

.links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.links svg {
  width: 20px;
  height: 20px;
  fill: var(--ink);
}

/* ========== desktop ========== */

@media (min-width: 769px) {
  .site {
    display: block;
    background: var(--dark);
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }

  .hero {
    position: absolute;
    inset: 0;
    overflow: hidden;
  }

  .hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .video { display: none; }

  /* tracklist: bottom-right */
  .tracks-wrap {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 80px 40px 40px 0;
  }

  .tracks {
    align-items: flex-end;
    gap: 10px;
  }

  .track {
    justify-content: flex-start;
    gap: 8px;
    min-height: 0;
    font-size: 15px;
    text-align: right;
    cursor: pointer;
    transition: font-size 0.25s ease, color 0.25s ease;
  }

  .track__num { margin-right: 12px; }

  /* per-track base tracking (--tr); trailing space is cancelled by the
     negative margin so the right edge stays aligned with the duration */
  .track__title {
    font-weight: 400;
    letter-spacing: var(--tr, 0em);
    margin-right: calc(-1 * var(--tr, 0em));
    transition:
      letter-spacing 0.4s var(--ease-out),
      margin-right 0.4s var(--ease-out);
  }

  .track__e { align-self: center; }

  .track__dur {
    width: 3.6em;
    text-align: right;
    flex-shrink: 0;
  }

  .track:hover {
    font-size: 21px;
    color: var(--accent);
  }

  .track:hover .track__title {
    font-weight: 700;
    letter-spacing: 1em;
    margin-right: -1em;
  }

  /* social row: bottom-left */
  .links {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 2;
    margin: 0;
    justify-content: flex-start;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: nowrap;
    padding: 80px 0 40px 24px;
    border-top: 0;
  }

  .links a {
    width: auto;
    height: auto;
    gap: 10px;
    font-size: 15px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0;
    animation: trackWaveL 0.7s var(--ease-out) forwards;
    animation-delay: var(--d, 0.3s);
    transition: font-size 0.25s ease;
  }

  .links a:hover { font-size: 21px; }

  .links svg {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
  }

  /* chasing bubble */
  .bubble {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 55;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
    border: 1px solid #000;
    background: transparent;
    padding: 8px;
    text-decoration: none;
    color: #000;
    font-size: 8px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.03em;
    will-change: transform;
    cursor: pointer;
  }

  .bubble span:first-child { letter-spacing: 0.4em; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }

  .track,
  .links a {
    animation: none;
    opacity: 1;
  }

  .track,
  .track__title,
  .links a { transition: none; }
}
