/* ============================================
   GRETE - Underground Fashion Brand
   Base styles inspired by luisdejavier.com
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Colors */
    --color-bg: #010101;
    --color-text: #fcfcfc;
    --color-text-muted: #888888;
    --color-accent: #c9a962; /* Muted gold */
    --color-border: #222222;

    /* Typography */
    --font-primary: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 10px;
    --font-size-sm: 12px;
    --font-size-base: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 24px;
    --font-size-2xl: 36px;
    --font-size-3xl: 48px;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 80px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* Layout */
    --header-height: 60px;
    --footer-height: 50px;
}

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

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

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: 300;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

/* ============================================
   Header
   ============================================ */
/* ============================================
   Top Header Bar
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    opacity: 0;
    transform: translateY(-100%);
    transition:
        opacity var(--transition-base),
        transform var(--transition-base);
    pointer-events: none;
}

.header.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 var(--spacing-md);
}

.logo {
    font-size: var(--font-size-sm);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: var(--spacing-md);
}

.nav a {
    font-size: var(--font-size-sm);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ============================================
   Vertical Navigation
   ============================================ */
.nav-vertical {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
    padding-right: 250px;
    padding-top: 250px;
    background: radial-gradient(
        ellipse at bottom left,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 20%,
        rgba(0, 0, 0, 0.2) 40%,
        rgba(0, 0, 0, 0.05) 60%,
        transparent 80%
    );
}

.nav-vertical a {
    font-family: var(--font-primary);
    font-size: var(--font-size-xl);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text);
    transition:
        opacity var(--transition-fast),
        color var(--transition-fast);
}

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
    height: 200vh; /* Double height to allow scroll-based pan */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--color-bg);
    background-size: cover;
    background-position: center 15%;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(1, 1, 1, 0.3) 0%,
        rgba(1, 1, 1, 0.5) 50%,
        var(--color-bg) 100%
    );
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    display: none;
}

.hero-logo-left,
.hero-logo-right {
    position: absolute;
    top: 0;
    height: min(150px, 8vw);
    width: auto;
    z-index: 10;
}

.hero-logo-left {
    left: 0;
}

.hero-logo-right {
    right: 0;
}

.hero-title {
    display: none;
}

