/* 
    ======================================
    Ayan Trading Company
    Core Stylesheet - Light Brutalist Redesign
    ======================================
*/

:root {
    /* Color Palette - Light Brutalism */
    --color-bg-base: #F4F4F0;
    --color-bg-alt: #FFFFFF;
    --color-bg-char: #E5E5E0;

    --color-text-main: #111111;
    --color-text-muted: #555555;

    --color-accent: #111111; /* Changed from Blue to Black */
    --color-accent-hover: #555555;

    --border-dark: 2px solid #111111;

    /* Typography */
    --font-heading: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacings */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Utilities */
    --transition-smooth: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: initial;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.loading {
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.05;
    text-transform: uppercase;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 
    Layout Utilities
*/
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

.relative {
    position: relative;
}

.dark-bg {
    background-color: var(--color-text-main);
    color: var(--color-bg-base);
}
.dark-bg .section-subtitle, .dark-bg p {
    color: var(--color-bg-char);
}

.char-bg {
    background-color: var(--color-bg-char);
}

.mt-2 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: 5rem; }
.mb-5 { margin-bottom: 5rem; }
.text-center { text-align: center; }

/* 
    Typography Utilities
*/
.section-title {
    font-size: clamp(3rem, 7vw, 6rem);
    margin-bottom: 1rem;
    color: inherit;
    letter-spacing: -2px;
}

.section-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--color-accent);
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
}

p {
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    color: var(--color-text-muted);
    font-weight: 400;
}

/* 
    Custom Cursor
*/
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    background-color: var(--color-accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    border: 2px solid var(--color-text-main);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
}

body:hover .cursor { opacity: 1; }

.cursor.active {
    width: 80px;
    height: 80px;
    background-color: var(--color-text-main);
    mix-blend-mode: difference;
}

.cursor-follower.active {
    width: 0;
    height: 0;
    opacity: 0;
}

@media (hover: none) and (pointer: coarse) {
    .cursor, .cursor-follower { display: none; }
}

/* 
    Buttons
*/
.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: var(--border-dark);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    background: transparent;
    color: var(--color-text-main);
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-text-main);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: -1;
}

.btn:hover {
    color: var(--color-bg-base);
}

.btn:hover::before {
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--color-text-main);
    color: var(--color-bg-base);
}
.btn-primary::before {
    background-color: var(--color-accent);
}

/* 
    Preloader
*/
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-text-main);
    color: var(--color-bg-base);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.preloader-text {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    text-transform: uppercase;
    display: flex;
    gap: 1.5rem;
    overflow: hidden;
}

.preloader-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
}

.preloader-progress {
    width: 0%;
    height: 4px;
    background-color: var(--color-accent);
    position: absolute;
    bottom: 0;
    left: 0;
}

/* 
    Navigation - Brutalist
*/
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    border-bottom: var(--border-dark);
    background-color: var(--color-bg-base);
    transition: transform 0.4s ease;
}

.navbar.hidden {
    transform: translateY(-100%);
}

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

.nav-logo {
    height: 40px;
    transition: transform 0.3s ease;
}

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

.nav-links a {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0;
    overflow: hidden;
    color: var(--color-text-main);
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-text-muted);
}

.hamburger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-text-main);
    position: absolute;
    transition: var(--transition-smooth);
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { bottom: 0; }

/* 
    Split Screen Hero
*/
.hero-split {
    min-height: 100vh;
    height: auto;
    display: flex;
    border-bottom: var(--border-dark);
    padding-top: 120px; /* Offset for nav */
}

.hero-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5% 5% 4rem 5%;
    border-right: var(--border-dark);
    position: relative;
}

.hero-right {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: var(--color-bg-char);
    min-height: 50vh;
}

.hero-video {
    width: 100%;
    height: 120%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2); /* Brutalist image treatment */
}

.hero-subtitle {
    font-family: var(--font-body);
    color: var(--color-accent);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(4rem, 8vw, 9rem);
    text-transform: uppercase;
    line-height: 0.9;
    letter-spacing: -3px;
    margin-bottom: 3rem;
}

.hero-title .line {
    overflow: hidden;
    padding-bottom: 0.1em;
}

.hero-title span {
    display: inline-block;
    transform: translateY(110%);
}

.hero-desc {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    max-width: 80%;
    color: var(--color-text-main);
    margin-bottom: 3rem;
}

/* Marquee */
.marquee-container {
    width: 100%;
    overflow: hidden;
    background: var(--color-text-main);
    color: var(--color-bg-base);
    padding: 1.5rem 0;
    border-bottom: var(--border-dark);
    display: flex;
    white-space: nowrap;
}

.marquee-content {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 
    Grid Layouts
*/
.brutal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: var(--border-dark);
}

.brutal-grid > div {
    padding: 5rem 5%;
}

.brutal-grid > div:first-child {
    border-right: var(--border-dark);
}

/* Product Grid Brutal (Shop/Related) */
.product-grid-brutal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    border-bottom: var(--border-dark);
}

.product-grid-brutal .product-card-brutal {
    border-bottom: none;
    border-left: none;
    border-top: none;
    border-right: var(--border-dark);
    height: 450px;
}

