/* Local Font Definitions */
@font-face {
    font-family: 'Space Mono';
    src: url('fonts/SpaceMono-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Mono';
    src: url('fonts/SpaceMono-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Space Mono';
    src: url('fonts/SpaceMono-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Mono';
    src: url('fonts/SpaceMono-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

:root {
    /* Light Mode Variables (Technical/Sketchy) */
    --bg-body: #ece5d7;
    --bg-panel: rgba(255, 255, 255, 0.6);
    --bg-hover: rgba(0, 0, 0, 0.05);
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --border-color: #1a1a1a;
    --waveform-bg: rgba(0, 0, 0, 0.1); 
    --waveform-fill: #1a1a1a;
    --ring-color: #a0522d; /* Sienna Brown */
    --hero-overlay-start: rgba(0,0,0,0.1);
    --hero-overlay-end: rgba(0,0,0,0.8);
}

[data-theme="dark"] {
    /* Dark Mode Variables (Industrial/Night) */
    --bg-body: #121212;
    --bg-panel: rgba(255, 255, 255, 0.03);
    --bg-hover: rgba(255, 255, 255, 0.08);
    --text-main: #ece5d7;
    --text-muted: #888888;
    --border-color: #ece5d7;
    --waveform-bg: rgba(255, 255, 255, 0.15);
    --waveform-fill: #ece5d7;
    --ring-color: #a0522d; /* Sienna Brown */
    --hero-overlay-start: rgba(0,0,0,0.4);
    --hero-overlay-end: rgba(0,0,0,0.9);
}

/* Prevent Image Dragging Globally */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    user-select: none;
    pointer-events: none; /* Allows clicking through overlays */
}

/* Re-enable pointer events for functional images */
.artwork-container img, .product-card img, .hero-bg {
    pointer-events: none;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    transition: background-color 0.4s ease, color 0.4s ease;
    font-family: 'Space Mono', monospace;
}

/* SVG Highlights */
.highlight-wrapper {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    z-index: 10;
}

.highlight-scribble {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(4.2) rotate(-5deg);
    width: 120%;
    height: 120%;
    z-index: 20;
    pointer-events: none;
    opacity: 0.9;
    filter: invert(34%) sepia(48%) saturate(1876%) hue-rotate(339deg) brightness(92%) contrast(89%);
    mix-blend-mode: multiply;
}

[data-theme="dark"] .highlight-scribble {
     mix-blend-mode: normal;
}

[data-theme="dark"] .daw-icons {
    filter: invert(1) brightness(0.8);
}

/* Technical Borders */
.tech-border {
    border: 2px solid var(--border-color);
    box-shadow: 4px 4px 0px var(--border-color);
    transition: all 0.3s ease;
}

/* Player Vault (Shared) */
.player-vault {
    width: 100%;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.sample-row {
    height: 56px; 
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s ease;
}
.sample-row:last-child { border-bottom: none; }
.sample-row:hover { background-color: var(--bg-hover); }
.sample-row.active-row { background-color: var(--bg-hover); }

.vault-row, .vault-header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 16px;
    gap: 16px;
}

.vault-header {
    height: 48px;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.vault-row { height: 100%; }

/* COLUMN DEFINITIONS */
.col-play { width: 32px; flex-shrink: 0; display: flex; justify-content: center; }
.col-info { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.col-wave { width: 120px; flex-shrink: 0; display: flex; align-items: center; }
.col-meta { width: 60px; flex-shrink: 0; text-align: center; font-size: 0.8rem; }
.col-action { width: 40px; flex-shrink: 0; display: flex; justify-content: flex-end; }

@media (min-width: 768px) {
    .col-play { width: 48px; }
    .col-wave { width: 280px; }
    .col-meta { width: 80px; }
}

.hide-bpm .col-bpm { display: none !important; }
.hide-bpm .col-wave { width: 140px; }
@media (min-width: 768px) { .hide-bpm .col-wave { width: 220px; } }

/* Waveform Inner */
.waveform-container {
    position: relative;
    height: 36px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.waveform-svg { width: 100%; height: 100%; display: block; }
.waveform-bg { fill: var(--waveform-bg); }
.waveform-fill { fill: var(--waveform-fill); }
.waveform-progress-wrap {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    clip-path: inset(0 100% 0 0);
    z-index: 2;
    pointer-events: none;
    border-right: 2px solid var(--ring-color);
}

/* Controls */
.btn-control {
    color: var(--text-main);
    transition: transform 0.1s;
    opacity: 0.7;
    cursor: pointer;
}
.btn-control:hover { transform: scale(1.1); opacity: 1; color: var(--ring-color); }
.btn-loop.active { color: var(--ring-color); opacity: 1; }

/* Typography */
.font-tech { font-family: 'Space Mono', monospace; }
.title-sub { color: var(--text-muted); font-size: 0.7rem; }

/* Animations */
.sample-container {
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 2000px;
    overflow: hidden;
}
.sample-container.collapsed { max-height: 280px; }

/* Icon rotation */
.char-icon {
    transform: rotate(-5deg);
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(5px 5px 0px rgba(0,0,0,0.1));
}
.char-icon:hover { transform: rotate(0deg) scale(1.05); }
[data-theme="dark"] .char-icon { filter: invert(1) brightness(0.9) drop-shadow(5px 5px 0px rgba(255,255,255,0.1)); }

/* Artwork Styles */
.artwork-container {
    position: relative;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: 8px 8px 0px var(--border-color);
}
.artwork-container img { transition: transform 0.5s ease; }
.artwork-container:hover img { transform: scale(1.02); }

/* Tech Box Hover */
.tech-box .default-content { transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out; }
.tech-box .hover-content { transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out; pointer-events: none; }
.tech-box:hover .default-content { opacity: 0; transform: translateY(-10px); }
.tech-box:hover .hover-content { opacity: 1; }

/* Ticker Animation */
@keyframes ticker-move {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}
.ticker-wrapper {
    display: flex;
    overflow: hidden;
    mask-image: linear-gradient(to right, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
}
.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: ticker-move 30s linear infinite;
}
.ticker-item { flex-shrink: 0; padding-right: 1.5rem; }

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    background-color: var(--bg-body);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}
.loader-bar-bg { width: 200px; height: 4px; background: var(--text-muted); opacity: 0.2; margin-top: 1rem; }
.loader-bar-fill { height: 100%; background: var(--ring-color); width: 0%; transition: width 0.2s linear; }

/* LANDING PAGE SPECIFIC STYLES */

/* Navigation */
.nav-fixed-dark {
    background-color: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
    position: relative;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.75rem; /* Smaller font on mobile */
    letter-spacing: 0.05em;
    padding: 0.5rem 0.5rem;
    color: #ffffff !important; /* Force White Text always */
    transition: color 0.2s;
}

@media (min-width: 768px) {
    .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
}

.nav-link:hover { color: var(--ring-color) !important; }

/* Main Logo in Nav - Force White */
.main-logo-nav {
    filter: brightness(0) invert(1); /* Makes it pure white */
}

/* Hero Banner */
.hero-banner {
    position: relative;
    width: 100%;
    height: 560px;
    overflow: hidden;
    border-bottom: 4px solid var(--border-color);
}
.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7) contrast(1.1);
}
.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    text-align: center;
}
/* Improved Hero Overlay with Gradient */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--hero-overlay-end), var(--hero-overlay-start));
    z-index: 10;
}

