/* ============================================================
   Prodigious Music — Joomla Template Stylesheet
   Design: Monochrome Luxury
   Version: 1.0.0
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
    --pm-bg:          #0d0b12;
    --pm-bg-card:     #141020;
    --pm-bg-surface:  #1a1528;
    --pm-fg:          #f5f3f8;
    --pm-fg-muted:    #7a7490;
    --pm-fg-dim:      #4a4460;
    --pm-accent:      #8b5cf6;       /* overridden by inline :root from PHP */
    --pm-accent-dim:  #6d3fd4;
    --pm-border:      #2a2440;
    --pm-font-display: 'Bebas Neue', 'Arial Narrow', sans-serif;
    --pm-font-body:    'DM Sans', 'Segoe UI', sans-serif;
    --pm-radius:       2px;
    --pm-ease-out:     cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body.pm-body {
    background-color: var(--pm-bg);
    color: var(--pm-fg);
    font-family: var(--pm-font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Grain texture overlay */
body.pm-grain::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 128px 128px;
}

a { color: var(--pm-accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--pm-fg); }

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

/* ── Typography ─────────────────────────────────────────────── */
.pm-display {
    font-family: var(--pm-font-display);
    letter-spacing: 0.02em;
    line-height: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--pm-font-display);
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: var(--pm-fg);
}

h1 { font-size: clamp(3rem, 8vw, 6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p { color: var(--pm-fg-muted); margin-bottom: 1rem; }

/* ── Layout ─────────────────────────────────────────────────── */
.pm-layout {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .pm-layout {
        grid-template-columns: 1fr 280px;
        padding: 3rem 2rem;
    }
    .pm-layout:not(:has(.pm-sidebar)) {
        grid-template-columns: 1fr;
    }
}

.pm-main { min-width: 0; }

/* ── Header / Navigation ────────────────────────────────────── */
.pm-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    transition: background 0.3s var(--pm-ease-out), border-color 0.3s;
    border-bottom: 1px solid transparent;
}

.pm-header.pm-scrolled {
    background: rgba(13, 11, 18, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: var(--pm-border);
}

.pm-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .pm-header__inner { padding: 0 2rem; }
}

/* Brand */
.pm-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--pm-fg) !important;
    text-decoration: none;
}

.pm-brand__logo { width: 36px; height: 36px; object-fit: contain; }

.pm-brand__name {
    font-family: var(--pm-font-display);
    font-size: 1.2rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pm-fg);
}

/* Nav links (Joomla menu module output) */
.pm-nav { display: none; }

@media (min-width: 768px) {
    .pm-nav { display: flex; align-items: center; gap: 2rem; }
}

.pm-nav ul { list-style: none; display: flex; gap: 2rem; }
.pm-nav ul li a {
    font-size: 0.75rem;
    font-family: var(--pm-font-body);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--pm-fg-muted);
    transition: color 0.2s;
    position: relative;
    padding-bottom: 2px;
}
.pm-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 1px;
    background: var(--pm-accent);
    transition: width 0.25s var(--pm-ease-out);
}
.pm-nav ul li a:hover,
.pm-nav ul li.active > a,
.pm-nav ul li.current > a {
    color: var(--pm-accent);
}
.pm-nav ul li a:hover::after,
.pm-nav ul li.active > a::after,
.pm-nav ul li.current > a::after { width: 100%; }

/* Hamburger */
.pm-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
@media (min-width: 768px) { .pm-hamburger { display: none; } }

.pm-hamburger__bar {
    display: block;
    width: 24px; height: 1px;
    background: var(--pm-fg);
    transition: transform 0.2s, opacity 0.2s;
}

/* Mobile menu */
.pm-mobile-menu {
    background: rgba(13, 11, 18, 0.97);
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid var(--pm-border);
}
.pm-mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.pm-mobile-menu ul li a {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--pm-fg-muted);
    font-family: var(--pm-font-body);
}
.pm-mobile-menu ul li a:hover { color: var(--pm-accent); }

/* ── Hero Section ───────────────────────────────────────────── */
.pm-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 10vh;
    overflow: hidden;
}

