/* =============================================================
   Crimson Sun — links page
   The band photo fades to near-black at the bottom; the page
   background picks up that exact colour and keeps fading down.
   ============================================================= */

:root {
  --bg: #110f1a;      /* the colour the photo fades into */
  --bg-deep: #08070c;
  --text: #f1ece8;
  --muted: rgba(241, 236, 232, 0.62);
  --faint: rgba(241, 236, 232, 0.38);

  --crimson: #a3272a;
  --crimson-hi: #c9383a;
  --rust: #c0582f;
  --glow: #e0773f;                      /* hover border + icons */
  --glow-soft: rgba(224, 119, 63, 0.38);

  --card-bg: rgba(241, 236, 232, 0.045);
  --card-border: rgba(241, 236, 232, 0.12);
  --card-border-hi: rgba(241, 236, 232, 0.26);

  --radius: 14px;
  --display: "Oswald", "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--body);
  line-height: 1.45;
  background-color: var(--bg-deep);
  /* Starts at the photo's bottom colour, keeps fading to black */
  background-image: linear-gradient(to bottom, var(--bg) 0, var(--bg) 55vh, var(--bg-deep) 100%);
}

a { color: inherit; }

/* --- Page column -------------------------------------------- */
.page {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: calc(3rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Hero --------------------------------------------------- */
.hero {
  position: relative;
  width: 100%;
}

/* The whole photo, uncropped. Its own bottom fade meets --bg. */
.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 7;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}

.hero-brand {
  position: relative;
  margin-top: -13%;
  padding: 0 1.5rem;
  text-align: center;
}

/* Soft crimson glow behind the logo */
.hero-brand::before {
  content: "";
  position: absolute;
  inset: -40% 5% -10%;
  background: radial-gradient(closest-side, rgba(163, 39, 42, 0.28), transparent);
  filter: blur(10px);
  z-index: -1;
  pointer-events: none;
}

.logo { line-height: 0; }

.logo img {
  width: min(88vw, 440px);
  height: auto;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.7));
}

