/**
 * BLACKOUT [REC] - Homepage Styles
 *
 * Styles for page-template-homepage.php: hero, artist roster grid,
 * genre banner.
 *
 * Loaded conditionally via is_front_page() in enqueue.php.
 *
 * @package Blackout
 */

/* Full-width overflow guard */
.hero,
.genre-banner {
    max-width: 100%;
    overflow-x: hidden;
}

/* ==========================================================================
   1. HERO
   ========================================================================== */

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    text-align: center;
    padding-bottom: 10vh;
}

/* Background radial glow */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(ellipse at 40% 50%, var(--glow) 0%, transparent 50%),
                radial-gradient(ellipse at 60% 50%, var(--glow2) 0%, transparent 50%);
}

/* Hero background image */
.hero-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70vmin;
    height: 70vmin;
    z-index: 0;
    pointer-events: none;
    background: center/contain no-repeat;
    opacity: 0.12;
    filter: grayscale(100%) brightness(1.2);
}

/* Concentric pulsing rings */
.hero-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70vmin;
    height: 70vmin;
    z-index: 0;
    pointer-events: none;
}

.hero-rings .ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    animation: ringPulse 8s ease-in-out infinite;
}

.hero-rings .ring:nth-child(2) {
    inset: 10%;
    animation-delay: -1.5s;
    border-color: rgba(0, 230, 138, 0.08);
}

.hero-rings .ring:nth-child(3) {
    inset: 20%;
    animation-delay: -3s;
    border-color: rgba(168, 85, 247, 0.06);
}

.hero-rings .ring:nth-child(4) {
    inset: 30%;
    animation-delay: -4.5s;
    border-color: rgba(0, 230, 138, 0.05);
}

.hero-rings .ring:nth-child(5) {
    inset: 40%;
    animation-delay: -6s;
    border-color: rgba(168, 85, 247, 0.04);
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.08); opacity: 1; }
}

/* Slow rotating grid overlay */
.hero-grid {
    position: absolute;
    inset: -20%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.04;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridRotate 120s linear infinite;
}

@keyframes gridRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 10;
}

/* --- Hero logo foreground (HOME-02) --- */
/* The foreground logo is a direct child of .hero, absolutely positioned
   at the exact same center point as .hero-bg (the large B&W logo).
   Both use top:50% left:50% translate(-50%,-50%) so they share the
   same center regardless of their individual sizes. */
.hero-logo-fg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    max-width: 345px;
    width: 69vw;
    height: auto;
    z-index: 5;
    filter: drop-shadow(0 0 40px var(--glow));
    pointer-events: none;
}

/* Override global .reveal transform so centering is always preserved */
.hero-logo-fg.reveal {
    transform: translate(-50%, -50%) translateY(40px);
}
.hero-logo-fg.reveal.active {
    transform: translate(-50%, -50%) translateY(0);
}

/* --- Hero logo block (decorative bg text, taken out of flow) --- */
.hero-logo-block {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
}

/* Background text: decorative "BLACKOUT / RECORDS" behind everything */
.hero-logo-bg-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: clamp(3rem, 8vw, 6rem);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.07);
    text-shadow: 0 0 40px rgba(0, 230, 138, 0.15), 0 0 80px rgba(168, 85, 247, 0.1);
    letter-spacing: 0.1em;
    line-height: 0.9;
    user-select: none;
    pointer-events: none;
}

/* Title (kept for potential reuse) */
.hero-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.2rem, 6.5vw, 8rem);
    font-weight: 800;
    line-height: 0.85;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title--seo {
    margin: 0 auto;
    max-width: 820px;
    gap: 0.35rem;
    font-size: 1.45rem;
    line-height: 1.2;
    letter-spacing: 0;
    color: var(--fg);
    text-align: center;
    text-shadow: 0 0 24px rgba(0, 230, 138, 0.24);
}

.hero-title--seo span {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.72);
}

/* Subtitle */
.hero-sub {
    margin-top: 2rem;
    font-size: clamp(0.6rem, 0.85vw, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 4px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* --- Hero streaming links (HOME-03) --- */
.hero-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}

.hero-link:hover {
    color: var(--accent);
}

.hero-link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Floating BPM counter */
.hero-bpm {
    position: absolute;
    bottom: 15vh;
    right: 5%;
    z-index: 10;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: #333;
    text-transform: uppercase;
}

.hero-bpm span {
    color: var(--accent);
    font-weight: 800;
    font-size: 2rem;
    display: block;
    line-height: 1;
}

/* --- Hero mail icon (left side) --- */
.hero-mail {
    position: absolute;
    bottom: 15vh;
    left: 5%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--accent);
    text-shadow: 0 0 10px var(--glow);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: none;
    transition: color 0.3s, text-shadow 0.3s;
    padding: 0;
}

.hero-mail:hover {
    color: var(--fg);
    text-shadow: none;
}

.hero-mail svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 6px var(--glow));
}

.hero-mail span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.6rem;
    letter-spacing: 3px;
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hero-scroll span {
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: #555;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 30px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
    transform-origin: top;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(0.66); }
}

