/* HEDEGAARD Free Downloads — dark, cinematic, mobile-first */

:root {
  --bg: #0a0a0b;
  --bg-raise: #101014;
  --surface: #131318;
  --surface-2: #17171c;
  --line: #232329;
  --line-strong: #2e2e36;
  --text: #f5f5f7;
  --muted: #9b9ba4;
  --dim: #6f6f78;
  --error: #e08a8a;
  --radius: 14px;
  --font-cond: "Arial Narrow", "Helvetica Neue Condensed", Bahnschrift, "Roboto Condensed", "sans-serif-condensed", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 70% at 50% -10%, #17171d 0%, transparent 60%),
    var(--bg);
  pointer-events: none;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* Blurred artwork backdrop on track pages */
.page-bg {
  position: fixed;
  inset: -12%;
  z-index: -1;
  background-size: cover;
  background-position: center;
  filter: blur(80px) brightness(0.42) saturate(1.1);
  opacity: 0.55;
  transform: scale(1.15);
  pointer-events: none;
}

/* ── Layout ─────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
}

.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 22px 8px;
}
.wordmark {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.site-head-label {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.site-head-logo { justify-content: center; padding: 4px 22px 0; }
.site-head-logo a {
  display: flex;
  align-items: center;
  width: min(145px, 42vw);
  height: 36px;
  overflow: hidden;
}
.site-head-logo img { flex: 0 0 auto; width: 100%; height: auto; }

.site-foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 22px 44px;
  text-align: center;
}
.foot-promo { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.foot-promo a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.foot-legal { font-size: 12px; color: var(--dim); }
.foot-legal a { color: var(--dim); text-decoration: none; }
.foot-legal a:hover { color: var(--muted); }

/* ── Typography ─────────────────────────────────────────── */
.h-display {
  font-family: var(--font-cond);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: 0.96;
  font-size: clamp(2.5rem, 9.5vw, 4.6rem);
  text-wrap: balance;
}
.kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.muted { color: var(--muted); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: #fff; color: #0a0a0b; }
.btn-primary:hover { opacity: 0.92; }
.btn-primary[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: #4a4a55; }
.btn-xl { min-height: 58px; padding: 16px 34px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { cursor: not-allowed; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.pill:hover { color: var(--text); border-color: #4a4a55; }

/* ── Simple per-track landing page ─────────────────────── */
.landing-actions { display: grid; gap: 10px; margin: 22px 0 0; }
.landing-catalog-link {
  display: block;
  width: max-content;
  margin: 18px auto 0;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}
.landing-catalog-link:hover { color: var(--muted); }
.page-landing .site-foot { display: none; }

/* ── Index hero + grid ──────────────────────────────────── */
.hero { padding: 48px 0 40px; max-width: 640px; }
.hero-sub { margin-top: 18px; color: var(--muted); font-size: 16px; max-width: 34em; }

.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
  padding-bottom: 24px;
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
}
.card-art {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
}
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.card-art-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-cond);
  font-size: 84px;
  font-weight: 700;
  color: #26262d;
  text-transform: uppercase;
}
.badge-new {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fff;
  color: #0a0a0b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 7px;
}
.card-body { display: block; padding: 15px 16px 17px; }
.card-title {
  display: block;
  font-family: var(--font-cond);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--text);
}
.card-meta {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.empty-state { padding: 20px 0 60px; max-width: 480px; }
.empty-social { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ── Track page ─────────────────────────────────────────── */
.track-main { padding-top: 26px; }
.track { display: grid; gap: 30px; padding-bottom: 30px; }

.track-art {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  background: var(--surface-2);
  aspect-ratio: 1 / 1;
}
.track-art img { width: 100%; height: 100%; object-fit: cover; }
.track-art-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-cond);
  font-size: 30vw;
  font-weight: 700;
  color: #26262d;
}

.track-info { max-width: 560px; margin: 0 auto; width: 100%; }
.track-byline {
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.track-desc { margin-top: 18px; color: var(--muted); font-size: 15px; max-width: 40em; }

.player {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 12px 8px;
}
.player audio { width: 100%; display: block; color-scheme: dark; }
.player-note {
  padding: 6px 6px 4px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}

.track-cta { margin-top: 26px; }
.track-cta .btn { width: 100%; max-width: 380px; }
.cta-note {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.track-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}
.track-links-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-right: 4px;
}

@media (min-width: 880px) {
  .track-main { padding-top: 46px; }
  .track {
    grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
    gap: 60px;
    align-items: start;
  }
  .track-art { position: sticky; top: 46px; margin: 0; }
  .track-info { margin: 0; padding-top: 8px; }
  .track-cta .btn { width: auto; min-width: 300px; }
}

/* ── Sticky mobile CTA ──────────────────────────────────── */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(8, 8, 10, 0.96) 55%, rgba(8, 8, 10, 0));
  display: flex;
  justify-content: center;
}
.sticky-cta .btn { width: 100%; max-width: 420px; min-height: 54px; }
body.page-track { padding-bottom: 0; }
body.gate-open .sticky-cta { display: none; }
@media (min-width: 880px) {
  .sticky-cta { display: none; }
}

