/* =========================================
   namu.market — Street-Style Modular Bazaar
   ========================================= */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.8;
    color: #4A3A28;
    background-color: #F8F2E8;
    overflow-x: hidden;
    position: relative;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    color: #2A1A10;
    line-height: 1.15;
}

/* --- Geometric Overlay Shapes (crossing module boundaries) --- */
.geo-overlay {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.geo-overlay.visible {
    opacity: 0.08;
}

.geo-overlay--triangle {
    top: 18vh;
    right: -60px;
    width: 320px;
    height: 320px;
    border: 3px solid #2A1A10;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.geo-overlay--hexagon {
    top: 55vh;
    left: -40px;
    width: 280px;
    height: 280px;
    border: 3px solid #2A1A10;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: transparent;
    /* Use box-shadow for outline effect */
}

.geo-overlay--hexagon::after {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 3px solid #2A1A10;
}

.geo-overlay--diamond {
    bottom: 30vh;
    right: 5vw;
    width: 200px;
    height: 200px;
    border: 3px solid #2A1A10;
    transform: rotate(45deg);
}

.geo-overlay--circle-lg {
    top: 75vh;
    left: 15vw;
    width: 360px;
    height: 360px;
    border: 3px solid #2A1A10;
    border-radius: 50%;
}

/* --- Abstract Shape Decorations --- */
.abstract-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.abstract-shape.visible {
    opacity: 0.15;
}

/* Hero abstract shapes */
.hero__abstract-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero__abstract-shapes .abstract-shape--circle {
    width: 300px;
    height: 300px;
    background: #E08080;
    border-radius: 50%;
    top: 10%;
    right: 10%;
}

.hero__abstract-shapes .abstract-shape--star {
    width: 200px;
    height: 200px;
    background: #E09060;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    bottom: 15%;
    left: 8%;
}

.hero__abstract-shapes .abstract-shape--arrow {
    width: 150px;
    height: 150px;
    background: #D07030;
    clip-path: polygon(0% 40%, 60% 40%, 60% 0%, 100% 50%, 60% 100%, 60% 60%, 0% 60%);
    top: 55%;
    right: 25%;
}

/* Market section abstract shapes */
.market__abstract-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.market__abstract-shapes .abstract-shape--blob {
    width: 400px;
    height: 400px;
    background: #E08080;
    border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
    top: 20%;
    right: -100px;
}

.market__abstract-shapes .abstract-shape--ring {
    width: 250px;
    height: 250px;
    border: 40px solid #E09060;
    border-radius: 50%;
    bottom: 15%;
    left: -60px;
}

/* Module internal abstract backgrounds */
.module__abstract-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.module__abstract-bg::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    background: #E08080;
    border-radius: 50%;
    opacity: 0.12;
    bottom: -40px;
    right: -40px;
}

.module__abstract-bg--alt::before {
    background: #E09060;
    width: 220px;
    height: 220px;
    top: -60px;
    left: -60px;
    bottom: auto;
    right: auto;
}

.module__abstract-bg--wide::before {
    width: 300px;
    height: 300px;
    background: #D07030;
    opacity: 0.08;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #F8F2E8;
    overflow: hidden;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero__title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 10vw, 8rem);
    color: #2A1A10;
    letter-spacing: 0.04em;
    line-height: 1;
    opacity: 0;
    transform: translateY(30px);
    animation: heroTitleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

.hero__title-dot {
    color: #D07030;
}

.hero__title-market {
    color: #D07030;
}

.hero__tagline {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: #4A3A28;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-top: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: heroTitleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s forwards;
}

@keyframes heroTitleIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero thick border frame */
.hero::before {
    content: '';
    position: absolute;
    inset: 20px;
    border: 3px solid #2A1A10;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    animation: frameFadeIn 0.6s ease 1s forwards;
}

@keyframes frameFadeIn {
    to { opacity: 1; }
}

/* --- Market Section --- */
.market {
    position: relative;
    padding: 80px 40px 120px;
    background-color: #F8F2E8;
}

.market__grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Module Base --- */
.module {
    position: relative;
    background: #FEFAF4;
    border: 3px solid #2A1A10;
    border-radius: 0;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: box-shadow 0.3s ease;
}

.module.bounced-in {
    opacity: 1;
    transform: translateY(0);
    animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.module:hover {
    box-shadow: 8px 8px 0px #2A1A10;
}

/* Module variants */
.module--featured {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 420px;
    padding: 48px;
}

.module--wide {
    grid-column: span 2;
}

.module--tall {
    grid-row: span 2;
    min-height: 380px;
}

.module--full {
    grid-column: span 3;
    padding: 48px;
}

/* Module internal elements */
.module__label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #D07030;
    background: #F8F2E8;
    display: inline-block;
    padding: 4px 12px;
    border: 2px solid #D07030;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    align-self: flex-start;
}

.module__title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: #2A1A10;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.module--standard .module__title {
    font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.module__desc {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    color: #4A3A28;
    line-height: 1.8;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.module__price {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    color: #D07030;
    position: relative;
    z-index: 1;
}

/* --- Footer Section --- */
.footer-section {
    position: relative;
    background: #2A1A10;
    padding: 80px 40px;
    text-align: center;
}

.footer-section__content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-section__title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #F8F2E8;
    margin-bottom: 16px;
}

.footer-section__dot {
    color: #D07030;
}

.footer-section__text {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    color: #E09060;
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    line-height: 1.8;
    margin-bottom: 32px;
}

.footer-section__links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-section__link {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #F8F2E8;
    cursor: pointer;
    transition: color 0.3s ease;
}

.footer-section__link:hover {
    color: #D07030;
}

.footer-section__copy {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: #4A3A28;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .market {
        padding: 60px 20px 80px;
    }

    .market__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .module--featured {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 300px;
    }

    .module--full {
        grid-column: span 2;
    }

    .module--tall {
        grid-row: span 1;
    }

    .geo-overlay--triangle,
    .geo-overlay--hexagon,
    .geo-overlay--diamond,
    .geo-overlay--circle-lg {
        display: none;
    }
}

@media (max-width: 600px) {
    .market__grid {
        grid-template-columns: 1fr;
    }

    .module--featured,
    .module--wide,
    .module--full {
        grid-column: span 1;
    }

    .hero__title {
        font-size: clamp(2.5rem, 12vw, 4.5rem);
    }

    .hero::before {
        inset: 12px;
    }

    .module {
        padding: 24px;
    }

    .footer-section__links {
        gap: 20px;
    }
}