.tagline {
  margin-top: 0.9rem;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- Links -------------------------------------------------- */
.links {
  width: 100%;
  max-width: 480px;
  margin-top: 2.25rem;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4rem;
  padding: 0.85rem 1rem 0.85rem 1.15rem;
  border-radius: var(--radius);
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
          backdrop-filter: blur(10px) saturate(110%);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.card-icon { width: 1.5rem; height: 1.5rem; flex-shrink: 0; }

/* Enslain logo in the merch card, drawn as a mask so it takes the text colour */
.card-logo {
  width: 4.1rem; aspect-ratio: 521 / 292; flex-shrink: 0;
  margin: -0.4rem -0.3rem -0.4rem -0.5rem;
  background-color: currentColor;
  -webkit-mask: url("img/enslain-logo.svg") center / contain no-repeat;
          mask: url("img/enslain-logo.svg") center / contain no-repeat;
}
.card-icon, .card-logo, .tile svg { transition: color 0.2s ease, filter 0.2s ease; }

.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.card-title {
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.card-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.card-sub em { font-style: italic; color: var(--text); }

.card-arrow {
  width: 1.1rem; height: 1.1rem; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0.45;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

/* Hover: rust border with a soft glow, icons light up in the same colour */
.card:hover, .card:focus-visible,
.tile:hover, .tile:focus-visible {
  transform: translateY(-2px);
  border-color: var(--glow);
  background-color: rgba(224, 119, 63, 0.07);
  box-shadow: 0 0 0 1px var(--glow-soft), 0 0 22px var(--glow-soft), 0 10px 30px rgba(0, 0, 0, 0.45);
}
.card:hover .card-icon, .card:focus-visible .card-icon,
.card:hover .card-logo, .card:focus-visible .card-logo,
.tile:hover svg, .tile:focus-visible svg {
  color: var(--glow);
  filter: drop-shadow(0 0 6px var(--glow-soft));
}
.card:hover .card-arrow, .card:focus-visible .card-arrow { transform: translateX(3px); opacity: 0.9; }
.card:active { transform: translateY(0); }

/* Spotify — the main call to action */
.card--primary {
  min-height: 4.75rem;
  background: linear-gradient(135deg, rgba(163, 39, 42, 0.92), rgba(110, 24, 26, 0.92));
  border-color: rgba(220, 80, 70, 0.45);
  box-shadow: 0 10px 34px rgba(120, 20, 20, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.card--primary .card-icon { width: 1.9rem; height: 1.9rem; }
.card--primary .card-title { font-size: 1.3rem; }
.card--primary .card-sub { color: rgba(255, 240, 236, 0.78); }
.card--primary .card-arrow { opacity: 0.8; }
.card--primary:hover, .card--primary:focus-visible {
  background: linear-gradient(135deg, rgba(185, 46, 48, 0.95), rgba(125, 28, 30, 0.95));
  border-color: var(--glow);
  box-shadow: 0 0 0 1px var(--glow-soft), 0 0 26px var(--glow-soft), 0 14px 40px rgba(150, 25, 25, 0.5);
}
/* On the red Spotify card the icon lifts to a warm light tone to stay visible */
.card--primary:hover .card-icon, .card--primary:focus-visible .card-icon { color: #ffc29e; }

/* --- Section label ------------------------------------------ */
.section-label {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
}
.section-label::before, .section-label::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to right, transparent, rgba(241, 236, 232, 0.18), transparent);
}

/* --- Social tiles ------------------------------------------- */
.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.5rem;
  padding: 0.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.tile svg { width: 1.3rem; height: 1.3rem; flex-shrink: 0; }


/* --- Other streaming services ------------------------------- */
.also { margin-top: 0.25rem; }
.also-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.also-list a {
  display: grid;
  place-items: center;
  width: 3rem; height: 3rem;
  border-radius: 50%;
  color: var(--muted);
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  transition: color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.also-list svg { width: 1.3rem; height: 1.3rem; }
.also-list a:hover, .also-list a:focus-visible {
  color: var(--glow);
  border-color: var(--glow);
  box-shadow: 0 0 0 1px var(--glow-soft), 0 0 18px var(--glow-soft);
  transform: translateY(-2px);
}

/* --- Release block (loaded from release/release.html) ------- */
#release-slot:empty { display: none; }
#release-slot {
  width: 100%;
  max-width: 480px;
  margin-top: 2.25rem;
  padding: 0 1rem;
}
#release-slot + .links { margin-top: 1rem; }

.release {
  position: relative;
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: calc(var(--radius) + 4px);
  text-decoration: none;
  background: linear-gradient(135deg, rgba(192, 88, 47, 0.2), rgba(241, 236, 232, 0.03));
  border: 1px solid rgba(192, 88, 47, 0.4);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.release:hover, .release:focus-visible {
  transform: translateY(-2px);
  border-color: var(--glow);
  box-shadow: 0 0 0 1px var(--glow-soft), 0 0 26px var(--glow-soft), 0 10px 34px rgba(0, 0, 0, 0.45);
}
.release img {
  display: block; width: 100%; height: auto; aspect-ratio: 1;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}
.release-kicker {
  font-family: var(--display);
  font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--rust);
}
.release-title {
  font-family: var(--display);
  font-size: 1.5rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  line-height: 1.15; margin-top: 0.2rem;
}
.release-cta {
  display: inline-block; margin-top: 0.6rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-family: var(--display); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--rust); color: #fff;
}

/* --- Footer ------------------------------------------------- */
.footer {
  margin-top: 2.75rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  font-family: var(--display);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.footer a { text-decoration: none; border-bottom: 1px solid rgba(241, 236, 232, 0.3); padding-bottom: 1px; }
.footer a:hover { color: var(--text); border-color: var(--text); }
.footer .fine { margin-top: 0.6rem; font-size: 0.72rem; color: var(--faint); }

/* --- Keyboard focus ----------------------------------------- */
a:focus-visible { outline: 2px solid var(--crimson-hi); outline-offset: 3px; }

/* --- Entrance motion ---------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-photo img { animation: fade 1.1s ease both; }
  .hero-brand { animation: rise 0.9s 0.25s ease both; }
  .reveal, .release { animation: rise 0.6s ease both; }
  .links > :nth-child(1) { animation-delay: 0.45s; }
  .links > :nth-child(2) { animation-delay: 0.52s; }
  .links > :nth-child(3) { animation-delay: 0.59s; }
  .links > :nth-child(4) { animation-delay: 0.66s; }
  .social-grid > *        { animation-delay: 0.72s; }
  .social-grid > :nth-child(2) { animation-delay: 0.76s; }
  .social-grid > :nth-child(3) { animation-delay: 0.80s; }
  .social-grid > :nth-child(4) { animation-delay: 0.84s; }
  .also { animation-delay: 0.9s; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* --- Wider screens ------------------------------------------ */
@media (min-width: 900px) {
  /* Photo edges are already dark; a thin feather hides the rectangle */
  .hero-photo img {
    -webkit-mask-image:
      linear-gradient(to bottom, #000 72%, transparent 100%),
      linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
    -webkit-mask-composite: source-in;
            mask-image:
      linear-gradient(to bottom, #000 72%, transparent 100%),
      linear-gradient(to right, transparent 0, #000 4%, #000 96%, transparent 100%);
            mask-composite: intersect;
  }
  .hero-brand { margin-top: -10%; }
  .logo img { width: 480px; }
}