/* ── Follow gate ────────────────────────────────────────── */
body.gate-open { overflow: hidden; }
.gate { position: fixed; inset: 0; z-index: 100; }
.gate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 7, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.gate.is-open .gate-backdrop { opacity: 1; }
.gate-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 470px;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  padding: 30px 24px calc(26px + env(safe-area-inset-bottom));
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.25, 1), opacity 0.22s ease;
}
.gate.is-open .gate-sheet { transform: translateY(0); opacity: 1; }
@media (min-width: 640px) {
  .gate { display: flex; align-items: center; justify-content: center; padding: 24px; }
  .gate-sheet {
    position: relative;
    border-radius: 22px;
    padding: 34px 32px 30px;
    max-height: 88vh;
  }
}
.gate-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
  border-radius: 10px;
}
.gate-close:hover { color: var(--text); }

.gate-step { display: none; }
.gate-step.is-active { display: block; }

.gate-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}
.gate-headline {
  font-family: var(--font-cond);
  font-size: 32px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
}
.gate-headline-track { font-size: 26px; line-height: 1.1; }
.gate-sub { margin-top: 8px; color: var(--muted); font-size: 14px; }

.gate-platforms { display: grid; gap: 10px; margin: 22px 0 18px; }
.gate-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.gate-btn:active { transform: scale(0.985); }
@media (hover: hover) {
  .gate-btn:hover { border-color: var(--line-strong); background: #1b1b21; }
}
.gate-btn-icon { display: flex; width: 24px; height: 24px; flex: 0 0 24px; }
.gate-btn-icon svg { width: 100%; height: 100%; }
.gate-btn-label { flex: 1; text-align: left; }
.gate-btn-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  background: #fff;
  color: #0a0a0b;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.25, 1.4);
}
.gate-btn-check svg { width: 15px; height: 15px; }
.gate-btn.is-followed {
  border-color: #37c96b;
  background: linear-gradient(135deg, rgba(29, 125, 65, .55), rgba(19, 78, 43, .72));
  box-shadow: 0 0 0 1px rgba(75, 224, 126, .12), 0 8px 28px rgba(21, 151, 69, .14);
}
.gate-btn.is-followed .gate-btn-check { opacity: 1; transform: scale(1); }
.gate-btn.is-followed .gate-btn-check { background: #51e083; color: #07170d; }

.gate-continue { width: 100%; }
.gate-continue:disabled { opacity: 0.35; }
.gate-continue.is-unlocked { animation: fdPulse 0.45s ease; }
.gate-continue.is-all-followed {
  color: #06150b;
  background: #51e083;
  border-color: #51e083;
  box-shadow: 0 10px 30px rgba(49, 202, 103, .25);
}
@keyframes fdPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.035); }
  100% { transform: scale(1); }
}

