/* ─────────────────────────────────────────────────────────────────────
   LONE JACK — album player
   Vintage beach backdrop · Dakota Rough script in cream
   ──────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Dakota Rough";
  src: url("fonts/Dakota-Rough-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Redlodge Serif";
  src: url("fonts/Redlodge-Serif-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #f2e4bd;          /* script lettering, from the Ellegrin reference */
  --cream-soft: rgba(242, 228, 189, 0.72);
  --cream-faint: rgba(242, 228, 189, 0.28);
  --gold: #eec25c;           /* golden yellow — album title, sunset accent */
  --ink: #0c1f33;            /* deep sea navy */
  --card: rgba(10, 30, 52, 0.26);
  --card-edge: rgba(242, 228, 189, 0.18);
  --shadow: rgba(0, 10, 24, 0.55);
  --serif: "Georgia", "Times New Roman", serif;
}

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

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--serif);
  color: var(--cream);
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.25rem, 4vw, 3rem) 1.25rem 2.5rem;
  overflow-x: hidden;
}

/* ── backdrop ─────────────────────────────────────────────────────── */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("images/web-background.webp") center / cover no-repeat;
}
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, transparent 30%, rgba(6, 20, 38, 0.55) 100%),
    linear-gradient(180deg, rgba(6, 20, 38, 0.15) 0%, rgba(6, 20, 38, 0.5) 100%);
}

/* film grain over everything, very quiet */
.grain {
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1.4s steps(4) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, 1%); }
  50%  { transform: translate(1%, -2%); }
  75%  { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}

/* ── wordmark ─────────────────────────────────────────────────────── */
.masthead {
  width: 100%;
  max-width: 100%;
  text-align: center;
  margin: clamp(1rem, 6vh, 3.5rem) 0 clamp(2.75rem, 9vh, 5rem);
}

.wordmark {
  font-family: "Dakota Rough", cursive;
  font-weight: normal;
  font-size: clamp(2.6rem, 12vw, 4.6rem);
  line-height: 1;
  color: var(--cream);
  transform: rotate(-3deg);
  text-shadow:
    0 2px 0 rgba(0, 10, 24, 0.35),
    0 10px 32px var(--shadow);
}

.wordmark__sub {
  margin-top: clamp(1.5rem, 3.5vw, 2.25rem);
  font-family: "Redlodge Serif", var(--serif);
  /* Always well below the wordmark (clamp 1.9–4.6rem) so LONE JACK stays dominant */
  font-size: clamp(1.15rem, 4.7vw, 1.6rem);
  letter-spacing: 0.05em;
  color: var(--gold);
  line-height: 1.2;
  padding: 0 0.5rem;
  text-shadow: 0 1px 6px rgba(0, 10, 24, 0.5);
}

/* ── layout stack ─────────────────────────────────────────────────── */
.stack {
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

/* ── player card ──────────────────────────────────────────────────── */
.player {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 14px;
  padding: clamp(1.25rem, 4vw, 1.75rem);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 24px 60px var(--shadow);
}

/* top row: now-playing info on the left, small cover thumbnail on the right */
.player__top {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.player__head {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: center;
  padding-top: 0.5rem; /* nudge NOW PLAYING down to sit just below the cover's top edge */
}

.player__cover {
  width: clamp(120px, 46%, 230px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 6px 18px rgba(0, 10, 24, 0.45);
}

.player__eyebrow {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.38em;
  text-indent: 0.38em; /* offset trailing tracking so it optically centers */
  text-transform: uppercase;
  color: var(--cream-soft);
  margin-bottom: 0.7rem;
}

.player__nowplaying {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.55rem;
  margin-block: auto; /* center track info in the space below NOW PLAYING */
}

.player__num {
  font-size: clamp(1.15rem, 3.6vw, 1.4rem);
  line-height: 1;
  color: var(--cream-soft);
  font-variant-numeric: tabular-nums;
}

.player__title {
  font-family: "Redlodge Serif", var(--serif);
  font-size: clamp(1.3rem, 4.2vw, 1.65rem);
  line-height: 1.15;
  color: var(--cream);
}

/* progress */
.player__progress {
  height: 6px;
  background: var(--cream-faint);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}
.player__progress-fill {
  height: 100%;
  width: 0%;
  background: var(--cream);
  border-radius: 3px;
  transition: width 0.1s linear;
}
.player__times {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--cream-soft);
  margin-top: 0.45rem;
  font-variant-numeric: tabular-nums;
}

/* controls */
.player__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.4rem;
  margin: 1.2rem 0 1.4rem;
}

.ctrl {
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--cream);
  background: transparent;
  border: 1px solid var(--cream-faint);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
}
.ctrl:hover { border-color: var(--cream-soft); }
.ctrl:active { transform: scale(0.94); }

