:root {
    --ink: #f6f1e8;
    --paper: #11100f;
    --muted: #a9a095;
    --line: rgba(246, 241, 232, 0.14);
    --panel: rgba(246, 241, 232, 0.065);
    --panel-strong: rgba(246, 241, 232, 0.11);
    --red: #d9513f;
    --lime: #d7ff5f;
    --cyan: #7adad4;
    --violet: #b6a1ff;
    --amber: #ffb84e;
    --radius: 22px;
    --motion: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 18% 12%, rgba(215, 255, 95, 0.12), transparent 28rem),
        radial-gradient(circle at 88% 16%, rgba(217, 81, 63, 0.18), transparent 30rem),
        linear-gradient(135deg, #0d0c0a 0%, #17130f 46%, #080806 100%);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    line-height: 1.5;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    content: "";
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(246, 241, 232, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(246, 241, 232, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input,
textarea {
    font: inherit;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 5;
    padding: 10px 14px;
    background: var(--ink);
    color: #11100f;
    transform: translateY(-140%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header,
main,
.site-footer {
    position: relative;
    z-index: 1;
}

.site-header {
    padding: 22px clamp(16px, 4vw, 56px) 0;
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(1180px, 100%);
    min-height: 68px;
    margin: 0 auto;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(17, 16, 15, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 16px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #11100f;
    background: linear-gradient(135deg, var(--lime), var(--cyan));
    font-weight: 900;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 0.75rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 999px;
    color: var(--muted);
    transition: color 350ms var(--motion), background 350ms var(--motion), transform 350ms var(--motion);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links .active {
    color: var(--ink);
    background: var(--panel-strong);
    transform: translateY(-1px);
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.flash {
    margin: 22px auto 0;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(199, 243, 107, 0.12);
}

.flash.error,
.form-errors {
    background: rgba(230, 83, 69, 0.14);
    color: #ffd8d3;
}

.hero {
    display: grid;
    grid-template-columns: 74px minmax(0, 0.95fr) minmax(330px, 0.9fr);
    gap: clamp(18px, 4vw, 54px);
    align-items: center;
    min-height: 660px;
    padding: clamp(58px, 10vw, 120px) 0 76px;
}

.rap-hero {
    position: relative;
}

.rap-hero::after {
    position: absolute;
    right: -6vw;
    bottom: 7%;
    z-index: -1;
    width: min(48vw, 620px);
    aspect-ratio: 1;
    content: "";
    border: 1px solid rgba(246, 241, 232, 0.08);
    border-radius: 50%;
    background:
        repeating-linear-gradient(90deg, rgba(246, 241, 232, 0.08) 0 1px, transparent 1px 16px),
        radial-gradient(circle, rgba(255, 184, 78, 0.11), transparent 62%);
    transform: rotate(-12deg);
}

.hero-rail {
    display: grid;
    align-content: space-between;
    align-self: stretch;
    min-height: 500px;
    padding: 14px 0;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    color: var(--amber);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.hero-rail span {
    padding: 0 24px;
}

.eyebrow,
.tag {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

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

h1 {
    max-width: 900px;
    margin-bottom: 24px;
    font-size: clamp(3.4rem, 8vw, 8rem);
    line-height: 0.82;
    letter-spacing: 0;
}

.rap-hero h1 {
    display: grid;
    gap: 10px;
    width: min(650px, 100%);
    margin-bottom: 22px;
    text-transform: uppercase;
}

.rap-hero h1 span {
    display: block;
    width: fit-content;
    padding: 0.04em 0.16em 0.09em;
    border: 1px solid rgba(246, 241, 232, 0.18);
    background: rgba(246, 241, 232, 0.075);
    box-shadow: inset 0 -0.08em 0 rgba(215, 255, 95, 0.22);
}

.rap-hero h1 span:nth-child(2) {
    margin-left: clamp(26px, 8vw, 104px);
    color: var(--lime);
}

.rap-hero h1 span:nth-child(3) {
    margin-left: clamp(6px, 4vw, 44px);
}

h2 {
    font-size: clamp(2rem, 5vw, 4.4rem);
    line-height: 0.96;
}

h3 {
    margin-bottom: 0;
    font-size: 1.55rem;
    line-height: 1.05;
}

.lead {
    max-width: 660px;
    color: #d5ccbf;
    font-size: clamp(1.03rem, 1.5vw, 1.22rem);
}

.hero-actions,
.detail-actions,
.card-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 13px 18px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 420ms var(--motion), background 420ms var(--motion), color 420ms var(--motion);
}

.btn span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(17, 16, 15, 0.16);
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-2px);
}

.primary {
    color: #11100f;
    background: var(--lime);
}

.secondary {
    color: var(--ink);
    background: var(--panel-strong);
    border: 1px solid var(--line);
}

.danger {
    color: #1c0907;
    background: #ff8a7f;
}

.hero-wall {
    display: grid;
    gap: 18px;
}

.wall-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    background: rgba(246, 241, 232, 0.055);
    transform: rotate(1.2deg);
}

.wall-stats div {
    min-height: 92px;
    padding: 14px;
    background: #efe5d4;
    color: #14110d;
}

.wall-stats strong {
    display: block;
    font-size: clamp(1.4rem, 2.5vw, 2.45rem);
    line-height: 0.95;
    font-variant-numeric: tabular-nums;
}

.wall-stats span {
    display: block;
    margin-top: 6px;
    color: #504434;
    font-size: 0.78rem;
}

.poster-stack {
    position: relative;
    min-height: 430px;
}

.mini-poster {
    position: absolute;
    overflow: hidden;
    width: min(72%, 360px);
    aspect-ratio: 4 / 5;
    border: 8px solid #efe5d4;
    background: #efe5d4;
    color: #11100f;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
    transition: transform 520ms var(--motion), filter 520ms var(--motion);
}

.mini-poster:nth-child(1) {
    top: 0;
    left: 11%;
    z-index: 3;
    transform: rotate(-5deg);
}

.mini-poster:nth-child(2) {
    top: 54px;
    right: 0;
    z-index: 2;
    transform: rotate(5deg);
}

.mini-poster:nth-child(3) {
    top: 130px;
    left: 0;
    z-index: 1;
    transform: rotate(-1deg);
}

.mini-poster:hover,
.mini-poster:focus-visible {
    z-index: 4;
    filter: saturate(1.08);
    transform: rotate(0deg) translateY(-10px);
}

.mini-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.18) contrast(1.08);
}

.mini-poster span {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    background: rgba(239, 229, 212, 0.92);
}

.mini-poster strong,
.mini-poster small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.atlas-section {
    padding: 40px 0 90px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 28px;
}

.artist-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
}

.artist-card {
    grid-column: span 4;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 4px);
    background: rgba(246, 241, 232, 0.07);
    transition: transform 520ms var(--motion), border-color 520ms var(--motion), background 520ms var(--motion);
}

.artist-card:hover {
    border-color: rgba(199, 243, 107, 0.4);
    background: rgba(246, 241, 232, 0.1);
    transform: translateY(-6px);
}

.image-link {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.image-link img,
.detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.88) contrast(1.08);
    transition: transform 650ms var(--motion), filter 650ms var(--motion);
}

.artist-card:hover img {
    filter: saturate(1.12) contrast(1.08);
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.pulse-dot {
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    margin-top: 8px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 8px rgba(230, 83, 69, 0.11);
}

.mini-stats,
.detail-stats {
    display: grid;
    gap: 10px;
    margin: 20px 0;
}

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

dt {
    color: var(--muted);
    font-size: 0.8rem;
}

dd {
    margin: 0;
    font-weight: 900;
}

.mini-stats div,
.detail-stats div,
.audio-box {
    padding: 15px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.2);
}

.artist-bio,
.track {
    color: #d5ccbf;
}

.artist-bio {
    min-height: 72px;
    margin-bottom: 14px;
    font-size: 0.94rem;
}

.text-link,
.danger-link {
    min-height: 44px;
    padding: 0;
    border: 0;
    color: var(--lime);
    background: transparent;
    cursor: pointer;
}

.danger-link {
    color: #ff9a90;
}

.empty-state,
.artist-form {
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 8px);
    background: rgba(246, 241, 232, 0.065);
}