/* Product Cards */
.product-card {
    position: relative;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-panel);
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 12px 12px 0px var(--border-color);
}
.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-bottom: 2px solid var(--border-color);
    transition: filter 0.3s ease;
}
.product-card:hover .product-image {
    filter: contrast(1.1);
}

/* Marquee for Brands */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
    padding: 3rem 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-panel);
}
.marquee-track {
    display: flex;
    gap: 6rem; /* Consistent Gap */
    /* Animation: Moves 25% because we have 4 sets of logos. 
       This ensures visual continuity even on ultra-wide screens. */
    animation: marquee-scroll 40s linear infinite; 
    width: max-content;
    will-change: transform;
    align-items: center;
    padding-right: 6rem; /* Match the gap for the loop seam */
}

/* Wrapper for individual SVG strip to manage size */
.brand-logo-wrapper {
    height: 60px; /* Consistent height */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Image Styling and Color Adaptation */
.brand-logo-img {
    height: 100%;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: opacity 0.3s ease;
    
    /* DEFAULT (Light Mode): Make logos black */
    filter: grayscale(100%) brightness(0) opacity(0.8);
}

/* DARK MODE: Make logos white */
[data-theme="dark"] .brand-logo-img {
    filter: grayscale(100%) brightness(0) invert(1) opacity(0.8);
}

/* Hover effect */
.marquee-track:hover .brand-logo-img {
    opacity: 1;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-25%); } /* Move only 25% (1 set out of 4) */
}

/* Logo CSS fallback if SVG missing */
.ss-logo-text {
    font-family: 'VT323', monospace;
    font-size: 2.5rem;
    line-height: 1;
    font-weight: bold;
    letter-spacing: -0.05em;
    border: 2px solid var(--text-main);
    padding: 0.25rem 0.5rem;
}

/* Modal Styles - Needed for Privacy Policy to prevent bleeding */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-body);
    border: 2px solid var(--border-color);
    padding: 2.5rem;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 12px 12px 0px var(--border-color);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    background: var(--text-main);
    color: var(--bg-body);
}