/* 
 * DISCRIMINATE AUDIO - Mobile-Responsive Stylesheet
 * Modernized from legacy HTML - Maintains original dark aesthetic
 * Optimized for iPhone & Android devices
 */

/* ============================================
   CSS CUSTOM PROPERTIES (Variables)
   ============================================ */
:root {
    --color-bg: #000000;
    --color-text: #ffffff;
    --color-border: #ffffff;
    --color-link: #ffffff;
    --color-link-hover: #cccccc;
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 16px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --max-width: 900px;
    --border-style: 1px solid var(--color-border);
    --transition-speed: 0.3s;
    /* Touch target minimum size (44px per Apple/Google guidelines) */
    --touch-target-min: 44px;
    /* Safe area insets for notched phones */
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-inset-left: env(safe-area-inset-left, 0px);
    --safe-area-inset-right: env(safe-area-inset-right, 0px);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    /* Support for notched phones */
    padding-left: var(--safe-area-inset-left);
    padding-right: var(--safe-area-inset-right);
    /* Prevent horizontal scroll on mobile */
    overflow-x: hidden;
}

/* Ensure images never overflow container */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color var(--transition-speed) ease,
                border-color var(--transition-speed) ease;
    /* Ensure touch targets are large enough */
    -webkit-touch-callout: none;
}

a:hover,
a:focus {
    color: var(--color-link-hover);
    outline: none;
}

/* Prevent text selection on interactive elements for mobile */
button, a {
    -webkit-user-select: none;
    user-select: none;
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-sm);
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

.main-content {
    flex: 1;
    padding: var(--spacing-md);
}

/* ============================================
   HOMEPAGE STYLES
   ============================================ */
.home-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding: var(--spacing-lg);
    padding-top: calc(var(--spacing-lg) + var(--safe-area-inset-top));
    padding-bottom: calc(var(--spacing-lg) + var(--safe-area-inset-bottom));
    text-align: center;
}

.home-logo {
    max-width: 100%;
    width: 469px;
    height: auto;
    transition: transform var(--transition-speed) ease,
                filter var(--transition-speed) ease;
}

/* Remove hover effects on touch devices */
@media (hover: hover) {
    .home-logo:hover {
        transform: scale(1.02);
        filter: brightness(1.1);
    }
}

/* Active state for touch devices */
.home-logo:active {
    transform: scale(0.98);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-sm);
    padding-top: calc(var(--spacing-sm) + var(--safe-area-inset-top));
    text-align: center;
    border-bottom: var(--border-style);
}

.site-logo {
    max-width: 100%;
    width: 400px;
    height: auto;
    margin: 0 auto;
}

/* Smaller logo on very small screens */
@media (max-width: 400px) {
    .site-logo {
        width: 280px;
    }
}

.site-logo-small {
    width: 60px;
    height: auto;
    margin: 0 auto var(--spacing-sm);
}

/* Main Navigation */
.main-nav {
    padding: var(--spacing-xs) 0;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: var(--spacing-xs);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Minimum touch target size */
    min-height: var(--touch-target-min);
    min-width: var(--touch-target-min);
    padding: var(--spacing-xs) var(--spacing-xs);
    font-size: 0.75rem;
    font-weight: bold;
    transition: background-color var(--transition-speed) ease;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Active state for touch */
.nav-link:active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Social Links */
.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Ensure touch target meets minimum size */
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    transition: transform var(--transition-speed) ease,
                opacity var(--transition-speed) ease;
}

@media (hover: hover) {
    .social-link:hover {
        transform: scale(1.15);
        opacity: 0.8;
    }
}

.social-link:active {
    transform: scale(0.95);
    opacity: 0.7;
}

.social-icon {
    width: 30px;
    height: 30px;
}

/* ============================================
   PAGE LAYOUT - Sidebar + Content
   ============================================ */
.page-layout {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-xs);
}

/* Mobile: Sidebar becomes horizontal top bar */
.sidebar {
    border: var(--border-style);
    padding: var(--spacing-xs);
    text-align: center;
    display: flex;
    flex-direction: column;
    position: sticky;
    align-items: center;
    gap: var(--spacing-xs);
}

