:root {
  --bg: #f7f1e7;
  --bg-soft: #fffaf3;
  --panel: #ffffff;
  --panel-alt: #f1e7d8;
  --text: #111111;
  --muted: #5f594f;
  --accent: #111111;
  --accent-2: #8a6f4d;
  --border: rgba(17, 17, 17, .14);
  --border-strong: rgba(17, 17, 17, .24);
  --shadow: 0 18px 50px rgba(72, 54, 31, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, .95), transparent 34rem),
    radial-gradient(circle at 82% 18%, rgba(232, 216, 192, .58), transparent 28rem),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 250, 243, .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.navbar {
  max-width: 1180px;
  margin: auto;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 900;
  letter-spacing: .22em;
  color: var(--accent-2);
}

.nav-links { display: flex; gap: 1rem; align-items: center; }
.nav-links a { color: var(--muted); font-size: .95rem; }
.nav-links a:hover { color: var(--text); }
.menu-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.7rem; }

.section {
  max-width: 1180px;
  margin: auto;
  padding: 6rem 1.25rem;
}

.hero {
  min-height: 90vh;
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: .92;
  margin: .5rem 0 1.5rem;
}

.hero-text { max-width: 620px; color: var(--muted); font-size: 1.25rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-card, .card, .form, .cart {
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(247,241,231,.96));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.hero-card { min-height: 340px; display: flex; flex-direction: column; justify-content: end; }

.eyebrow, .tag { color: var(--accent-2); text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 800; }
.section-heading { margin-bottom: 2rem; }
.section-heading h2, .split h2 { font-size: clamp(2rem, 5vw, 4rem); margin: .2rem 0; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.music-grid, .product-grid { grid-template-columns: repeat(4, 1fr); }
.card { transition: transform .25s ease, border-color .25s ease; }
.card:hover { transform: translateY(-6px); border-color: rgba(183,92,255,.6); }
.card p { color: var(--muted); }

/* Bottom-align buttons inside card-style containers */
.grid { align-items: stretch; }

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card .card-action,
.card > .btn:last-child {
  margin-top: auto;
  align-self: flex-start;
}

.music-card .btn,
.news-card .btn,
.product-card .btn {
  margin-top: auto;
  align-self: flex-start;
}


.cover, .product-img, .profile-image {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111111;
  font-weight: 900;
  margin-bottom: 1rem;
}
.profile-image { min-height: 480px; margin: 0; }

.filters { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-btn, .btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .85rem 1.1rem;
  color: var(--text);
  background: rgba(255,255,255,.82);
  cursor: pointer;
}
.filter-btn.active, .btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #111111; font-weight: 800; }
.btn.secondary { border-color: var(--accent); }
.btn.ghost { background: transparent; }
.btn.small { padding: .65rem .9rem; font-size: .9rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.feature-list { color: var(--muted); line-height: 1.8; }
.benefits { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1rem; }
.benefits span { border: 1px solid var(--border); padding: .6rem .8rem; border-radius: 999px; color: var(--muted); }

.form { display: grid; gap: 1rem; }
.form label { color: var(--muted); display: grid; gap: .45rem; }
.form input, .form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  padding: .9rem 1rem;
}

.cart { display: inline-block; margin-bottom: 1.5rem; }
.footer { text-align: center; color: var(--muted); border-top: 1px solid var(--border); padding: 2rem 1rem; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.hidden { display: none; }

@media (max-width: 900px) {
  .hero, .split { grid-template-columns: 1fr; }
  .grid, .music-grid, .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .section { padding: 4rem 1rem; }
  .grid, .music-grid, .product-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { text-align: center; width: 100%; }
}


/* Member area additions */
.member-hero { min-height: 76vh; display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center; }
.member-hero h1, .auth-page h1, .section-heading h1 { font-size: clamp(2.6rem, 7vw, 6rem); line-height: .95; margin: .5rem 0 1rem; }
.featured-card { border-color: rgba(0,224,255,.55); transform: translateY(-4px); }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.dashboard-card { min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end; }
.muted-note { color: var(--muted); border-left: 3px solid var(--accent-2); padding-left: 1rem; }
.form select { width: 100%; border: 1px solid var(--border); border-radius: 14px; background: #ffffff; color: var(--text); padding: .9rem 1rem; }
.forum-list { display: grid; gap: 1rem; margin-bottom: 2rem; }
.forum-row { background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(247,241,231,.96)); border: 1px solid var(--border); border-radius: 20px; padding: 1rem 1.25rem; }
.forum-row p { color: var(--muted); }
@media (max-width: 900px) { .member-hero { grid-template-columns: 1fr; } .dashboard-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .dashboard-grid { grid-template-columns: 1fr; } }


/* Store, basket, checkout, and payment */
.basket-list { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.basket-item, .checkout-summary { background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(247,241,231,.96)); border: 1px solid var(--border); border-radius: 24px; padding: 1.25rem; box-shadow: var(--shadow); }
.basket-item { display: grid; grid-template-columns: 1fr auto auto auto; gap: 1rem; align-items: center; }
.qty-controls { display: flex; gap: .5rem; align-items: center; }
.qty-controls button { border: 1px solid var(--border); background: rgba(255,255,255,.82); color: var(--text); border-radius: 999px; width: 34px; height: 34px; cursor: pointer; }
.remove-item { color: var(--muted); text-decoration: underline; background: transparent; border: 0; cursor: pointer; }
#checkout-items p { color: var(--muted); margin: .4rem 0; }
@media (max-width: 700px) { .basket-item { grid-template-columns: 1fr; } }

.product-option {
  width: 100%;
  margin: 0.35rem 0 0.85rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(17,17,17,.16);
  background: rgba(255,255,255,.82);
  color: #111111;
}
.product-option option {
  color: #111;
}
.product label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: rgba(17,17,17,.68);
}


/* Kaekh Profile Menu */
.auth-area {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-menu {
  position: relative;
}

.profile-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid rgba(17,17,17,.20);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #111111;
  cursor: pointer;
  font: inherit;
}

.profile-toggle:hover {
  background: rgba(17,17,17,.16);
}

.profile-avatar {
  font-size: 1rem;
}

.profile-arrow {
  opacity: 0.75;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  min-width: 220px;
  padding: 0.6rem;
  border: 1px solid rgba(17,17,17,.16);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(0,0,0,0.45);
  display: none;
  z-index: 999;
}

.profile-dropdown.show {
  display: block;
}

.profile-dropdown a,
.profile-dropdown button {
  width: 100%;
  display: block;
  padding: 0.8rem 0.9rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #111111;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
  background: rgba(17,17,17,.07);
}

.profile-dropdown button {
  color: #ff6b8a;
}

@media (max-width: 760px) {
  .profile-dropdown {
    right: auto;
    left: 0;
  }

  .profile-toggle span:nth-child(2) {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}


/* Revised More Music Filters */
.filter-panel {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.25rem;
  border: 1px solid rgba(17,17,17,.14);
  border-radius: 22px;
  background: rgba(255,255,255,.78);
}

.filter-panel h3 {
  margin: 0 0 0.75rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.artist-filter,
.status-filter {
  border: 1px solid rgba(17,17,17,.20);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #111111;
  padding: 0.7rem 1rem;
  cursor: pointer;
}

.artist-filter.active,
.status-filter.active,
.artist-filter:hover,
.status-filter:hover {
  background: linear-gradient(135deg, #111111, #3a332b);
  border-color: transparent;
}

.full-catalogue {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.cover-placeholder {
  min-height: 170px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #efe4d4, #ffffff);
  margin-bottom: 1rem;
}

.tag {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.tag.released {
  background: rgba(70, 255, 170, 0.15);
  color: #8dffc9;
}

.tag.coming-soon {
  background: rgba(255, 198, 87, 0.15);
  color: #ffd37a;
}

.empty-state {
  margin-top: 2rem;
  opacity: 0.8;
}

.btn.disabled {
  opacity: 0.55;
  pointer-events: none;
}


/* Fixed music catalogue page layout */
.music-page-hero {
  min-height: auto;
  padding-top: 7rem;
  padding-bottom: 2rem;
}

.music-page-hero .section-heading {
  max-width: 780px;
}

.music-page-hero h1 {
  font-size: clamp(2.7rem, 10vw, 5rem);
  line-height: .95;
  margin: .5rem 0 1rem;
}

.music-catalogue-section {
  padding-top: 2rem;
}

.music-catalogue-section .music-card {
  display: flex;
  flex-direction: column;
}

.music-catalogue-section .music-card .btn {
  margin-top: auto;
  width: max-content;
}

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

@media (max-width: 760px) {
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .music-catalogue-section .music-card .btn {
    width: 100%;
  }
}

/* DB-driven catalogue support */
.loading,
.error,
.empty-state {
  padding: 1rem;
  opacity: 0.9;
}

.error {
  color: #ff8fa3;
}

.filter-panel {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.25rem;
  border: 1px solid rgba(17,17,17,.14);
  border-radius: 22px;
  background: rgba(255,255,255,.78);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.artist-filter,
.status-filter {
  border: 1px solid rgba(17,17,17,.20);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #111111;
  padding: 0.7rem 1rem;
  cursor: pointer;
}

.artist-filter.active,
.status-filter.active,
.artist-filter:hover,
.status-filter:hover {
  background: linear-gradient(135deg, #111111, #3a332b);
  border-color: transparent;
}

.cover-placeholder {
  min-height: 170px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #efe4d4, #ffffff);
  margin-bottom: 1rem;
}

.tag {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.tag.released {
  background: rgba(70, 255, 170, 0.15);
  color: #8dffc9;
}

.tag.coming-soon {
  background: rgba(255, 198, 87, 0.15);
  color: #ffd37a;
}

.product-card label {
  display: block;
  margin: 0.75rem 0;
}

.product-card select {
  width: 100%;
  margin-top: 0.35rem;
}

.price {
  font-size: 1.25rem;
  font-weight: 700;
}

.btn.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.radio-section,

.radio-page {
  background: radial-gradient(circle at top, rgba(255,255,255,.92), transparent 45%);
}

.radio-card,

.radio-player {
  border: 1px solid rgba(17,17,17,.16);
  border-radius: 24px;
  padding: 2rem;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
}

.radio-card {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.radio-player audio {
  width: 100%;
  margin-top: 1rem;
}

/* Music API cards */
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: auto;
}

.card-links .btn {
  margin-top: 0;
}


/* ==========================================================
   Shared artist image component
   Used by the database-driven profiles on index.html and artist.html
   ========================================================== */

.artist-media {
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow);
}

/* Homepage profile image */
.artist-media--home {
  width: min(100%, 480px);
  aspect-ratio: 4 / 5;
  min-height: 0;
}

/* Full biography portrait */
.artist-media--detail {
  width: min(100%, 480px);
  aspect-ratio: 4 / 5;
  min-height: 0;
}

.artist-media > img,
.artist-media > .artist-photo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center top;
  border: 0;
  border-radius: inherit;
}

/* Text fallback when an artist has no portrait */
.artist-media:not(:has(img)) {
  display: grid;
  place-items: center;
  padding: 1.5rem;
  color: #111111;
  font-weight: 900;
  text-align: center;
}

/* Neutralise the older generic profile-image artwork rules. */
.profile-image.artist-media {
  min-height: 0;
  margin: 0 auto;
  border-radius: 22px;
}

@media (max-width: 900px) {
  .artist-media--home,
  .artist-media--detail {
    width: min(100%, 520px);
  }
}

@media (max-width: 560px) {
  .artist-media,
  .profile-image.artist-media {
    border-radius: 16px;
  }
}


/* ==========================================================
   Site-wide cream and white palette
   These rules intentionally appear last so they override older
   page-specific dark-theme declarations.
   ========================================================== */

html {
  background: var(--bg);
  color-scheme: light;
}

body,
main,
.page,
.site-page,
.music-page,
.release-page,
.radio-page,
.auth-page {
  color: var(--text);
}

body::before,
body::after,
main::before,
main::after {
  background-image: none !important;
}

.site-header {
  background: rgba(255, 250, 243, .94);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 28px rgba(72, 54, 31, .07);
}

.logo {
  color: var(--text);
}

.nav-links a,
.menu-toggle,
.auth-area,
.profile-toggle {
  color: var(--text);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent-2);
}


.hero-card,
.card,
.form,
.cart,
.forum-row,
.basket-item,
.checkout-summary,
.filter-panel,
.radio-card,
.radio-player,
.track-row,
.release-shell,
.gallery-card,
.story-card,
.news-card,
.product-card,
.music-card {
  background: linear-gradient(145deg, #ffffff, #fbf5ec);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow);
}

.card:hover,
.music-card:hover,
.product-card:hover,
.news-card:hover,
.story-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 22px 55px rgba(72, 54, 31, .16);
}

.card p,
.forum-row p,
.feature-list,
.hero-text,
.muted-note,
.track-list-message,
.empty-state,
.loading,
#checkout-items p,
.form label,
.product label {
  color: var(--muted);
}

.eyebrow,
.tag {
  color: var(--accent-2);
}

.cover,
.product-img,
.profile-image,
.artist-media,
.cover-placeholder {
  background: linear-gradient(135deg, #eadcc8, #fffdf9);
  color: var(--text);
}

.filter-btn,
.btn,
.artist-filter,
.status-filter,
.qty-controls button,
.profile-toggle {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border-strong);
}

.filter-btn:hover,
.btn:hover,
.artist-filter:hover,
.status-filter:hover,
.qty-controls button:hover,
.profile-toggle:hover {
  background: var(--panel-alt);
  color: var(--text);
}

.filter-btn.active,
.btn.primary,
.artist-filter.active,
.status-filter.active {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

.btn.secondary {
  background: var(--panel-alt);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
}

.form input,
.form textarea,
.form select,
.product-option,
.product-card select {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border-strong);
}

.form input::placeholder,
.form textarea::placeholder {
  color: #8a8379;
}

.product-option option {
  color: var(--text);
  background: #ffffff;
}

.profile-dropdown {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 20px 45px rgba(72, 54, 31, .16);
}

.profile-dropdown a,
.profile-dropdown button {
  color: var(--text);
}

.profile-dropdown a:hover,
.profile-dropdown button:hover {
  background: var(--panel-alt);
}

.profile-dropdown button {
  color: #8b1e1e;
}

.tag.released {
  background: #e6f2e9;
  color: #215c32;
}

.tag.coming-soon {
  background: #f6ead1;
  color: #735415;
}

.error {
  color: #8b1e1e;
}

.radio-section,
.radio-page {
  background: radial-gradient(circle at top, rgba(255,255,255,.95), transparent 45%);
}

.footer {
  background: #efe5d7;
  color: var(--muted);
  border-top-color: var(--border);
}

::selection {
  background: #d9c6aa;
  color: #111111;
}

:focus-visible {
  outline: 3px solid rgba(138, 111, 77, .38);
  outline-offset: 3px;
}

/* Database-driven contact form */
.contact-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form-status {
  min-height: 1.5em;
  margin: 0;
  color: var(--muted);
}

.form-status.is-pending {
  color: var(--muted);
}

.form-status.is-success {
  color: #215c32;
}

.form-status.is-error {
  color: #8b1e1e;
}

.form [aria-invalid="true"] {
  border-color: #8b1e1e;
  box-shadow: 0 0 0 3px rgba(139, 30, 30, .12);
}

.form button:disabled {
  cursor: wait;
  opacity: .65;
}

/* ==========================================================
   Consolidated mobile navigation
   This is the single authoritative mobile menu definition.
   ========================================================== */
@media (max-width: 900px) {
  .site-header {
    background: #fffaf3;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .navbar {
    position: relative;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .75rem 0 1rem;
    background: #fffaf3;
    background-image: none;
    opacity: 1;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 1px solid rgba(37, 35, 38, .08);
    border-bottom: 2px solid rgba(120, 73, 90, .24);
    box-shadow: 0 20px 40px rgba(37, 35, 38, .22);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    color: #252326;
    font-weight: 700;
    background: transparent;
  }

  .nav-links a + a {
    border-top: 1px solid rgba(37, 35, 38, .08);
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    background: #efe5d7;
    color: #593442;
  }

  .menu-toggle {
    display: block;
    color: #593442;
  }
}

/* ==========================================================
   Site-wide mobile document scrolling
   Keep dynamically populated pages taller than the viewport and
   reserve space below an open, fixed audio-preview player.
   ========================================================== */
@media (max-width: 900px) {
  html {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body:not(.viewer-open) {
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body:not(.viewer-open) main {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /*
   * The preview player is fixed and therefore does not contribute to page
   * height. Add clearance only while it is visible so the footer and final
   * content can scroll completely above it.
   */
  body:has(.music-preview-widget:not([hidden])) .footer {
    padding-bottom: calc(11rem + env(safe-area-inset-bottom));
  }
}
