/* style.css (Sonic Bober v1.1) */

/* Global Settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400..900&display=swap');

body {
    background-color: #000;
    color: #e5e7eb; /* tailwind text-gray-200 */
    font-family: 'Orbitron', sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-optical-sizing: auto;
}

/* Base Styles (not using utility framework like full Tailwind in this simple approach) */
a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

h1, h2 { 
font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #fff, #a78bfa); /* Subtle purple glow */
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Tailwind-style Utility classes for our HTML structure */
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.w-full { width: 100%; }
.h-screen { height: 100vh; }
.pt-24 { padding-top: 6rem; }
.pb-24 { padding-bottom: 6rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-12 { padding: 3rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.bg-cover { background-size: cover; }
.bg-center { background-position: center; }
.bg-black { background-color: #000; }
.bg-gray-950 { background-color: #0a0a0a; }
.bg-gray-900 { background-color: #171717; }
.bg-opacity-90 { --tw-bg-opacity: 0.9; }
.bg-opacity-60 { --tw-bg-opacity: 0.6; }
.bg-opacity-90, .bg-opacity-60 { background-color: rgba(0, 0, 0, var(--tw-bg-opacity)); }
.bg-white { background-color: #fff; }
.bg-purple-900 { background-color: #4c1d95; }
.bg-purple-600 { background-color: #7c3aed; }
.z-50 { z-index: 50; }
.z-10 { z-index: 10; }
.flex { display: flex; }
.flex-1 { flex: 1 1 0%; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-12 > * + * { margin-top: 3rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.text-center { text-align: center; }
.text-white { color: #fff; }
.text-blue-400 { color: #1C9DF6; }
.text-green-400 { color: #4ade80; }
.text-purple-400 { color: #a78bfa; }
.text-purple-600 { color: #7c3aed; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #a3a3a3; }
.text-gray-500 { color: #737373; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.font-sans { font-family: ui-sans-serif, system-ui, -apple-system, blinkmacsystemfont, "Segoe UI", roboto, "Helvetica Neue", arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.font-bold { font-weight: 700; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-tighter { letter-spacing: -0.05em; }
.uppercase { text-transform: uppercase; }
.border-b { border-bottom-width: 1px; }
.border-4 { border-width: 4px; }
.border { border-width: 1px; }
.border-gray-800 { border-color: #262626; }
.border-purple-900 { border-color: #4c1d95; }
.rounded-full { border-radius: 9999px; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-lg { border-radius: 0.5rem; }
.shadow-lg { --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-2xl { --tw-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.shadow-lg, .shadow-2xl { box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); }
.opacity-50 { opacity: 0.5; }
.hover\:text-purple-400:hover { color: #a78bfa; }
.hover\:text-white:hover { color: #fff; }


.container {
    width: 90%;            /* Responsive padding for mobile */
    max-width: 1200px;     /* The "Desktop" ceiling */
    margin-left: auto;     /* Magic centering */
    margin-right: auto;    /* Magic centering */
}

/* For the text-heavy 'Lab Notes' story */
.content-narrow {
    max-width: 750px;      /* Optimal for reading story text */
    margin: 0 auto;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px; /* Set a specific height so we can offset it */
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 100;
    border-bottom: 1px solid #262626;
    display: flex;
    align-items: center;
}

header {
    background-image: url('images/img_hero.jpg');
    position: relative;
    width: 100%;
    /* This is the magic part: offset the hero by the height of the nav */
    margin-top: 70px; 
    /* Adjust height to account for the offset so it still feels like a full screen */
    height: calc(100vh - 70px); 
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 3. Smooth Scroll Offset */
/* Since the nav is fixed, when you click "Story" it might cut off the title. 
   This fix ensures the scroll stops at the right place. */
section {
    scroll-margin-top: 70px;
}

#story {
    background-color: #1D1929; 
    position: relative;
    margin-top: -80px;
    padding-top: 80px;
}

#story::before {
    content: "";
    position: absolute;
    top: -100px; /* Pulls the gradient up into the hero area */
    left: 0;
    width: 100%;
    height: 100px;
    /* This fades from the hero's bottom tint into the section color */
    background: linear-gradient(to bottom, rgba(14, 12, 17, 0), #1D1929);
    pointer-events: none;
}
#story::after {
    content: "";
    position: absolute;
    bottom: -100px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, #1D1929, #08080B);
    pointer-events: none;
    z-index: 1;
}

#music {
    position: relative;
    width: 100%;
    padding-top: 60px;
    padding-bottom: 120px;
    background-image: url('images/img_music_bg.jpg');
    background-size: cover;          /* Cover the full section */
    background-position: center;   /* Center the soundwave design */
    background-repeat: no-repeat;
    background-attachment: fixed;    /* Parallax effect! */
    backdrop-filter: blur(12px);
    text-align: center;
}

#music::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #000 0%, rgba(14, 12, 17, 0.4) 30%, rgba(14, 12, 17, 0.4) 70%, #000 100%);
    pointer-events: none;
    z-index: 1;
}

/* Ensure player content sits *above* the gradient overlay */
.music-content {
    position: relative;
    z-index: 10;
    padding: 80px 0;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    color: white;
    margin-bottom: 40px;
    font-size: 2rem;
    letter-spacing: 2px;
}

/* The Grid Card */
.music-card {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* 1 part art, 1.5 parts player */
    gap: 40px;
    background: rgba(10, 10, 10, 0.7); /* See-through dark card */
    backdrop-filter: blur(10px); /* Blurs the marble background behind it */
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
}

.album-art img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* Badges */
.badge-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.badges { display: flex; gap: 10px; }
.badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    padding: 4px 10px 2px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}
.badge.ai { background: #7c3aed; color: white; }
.badge.lossless { border: 1px solid #4ade80; color: #4ade80; }

.album-title { font-family: 'Orbitron', sans-serif; font-size: 1.8rem; margin-bottom: 10px; color: white; }
.album-desc { color: #9ca3af; margin-bottom: 30px; font-size: 0.9rem; }

/* Update your details section */
.album-details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Aligns content to the top */
}

/* Ensure the title doesn't hug the badges too tight */
.album-title {
    margin-top: 15px;
    margin-bottom: 5px;
    line-height: 1.2;
}

/* The HTML5 Player Styling */
.track-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    transition: background 0.3s;
}

.track-item:hover { background: rgba(255, 255, 255, 0.08); }

.track-info { display: flex; align-items: center; gap: 15px; }
.track-number { color: #7c3aed; font-family: 'JetBrains Mono', monospace; font-weight: bold; }
.track-name { font-weight: 600; color: white; }

/* Styling the native audio player to fit the dark theme */
audio {
    width: 100%;
    height: 32px;
    filter: invert(100%) hue-rotate(270deg) brightness(1.2) contrast(0.9);
    opacity: 0.8;
    transition: opacity 0.3s;
}

audio:hover {
    opacity: 1;
}
/* For Chrome/Edge specifically, we can target the background of the control bar */
audio::-webkit-media-controls-enclosure {
    background-color: rgba(124, 58, 237, 0.1); /* Very subtle purple tint */
    border-radius: 8px;
}

.player-list {
    max-height: 475px; /* Limits the height */
    overflow-y: auto;  /* Adds a scrollbar to the track list only */
    padding-right: 10px;
}

/* Custom Scrollbar to match the "Sonic Bober" purple */
.player-list::-webkit-scrollbar {
    width: 6px;
}
.player-list::-webkit-scrollbar-thumb {
    background: #7c3aed;
    border-radius: 10px;
}
.player-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

/* The Main Grid Wrapper */
.music-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Left col slightly narrower than tracklist */
    gap: 60px;
    align-items: start;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 50px;
    border-radius: 30px;
}

/* Left Column Styling */
.music-info-col {
    position: sticky; /* Optional: keeps art visible as they scroll tracks */
    top: 100px;
}

.music-info-col .section-title, .music-info-col .album-title {
    font-size: 1.5rem;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.music-info-col .album-desc {
    margin-bottom: 30px;
    font-size: 1rem;
    color: #9ca3af;
    line-height: 1.6;
}

.album-art img {
    width: 100%;
    max-width: 400px;
    border-radius: 15px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
}

/* Right Column Styling */
.music-player-col {
    display: flex;
    flex-direction: column;
}

.badge-row {
    margin-bottom: 25px;
}

/* Process Section Styling */
.font-orbitron { font-family: 'Orbitron', sans-serif; }

/* Vertical Middle Alignment for Grid Cards */
.process-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Keeps content starting from the top of the card */
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
}
.process-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-3px);
}


/* The parent container needs this */
.process-grid-container {
    display: flex;
    flex-direction: row;
    align-items: stretch; /* Forces arrows and cards to same height */
    justify-content: center;
    gap: 1rem;
}

/* The wrapper for the arrow */
.arrow-wrapper {
    display: flex;
    align-items: center; /* This centers the arrow vertically */
    justify-content: center;
    padding: 0 10px;
}

/* The actual arrow styling */
.process-arrow {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    color: rgba(124, 58, 237, 0.6); /* Purple-600 with transparency */
    user-select: none;
    /* Optical correction: moves arrow up slightly to center 
       better with the visuals rather than the text block */
    transform: translateY(-20px); 
}



.waveform-container {
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    overflow: hidden;
}

.waveform-img {
    width: 90%;
    height: auto;
    /* filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.2)); */
    box-shadow: 0 0 20px #222;
}

.process-step-title {
    font-weight: 800;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.process-list {
    list-style: none;
    padding: 0;
    font-size: 0.75rem;
    line-height: 1.6;
    color: #AAA;
}

.process-list li {
    margin-bottom: 2px;
    position: relative;
}

/* Enhanced Horizontal Pulse for Arrows */
@keyframes pulse-horizontal {
    0%, 100% { 
        transform: translateX(0); 
        opacity: 0.3; 
    }
    50% { 
        transform: translateX(10px); 
        opacity: 1; 
    }
}
.animate-pulse-horizontal {
    animation: pulse-horizontal 2s infinite ease-in-out;
    display: inline-block;
    /* Optical correction: nudges the arrow up slightly to feel centered 
       relative to the text, not the whole container */
    margin-bottom: 20px; 
}


/* -------------- phone -------------- */

@media (min-width: 768px) {
    .md\:text-8xl { font-size: 8rem; line-height: 1; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:col-span-2 { grid-column: span 2 / span 2; }
}
/* Responsive Fix for Mobile */
@media (max-width: 900px) {
    .music-grid {
        grid-template-columns: 1fr;
        padding: 30px;
    }
    .music-info-col {
        position: static;
        text-align: center;
    }
    .album-art img {
        margin: 0 auto 40px auto;
    }
}
/* Mobile Responsive */
@media (max-width: 768px) {
    html, body {
        max-width: 100%;
        overflow-x: hidden; /* Prevents the horizontal "wiggle" */
    }
    footer {
        margin-top: 100px !important;
        margin-bottom: 20px !important;
        font-size: 0.5rem !important;
    }
    footer > div {
        justify-content: center !important;
    }
    footer > div > p{
        padding-right: 20px !important;
    }

    .rounded-full { border-radius: 10px; }
    .max-w-4xl { max-width: 768px; }
    .max-w-6xl { max-width: 768px; }
    .max-w-7xl { max-width: 768px; }
    .container {
        width: 90%;            /* Responsive padding for mobile */
        max-width: 768px;     /* The "Mobile" ceiling */
        margin-left: auto;     /* Magic centering */
        margin-right: auto;    /* Magic centering */
    }
    .content-narrow {
        max-width: 768px;      /* Optimal for reading story text */
        margin: 0 auto;
    }
    #story > div > div > div {
        width: 70%;            /* Standard mobile width */
        max-width: 760px;      /* Keeps it from getting too wide on desktop */
        box-sizing: border-box; /* Crucial: includes padding in the width calculation */
        word-wrap: break-word; /* Forces long words to break instead of pushing the edge */
        overflow-wrap: break-word;
    }
    nav {
      height: 60px;
    }
    header {
        /* Adjust height: 100vh can be too much on mobile; 60-70% is usually the sweet spot */
        height: 30vh !important; 
        margin-top: 60px; /* Match your mobile nav height */
        background-attachment: scroll; /* Parallax/Fixed often breaks on mobile browsers */
        background-size: cover !important; 
        background-color: #050406; /* Matches the top of your next section */
    }
    #myvitalware {
        display: none;
    }
    .px-6 { padding: 0px; }
    .text-4xl { font-size: 1.5rem !important; letter-spacing: -0.01em !important; }
    .text-lg { font-size: 0.875rem !important; }
    /* Stack the music grid */
    .music-grid {
        grid-template-columns: 1fr; /* Switch to 1 column */
        padding: 20px;
        gap: 20px;
    }

    /* Center the branding text on mobile */
    .music-info-col {
        text-align: center;
        position: static; /* Remove the 'sticky' effect on mobile */
    }

    .album-art img {
        max-width: 280px; /* Keep art from being too huge on small screens */
        margin: 0 auto 20px auto;
    }

    h2.section-title {
        font-size: 1.5rem;
        letter-spacing: 2px;
        margin-bottom: 2rem;
    }

    .album-title {
        font-size: 1.8rem;
    }
    
    /* Lab notes text often needs more padding on mobile to feel 'premium' */
    .content-narrow {
        padding: 0 15px;
    }

    .track-item {
        padding: 20px 15px; /* Bigger touch target */
    }
    
    audio {
        height: 40px; /* Slightly taller for mobile fingers */
    }

    /* Stack the blocks vertically */
    .process-grid-container {
        flex-direction: column;
        align-items: center; /* Centers the cards on the phone screen */
        gap: 30px;           /* Adds space between the stacked blocks */
    }

    /* Force the cards to take up full width (minus margins) */
    .process-card {
        width: 100%;
        max-width: 100%;
        margin-bottom: 10px;
        padding: 25px 15px; /* Adjust padding for smaller screens */
        border: 1px solid rgba(124, 58, 237, 0.2); /* Light purple border */
        background: rgba(255, 255, 255, 0.03);    /* Slightly lighter background */
    }

    /* Hide the arrows completely */
    .arrow-wrapper,
    .process-arrow {
        display: none !important;
    }


}

/* =========================================================
   Format Toggle (MP3 / FLAC) — pure CSS, no JS
   ========================================================= */

.format-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.format-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.format-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.2s;
    user-select: none;
    margin-top: 10px;
}
.format-toggle-wrap label {
    margin-top: 10px;
}

.mp3-label { color: #fff; }
.flac-label { color: #6b7280; }

.format-toggle-input:checked ~ .badge-row .mp3-label { color: #6b7280; }
.format-toggle-input:checked ~ .badge-row .flac-label { color: #fff; }

.format-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    background: #7c3aed;
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.format-toggle-input:checked ~ .badge-row .toggle-thumb {
    transform: translateX(22px);
}

/* Default: show MP3, hide FLAC */
.audio-flac { display: none; }

/* When toggled to FLAC */
.format-toggle-input:checked ~ .player-list .audio-flac { display: block; }
.format-toggle-input:checked ~ .player-list .audio-mp3  { display: none; }