/* Hide small logo on mobile - already shown in header */
@media (max-width: 767px) {
    .sidebar .site-logo-small {
        display: none;
    }
    
    .sidebar .nav-list {
        flex-direction: row !important;
        flex-wrap: nowrap;
    }
    
    .sidebar .social-links {
        margin-top: var(--spacing-xs);
    }
}

.content-area {
    border: var(--border-style);
    padding: var(--spacing-sm);
}

/* Tablet and up: larger padding */
@media (min-width: 480px) {
    .page-layout {
        padding: var(--spacing-md);
    }
    
    .content-area {
        padding: var(--spacing-md);
    }
    
    .sidebar {
        padding: var(--spacing-md);
    }
}

/* Desktop: Side-by-side layout */
@media (min-width: 768px) {
    .page-layout {
        flex-direction: row;
    }
    
    .sidebar {
        flex: 0 0 150px;
        position: sticky;
        top: var(--spacing-md);
        align-self: flex-start;
        flex-direction: column;
    }
    
    .sidebar .site-logo-small {
        display: block;
    }
    
    .content-area {
        flex: 1;
    }
}

/* ============================================
   RELEASES GRID
   ============================================ */
.releases-section {
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: var(--border-style);
    word-wrap: break-word;
}

@media (min-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }
}

.releases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    justify-content: center;
}

@media (min-width: 480px) {
    .release-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: var(--spacing-lg);
    justify-content: center;
    }
}

.release-item {
    text-align: center;
    justify-content: center;
}

.release-image {
    width: 100%;
    max-width: 200px;
    margin: 0 auto var(--spacing-sm);
    transition: transform var(--transition-speed) ease;
}

@media (min-width: 480px) {
    .release-image {
        max-width: 200px;
    }
}

@media (hover: hover) {
    .release-image:hover {
        transform: scale(1.05);
    }
}

.release-image:active {
    transform: scale(0.98);
}

.release-name {
    text-align: center;
    font-weight: bold;
    font-size: 0.7rem;
    margin-bottom: var(--spacing-sm);
}

@media (min-width: 480px) {
    .release-name {
        font-size: 1rem;
    text-align: center;
    }
}

.release-item p {
    font-size: 0.8rem;
}

@media (min-width: 480px) {
    .release-item p {
        font-size: 0.7rem;
    }
}

.release-price {
    color: rgba(255, 255, 255, 0.8);
    margin-top: var(--spacing-xs);    }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    width: 100%;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    margin-top: auto;
    padding: var(--spacing-md);
    padding-bottom: calc(var(--spacing-md) + var(--safe-area-inset-bottom));
    text-align: center;
    border-top: var(--border-style);
}

.copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

/* ============================================
   CONTENT PAGES (About, Press, Interviews, etc.)
   ============================================ */
.content-text {
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-text p {
    margin-bottom: var(--spacing-md);
}

.content-text h2,
.content-text h3 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
}

@media (min-width: 480px) {
    .content-text h2,
    .content-text h3 {
        font-size: 1.5rem;
    }
}

.content-text ul,
.content-text ol {
    margin-left: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.content-text li {
    margin-bottom: var(--spacing-xs);
    /* Ensure links in lists have good touch targets */
    padding: var(--spacing-xs) 0;
}

/* Make list links easier to tap */
.content-text li a {
    display: inline-block;
    padding: var(--spacing-xs) 0;
}

/* Blockquotes for reviews/press */
.quote {
    border-left: 3px solid var(--color-border);
    padding-left: var(--spacing-sm);
    margin: var(--spacing-md) 0;
    font-style: normal;
    color: rgba(255, 255, 255, 0.9);
}

@media (min-width: 480px) {
    .quote {
        padding-left: var(--spacing-md);
    }
}

.quote-source {
    display: block;
    margin-top: var(--spacing-xs);
    font-style: normal;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   PRODUCT/RELEASE DETAIL PAGES
   ============================================ */
.release-detail {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.release-detail-cover {
    max-width: 250px;
    margin: 0 auto;
}

@media (min-width: 480px) {
    .release-detail-cover {
        max-width: 300px;
    }
}

.release-detail-info {
    flex: 1;
    min-width: 0;
}

.release-detail-info .release-artist {
    font-size: 1.5rem;
}

@media (min-width: 480px) {
    .release-detail-info .release-artist {
        font-size: 1.75rem;
    }
}

.tracklist {
    list-style: decimal;
    margin-left: var(--spacing-md);
}

.tracklist li {
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

@media (min-width: 480px) {
    .tracklist li {
        font-size: 1rem;
    }
}

.buy-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.buy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Ensure touch target size */
    min-height: var(--touch-target-min);
    padding: var(--spacing-sm) var(--spacing-md);
    border: var(--border-style);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.875rem;
    transition: background-color var(--transition-speed) ease,
                color var(--transition-speed) ease;
}

.buy-button:hover {
    background-color: var(--color-text);
    color: var(--color-bg);
}

.buy-button:active {
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--color-bg);
}

@media (min-width: 768px) {
    .release-detail {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--spacing-lg);
    }
    
    .release-detail-cover {
        flex: 0 0 300px;
        margin: 0;
    }
}

/* ============================================
   SHIRTS/MERCH PAGE
   ============================================ */
.merch-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

@media (min-width: 480px) {
    .merch-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: var(--spacing-lg);
    }
}