.hero-subtitle {
    font-size: var(--font-size-sm);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* ============================================
   Collections
   ============================================ */
.collections {
    padding: var(--spacing-xl) 0;
}

.collection {
    border-top: 1px solid var(--color-border);
}

.collection:last-child {
    border-bottom: 1px solid var(--color-border);
}

.collection-header {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    transition: background var(--transition-fast);
}

.collection-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.collection-title {
    font-size: var(--font-size-xl);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.collection-toggle {
    font-size: var(--font-size-lg);
    font-weight: 300;
    transition: transform var(--transition-base);
}

.collection-toggle::before {
    content: "+";
}

.collection.is-open .collection-toggle::before {
    content: "-";
}

.collection-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.collection.is-open .collection-content {
    max-height: 80vh;
}

/* Always-open collection content (for main season headers) */
.collection-content--always-open {
    max-height: none;
    overflow: visible;
}

/* Main collection header (non-clickable) */
.collection-header--main {
    cursor: default;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
}

.collection-header--main .collection-title {
    font-size: var(--font-size-xl);
    font-weight: 500;
}

/* Subcollections */
.subcollection {
    border-bottom: 1px solid var(--color-border);
}

.subcollection:last-child {
    border-bottom: none;
}

.subcollection-header {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    padding-left: var(--spacing-lg);
    transition: background var(--transition-fast);
}

.subcollection-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.subcollection-title {
    font-size: var(--font-size-base);
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.subcollection-toggle {
    font-size: var(--font-size-base);
    font-weight: 300;
    color: var(--color-text-muted);
    transition: transform var(--transition-base);
}

.subcollection-toggle::before {
    content: "+";
}

.subcollection.is-open .subcollection-toggle::before {
    content: "-";
}

.subcollection-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.subcollection.is-open .subcollection-content {
    max-height: 80vh;
}

/* ============================================
   Gallery / Carousel
   ============================================ */
.gallery {
    padding: var(--spacing-md);
    padding-top: 0;
}

.gallery-label {
    display: block;
    font-size: var(--font-size-xs);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
}

.gallery-detail {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.gallery-track {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: var(--spacing-sm);
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-slide {
    flex: 0 0 auto;
    width: 300px;
    scroll-snap-align: start;
}

.gallery-slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    border: 1px solid var(--color-border);
    transition:
        border-color var(--transition-base),
        box-shadow var(--transition-base),
        opacity var(--transition-base);
}

/* Dim other images when hovering on one */
.gallery-track:hover .gallery-slide img {
    opacity: 0.5;
}

.gallery-track:hover .gallery-slide img:hover {
    opacity: 1;
    border-color: var(--color-accent);
    box-shadow: 0 0 20px rgba(201, 169, 98, 0.3);
}

@media (min-width: 768px) {
    .gallery-slide {
        width: 350px;
    }
}

@media (min-width: 1024px) {
    .gallery-slide {
        width: 400px;
    }
}

/* Image Placeholder */
.image-placeholder {
    aspect-ratio: 2 / 3;
    background: linear-gradient(145deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: var(--spacing-sm);
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition-base);
}

.image-placeholder:hover {
    border-color: var(--color-accent);
}

.image-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 50%);
}

.image-placeholder::after {
    content: attr(data-label);
    position: relative;
    z-index: 1;
    font-size: var(--font-size-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* Gallery Controls */
.gallery-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding-top: var(--spacing-md);
}

.gallery-prev,
.gallery-next {
    font-size: var(--font-size-lg);
    padding: var(--spacing-xs) var(--spacing-sm);
    transition: color var(--transition-fast);
}

.gallery-prev:hover,
.gallery-next:hover {
    color: var(--color-accent);
}

.gallery-counter {
    font-size: var(--font-size-xs);
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
    min-width: 60px;
    text-align: center;
}

/* ============================================
   About Section
   ============================================ */
.about {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-md);
}

.about-inner {
    max-width: 600px;
    margin: 0 auto;
}

.section-title {
    font-size: var(--font-size-xs);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
}

.about-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--color-border);
}

.about-content p {
    font-size: var(--font-size-lg);
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    min-height: 50vh;
    display: flex;
    align-items: center;
    padding: var(--spacing-xl) var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.contact-inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-link {
    font-size: var(--font-size-xl);
    font-weight: 300;
    letter-spacing: 0.05em;
}

.contact-socials {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.social-link {
    font-size: var(--font-size-sm);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

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

/* ============================================
   Bespoke Section
   ============================================ */
.bespoke {
    padding: var(--spacing-xl) var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.bespoke-inner {
    max-width: 800px;
    margin: 0 auto;
}

.bespoke-content p {
    font-size: var(--font-size-lg);
    line-height: 1.8;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
}

.bespoke-cta {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

.bespoke-cta p {
    margin-bottom: var(--spacing-sm);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height);
    background: linear-gradient(to top, var(--color-bg) 0%, transparent 100%);
    z-index: 100;
    pointer-events: none;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 var(--spacing-md);
    pointer-events: auto;
}

.footer-copyright {
    font-size: var(--font-size-xs);
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

.footer-nav {
    display: flex;
    gap: var(--spacing-md);
}

.footer-nav a {
    font-size: var(--font-size-xs);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    mix-blend-mode: difference;
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    :root {
        --font-size-3xl: 32px;
        --font-size-xl: 20px;
    }

    .nav {
        gap: var(--spacing-sm);
    }

    .footer-nav {
        display: none;
    }

    .hero-title {
        letter-spacing: 0.15em;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Smooth scroll padding for fixed header */
html {
    scroll-padding-top: var(--header-height);
}

/* Selection color */
::selection {
    background: var(--color-accent);
    color: var(--color-bg);
}
