/* ============================================================
   Onionwave — dark, mobile-first redesign
   "Beware of unexpected waves"
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* surfaces */
    --bg: #04100c;
    --bg-2: #061a13;
    --surface: rgba(202, 255, 214, 0.035);
    --surface-2: rgba(202, 255, 214, 0.06);
    --glass: rgba(6, 22, 16, 0.66);

    /* ink */
    --ink: #e9f5ec;
    --muted: rgba(233, 245, 236, 0.58);
    --faint: rgba(233, 245, 236, 0.32);

    /* lines */
    --line: rgba(198, 242, 78, 0.14);
    --line-strong: rgba(198, 242, 78, 0.28);

    /* accents */
    --acid: #c6f24e;
    --teal: #3fe0c5;
    --clay: #ff8a5b;
    --glow-acid: rgba(198, 242, 78, 0.45);
    --glow-teal: rgba(63, 224, 197, 0.4);

    --radius: 16px;
    --radius-sm: 10px;
    --container: 1200px;

    --display: "Syne", "Archivo", ui-sans-serif, system-ui, sans-serif;
    --mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(1100px 700px at 78% -10%, rgba(63, 224, 197, 0.12), transparent 60%),
        radial-gradient(900px 600px at 8% 8%, rgba(198, 242, 78, 0.1), transparent 55%),
        linear-gradient(180deg, var(--bg-2), var(--bg) 60%);
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.modal-open {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

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

::selection {
    background: var(--acid);
    color: #04100c;
}

:focus-visible {
    outline: 2px solid var(--acid);
    outline-offset: 3px;
    border-radius: 4px;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

/* ---------- animated wave canvas / background motifs ---------- */

.wave-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

.background-logo {
    position: fixed;
    right: -14vw;
    bottom: -16vh;
    width: clamp(320px, 64vw, 820px);
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
    animation: drift 26s ease-in-out infinite;
}

.background-logo img {
    width: 100%;
    filter: invert(86%) sepia(34%) saturate(800%) hue-rotate(40deg) brightness(105%);
}

@keyframes drift {
    50% { transform: translateY(-26px) rotate(6deg); }
}

/* grain overlay */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

.container,
.marquee {
    position: relative;
    z-index: 1;
}

/* ---------- header ---------- */

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--glass);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.header.scrolled {
    border-color: var(--line-strong);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 34px;
    height: 34px;
    filter: invert(86%) sepia(34%) saturate(800%) hue-rotate(40deg) brightness(105%);
}

.logo-text {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 700;
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
    transform: translateY(-3px);
    color: #04100c;
    background: var(--acid);
    border-color: var(--acid);
    box-shadow: 0 6px 18px var(--glow-acid);
    outline: none;
}

/* ---------- hero ---------- */

.hero {
    display: grid;
    gap: 34px;
    padding: 56px 0 34px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--teal);
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--teal);
}

.hero h1 {
    margin-top: 18px;
    font-family: var(--display);
    font-size: clamp(48px, 15vw, 132px);
    font-weight: 700;
    line-height: 0.86;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.hero-lede {
    max-width: 540px;
    margin-top: 26px;
    color: var(--muted);
    font-size: clamp(17px, 4.4vw, 21px);
    line-height: 1.45;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 99px;
    font-family: var(--display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
    background: linear-gradient(120deg, var(--acid), var(--teal));
    color: #04100c;
    box-shadow: 0 10px 30px rgba(198, 242, 78, 0.28);
}

.button-primary:hover,
.button-primary:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(198, 242, 78, 0.4);
    outline: none;
}

.button-ghost {
    border-color: var(--line-strong);
    background: var(--surface);
    color: var(--ink);
}

.button-ghost:hover,
.button-ghost:focus-visible {
    transform: translateY(-3px);
    border-color: var(--acid);
    background: var(--surface-2);
    outline: none;
}

/* hero plate / equalizer card */

.hero-plate {
    position: relative;
    display: grid;
    gap: 24px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(120% 120% at 50% 0%, rgba(63, 224, 197, 0.12), transparent 60%),
        var(--surface);
    overflow: hidden;
}

.hero-plate::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, var(--line-strong), transparent 40%, transparent 60%, var(--glow-teal));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.hero-plate > img {
    justify-self: center;
    width: min(56vw, 230px);
    filter: invert(86%) sepia(34%) saturate(900%) hue-rotate(40deg) brightness(105%);
    opacity: 0.92;
}