.merch-item {
    text-align: center;
}

.merch-image {
    width: 100%;
    max-width: 150px;
    margin: 0 auto var(--spacing-sm);
    transition: transform var(--transition-speed) ease;
}

@media (min-width: 480px) {
    .merch-image {
        max-width: 200px;
    }
}

@media (hover: hover) {
    .merch-image:hover {
        transform: scale(1.05);
    }
}

.merch-image:active {
    transform: scale(0.98);
}

.merch-name {
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-xs);
}

@media (min-width: 480px) {
    .merch-name {
        font-size: 1rem;
    }
}

.merch-item p {
    font-size: 0.8rem;
}

@media (min-width: 480px) {
    .merch-item p {
        font-size: 0.9rem;
    }
}

.merch-price {
    color: rgba(255, 255, 255, 0.8);
    margin-top: var(--spacing-xs);
}

/* ============================================
   PRESS & INTERVIEWS PAGES
   ============================================ */
.press-list,
.interviews-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.press-list li,
.interviews-list li {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.press-list li:last-child,
.interviews-list li:last-child {
    border-bottom: none;
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

/* Better focus states for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 4px;
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-border: #ffffff;
    }
    
    a:focus {
        outline: 3px solid var(--color-text);
    }
}

/* ============================================
   iOS SPECIFIC FIXES
   ============================================ */
/* Fix for iOS momentum scrolling */
.page-wrapper {
    -webkit-overflow-scrolling: touch;
}

/* Prevent iOS zoom on input focus */
input, select, textarea {
    font-size: 16px;
}

/* Fix iOS Safari bottom bar issues */
@supports (-webkit-touch-callout: none) {
    .home-hero {
        min-height: -webkit-fill-available;
    }
}

/* ============================================
   LANDSCAPE MODE ADJUSTMENTS
   ============================================ */
@media (orientation: landscape) and (max-height: 500px) {
    .home-hero {
        padding: var(--spacing-sm);
        min-height: auto;
    }
    
    .home-logo {
        max-height: 70vh;
        width: auto;
    }
}

/* ============================================
   VERY SMALL SCREENS (320px and below)
   ============================================ */
@media (max-width: 350px) {
    :root {
        --font-size-base: 14px;
        --spacing-xs: 0.375rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
    }
    
    .nav-link {
        font-size: 0.75rem;
        padding: var(--spacing-xs);
    }
    
    .social-icon {
        width: 24px;
        height: 24px;
    }
    
    .release-cover {
        width: 100px;
        height: 100px;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
}

/* ============================================
   UTILITY: LIST STYLES
   ============================================ */
.list-unstyled {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

/* ============================================
   UTILITY: NAV LIST VERTICAL (for sidebar)
   ============================================ */
.nav-list-vertical {
    flex-direction: column;
}

/* ============================================
   EMAIL PROTECTION
   ============================================ */
.email-protect {
    cursor: pointer;
}

.email-protect .at-symbol {
    /* Hide the [at] visually but keep for bots */
    font-size: 0;
}

.email-protect .at-symbol::before {
    content: '@';
    font-size: 1rem;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .social-links,
    .main-nav {
        display: none;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .page-layout {
        display: block;
    }
    
    .sidebar {
        display: none;
    }
}