/* Corner markers */
.hero-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    z-index: 10;
    opacity: 0.15;
}

.hero-corner::before,
.hero-corner::after {
    content: '';
    position: absolute;
    background: var(--fg);
}

.hero-corner--tl {
    top: 5%;
    left: 5%;
}

.hero-corner--tl::before {
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
}

.hero-corner--tl::after {
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
}

.hero-corner--br {
    bottom: 5%;
    right: 5%;
}

.hero-corner--br::before {
    bottom: 0;
    right: 0;
    width: 1px;
    height: 100%;
}

.hero-corner--br::after {
    bottom: 0;
    right: 0;
    width: 100%;
    height: 1px;
}

/* ==========================================================================
   2. MANIFESTO (HOME-05)
   ========================================================================== */

.manifesto {
    padding: 15% 5%;
    max-width: 1600px;
    margin: 0 auto;
    content-visibility: auto;
    contain-intrinsic-size: auto 300px;
}

.manifesto-text {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.4rem, 3vw, 2.8rem);
    line-height: 1.3;
    text-transform: uppercase;
    font-weight: 700;
    color: #555;
    transition: color 0.5s;
}

.manifesto-text:hover {
    color: var(--fg);
}

.manifesto-text span {
    color: var(--accent);
    text-shadow: 0 0 30px var(--glow);
}

.manifesto-sub {
    margin-top: 3rem;
    font-size: 1rem;
    max-width: 600px;
    color: #888;
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
}

/* ==========================================================================
   3. ARTIST ROSTER GRID (ROST-01, ROST-02)
   ========================================================================== */

.roster-section {
    padding: 6rem 5%;
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.roster-tile {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--fg);
    transition: transform 0.3s, box-shadow 0.3s;
}

.roster-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 20px rgba(0, 230, 138, 0.1);
}

.roster-tile__img {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #111;
    border: 1px solid var(--border, #1a1a1a);
    transition: border-color 0.3s;
}

.roster-tile:hover .roster-tile__img {
    border-color: var(--accent);
}

.roster-tile__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.7);
    transition: filter 0.3s;
}

.roster-tile:hover .roster-tile__img img {
    filter: saturate(1);
}

.roster-tile__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 230, 138, 0.08) 0%, rgba(168, 85, 247, 0.06) 100%);
}

.roster-tile__name {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: var(--roster-name-fit-size, 0.8rem);
    text-transform: uppercase;
    color: var(--fg);
    margin-top: 0.6rem;
    line-height: 1.05;
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    letter-spacing: 0;
    transform-origin: left center;
}

.roster-tile__origin {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

/* ==========================================================================
   4. GENRE BANNER
   ========================================================================== */

.genre-banner {
    padding: 8rem 5%;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    content-visibility: auto;
    contain-intrinsic-size: auto 400px;
}

.genre-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, var(--glow) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 50%, var(--glow2) 0%, transparent 50%);
    opacity: 0.5;
}

.genre-words {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem 3rem;
    position: relative;
    z-index: 1;
}

.genre-word {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.5rem, 6vw, 6rem);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15);
    transition: all 0.5s ease;
}

.genre-word:hover {
    -webkit-text-stroke: 0;
}

.genre-word.glow-green:hover {
    color: var(--accent);
    text-shadow: 0 0 40px var(--glow), 0 0 80px var(--glow);
}

.genre-word.glow-purple:hover {
    color: var(--accent2);
    text-shadow: 0 0 40px var(--glow2), 0 0 80px var(--glow2);
}

.genre-sep {
    color: rgba(255, 255, 255, 0.1);
    font-size: 2rem;
    user-select: none;
}

/* ==========================================================================
   5a. HERO PARALLAX (desktop only)
   ========================================================================== */

@media (min-width: 769px) {
    .hero-logo-fg,
    .hero-logo-bg-text {
        will-change: transform;
    }
}

/* ==========================================================================
   5. RESPONSIVE: DESKTOP (1200px+)
   ========================================================================== */

@media (min-width: 1200px) {
    .roster-section { padding: 8rem 8%; }
    .roster-grid { gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
    .genre-banner { padding: 10rem 5%; }
    .genre-word { font-size: clamp(3rem, 7vw, 8rem); }
}

/* ==========================================================================
   6. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    /* Disable hero ring pulse */
    .hero-rings .ring {
        animation: none;
    }

    /* Disable grid rotate */
    .hero-grid {
        animation: none;
    }

    /* Disable scroll-line pulse */
    .scroll-line {
        animation: none;
    }

    /* Disable roster tile hover transform */
    .roster-tile {
        transition: none;
    }

    /* Disable hero parallax GPU hints (JS won't run either) */
    .hero-logo-fg,
    .hero-logo-bg-text {
        will-change: auto !important;
    }
}

/* ==========================================================================
   NEWSLETTER MODAL
   ========================================================================== */