.pm-hero__bg {
    position: absolute;
    inset: 0;
    background: url('../images/hero-bg.jpg') center/cover no-repeat;
}

.pm-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        var(--pm-bg) 0%,
        rgba(13,11,18,0.55) 50%,
        rgba(13,11,18,0.12) 100%
    );
}

.pm-hero__accent-bar {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--pm-accent);
}

.pm-hero__content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

@media (min-width: 1024px) { .pm-hero__content { padding: 0 2rem; } }

/* ── Artist Grid ────────────────────────────────────────────── */
.pm-artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1px;
    background: var(--pm-border);
}

@media (min-width: 1024px) {
    .pm-artists-grid { grid-template-columns: repeat(4, 1fr); }
}

.pm-artist-card {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: var(--pm-bg);
    cursor: pointer;
}

.pm-artist-card__ghost {
    position: absolute;
    bottom: -0.5rem; right: -0.5rem;
    font-family: var(--pm-font-display);
    font-size: clamp(5rem, 10vw, 9rem);
    line-height: 1;
    color: rgba(245,243,248,0.04);
    pointer-events: none;
    select: none;
    transition: color 0.4s;
    z-index: 0;
}

.pm-artist-card:hover .pm-artist-card__ghost { color: rgba(245,243,248,0.07); }

.pm-artist-card__image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.7s var(--pm-ease-out);
}

.pm-artist-card:hover .pm-artist-card__image { transform: scale(1.06); }

.pm-artist-card__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(13,11,18,0.97) 0%,
        rgba(13,11,18,0.25) 55%,
        transparent 100%
    );
}

.pm-artist-card__hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(13,11,18,1) 0%,
        rgba(13,11,18,0.8) 100%
    );
    opacity: 0;
    transition: opacity 0.45s var(--pm-ease-out);
}

.pm-artist-card:hover .pm-artist-card__hover-overlay { opacity: 1; }

.pm-artist-card__accent-bar {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--pm-accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.pm-artist-card:hover .pm-artist-card__accent-bar { opacity: 1; }

.pm-artist-card__index {
    position: absolute;
    top: 1.25rem; right: 1.25rem;
    font-family: var(--pm-font-display);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--pm-accent);
    z-index: 3;
}

.pm-artist-card__body {
    position: absolute;
    inset: 0;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 3;
}

.pm-artist-card__genre {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--pm-accent);
    font-family: var(--pm-font-body);
    margin-bottom: 0.35rem;
}

.pm-artist-card__name {
    font-family: var(--pm-font-display);
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    letter-spacing: 0.03em;
    color: var(--pm-fg);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.pm-artist-card__tagline {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--pm-fg-muted);
    font-family: var(--pm-font-body);
    margin-bottom: 0;
}

.pm-artist-card__bio {
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--pm-fg-dim);
    font-family: var(--pm-font-body);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s var(--pm-ease-out), opacity 0.4s;
    margin-top: 0.75rem;
}

.pm-artist-card:hover .pm-artist-card__bio {
    max-height: 120px;
    opacity: 1;
}

/* ── Artist Detail Page ─────────────────────────────────────── */
.pm-artist-detail {
    padding-top: 5rem;
}

.pm-artist-detail__hero {
    display: grid;
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .pm-artist-detail__hero { grid-template-columns: 1fr 2fr; align-items: start; }
}

.pm-artist-detail__portrait {
    aspect-ratio: 2/3;
    background-size: cover;
    background-position: center;
    position: relative;
}

.pm-artist-detail__portrait::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--pm-accent);
}

.pm-artist-detail__meta { padding-top: 1rem; }

.pm-artist-detail__genre {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--pm-accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pm-artist-detail__genre::before {
    content: '';
    display: block;
    width: 2.5rem; height: 1px;
    background: var(--pm-accent);
}

.pm-artist-detail__name {
    font-family: var(--pm-font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.02em;
    color: var(--pm-fg);
    line-height: 1;
    margin-bottom: 1rem;
}

.pm-artist-detail__tagline {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--pm-fg-muted);
    margin-bottom: 2rem;
}

.pm-artist-detail__bio {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--pm-fg-muted);
    margin-bottom: 2rem;
}

