/* ================================================
   KMNZ Unofficial Fan Site — "Concrete Zine"
   ================================================ */

/* --- Font --- */
@font-face {
    font-family: "Geist";
    src: url("rsrc/fonts/Geist-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Geist";
    src: url("rsrc/fonts/Geist-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "GeistMono";
    src: url("rsrc/fonts/GeistMono-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* --- Variables --- */
:root {
    --bg: #111111;
    --bg-alt: #1a1a1a;
    --fg: #f0f0f0;
    --fg-muted: #888888;
    --accent: #c4222e;
    --border: #2a2a2a;
    --surface: #181818;
    --font-display: "Geist", "Helvetica Neue", "Arial", sans-serif;
    --font-body: "Helvetica Neue", "Arial", sans-serif;
    --font-mono: "GeistMono", "SF Mono", "Menlo", "Consolas", monospace;
}

/* --- Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a {
    color: inherit;
    text-decoration: none;
}
img {
    display: block;
    max-width: 100%;
    height: auto;
}
button {
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    font: inherit;
}
ol,
ul {
    list-style: none;
}

/* ================================================
   HEADER (sticky, visible when section is active)
   ================================================ */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 52px;
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}
body.has-section #site-header {
    transform: translateY(0);
}

.header-logo {
    font-family: var(--font-display);
    font-size: 18px;
    letter-spacing: 2px;
}
.header-nav {
    display: flex;
    gap: 20px;
}
.header-nav a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--fg-muted);
    transition: color 0.2s;
    position: relative;
}
.header-nav a:hover,
.header-nav a.active {
    color: var(--fg);
}
.header-nav a.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

/* ================================================
   HERO
   ================================================ */
#hero {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--bg);
    overflow: hidden;
}
#hero::before {
    content: "";
    position: absolute;
    bottom: -20px;
    right: -40px;
    width: 360px;
    height: 420px;
    background: url("rsrc/silhouette_all.svg") no-repeat center;
    background-size: contain;
    opacity: 0.06;
    filter: invert(1);
    pointer-events: none;
}
body.has-section #hero {
    display: none;
}

.hero-content {
    text-align: center;
    padding: 24px;
}
.hero-logo {
    width: 200px;
    height: auto;
    margin: 0 auto 32px;
    filter: invert(1);
}
.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(14px, 3vw, 20px);
    letter-spacing: 3px;
    margin-bottom: 8px;
    color: var(--fg);
}
.hero-sub {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 4px;
    color: var(--fg-muted);
    margin-bottom: 56px;
}
.hero-nav {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}
.hero-nav a {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--fg-muted);
    padding: 8px 0;
    position: relative;
    transition: color 0.2s;
}
.hero-nav a::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--fg);
    transition: width 0.3s ease;
}
.hero-nav a:hover {
    color: var(--fg);
}
.hero-nav a:hover::after {
    width: 100%;
}

/* Hero animations */
.anim-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.6s ease forwards;
}
.d1 {
    animation-delay: 0.15s;
}
.d2 {
    animation-delay: 0.25s;
}
.d3 {
    animation-delay: 0.4s;
}
.d4 {
    animation-delay: 0.5s;
}
.d5 {
    animation-delay: 0.6s;
}
.d6 {
    animation-delay: 0.7s;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================
   PAGE SECTIONS (shared)
   ================================================ */
.page-section {
    display: none;
    padding-top: 80px;
    min-height: 100dvh;
}
.page-section.active {
    display: block;
    animation: fadeIn 0.35s ease;
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.section-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px 80px;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 6vw, 48px);
    letter-spacing: 4px;
    margin-bottom: 48px;
    color: var(--fg);
}

/* ================================================
   ABOUT
   ================================================ */
.about-hero-img {
    margin-bottom: 32px;
    overflow: hidden;
}
.about-hero-img img {
    width: 100%;
    filter: grayscale(1);
}
#about.active .about-hero-img img {
    animation: desaturate 2.5s ease 0.5s forwards;
}
@keyframes desaturate {
    from {
        filter: grayscale(1);
    }
    to {
        filter: grayscale(0);
    }
}

.about-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--fg-muted);
    margin-bottom: 24px;
    max-width: 600px;
}

.official-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 56px;
}
.official-links a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    transition:
        border-color 0.2s,
        color 0.2s;
}
.official-links a:hover {
    border-color: var(--fg);
    color: var(--fg);
}

/* Members */
.members-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}
@media (min-width: 640px) {
    .members-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

.member-card {
    position: relative;
}
.member-photo {
    aspect-ratio: 1;
    overflow: hidden;
    margin-bottom: 12px;
}
.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.8);
    transition:
        filter 0.4s ease,
        transform 0.4s ease;
}
.member-card:hover .member-photo img {
    filter: grayscale(0);
    transform: scale(1.03);
}
.member-name {
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 3px;
    margin-bottom: 4px;
}
.member-sns {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--fg-muted);
    transition: color 0.2s;
}
.member-sns:hover {
    color: var(--accent);
}

/* ================================================
   ALBUMS
   ================================================ */
