/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-black: #000000;
    --primary-white: #ffffff;
    --gymshark-grey: #1a1a1a;
    --accent-blue: #0066cc;
    --deep-blue: #003d7a;
    --text-light: #cccccc;
    --text-dark: #333333;
    --gradient-primary: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    --gradient-accent: linear-gradient(135deg, #0066cc 0%, #003d7a 100%);
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--primary-white);
    background: var(--primary-black);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h1 {
    display: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.logo-img {
    height: 44px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1) drop-shadow(0 0 2px rgba(255, 255, 255, 0.35));
}

.nav-menu a {
    color: var(--primary-white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--accent-blue);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-white);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.hero-onyx {
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://i.ytimg.com/vi/1lDNKQNmtyw/maxresdefault.jpg');
    background-size: cover;
    background-position: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23333" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    line-height: 1.7;
}

.cta-button {
    background: var(--gradient-accent);
    color: var(--primary-white);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.4);
}

/* Product Showcase */
.product-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.product-image {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    margin-bottom: 1rem;
    background-size: cover;
    background-position: center;
}

.onyx-black {
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
}

.onyx-white {
    background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
}

.onyx-blue {
    background: linear-gradient(135deg, #003d7a 0%, #0066cc 100%);
}

.product-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: var(--text-light);
    font-size: 1.5rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Section Styles */
.section-title {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* History Section */
.history {
    padding: 6rem 0;
    background: var(--gymshark-grey);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-blue);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 3rem;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-year {
    background: var(--accent-blue);
    color: var(--primary-white);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    min-width: 120px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    margin: 0 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex: 1;
}

.timeline-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-blue);
}

.timeline-content p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Color chips for timeline and collections */
.color-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.color-chip {
    --chip-color: #999;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem 0.35rem 1.4rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--primary-white);
    position: relative;
}
.color-chip::before {
    content: '';
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--chip-color);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.35) inset;
}
/* Specific chip colors */
.chip-black { --chip-color: #000000; }
.chip-white { --chip-color: #ffffff; }
.chip-deep-petrol-blue { --chip-color: #003d7a; }
.chip-red { --chip-color: #d32f2f; }
.chip-grey { --chip-color: #9e9e9e; }
.chip-blue { --chip-color: #1976d2; }
.chip-brand-blue { --chip-color: #0066cc; }
.chip-green { --chip-color: #2e7d32; }

/* Video embed section */
.video-section {
    padding: 4rem 0 2rem;
    background: var(--primary-black);
}
.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255,255,255,0.04);
}
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-embed video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}
.video-hidden { display: none; }
.video-caption {
    margin-top: 0.75rem;
    color: var(--text-light);
    font-size: 0.95rem;
    text-align: center;
}

/* Unmute overlay */
.video-unmute-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.35),
        rgba(0,0,0,0.55)
    );
    z-index: 2;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.video-unmute-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.unmute-btn {
    appearance: none;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #0b0b0b;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.unmute-btn:hover {
    background: #f2f2f2;
}
.unmute-icon {
    font-size: 1.1rem;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: var(--primary-black);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
}

.feature-icon {
    font-size: 3rem;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-white);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Collection Gallery */
.collection {
    padding: 6rem 0;
    background: var(--gymshark-grey);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.gallery-image {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Drop highlight */
.gallery-image.dragover {
    outline: 2px dashed rgba(0, 102, 204, 0.8);
    outline-offset: -10px;
}

/* Ensure inline IMG inside gallery-image fills the card */
.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Fine-tune crop for specific colours */
.gallery-image[data-color="red"] img { object-fit: contain; object-position: left center; }
.gallery-image[data-color="grey"] img { object-position: center; }
.gallery-image[data-color="blue"] img { object-position: center; }
.gallery-image[data-color="brand-blue"] img { object-position: center; }
.gallery-image[data-color="green"] img { object-position: center; }
.gallery-item--wide .gallery-image img { object-position: center; }

/* Fallback placeholder when image missing */
.image-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(135deg, #333 0%, #666 100%);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Wide gallery item for Midnight */
.gallery-item--wide { grid-column: 1 / -1; }
.gallery-item--wide .gallery-image { height: 420px; }

/* Upload button overlay for gallery cards */
.upload-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: var(--gradient-accent);
    color: var(--primary-white);
    border: none;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 102, 204, 0.35);
}
.upload-btn:hover { filter: brightness(1.1); }

.onyx-tee {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

.onyx-hoodie {
    background: linear-gradient(135deg, #003d7a 0%, #0066cc 100%);
}

.onyx-shorts {
    background: linear-gradient(135deg, #333333 0%, #666666 100%);
}

.onyx-leggings {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
}

.gallery-info {
    padding: 1.5rem;
}

.gallery-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-white);
}

.gallery-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-blue);
}

/* Legacy Section */
.legacy {
    padding: 6rem 0;
    background: var(--primary-black);
}

.legacy-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.legacy-text h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legacy-text p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
    font-size: 1.1rem;
}

.legacy-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legacy-showcase {
    position: relative;
}

.legacy-item {
    width: 100%;
    height: 400px;
    background: var(--gradient-primary);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.onyx-evolution {
    background: linear-gradient(135deg, #000000 0%, #003d7a 50%, #0066cc 100%);
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: var(--gradient-accent);
    text-align: center;
}

.cta-content h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary-white);
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
}

.newsletter-form button {
    background: var(--primary-black);
    color: var(--primary-white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--gymshark-grey);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: var(--gymshark-grey);
    padding: 3rem 0 1rem;
    color: var(--text-light);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--primary-white);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.footer-logo-img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1) drop-shadow(0 0 2px rgba(255, 255, 255, 0.35));
}

/* Page header for dedicated pages */
.page-header {
    padding-top: 7rem;
    padding-bottom: 3rem;
    background: var(--gradient-primary);
}
.page-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-white);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-blue);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--primary-white);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-blue);
    transform: translateY(-2px);
}

/* Inline SVG icons styling */
.social-links a svg {
    width: 20px;
    height: 20px;
    fill: var(--primary-white);
}
.social-links a:hover svg {
    fill: #ffffff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .product-showcase {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 50px;
    }
    
    .timeline-year {
        margin-bottom: 1rem;
    }
    
    .timeline-content {
        margin: 0;
    }
    
    .legacy-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .legacy-stats {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: -999px;
    background: #fff;
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    z-index: 2000;
}
.skip-link:focus {
    left: 12px;
    top: 12px;
}

/* Loading animation for images */
.product-image,
.gallery-image,
.legacy-item {
    position: relative;
    overflow: hidden;
}

.product-image::before,
.gallery-image::before,
.legacy-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.product-image:hover::before,
.gallery-image:hover::before,
.legacy-item:hover::before {
    left: 100%;
}

/* Glow effect for interactive elements */
.cta-button,
.feature-card,
.gallery-item {
    position: relative;
}

.cta-button::after,
.feature-card::after,
.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 102, 204, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cta-button:hover::after,
.feature-card:hover::after,
.gallery-item:hover::after {
    opacity: 1;
}
/* Progressive enhancement for backdrop-filter */
@supports ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .navbar {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.95);
  }
  .product-card,
  .timeline-content,
  .feature-card,
  .gallery-item {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

/* Inline style cleanup */
#play-local { margin-left: 0.75rem; }