.detail-layout,
.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: clamp(24px, 6vw, 70px);
    padding: clamp(58px, 10vw, 112px) 0 90px;
    align-items: start;
}

.detail-media {
    position: sticky;
    top: 24px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 14px);
    background: rgba(246, 241, 232, 0.06);
}

.detail-media img {
    border-radius: var(--radius);
}

.detail-content h1,
.form-intro h1,
.login-form h1 {
    font-size: clamp(2.7rem, 6vw, 6rem);
}

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

.audio-box audio {
    width: 100%;
}

.artist-form {
    display: grid;
    gap: 18px;
}

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

label {
    display: grid;
    gap: 8px;
    color: #d9d1c5;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: rgba(0, 0, 0, 0.22);
    outline: none;
    transition: border-color 300ms var(--motion), background 300ms var(--motion);
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--cyan);
    background: rgba(0, 0, 0, 0.34);
}

.form-errors {
    padding: 12px 14px;
    border-radius: 14px;
}

.form-errors p {
    margin: 0;
}

.login-layout {
    display: grid;
    place-items: center;
    min-height: 620px;
    padding: 60px 0 90px;
}

.login-form {
    width: min(520px, 100%);
}

.site-footer {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 46px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.site-footer p {
    margin: 0;
}

.reveal {
    opacity: 1;
    transform: none;
}

.js-ready .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 850ms var(--motion), transform 850ms var(--motion);
}