.gate-skip {
  display: block;
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.gate-skip:hover { color: var(--muted); }

/* Step 2: download */
.btn-download {
  width: 100%;
  margin-top: 20px;
  color: #06150b;
  background: #51e083;
  border-color: #51e083;
  box-shadow: 0 10px 30px rgba(49, 202, 103, .25);
}
.btn-download:hover { background: #62e790; opacity: 1; }
.gate-email { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.gate-email-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.input {
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  background: #0d0d10;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--text);
  font-size: 16px;
  font-family: var(--font-body);
}
.input::placeholder { color: var(--dim); }
.input:focus { outline: none; border-color: #6a6a76; }
.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 12px 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  cursor: pointer;
}
.consent input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: 0 0 18px;
  accent-color: #fff;
  cursor: pointer;
}
.email-status { margin-top: 12px; font-size: 14px; color: var(--text); }
.email-status.is-error { color: var(--error); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.post-download {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(154, 132, 255, .58);
  border-radius: 14px;
  background: rgba(112, 84, 222, .12);
  animation: moreTracksGlow .65s ease-in-out 5;
}
.post-download-title {
  font-family: var(--font-cond);
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 9px;
  color: #cfc5ff;
}
.btn-more-tracks {
  color: #fff;
  background: #765de0;
  border-color: #9a84ff;
  box-shadow: 0 10px 28px rgba(100, 72, 215, .3);
}
.btn-more-tracks:hover { background: #866ff0; }
@keyframes moreTracksGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(135, 107, 245, 0); transform: scale(1); }
  50% { box-shadow: 0 0 26px rgba(135, 107, 245, .48); transform: scale(1.012); }
}
@media (prefers-reduced-motion: reduce) {
  .post-download { animation: none; }
}

/* The track URL is the download flow itself. */
.download-page { position: relative; min-height: calc(100vh - 42px); min-height: calc(100dvh - 42px); padding: 0 18px 48px; }
.test-mode-banner { position: absolute; z-index: 2; top: 7px; right: 26px; color: #d3a94e; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.gate-standalone {
  position: relative;
  inset: auto;
  z-index: 1;
  display: flex;
  justify-content: center;
}
.gate-standalone .gate-sheet {
  position: relative;
  inset: auto;
  width: 100%;
  opacity: 1;
  transform: none;
  border-radius: 22px;
  max-height: none;
  padding: 18px 24px 30px;
}
.gate-artwork { width: 100%; margin: 14px 0 0; }
.gate-artwork img { width: 100%; height: auto; border-radius: 16px; box-shadow: 0 18px 45px rgba(0, 0, 0, .35); }
@media (min-width: 640px) {
  .download-page { padding-top: 2px; }
  .gate-standalone { padding: 0; align-items: flex-start; }
  .gate-standalone .gate-sheet { padding: 20px 32px 30px; }
}

/* Download-gate and landing-page adjustments for phones only. */
@media (max-width: 639px) {
  body.page-track,
  body.page-landing { background: #000; }
  body.page-track::before,
  body.page-landing::before { background: #000; }
  .page-track .page-bg,
  .page-landing .page-bg { display: none; }
  .page-track .gate-headline,
  .page-landing .gate-headline { font-size: clamp(22px, 6.5vw, 27px); line-height: 1.08; }
  .page-track .site-foot { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .page-track .post-download-title { text-align: center; }
}

/* ── Error page ─────────────────────────────────────────── */
.error-box { padding: 12vh 0 8vh; text-align: center; }
.error-box .muted { margin: 14px 0 26px; }

/* ── Motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: fdUp 0.7s cubic-bezier(0.16, 0.7, 0.25, 1) forwards;
    animation-delay: var(--d, 0s);
  }
  @keyframes fdUp {
    to { opacity: 1; transform: none; }
  }
}
/* The same page is used in a modal iframe; styles never leak into the website. */
.is-embedded .site-head,.is-embedded .site-foot { display:none; }
.is-embedded .download-page { padding-top:20px; padding-bottom:24px; }
.is-embedded .gate-sheet { margin-top:0; }
.gate-step:not(.is-active) { display:none; }
.gate-email .muted {font-size:14px;line-height:1.5;}
:focus-visible {outline:2px solid #fff;outline-offset:5px;}

/* Compact embedded gate: one quiet scrolling surface, keyboard controls remain visible. */
.gate-headline[tabindex="-1"]:focus{outline:none}
html:has(.is-embedded){scrollbar-width:thin;scrollbar-color:#43454c #101114}
.is-embedded{background:#101114;min-height:0}
.is-embedded .download-page{padding:12px 20px 24px;min-height:0}
.is-embedded .gate-sheet{width:100%;max-width:none;border:0;box-shadow:none;background:transparent;padding:12px}
.is-embedded .gate-artwork{width:100px;margin:20px auto 8px}
.is-embedded .gate-artwork img{border-radius:12px}
.is-embedded .gate-headline{font-size:clamp(23px,5vw,30px)}
.is-embedded .gate-skip{margin-top:12px}
@media(max-width:520px){.is-embedded .download-page{padding:8px 12px 20px}.is-embedded .gate-artwork{width:72px}}

html:has(.is-embedded){scrollbar-width:none}
html:has(.is-embedded)::-webkit-scrollbar{display:none}
