:root {
  color-scheme: dark;
  --background: #171613;
  --panel: #211e1a;
  --line: #40382e;
  --cream: #f8ebd7;
  --muted: #d8c7b4;
  --gold: #edb766;
  --ink: #23180c;
  --heading: Georgia, 'Times New Roman', serif;
  --body: 'Segoe UI', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--cream);
  font: 1rem/1.6 var(--body);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

h1, h2, h3, h4, p {
  margin: 0;
}

h1, h2, h3, h4 {
  font-family: var(--heading);
  font-weight: 700;
}

.wrap {
  width: min(100% - 3rem, 73rem);
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 1;
  background: #13120f;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 4.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: block;
  width: 4.1rem;
  flex: none;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 2.5rem);
  color: var(--muted);
  font-size: .94rem;
  font-weight: 600;
}

nav a {
  padding-block: .5rem;
  text-decoration: none;
  transition: color 140ms ease;
}

nav a:hover {
  color: var(--gold);
}

.welcome {
  display: grid;
  align-items: center;
  min-height: clamp(31rem, 50vw, 40rem);
  background-color: #2b2019;
  background-image:
    linear-gradient(90deg, rgba(17, 14, 12, .87) 0%, rgba(17, 14, 12, .57) 42%, rgba(17, 14, 12, .04) 78%),
    linear-gradient(0deg, rgba(17, 14, 12, .65), transparent 42%),
    url('dusk-highway.jpg');
  background-position: center, center, center 56%;
  background-size: cover;
  border-bottom: 1px solid #5b4936;
}

.welcome-copy {
  max-width: 40rem;
  padding-block: 4.5rem 5rem;
  animation: rise-in 520ms ease-out both;
}

.eyebrow {
  margin-bottom: .8rem;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(3.65rem, 8vw, 7.2rem);
  line-height: .98;
  letter-spacing: -.052em;
}

.intro {
  max-width: 30rem;
  margin-top: 1.3rem;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.7vw, 1.16rem);
  line-height: 1.67;
}

.listen-link {
  display: inline-block;
  margin-top: 1.85rem;
  padding: .67rem 1.14rem;
  border: 1px solid var(--gold);
  border-radius: 3px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.listen-link:hover {
  background: #ffd298;
  border-color: #ffd298;
}

.album-intro {
  background-color: #231a13;
  background-image:
    linear-gradient(90deg, #221a14 8%, rgba(28, 21, 16, .89) 50%, rgba(28, 21, 16, .44)),
    url('acoustic-guitar.jpg');
  background-position: center, right center;
  background-size: cover;
  border-bottom: 1px solid var(--line);
}

.album-layout {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  gap: clamp(2rem, 7vw, 6.25rem);
  align-items: center;
  padding-block: clamp(3rem, 6vw, 5rem);
}

.album-cover {
  width: 100%;
  border: 1px solid #725030;
  border-radius: 4px;
  box-shadow: 0 16px 40px #100e0b99;
}

h2 {
  font-size: clamp(2.85rem, 6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -.048em;
}

.tracks {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

h3 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.035em;
}

.track-list {
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.track {
  display: grid;
  grid-template-columns: clamp(6.25rem, 11vw, 9.6rem) minmax(0, 1fr);
  grid-template-areas: 'art title' 'art player';
  grid-template-rows: 1fr auto;
  gap: .55rem clamp(.75rem, 1.7vw, 1.35rem);
  padding: .7rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.track:focus-within,
.track.is-playing {
  border-color: #aa7544;
  background-color: #2b231b;
}

.track-cover {
  grid-area: art;
  align-self: center;
  width: 100%;
  aspect-ratio: 1;
  background: #32271f;
  border-radius: 3px;
  object-fit: cover;
}

.track-title {
  grid-area: title;
  align-self: end;
}

.track-number {
  display: block;
  margin-bottom: .2rem;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .13em;
}

h4 {
  font-size: clamp(1.13rem, 2vw, 1.5rem);
  line-height: 1.14;
  text-wrap: balance;
}

audio {
  grid-area: player;
  width: 100%;
  min-width: 0;
  height: 3.25rem;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 59rem) {
  .wrap {
    width: min(100% - 2rem, 73rem);
  }
}

@media (max-width: 49rem) {
  .album-layout {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  }

  .track-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .track {
    grid-template-columns: 7.25rem minmax(0, 1fr);
  }
}

@media (max-width: 34rem) {
  .header-inner {
    min-height: 3.9rem;
  }

  .brand {
    width: 3.6rem;
  }

  .welcome {
    min-height: 31rem;
    background-position: center, center, 78% center;
    background-image:
      linear-gradient(90deg, rgba(17, 14, 12, .86), rgba(17, 14, 12, .46)),
      linear-gradient(0deg, rgba(17, 14, 12, .7), transparent 42%),
      url('dusk-highway.jpg');
  }

  .welcome-copy {
    padding-block: 4rem;
  }

  .album-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.65rem;
  }

  .album-cover {
    width: min(100%, 17rem);
  }

  .album-break {
    display: none;
  }

  .track {
    grid-template-columns: 5.25rem minmax(0, 1fr);
    grid-template-areas: 'art title' 'player player';
    grid-template-rows: auto auto;
  }

  .track-title {
    align-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .welcome-copy {
    animation: none;
  }

  nav a, .listen-link, .track {
    transition: none;
  }
}