.wave-index {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 56px;
}

.wave-index span {
    flex: 1;
    border-radius: 99px;
    background: rgba(198, 242, 78, 0.5);
    animation: eq 1.4s ease-in-out infinite;
    transform-origin: bottom;
}

.wave-index span:nth-child(1) { height: 40%; animation-delay: 0s; }
.wave-index span:nth-child(2) { height: 80%; animation-delay: 0.15s; }
.wave-index span:nth-child(3) { height: 55%; animation-delay: 0.3s; }
.wave-index span:nth-child(4) { height: 95%; animation-delay: 0.45s; }
.wave-index span:nth-child(5) { height: 35%; animation-delay: 0.6s; }

@keyframes eq {
    0%, 100% { transform: scaleY(0.4); opacity: 0.7; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- marquee ---------- */

.marquee {
    margin: 8px 0 12px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    white-space: nowrap;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
    display: inline-flex;
    gap: 28px;
    will-change: transform;
    animation: scrollX 26s linear infinite;
}

.marquee-track span {
    font-family: var(--display);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.marquee-track span::after {
    content: "✦";
    margin-left: 28px;
    color: var(--acid);
}

@keyframes scrollX {
    to { transform: translateX(-50%); }
}

/* ---------- sections ---------- */

.releases-section,
.about-section {
    padding: 48px 0;
}

.section-header,
.bio-header {
    display: grid;
    gap: 10px;
    margin-bottom: 28px;
}

.section-header h2,
.bio-header h2 {
    font-family: var(--display);
    font-size: clamp(38px, 11vw, 76px);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.02em;
}

/* ---------- releases grid ---------- */

.releases {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.release {
    --release-index: 1;
    border-radius: var(--radius);
}

/* Reveal-on-scroll only when JS is active (progressive enhancement):
   without JS the catalog stays fully visible. */
.js-anim .release {
    opacity: 0;
    transform: translateY(28px);
}

.js-anim .release.in-view {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--release-index, 1) * 40ms);
}

.release-content {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    width: 100%;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    text-align: left;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.release-content:hover,
.release-content:focus-visible {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    background: var(--surface-2);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(198, 242, 78, 0.08);
    outline: none;
}

.artwork {
    width: 92px;
    height: 100%;
    min-height: 132px;
    object-fit: cover;
    background: var(--bg-2);
    transition: transform 0.4s ease;
}

.release-content:hover .artwork {
    transform: scale(1.05);
}

.artwork-fallback {
    object-fit: contain;
    padding: 18px;
    filter: invert(86%) sepia(34%) saturate(700%) hue-rotate(40deg) brightness(105%);
    opacity: 0.5;
}

.release-info {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
    padding: 16px;
}

.release-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.release-index {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--faint);
}

.release-badge,
.catalog-number,
.modal-catalog {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.release-badge {
    padding: 3px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 99px;
    color: var(--acid);
}

.catalog-number,
.modal-catalog {
    color: var(--teal);
}

.title {
    overflow-wrap: anywhere;
    font-family: var(--display);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.01em;
}

.artist,
.date {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.genre {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--teal);
}

.date {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--faint);
}

/* ---------- modal ---------- */

.release-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: rgba(2, 8, 6, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.release-modal.is-open {
    display: flex;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
}

.modal-content {
    position: relative;
    width: min(100%, 1020px);
    max-height: 92svh;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--bg-2), var(--bg));
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    animation: rise 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes rise {
    from { transform: translateY(24px); opacity: 0; }
}

.modal-close {
    position: sticky;
    top: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin: 12px 12px -52px auto;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--glass);
    color: var(--ink);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
    background: var(--acid);
    color: #04100c;
    transform: rotate(90deg);
    outline: none;
}

.modal-grid {
    display: grid;
    gap: 24px;
    padding: 22px;
}

.modal-artwork img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-2);
}

