/* CSS Variables for strong, unique color palette */
:root {
    --bg-color: #f0f0eb; /* Off-white, paper-like */
    --text-primary: #0a0a0a;
    --text-secondary: #4a4a4a;
    
    /* Vibrant, energetic accents */
    --accent-red: #ff3b00;
    --accent-purple: #5c00ff;
    --accent-green: #00a86b;
    --accent-orange: #e65c00;
    --accent-amber: #b45309;
    --accent-lime: #ccff00;
    --accent-blue: #0044ff;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 6px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-red), var(--accent-lime));
    z-index: 9999;
    transition: width 0.1s ease-out;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.brand {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--accent-red);
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 8rem 4rem 4rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 0.85;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    margin-bottom: 3rem;
}

.hero-title .line-1 {
    font-size: clamp(4rem, 12vw, 10rem);
    color: var(--text-primary);
    letter-spacing: -0.05em;
}

.hero-title .line-2 {
    font-size: clamp(3rem, 8vw, 7rem);
    color: transparent;
    -webkit-text-stroke: 2px var(--text-primary);
    margin-left: 10%;
}

.hero-title .line-3 {
    font-size: clamp(4rem, 11vw, 9rem);
    color: var(--accent-purple);
    margin-left: 5%;
}

.hero-tagline {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: 15%;
    max-width: 600px;
}

.decorative-line {
    width: 80px;
    height: 4px;
    background-color: var(--accent-red);
}

.hero-tagline p {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 700;
    color: var(--text-secondary);
}

.hero-shapes {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.shape-1 {
    position: absolute;
    top: 10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background-color: var(--accent-lime);
    border-radius: 50%;
    mix-blend-mode: multiply;
    filter: blur(40px);
    opacity: 0.6;
}

.shape-2 {
    position: absolute;
    bottom: 20%;
    right: 20%;
    width: 400px;
    height: 400px;
    background-color: var(--accent-blue);
    border-radius: 50%;
    mix-blend-mode: multiply;
    filter: blur(60px);
    opacity: 0.4;
}

/* Inventory Section - Magazine Layout */
.inventory-section {
    padding: 8rem 4rem;
    background-color: #111;
    color: var(--bg-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 6rem;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 2rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 900;
    line-height: 0.9;
    text-transform: uppercase;
}

.section-meta {
    font-family: var(--font-body);
    color: var(--accent-lime);
    font-weight: 700;
    letter-spacing: 0.1em;
}

.magazine-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 460px;
    gap: 2rem;
}

.grid-item {
    position: relative;
    perspective: 1200px;
    cursor: pointer;
}

/* Card flip inner container — CSS Grid stacking avoids height/overflow issues */
.card-inner {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.75s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.grid-item.flipped .card-inner {
    transform: rotateY(180deg);
}

/* Both faces sit in the same grid cell, stacked */
.card-front,
.card-back {
    grid-area: 1 / 1;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.card-front {
    background: #1a1a1a;
    position: relative;
}

.card-back {
    transform: rotateY(180deg);
    padding: 3rem;
    justify-content: flex-start;
    gap: 0;
    overflow-y: auto;
}

.back-red    { background: var(--accent-red); color: #fff; }
.back-blue   { background: var(--accent-blue); color: #fff; }
.back-purple { background: var(--accent-purple); color: #fff; }
.back-green  { background: var(--accent-green); color: #fff; }
.back-orange { background: var(--accent-orange); color: #fff; }
.back-amber  { background: var(--accent-amber); color: #fff; }

/* Back face content */
.back-category {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.7;
    margin-bottom: 0.75rem;
}

.card-back h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

/* Spec list */
.spec-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 1.5rem;
    flex: 1;
}

.spec-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 0.65rem 0;
    font-size: 0.95rem;
}

.spec-list li span {
    opacity: 0.75;
    font-weight: 400;
}

.spec-list li strong {
    font-weight: 700;
    text-align: right;
}

/* Enquire button on back */
.back-cta {
    display: inline-block;
    background: rgba(0,0,0,0.25);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.9rem 2rem;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.5);
    transition: background 0.3s ease, border-color 0.3s ease;
    align-self: flex-start;
}

.back-cta:hover {
    background: rgba(0,0,0,0.45);
    border-color: #fff;
}

/* "Click for details" hint on front */
.flip-hint {
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    pointer-events: none;
}

/* Emoji placeholder for cards without product images */
.placeholder-visual {
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    flex: 1;
    min-height: 200px;
}

/* Full-bleed image fills the entire card front */
.item-visual {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #1e1e1e;
    z-index: 0;
}

.item-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.grid-item:hover .item-visual img {
    transform: scale(1.06);
}

/* Text overlaid at bottom with gradient */
.item-content {
    position: absolute;
    inset: 0;
    z-index: 1;
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.88) 0%,
        rgba(0,0,0,0.55) 40%,
        rgba(0,0,0,0.0) 70%
    );
}

.item-category {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-lime);
    margin-bottom: 0.6rem;
}

.grid-item h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    color: #fff;
}

.grid-item p {
    color: rgba(255,255,255,0.75);
    font-size: 1rem;
    line-height: 1.5;
}

/* Grid Card Sizes */
.item-large {
    grid-column: span 7;
}

.item-large h3 {
    font-size: 3rem;
}

.item-tall {
    grid-column: span 5;
}

.item-third {
    grid-column: span 4;
}

.item-third h3 {
    font-size: 1.6rem;
}

.item-third p {
    font-size: 0.92rem;
}

.item-full {
    grid-column: span 12;
}

.item-full h3 {
    font-size: 3.5rem;
}

.item-full .item-content {
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.92) 0%,
        rgba(0,0,0,0.6) 35%,
        rgba(0,0,0,0.0) 65%
    );
}

/* Contact Section */
.contact-section {
    padding: 8rem 4rem;
    position: relative;
    background-color: var(--accent-lime);
    color: var(--text-primary);
    overflow: hidden;
}

.contact-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    position: relative;
    z-index: 10;
}

.contact-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 900;
    line-height: 0.85;
    text-transform: uppercase;
}

.contact-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
}

.contact-block h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.contact-link, address {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    font-style: normal;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.2;
}

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

.contact-bg-accent {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 70%);
    z-index: 1;
}

/* Footer */
footer {
    background-color: var(--text-primary);
    color: white;
    padding: 4rem;
}

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

.footer-brand {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    text-transform: uppercase;
}

.footer-copy {
    color: #888;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .magazine-grid {
        display: flex;
        flex-direction: column;
    }
    
    .item-full .card-front {
        flex-direction: column;
    }

    .item-full .item-visual {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        min-width: 100%;
        max-width: 100%;
        min-height: 250px;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1.5rem 2rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero {
        padding: 10rem 2rem 4rem;
    }
    
    .hero-tagline {
        margin-left: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .inventory-section, .contact-section {
        padding: 4rem 2rem;
    }
    
    footer {
        padding: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}