:root {
  --ink: #f6efe3;
  --muted: #bdc5cc;
  --soft: #d9ae69;
  --blue: #77a9cb;
  --black: #050607;
  --panel: rgba(10, 13, 16, .88);
  --line: rgba(217, 174, 105, .34);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(5, 6, 7, .96), rgba(5, 6, 7, .76) 48%, rgba(5, 6, 7, .92)),
    url("../images/background1.png") center / cover fixed no-repeat;
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

body:after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 100% 8px;
}

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

a {
  color: inherit;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, serif;
  letter-spacing: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 6px;
  color: #071018;
  background: var(--ink);
}

.skip-link:focus {
  top: 16px;
}

.albums-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(28px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: rgba(5, 6, 7, .88);
  backdrop-filter: blur(18px);
}

.albums-brand,
.albums-header nav {
  display: flex;
  align-items: center;
}

.albums-brand {
  gap: 14px;
  text-decoration: none;
  font-weight: 900;
}

.albums-brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.albums-header nav {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.albums-header nav a {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}

.albums-header nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, .08);
}

main,
.albums-hero,
.catalog-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.albums-hero {
  min-height: calc(100vh - 84px);
  display: grid;
  grid-template-columns: minmax(300px, 440px) minmax(0, 1fr);
  gap: 54px;
  align-items: center;
  padding: 56px 0 64px;
}

.hero-art {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.hero-art img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 78px rgba(0, 0, 0, .46);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 900;
}

h1 {
  max-width: 720px;
  margin-bottom: 22px;
  font-size: clamp(56px, 7vw, 104px);
  line-height: .92;
}

.hero-copy p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
  font-size: 21px;
  line-height: 1.62;
}

.album-actions,
.album-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.album-actions {
  margin-top: 28px;
}

.checkout-panel {
  margin-top: 30px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(255, 255, 255, .07);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .18);
}

.checkout-panel .album-actions {
  margin-top: 14px;
}

.checkout-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.checkout-meta strong {
  color: var(--soft);
  font-size: 28px;
  line-height: 1;
}

.checkout-meta span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 900;
}

.button-primary {
  color: #080b0d;
  background: var(--soft);
  box-shadow: 0 14px 34px rgba(217, 174, 105, .2);
}

.button-secondary {
  color: var(--ink);
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .06);
}

.album-facts {
  margin-top: 22px;
}

.album-facts a,
.album-facts button {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
}

.album-facts a:hover,
.album-facts button:hover {
  color: var(--ink);
  border-color: var(--line);
}

.preview-section,
.catalog-section {
  padding: 66px 0 82px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.preview-section {
  width: min(860px, calc(100% - 48px));
  margin: 0 auto;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 3.5vw, 54px);
  line-height: 1;
}

.track-list {
  display: grid;
  gap: 7px;
}

.track-row {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, .07);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.track-row:hover,
.track-row.is-playing,
.track-row.is-loading {
  border-color: var(--line);
  background: rgba(217, 174, 105, .12);
}

.track-row span {
  color: var(--soft);
  font-size: 13px;
  font-weight: 900;
}