.product-grid-brutal .product-card-brutal:hover {
    transform: none;
    box-shadow: none;
    background-color: var(--color-bg-alt);
}

.product-grid-brutal .product-card-brutal:hover .img-container {
    background-color: #EFEFEF;
}

@media (max-width: 1024px) {
    .product-grid-brutal {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .product-grid-brutal {
        grid-template-columns: 1fr; /* Single column on phones */
    }
    .product-grid-brutal .product-card-brutal {
        height: auto;
        min-height: 400px;
        border-right: none;
        border-bottom: var(--border-dark);
    }
}

/* 
    Product Gallery
*/
.product-card-brutal {
    border: var(--border-dark);
    background: var(--color-bg-alt);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 500px;
    position: relative;
    overflow: hidden;
}

.product-card-brutal:hover {
    transform: translate(-5px, -5px);
    box-shadow: 10px 10px 0px var(--color-text-main);
}

.product-card-brutal .img-container {
    flex: 1;
    border-bottom: var(--border-dark);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-base);
}

.product-card-brutal img {
    max-height: 100%;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

.product-card-brutal:hover img {
    transform: scale(1.1) rotate(5deg);
}

.product-card-brutal .content {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.product-card-brutal h4 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1;
    letter-spacing: -1px;
    margin: 0;
    max-width: 90%;
}

/* Base Reveal Utilities for GSAP */
.reveal-text {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.image-reveal-wrapper {
    position: relative;
    overflow: hidden;
    border: var(--border-dark);
}

.image-reveal {
    position: absolute;
    inset: 0;
    background-color: var(--color-text-main);
    z-index: 2;
    transform-origin: top;
}

/* Page Headers for subpages */
.page-header {
    padding-top: 14rem;
    padding-bottom: 6rem;
    border-bottom: var(--border-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: var(--color-bg-char);
    color: var(--color-bg-base);
}

.page-header .section-subtitle {
    color: var(--color-text-muted);
}

.header-marquee {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    white-space: nowrap;
    opacity: 0.9;
    z-index: 0;
    pointer-events: none;
}

.header-marquee span {
    font-size: clamp(6rem, 15vw, 12rem);
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--color-bg-base);
    padding: 0 2rem;
    animation: scrollMarquee 15s linear infinite;
}

@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.page-header .container {
    position: relative;
    z-index: 1;
}

/* Ledger Related Products */
.ledger-list {
    border-top: var(--border-dark);
    display: flex;
    flex-direction: column;
}

.ledger-row {
    display: grid;
    grid-template-columns: 100px 1fr 200px 50px;
    padding: 2rem 0;
    border-bottom: var(--border-dark);
    align-items: center;
    text-decoration: none;
    color: var(--color-text-main);
    transition: all 0.3s ease;
}

.ledger-id {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--color-text-muted);
}

.ledger-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ledger-category {
    font-size: 0.9rem;
    color: var(--color-accent-hover);
    text-transform: uppercase;
    font-weight: 600;
}

.ledger-arrow {
    font-weight: 800;
    text-align: right;
    font-size: 1.5rem;
}

.ledger-row:hover {
    background-color: var(--color-text-main);
    color: var(--color-bg-base);
    padding-left: 2rem;
    padding-right: 2rem;
}

.ledger-row:hover .ledger-id,
.ledger-row:hover .ledger-category {
    color: var(--color-bg-alt);
}

@media (max-width: 768px) {
    .ledger-row {
        grid-template-columns: 1fr 50px;
        gap: 1rem;
    }
    .ledger-id, .ledger-category {
        display: none;
    }
}

/* 
    Footer
*/
.footer {
    padding-top: var(--spacing-xl);
    border-top: var(--border-dark);
    background-color: var(--color-text-main);
    color: var(--color-bg-base);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer h4 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer ul {
    list-style: none;
}

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

.footer a {
    font-family: var(--font-body);
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    font-weight: 600;
}

/* 
    Responsive Adjustments
*/
@media (max-width: 1024px) {
    .hero-split, .brutal-grid {
        flex-direction: column;
        display: flex;
    }
    
    .hero-left, .brutal-grid > div:first-child {
        border-right: none;
        border-bottom: var(--border-dark);
        padding-bottom: 4rem;
    }
    
    .hero-left {
        min-height: auto;
        padding-top: 4rem;
    }
    
    .hero-right {
        min-height: 50vh;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        padding-top: 10rem;
        padding-bottom: 4rem;
    }
}

@media (max-width: 480px) {
    .brutal-grid > div {
        padding: 3rem 5%;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .page-header {
        padding-top: 8rem;
        padding-bottom: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: var(--color-text-main);
        color: var(--color-bg-base);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0;
        gap: 3rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.5s cubic-bezier(0.8, 0, 0.2, 1), opacity 0.5s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        display: flex;
    }

    .nav-links a {
        font-size: 3rem;
    }
    
    .nav-links a::after {
        background-color: var(--color-bg-base);
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .hamburger.active span {
        background-color: var(--color-bg-base);
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}