/* footprint.market - Paper Texture Craft Store Aesthetic */
/* Palette: #d4c5a0, #f5efe0, #3d3225, #4a7c59, #b8860b, #bba882, #8b4513 */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #d4c5a0;
    color: #3d3225;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* ===== Kraft Paper Texture Overlay ===== */
#paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ===== Typography ===== */
.section-heading {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: #3d3225;
    margin-bottom: 1.5rem;
}

/* ===== Rough-Edge Rules ===== */
.rough-rule {
    width: 180px;
    margin: 0 auto;
    line-height: 0;
}

.rough-rule svg {
    width: 100%;
    height: 8px;
}

.rough-rule-wide {
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0.5rem 0;
}

.rough-rule-wide svg {
    width: 100%;
    height: 12px;
}

.rough-rule-footer {
    width: 120px;
    margin: 1rem auto;
}

.rough-rule-footer svg {
    height: 6px;
}

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

.hero-inner {
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.eco-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 8vw, 5rem);
    color: #3d3225;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.brand-dot {
    color: #4a7c59;
}

.tagline {
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    color: #8b4513;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

/* ===== Category Tabs ===== */
.category-tabs {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.tab {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #8b4513;
    background: none;
    border: none;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    border-bottom: 2px solid transparent;
}

.tab:hover {
    color: #3d3225;
}

.tab.active {
    color: #3d3225;
    border-bottom-color: #4a7c59;
}

/* ===== Browse / Product Section ===== */
.browse {
    background: #f5efe0;
    padding: 4rem 1.5rem;
}

.browse-inner {
    max-width: 1100px;
    margin: 0 auto;
}

/* ===== Featured Card ===== */
.featured-card {
    background: #f5efe0;
    border: 1px solid #bba882;
    border-radius: 4px;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.featured-content {
    position: relative;
}

.featured-card .eco-stamp {
    position: absolute;
    top: 0;
    right: 0;
    transform: rotate(12deg);
}

.tag {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    margin-bottom: 0.5rem;
}

.tag-green {
    background: #4a7c59;
    color: #f5efe0;
}

.tag-amber {
    background: #b8860b;
    color: #f5efe0;
}

.featured-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #3d3225;
    margin-bottom: 0.75rem;
}

.featured-desc {
    font-size: 0.9rem;
    color: #3d3225;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.featured-origin {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #8b4513;
    margin-bottom: 0.5rem;
}

.featured-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #d4c5a0 0%, #bba882 50%, #4a7c59 100%);
    border-radius: 4px;
    border: 1px solid #bba882;
}

/* ===== Twine Line ===== */
.twine-line {
    border-top: 2px dashed #bba882;
    margin: 2rem 0;
    opacity: 0.6;
}

/* ===== Masonry Product Grid ===== */
.product-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-rows: 10px;
    gap: 1.25rem;
}

.product-card {
    background: #f5efe0;
    border: 1px solid #bba882;
    border-radius: 4px;
    overflow: hidden;
    grid-row-end: span 32;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(61, 50, 37, 0.1);
}

.product-card.card-tall {
    grid-row-end: span 38;
}

.card-img {
    height: 120px;
    width: 100%;
}

.card-tall .card-img {
    height: 160px;
}

.card-img-green {
    background: linear-gradient(145deg, #4a7c59 0%, #5a9469 60%, #d4c5a0 100%);
}

.card-img-amber {
    background: linear-gradient(145deg, #b8860b 0%, #d4a030 60%, #f5efe0 100%);
}

.card-img-brown {
    background: linear-gradient(145deg, #8b4513 0%, #a0623a 60%, #d4c5a0 100%);
}

.card-img-light {
    background: linear-gradient(145deg, #bba882 0%, #d4c5a0 60%, #f5efe0 100%);
}

.card-body {
    padding: 1rem;
}

.card-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.eco-stamp-sm {
    line-height: 0;
    transform: rotate(8deg);
}

.card-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #3d3225;
    margin-bottom: 0.35rem;
}

.card-desc {
    font-size: 0.82rem;
    color: #3d3225;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.card-origin {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #8b4513;
    margin-bottom: 0.35rem;
}

.footprint-score {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
}

.score-a {
    color: #4a7c59;
    background: rgba(74, 124, 89, 0.1);
}

.score-b {
    color: #b8860b;
    background: rgba(184, 134, 11, 0.1);
}

/* ===== Story Section ===== */
.story {
    background: #d4c5a0;
    padding: 5rem 1.5rem;
}

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

.story-content {
    text-align: left;
}

.story-lead {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: #3d3225;
    margin-bottom: 1.5rem;
    text-align: center;
}

.story-body {
    font-size: 0.92rem;
    color: #3d3225;
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.story-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    text-align: center;
}

.stat-item {
    padding: 1.25rem 0.75rem;
    background: rgba(245, 239, 224, 0.5);
    border: 1px solid #bba882;
    border-radius: 4px;
}

.stat-number {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #4a7c59;
    margin-bottom: 0.25rem;
}

.stat-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #8b4513;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ===== Visit Section ===== */
.visit {
    background: #f5efe0;
    padding: 5rem 1.5rem;
}

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

.visit-text {
    font-size: 0.95rem;
    color: #3d3225;
    max-width: 560px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.visit-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-align: left;
}

.visit-block {
    background: rgba(212, 197, 160, 0.25);
    border: 1px solid #bba882;
    border-radius: 4px;
    padding: 1.5rem;
}

.visit-block-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #3d3225;
    margin-bottom: 0.5rem;
}

.visit-block-text {
    font-size: 0.85rem;
    color: #8b4513;
    line-height: 1.7;
}

/* ===== Footer ===== */
.footer {
    background: #d4c5a0;
    padding: 3rem 1.5rem;
    text-align: center;
}

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

.footer-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #3d3225;
    margin-bottom: 0.25rem;
}

.footer-tagline {
    font-size: 0.82rem;
    color: #8b4513;
}

.footer-copy {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #bba882;
}

/* ===== Fade-in Animation ===== */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Card Filter Animation ===== */
.product-card.card-hidden {
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.product-card.card-show {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.featured-card.card-hidden {
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-visual {
        order: -1;
    }

    .story-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .visit-details {
        grid-template-columns: 1fr;
    }

    .product-masonry {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 480px) {
    .product-masonry {
        grid-template-columns: 1fr;
    }

    .product-card,
    .product-card.card-tall {
        grid-row-end: auto;
    }

    .card-img,
    .card-tall .card-img {
        height: 140px;
    }

    .story-stats {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .category-tabs {
        gap: 0.15rem;
    }

    .tab {
        padding: 0.35rem 0.6rem;
        font-size: 0.72rem;
    }
}