.ctrl__icon {
  width: 18px;
  height: 18px;
  display: block;
}
.js-play-icon { display: flex; }
.ctrl--play .ctrl__icon { width: 24px; height: 24px; }

.ctrl--play {
  width: 62px;
  height: 62px;
  background: var(--cream);
  color: var(--ink);
  border: none;
}
.ctrl--play:hover { background: #fff3d6; }

/* ── tracklist ────────────────────────────────────────────────────── */
.tracklist {
  list-style: none;
  border-top: 1px solid var(--card-edge);
  padding-top: 0.5rem;
}

.tracklist__item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.52rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.tracklist__item:hover { background: rgba(242, 228, 189, 0.07); }
.tracklist__item.is-active { background: rgba(242, 228, 189, 0.12); }

.tracklist__num {
  font-size: 0.72rem;
  color: var(--cream-soft);
  width: 1.4em;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.tracklist__name {
  font-family: "Redlodge Serif", var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--cream);
  flex: 1;
}

/* eq bars — only visible on the playing track */
.tracklist__eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.tracklist__item.is-active.is-playing .tracklist__eq { opacity: 1; }
.tracklist__eq span {
  width: 3px;
  background: var(--cream);
  border-radius: 1px;
  animation: eq 0.9s ease-in-out infinite;
}
.tracklist__eq span:nth-child(1) { height: 60%; animation-delay: 0s; }
.tracklist__eq span:nth-child(2) { height: 100%; animation-delay: 0.25s; }
.tracklist__eq span:nth-child(3) { height: 40%; animation-delay: 0.5s; }
@keyframes eq {
  0%, 100% { transform: scaleY(0.5); }
  50%      { transform: scaleY(1); }
}

/* ── streaming + mailing ──────────────────────────────────────────── */
.links {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  align-items: center;
}

.stream-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.9rem;
  align-items: center;
  max-width: 100%;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.stream-link {
  color: var(--cream-soft);
  text-decoration: none;
  transition: color 0.2s;
}
.stream-link:hover { color: var(--cream); }
.stream-link__dot { color: var(--cream-faint); }

.socials {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: -0.5rem; /* pull a touch closer to the streaming links */
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cream-soft);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.social-link:hover { color: var(--cream); }
.social-link__icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.mailing { width: 100%; max-width: 400px; text-align: center; }
.mailing__label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cream-soft);
  margin-bottom: 0.7rem;
}
.mailing__row { display: flex; gap: 0.5rem; }
.mailing__input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--cream);
  background: rgba(10, 30, 52, 0.55);
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mailing__input::placeholder { color: var(--cream-faint); }
.mailing__input:focus { outline: none; border-color: var(--cream-soft); }
.mailing__submit {
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--cream);
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
}
.mailing__submit:hover { background: #fff3d6; }
.mailing__success {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--cream);
}

/* ── cookie consent ───────────────────────────────────────────────── */
.consent {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 50;
  width: min(92%, 460px);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(10, 30, 52, 0.94);
  border: 1px solid var(--card-edge);
  border-radius: 10px;
  padding: 0.7rem 0.8rem 0.7rem 0.95rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(0, 10, 24, 0.55);
}
.consent[hidden] { display: none; }
.consent__text {
  flex: 1;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--cream-soft);
}
.consent__text a {
  color: var(--cream-faint);
  text-decoration: underline;
  cursor: pointer;
}
.consent__text a:hover { color: var(--cream-soft); }
.consent__btn {
  flex-shrink: 0;
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--cream);
  border: none;
  border-radius: 7px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}
.consent__btn:hover { background: #fff3d6; }

/* ── footer ───────────────────────────────────────────────────────── */
.footer {
  margin-top: 3rem;
  text-align: center;
}
.footer__copy {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cream-faint);
}

/* ── small screens ────────────────────────────────────────────────── */
@media (max-width: 420px) {
  .tracklist__name { font-size: 0.98rem; }
  .player__controls { gap: 1rem; }
  .stream-links { font-size: 0.7rem; letter-spacing: 0.14em; }
}
