/* namu.market — Scandinavian tree products marketplace */
/* Bento-box layout, Nordic functionalism, DM Sans */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    background: #3A3A36;
    font-family: 'DM Sans', sans-serif;
    color: #C8C0B4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 1px;
    background: #3A3A36;
    min-height: 100vh;
    padding: 1px;
    transition: grid-template-columns 300ms ease;
}

/* Module base */
.module {
    background: #1C1C1A;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: all 300ms ease;
}

/* Hero: 2 cols, 2 rows */
.module-hero {
    grid-column: span 2;
    grid-row: span 2;
    justify-content: center;
    align-items: flex-start;
    padding: 48px;
}

.hero-content {
    max-width: 400px;
}

.hero-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 48px;
    letter-spacing: -0.01em;
    color: #F0ECE4;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-dot {
    color: #C87A5A;
}

.hero-subtitle {
    font-weight: 400;
    font-size: 15px;
    line-height: 1.7;
    color: #8A8478;
    letter-spacing: 0.01em;
}

/* Product modules */
.module-product {
    justify-content: space-between;
}

.product-category {
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8A8478;
    margin-bottom: 12px;
}

.product-name {
    font-weight: 500;
    font-size: 24px;
    letter-spacing: 0.02em;
    color: #F0ECE4;
    margin-bottom: 12px;
    line-height: 1.2;
}

.product-desc {
    font-weight: 400;
    font-size: 15px;
    line-height: 1.7;
    color: #C8C0B4;
    margin-bottom: 20px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #3A3A36;
}

.product-dims {
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8A8478;
}

.product-price {
    font-weight: 500;
    font-size: 24px;
    letter-spacing: 0.02em;
    color: #D4B48A;
}

/* Material swatches module */
.module-swatches {
    justify-content: center;
    align-items: center;
}

.swatches-label {
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8A8478;
    margin-bottom: 24px;
    text-align: center;
}

.swatch-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.swatch {
    width: 60px;
    height: 20px;
    border-radius: 2px;
}

.swatch-names {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8A8478;
    display: none;
}

/* Wood grain module — spans 1 col, 2 rows */
.module-woodgrain {
    grid-row: span 2;
    position: relative;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    background:
        repeating-linear-gradient(
            0deg,
            #1A1A18 0px,
            #1A1A18 3px,
            #1C1C1A 3px,
            #1C1C1A 7px,
            #1A1A18 7px,
            #1A1A18 8px,
            #1C1C1A 8px,
            #1C1C1A 15px,
            #1B1B19 15px,
            #1B1B19 17px,
            #1C1C1A 17px,
            #1C1C1A 23px
        );
}

.module-woodgrain::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #1C1C1A;
    opacity: 0.6;
}

.woodgrain-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 24px;
}

.tree-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid #3A3A36;
    margin: 0 auto 24px;
    position: relative;
}

.tree-ring::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid #3A3A36;
}

.tree-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #3A3A36;
}

.woodgrain-text {
    font-weight: 400;
    font-size: 15px;
    line-height: 1.7;
    color: #8A8478;
    font-style: italic;
}

/* Sustainability module */
.module-sustainability {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
}

.sustainability-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.leaf-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.sustainability-text {
    font-weight: 400;
    font-size: 15px;
    line-height: 1.7;
    color: #8A8478;
}

/* Wood grain texture module 2 */
.module-woodgrain-2 {
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

.grain-pattern {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            90deg,
            #1A1A18 0px,
            #1A1A18 2px,
            #1C1C1A 2px,
            #1C1C1A 5px,
            #1B1B19 5px,
            #1B1B19 6px,
            #1C1C1A 6px,
            #1C1C1A 11px,
            #1A1A18 11px,
            #1A1A18 14px,
            #1C1C1A 14px,
            #1C1C1A 20px
        );
    opacity: 0.4;
}

/* Footer module */
.module-footer {
    grid-column: span 2;
    justify-content: center;
    padding: 24px 32px;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-item {
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8A8478;
}

.footer-divider {
    color: #3A3A36;
    font-size: 13px;
}

/* Hover states — subtle warmth */
.module-product:hover .product-name {
    color: #D4B48A;
    transition: color 300ms ease;
}

.module-product .product-name {
    transition: color 300ms ease;
}

/* Responsive: 2 columns on smaller screens */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .module-hero {
        grid-column: span 2;
        grid-row: span 1;
        padding: 32px;
    }

    .hero-title {
        font-size: 36px;
    }

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

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

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

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

    .module-hero,
    .module-sustainability,
    .module-footer {
        grid-column: span 1;
    }

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

    .module {
        padding: 24px;
    }

    .hero-title {
        font-size: 28px;
    }
}