.pm-artist-detail__links { display: flex; gap: 1rem; flex-wrap: wrap; }

.pm-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-size: 0.75rem;
    font-family: var(--pm-font-body);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    border: 1px solid var(--pm-accent);
    color: var(--pm-fg);
    background: transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    border-radius: var(--pm-radius);
}

.pm-btn:hover { background: rgba(139,92,246,0.14); color: var(--pm-fg); }

.pm-btn--primary { background: var(--pm-accent); border-color: var(--pm-accent); }
.pm-btn--primary:hover { background: var(--pm-accent-dim); }

/* ── Section Helpers ────────────────────────────────────────── */
.pm-section { padding: 4rem 0; }

.pm-section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pm-section-label::before {
    content: '';
    display: block;
    width: 3rem; height: 1px;
    background: var(--pm-accent);
    flex-shrink: 0;
}

.pm-section-label span {
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--pm-accent);
    font-family: var(--pm-font-body);
}

.pm-divider {
    border: none;
    border-top: 1px solid var(--pm-border);
    margin: 3rem 0;
}

/* ── Sidebar ────────────────────────────────────────────────── */
.pm-sidebar {
    border-left: 1px solid var(--pm-border);
    padding-left: 2rem;
}

.pm-sidebar .pm-module { margin-bottom: 2.5rem; }

.pm-sidebar .pm-module__title {
    font-family: var(--pm-font-display);
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--pm-fg);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--pm-border);
}

/* ── Footer ─────────────────────────────────────────────────── */
.pm-footer {
    border-top: 1px solid var(--pm-border);
    margin-top: 4rem;
}

.pm-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 1024px) { .pm-footer__inner { padding: 2rem; } }

.pm-footer__brand { display: flex; align-items: center; gap: 0.75rem; }
.pm-footer__logo { width: 28px; height: 28px; object-fit: contain; opacity: 0.5; }
.pm-footer__name {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--pm-fg-dim);
    font-family: var(--pm-font-body);
}

.pm-footer__copy {
    font-size: 0.7rem;
    color: var(--pm-fg-dim);
    margin: 0;
}

/* ── Joomla System Messages ─────────────────────────────────── */
.system-message-container { max-width: 1280px; margin: 1rem auto; padding: 0 1.5rem; }

.alert {
    padding: 1rem 1.5rem;
    border-left: 3px solid var(--pm-accent);
    background: var(--pm-bg-card);
    color: var(--pm-fg);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success { border-color: #22c55e; }
.alert-warning { border-color: #f59e0b; }
.alert-danger  { border-color: #ef4444; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; gap: 0.5rem; list-style: none; margin: 2rem 0; }

.pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid var(--pm-border);
    color: var(--pm-fg-muted);
    font-size: 0.85rem;
    transition: border-color 0.2s, color 0.2s;
}

.pagination .page-item.active .page-link,
.pagination .page-item .page-link:hover {
    border-color: var(--pm-accent);
    color: var(--pm-accent);
}

/* ── Forms ──────────────────────────────────────────────────── */
.pm-form .control-group { margin-bottom: 1.5rem; }

.pm-form label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--pm-fg-muted);
    margin-bottom: 0.5rem;
}

.pm-form input[type="text"],
.pm-form input[type="email"],
.pm-form textarea,
.pm-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--pm-bg-surface);
    border: 1px solid var(--pm-border);
    color: var(--pm-fg);
    font-family: var(--pm-font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    border-radius: var(--pm-radius);
}

.pm-form input:focus,
.pm-form textarea:focus,
.pm-form select:focus { border-color: var(--pm-accent); }

/* ── Utilities ──────────────────────────────────────────────── */
.pm-container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 1024px) { .pm-container { padding: 0 2rem; } }

.pm-text-accent { color: var(--pm-accent); }
.pm-text-muted  { color: var(--pm-fg-muted); }
.pm-text-dim    { color: var(--pm-fg-dim); }

.pm-sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Responsive Helpers ─────────────────────────────────────── */
@media (max-width: 767px) {
    .pm-hide-mobile { display: none !important; }
    .pm-artists-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .pm-hide-desktop { display: none !important; }
}
