/* =========================================================================
   Betray Flip — dark & minimal link tree
   Theme variables live in :root so you can recolor the whole site here.
========================================================================= */

:root {
  --bg: #0a0a0a;
  --bg-glow: #141414;
  --surface: #161616;
  --surface-hover: #202020;
  --border: #262626;
  --border-hover: #3a3a3a;
  --text: #f5f5f5;
  --muted: #8a8a8a;
  --accent: #ffffff; /* swap for a brand color, e.g. #e11d48 */

  --radius: 14px;
  --max-width: 480px;
  --gap: 12px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 48px 20px 40px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background:
    radial-gradient(80% 55% at 50% 0%, var(--bg-glow) 0%, var(--bg) 60%)
    no-repeat,
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.page {
  width: 100%;
  max-width: var(--max-width);
}

/* ---- Header --------------------------------------------------------- */

.header {
  text-align: center;
  margin-bottom: 36px;
}

/* 3D logo — overlaid on top of the album art, filling the square */
.logo3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: pan-y; /* let the page scroll through the canvas on mobile */
  opacity: 0;
  transition: opacity 0.6s ease;
}

.logo3d.is-loaded {
  opacity: 1;
}

.logo3d canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.wordmark {
  margin: 0;
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
}

.tagline {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.album-art {
  position: relative; /* positioning context for the 3D logo overlay */
  margin: 22px 0 0;
  width: 100%;
}

.album-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ---- Link groups ---------------------------------------------------- */

.link-group {
  margin-bottom: 28px;
}

.group-heading {
  margin: 0 0 12px;
  padding-left: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.link {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 18px;
  margin-bottom: var(--gap);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
}

.link:last-child {
  margin-bottom: 0;
}

/* Featured link (e.g. Patreon) — subtle accent to draw the eye. */
.link--featured {
  border-color: var(--border-hover);
  background: linear-gradient(var(--surface-hover), var(--surface));
}

.link--featured:hover {
  border-color: var(--accent);
}

.link:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.link:active {
  transform: translateY(0);
}

.link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.link-icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.link-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.link-label {
  flex: 1 1 auto;
}

.link-chevron {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.18s ease, color 0.18s ease;
}

.link:hover .link-chevron {
  color: var(--text);
  transform: translateX(3px);
}

/* ---- Footer --------------------------------------------------------- */

.footer {
  margin-top: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer p {
  margin: 0;
}

/* ---- Load-in animation (disabled for reduced-motion) ---------------- */

@media (prefers-reduced-motion: no-preference) {
  .header,
  .link-group,
  .footer {
    opacity: 0;
    transform: translateY(10px);
    animation: rise 0.5s ease forwards;
  }

  .header { animation-delay: 0.02s; }
  .link-group:nth-of-type(1) { animation-delay: 0.08s; }
  .link-group:nth-of-type(2) { animation-delay: 0.14s; }
  .link-group:nth-of-type(3) { animation-delay: 0.20s; }
  .link-group:nth-of-type(4) { animation-delay: 0.26s; }
  .footer { animation-delay: 0.32s; }
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