.newsletter-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.newsletter-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.newsletter-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.newsletter-modal__content {
    position: relative;
    z-index: 1;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3rem;
    max-width: 480px;
    width: 90%;
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.newsletter-modal.active .newsletter-modal__content {
    transform: translateY(0) scale(1);
}

.newsletter-modal__close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #555;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
    padding: 0;
    line-height: 1;
}

.newsletter-modal__close:hover {
    color: var(--fg);
}

.newsletter-modal__content h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--fg);
}

.newsletter-modal__content p {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
}

.newsletter-modal__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-modal__form input[type="email"] {
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    color: var(--fg);
    padding: 1rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    width: 100%;
    outline: none;
    text-align: center;
    transition: border-color 0.3s;
}

.newsletter-modal__form input[type="email"]:focus {
    border-bottom-color: var(--accent);
}

.newsletter-modal__form .btn {
    margin-top: 0.5rem;
    background: transparent;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

/* Label statement */
.label-statement__inner {
    display: grid;
    gap: 1rem;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.label-statement__inner p {
    margin: 0;
    color: #777;
    font-size: 0.88rem;
    line-height: 1.85;
    letter-spacing: 0;
}

/* ==========================================================================
   7. RESPONSIVE: TABLET (768px)
   ========================================================================== */

@media (max-width: 768px) {
    /* Hero -- auto height so content is never clipped on mobile */
    .hero {
        min-height: 100vh;
        height: auto;
        padding-bottom: 8vh;
    }

    .hero-bpm {
        display: none;
    }

    .hero-scroll {
        display: none;
    }

    .hero-mail {
        position: fixed;
        bottom: 1.5rem;
        right: 1.5rem;
        left: auto;
        top: auto;
        z-index: 50;
        flex-direction: row;
        gap: 0.4rem;
        background: rgba(3, 3, 3, 0.85);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 1px solid var(--accent);
        border-radius: 50px;
        padding: 0.6rem 1rem;
        cursor: pointer;
        box-shadow: 0 0 15px var(--glow);
    }

    .hero-mail span {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        font-size: 0.6rem;
        letter-spacing: 2px;
    }

    .newsletter-modal__content {
        padding: 2rem;
        width: 92%;
    }

    .newsletter-modal__content h3 {
        font-size: 1.3rem;
    }

    .hero-corner {
        display: none;
    }

    .hero-rings {
        width: 90vmin;
        height: 90vmin;
    }

    .hero-sub {
        letter-spacing: 2px;
        font-size: 0.55rem;
        padding: 0 1rem;
        line-height: 2;
    }

    .hero-title--seo {
        max-width: 520px;
        font-size: 1.1rem;
    }

    .hero-title--seo span {
        font-size: 0.58rem;
    }

    .hero-content {
        padding: 0 32px;
    }

    .hero-logo-fg {
        max-width: 230px;
    }

    .hero-links {
        gap: 1rem;
        margin-top: 2rem;
    }

    .hero-link {
        font-size: 0.6rem;
        letter-spacing: 1px;
    }

    .hero-link svg {
        width: 12px;
        height: 12px;
    }

    /* Manifesto */
    .manifesto {
        padding: 20% 6% 15%;
    }

    .manifesto-text {
        font-size: clamp(1.1rem, 4.5vw, 1.6rem);
        line-height: 1.4;
    }

    .manifesto-sub {
        font-size: 0.8rem;
        margin-top: 2rem;
    }

    /* Roster grid */
    .roster-section {
        padding: 4rem 32px;
    }

    .roster-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .roster-tile__name {
        font-size: 0.7rem;
    }

    .roster-tile__origin {
        font-size: 0.6rem;
    }

    /* Genre banner */
    .genre-banner {
        padding: 3rem 32px;
    }

    .genre-word {
        font-size: clamp(1.2rem, 6vw, 2rem);
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.7rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        -webkit-text-stroke-width: 0.5px;
    }

    .genre-word:last-child {
        border-bottom: none;
    }

    .genre-sep {
        display: none;
    }

    .genre-words {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
}

/* ==========================================================================
   8. RESPONSIVE: MOBILE (480px)
   ========================================================================== */

@media (max-width: 480px) {
    .roster-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.8rem;
    }

    .hero-links {
        gap: 0.8rem;
    }

    .hero-link {
        font-size: 0.55rem;
    }
}

/* ==========================================================================
   9. RESPONSIVE: SMALL MOBILE (400px)
   ========================================================================== */

@media (max-width: 400px) {
    .hero-content {
        padding: 0 24px;
    }

    .hero-logo-fg {
        max-width: 184px;
    }

    .manifesto-text {
        font-size: clamp(0.95rem, 4vw, 1.3rem);
    }

    .roster-section {
        padding: 3rem 24px;
    }

    .roster-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .roster-tile__name {
        font-size: 0.65rem;
    }

    .roster-tile__origin {
        font-size: 0.55rem;
    }

    .genre-banner {
        padding: 2.5rem 24px;
    }

    .genre-word {
        font-size: clamp(1rem, 5.5vw, 1.5rem);
        padding: 0.5rem 0;
    }
}