.modal-info {
    display: grid;
    align-content: start;
    gap: 12px;
}

.modal-title {
    font-family: var(--display);
    font-size: clamp(40px, 13vw, 84px);
    font-weight: 700;
    line-height: 0.86;
    letter-spacing: -0.02em;
}

.modal-artist {
    color: var(--muted);
    font-size: clamp(17px, 4.6vw, 24px);
    font-weight: 500;
}

.modal-genre {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--teal);
}

/* language switch */

.modal-language-switch,
.language-switch {
    display: inline-flex;
    width: fit-content;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: var(--surface);
    cursor: pointer;
    user-select: none;
}

.modal-language-switch span,
.language-switch span {
    display: grid;
    place-items: center;
    min-width: 46px;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 99px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    transition: background 0.2s ease, color 0.2s ease;
}

.modal-language-switch span.active,
.language-switch span.active {
    background: var(--acid);
    color: #04100c;
}

.modal-descriptions p,
.bio p {
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.7;
}

.modal-links {
    margin-top: 8px;
}

.modal-links h4 {
    margin-bottom: 12px;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--faint);
}

.streaming-links {
    display: grid;
    gap: 8px;
}

.streaming-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font-family: var(--display);
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.streaming-links a span:last-child {
    color: var(--acid);
    transition: transform 0.2s ease;
}

.streaming-links a:hover,
.streaming-links a:focus-visible {
    transform: translateX(4px);
    border-color: var(--line-strong);
    background: var(--surface-2);
    outline: none;
}

.streaming-links a:hover span:last-child {
    transform: translateX(4px);
}

/* ---------- about ---------- */

.bio {
    max-width: 760px;
    padding-top: 8px;
}

.bio p + p {
    margin-top: 18px;
}

.bio strong {
    color: var(--ink);
    font-weight: 700;
}

/* ---------- footer ---------- */

.footer {
    margin-top: 24px;
    padding: 28px 0 40px;
    border-top: 1px solid var(--line);
    color: var(--faint);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.04em;
}

/* ============================================================
   Breakpoints
   ============================================================ */

@media (min-width: 640px) {
    .releases {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .release-content {
        grid-template-columns: 1fr;
    }

    .artwork {
        width: 100%;
        aspect-ratio: 1;
        min-height: 0;
    }
}

@media (min-width: 760px) {
    .hero {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
        align-items: center;
        gap: 44px;
        padding: 72px 0 44px;
    }

    .hero h1 {
        font-size: clamp(40px, 6vw, 72px);
    }

    .section-header,
    .bio-header {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: end;
        column-gap: 24px;
    }

    .modal-grid {
        grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1fr);
        gap: 32px;
        padding: 32px;
    }

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

@media (min-width: 1024px) {
    .hero {
        grid-template-columns: minmax(0, 1fr) 440px;
        min-height: calc(100svh - 90px);
    }

    .hero h1 {
        font-size: clamp(64px, 7vw, 104px);
    }

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

    .release:first-child {
        grid-column: span 2;
    }

    .release:first-child .release-content {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .release:first-child .artwork {
        aspect-ratio: auto;
    }

    .release:first-child .release-info {
        align-content: center;
        padding: 28px;
    }

    .release:first-child .title {
        font-size: clamp(28px, 3.4vw, 44px);
    }
}

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

    .js-anim .release {
        opacity: 1;
        transform: none;
    }
}