.js-ready .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto;
        transition-duration: 1ms !important;
        animation-duration: 1ms !important;
    }

    .reveal,
    .js-ready .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 900px) {
    .hero,
    .detail-layout,
    .form-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-rail {
        min-height: auto;
        padding: 12px 0;
        writing-mode: initial;
        border-right: 0;
        border-left: 0;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
    }

    .hero-rail span {
        padding: 0;
    }

    .poster-stack {
        min-height: 390px;
    }

    .artist-card {
        grid-column: span 6;
    }

    .detail-media {
        position: static;
        aspect-ratio: 16 / 11;
    }
}

@media (max-width: 640px) {
    .site-header {
        padding-top: 12px;
    }

    .nav-shell {
        align-items: stretch;
        border-radius: 26px;
        flex-direction: column;
    }

    .nav-links {
        justify-content: stretch;
    }

    .nav-links a {
        flex: 1 1 auto;
        text-align: center;
    }

    main {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        padding-top: 56px;
    }

    .rap-hero h1 span,
    .rap-hero h1 span:nth-child(2),
    .rap-hero h1 span:nth-child(3) {
        margin-left: 0;
    }

    .wall-stats {
        grid-template-columns: 1fr;
        transform: none;
    }

    .poster-stack {
        display: grid;
        gap: 12px;
        min-height: auto;
    }

    .mini-poster,
    .mini-poster:nth-child(1),
    .mini-poster:nth-child(2),
    .mini-poster:nth-child(3) {
        position: relative;
        inset: auto;
        width: 100%;
        aspect-ratio: 16 / 10;
        transform: none;
    }

    h1 {
        font-size: clamp(2.7rem, 15vw, 4.6rem);
    }

    .artist-grid,
    .field-grid,
    .mini-stats,
    .detail-stats {
        grid-template-columns: 1fr;
    }

    .artist-card {
        grid-column: span 1;
    }
}