.album-item {
    display: flex;
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}
.album-item:first-of-type {
    border-top: 1px solid var(--border);
}

.album-art {
    width: 160px;
    min-width: 160px;
    aspect-ratio: 1;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition:
        box-shadow 0.3s ease,
        transform 0.3s ease;
}
.album-item:hover .album-art {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.album-info {
    flex: 1;
    min-width: 0;
}
.album-title {
    font-family: var(--font-display);
    font-size: clamp(18px, 3.5vw, 26px);
    letter-spacing: 2px;
    margin-bottom: 4px;
    word-break: break-word;
}
.album-date {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--fg-muted);
    display: block;
    margin-bottom: 12px;
}

/* Streaming links (shared) */
.streaming-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.streaming-links a {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    transition:
        border-color 0.2s,
        background 0.2s,
        color 0.2s;
}
.streaming-links a:hover {
    border-color: var(--fg);
    background: var(--fg);
    color: var(--bg);
}

/* Tracklist */
.tracklist summary {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--fg-muted);
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.2s;
    user-select: none;
}
.tracklist summary:hover {
    color: var(--fg);
}
.tracklist[open] summary {
    margin-bottom: 8px;
}
.tracklist ol {
    counter-reset: track;
}
.tracklist li {
    counter-increment: track;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 3px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tracklist li::before {
    content: counter(track, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--fg-muted);
    min-width: 20px;
}
.track-title {
    flex: 1;
    min-width: 0;
}
.track-dur {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--fg-muted);
    white-space: nowrap;
}
.mv-link {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 1px;
    padding: 1px 6px;
    background: var(--accent);
    color: #fff;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.mv-link:hover {
    opacity: 0.8;
}

/* Mobile: stack album items vertically */
@media (max-width: 639px) {
    .album-item {
        flex-direction: column;
    }
    .album-art {
        width: 100%;
        min-width: auto;
    }
}

/* ================================================
   SINGLES
   ================================================ */
.singles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (min-width: 768px) {
    .singles-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

.single-card {
    position: relative;
}
.single-art {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
}
.single-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
    transition: transform 0.4s ease;
}
#singles.active .single-art img {
    animation: desaturate 1.5s ease 0.5s forwards;
}
.single-art:hover img,
.single-art.touched img {
    transform: scale(1.05);
}

.single-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.single-art:hover .single-overlay,
.single-art.touched .single-overlay {
    opacity: 1;
}

.single-badge {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 2px;
    padding: 2px 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    margin-bottom: 6px;
}
.single-title {
    font-family: var(--font-display);
    font-size: clamp(12px, 2.5vw, 16px);
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 4px;
}
.single-date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}
.single-overlay .streaming-links {
    justify-content: center;
    margin-bottom: 0;
}
.single-overlay .streaming-links a {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    font-size: 9px;
}
.single-overlay .streaming-links a:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* Placeholder art for missing covers */
.no-art {
    background: var(--fg);
}
.placeholder-art {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: clamp(14px, 3vw, 22px);
    letter-spacing: 3px;
    color: var(--bg);
}

/* ================================================
   GALLERY
   ================================================ */
.gallery-grid {
    columns: 1;
    column-gap: 16px;
}
@media (min-width: 640px) {
    .gallery-grid {
        columns: 2;
    }
}
@media (min-width: 1024px) {
    .gallery-grid {
        columns: 3;
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 16px;
    cursor: pointer;
    overflow: hidden;
}
.gallery-item img {
    width: 100%;
    transition:
        transform 0.4s ease,
        filter 0.4s ease;
    filter: grayscale(0.7);
}
.gallery-item:hover img {
    transform: scale(1.02);
    filter: grayscale(0);
}

/* ================================================
   LIGHTBOX
   ================================================ */
#lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
#lightbox[hidden] {
    display: none;
}
#lightbox.active {
    animation: fadeIn 0.2s ease;
}

#lb-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
}
.lb-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 32px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
    z-index: 10;
}
.lb-close:hover {
    color: #fff;
}
.lb-prev,
.lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s;
    padding: 16px;
    z-index: 10;
}
.lb-prev {
    left: 8px;
}
.lb-next {
    right: 8px;
}
.lb-prev:hover,
.lb-next:hover {
    color: #fff;
}

/* ================================================
   FOOTER
   ================================================ */
#site-footer {
    text-align: center;
    padding: 48px 24px;
    border-top: 1px solid var(--border);
}
body:not(.has-section) #site-footer {
    display: none;
}

.footer-label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 3px;
    margin-bottom: 12px;
}
.footer-unofficial {
    color: var(--accent);
}
.footer-copy {
    font-size: 11px;
    color: var(--fg-muted);
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto;
}

/* ================================================
   RESPONSIVE TWEAKS
   ================================================ */
@media (max-width: 480px) {
    .header-nav {
        gap: 12px;
    }
    .header-nav a {
        font-size: 10px;
        letter-spacing: 1px;
    }
    .hero-nav {
        gap: 16px;
    }
    .section-inner {
        padding: 0 16px 60px;
    }
    .lb-prev,
    .lb-next {
        font-size: 28px;
        padding: 8px;
    }
}