.track-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.track-row em {
  min-width: 76px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.track-row.is-playing em:before {
  content: "Playing";
}

.track-row.is-loading em:before {
  content: "Loading";
}

.track-row.has-error em:before {
  content: "Unavailable";
}

.track-row.is-playing em,
.track-row.is-loading em,
.track-row.has-error em {
  color: var(--soft);
  font-size: 0;
}

.track-row.is-playing em:before,
.track-row.is-loading em:before,
.track-row.has-error em:before {
  font-size: 12px;
}

.track-row.is-muted {
  cursor: default;
  opacity: .62;
}

.track-row:disabled {
  cursor: default;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.album-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
}

.album-card.is-selected {
  border-color: var(--soft);
  box-shadow: 0 20px 58px rgba(217, 174, 105, .16);
}

.album-card a {
  display: grid;
  min-height: 100%;
  text-decoration: none;
}

.album-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.album-card span,
.album-card strong,
.album-card em {
  display: block;
  padding-inline: 15px;
}

.album-card span {
  padding-top: 14px;
  color: var(--soft);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: 11px;
  font-weight: 900;
}

.album-card strong {
  padding-top: 6px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.18;
}

.album-card em {
  padding-top: 8px;
  padding-bottom: 16px;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
  font-weight: 900;
}

@media (max-width: 980px) {
  .albums-hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    max-width: 520px;
  }

  .album-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .albums-header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 12px 16px;
  }

  .albums-brand img {
    width: 42px;
    height: 42px;
  }

  main,
  .albums-hero,
  .preview-section,
  .catalog-section {
    width: min(100% - 28px, 1180px);
  }

  .albums-hero {
    min-height: auto;
    padding: 42px 0 52px;
  }

  h1 {
    font-size: 48px;
  }

  .hero-copy p:not(.eyebrow) {
    font-size: 17px;
  }

  .button {
    width: 100%;
  }

  .checkout-meta {
    grid-template-columns: 1fr;
  }

  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .track-row em {
    grid-column: 2;
    min-width: 0;
    text-align: left;
  }
}

@media (max-width: 440px) {
  .album-grid {
    grid-template-columns: 1fr;
  }
}

.checkout-modal[hidden] {
  display: none;
}

.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(16px);
}

.checkout-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(8, 10, 12, .96);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .54);
}

.checkout-dialog h2 {
  margin-bottom: 18px;
  font-size: 42px;
  line-height: 1;
}

.checkout-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, .06);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.checkout-summary {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
}

.checkout-summary img {
  width: 78px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}

.checkout-summary strong,
.checkout-summary span {
  display: block;
}

.checkout-summary strong {
  font-size: 20px;
  line-height: 1.15;
}

.checkout-summary span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.payment-methods {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.payment-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  cursor: pointer;
}

.payment-option.is-selected {
  border-color: var(--soft);
  background: rgba(217, 174, 105, .12);
}

.payment-option.is-disabled {
  cursor: not-allowed;
  opacity: .55;
}

.payment-option input {
  margin-top: 4px;
  accent-color: var(--soft);
}

.payment-option strong,
.payment-option em {
  display: block;
}

.payment-option strong {
  font-size: 16px;
}

.payment-option em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.35;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: var(--muted);
  font-weight: 900;
}

.checkout-total strong {
  color: var(--soft);
  font-size: 24px;
}

.checkout-continue {
  width: 100%;
}

.checkout-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.cart-nav-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, .06);
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.cart-nav-button span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 6px;
  border-radius: 999px;
  color: #080b0d;
  background: var(--soft);
  font-size: 12px;
}

.cart-items {
  display: grid;
  gap: 10px;
}

.cart-empty {
  margin: 0;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, .045);
  text-align: center;
  font-weight: 800;
}

.cart-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
}

.cart-item img {
  width: 62px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}

.cart-item strong,
.cart-item span {
  display: block;
}

.cart-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.cart-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cart-quantity {
  display: inline-grid;
  grid-template-columns: 30px 26px 30px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  overflow: hidden;
}

.cart-quantity button,
.cart-remove {
  min-height: 30px;
  border: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, .07);
  font-weight: 900;
  cursor: pointer;
}

.cart-quantity span {
  margin: 0;
  color: var(--ink);
  text-align: center;
}

.cart-quantity-fixed {
  grid-template-columns: 42px;
}

.cart-quantity-fixed span {
  color: var(--muted);
}

.cart-remove {
  padding: 0 10px;
  border-radius: 6px;
  color: var(--muted);
}

.cart-notice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(8, 10, 12, .94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.cart-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 520px) {
  .cart-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .cart-quantity,
  .cart-remove {
    grid-column: 2;
    justify-self: start;
  }
}
