/* ==========================================================================
   foryou.reviews -- Cottagecore Pastoral Blog
   Palette:
     Cream Paper:    #faf5ee
     Warm Cocoa:     #3e2723
     Seal Red:       #b71c1c  (wax seal, accent)
     Seal Red Light: #d32f2f  (gradient highlight)
     Soft Pink:      #f8e8e0  (card bg)
     Lavender Mist:  #e8e0f0  (category tags)
     Pencil Gray:    #8d8d8d  (metadata)
     Stamp Brown:    #795548  (decorative)
   Fonts: Caveat, Merriweather, Karla (Google Fonts)
   ========================================================================== */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Merriweather", Georgia, serif;
    font-weight: 300;
    line-height: 1.8;
    color: #3e2723;
    background-color: #faf5ee;
    min-height: 100vh;
}

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

/* --- Page Wrapper --- */
.page-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

/* --- Hero Section --- */
.hero {
    margin-bottom: 2rem;
    text-align: center;
}

.hero-frame {
    padding: 2.5rem 2rem 2rem;
    border: 2px solid #795548;
    border-radius: 16px;
    border-style: dashed;
    position: relative;
    background: #faf5ee;
}

.site-title {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: clamp(2rem, 6vw, 3rem);
    color: #3e2723;
    letter-spacing: 0.02em;
    margin-bottom: 0.25rem;
}

.tagline {
    font-family: "Caveat", cursive;
    font-weight: 400;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #795548;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

.hero-divider {
    width: 100%;
    height: 8px;
    opacity: 0.4;
    display: block;
}

/* --- Section Dividers --- */
.section-divider,
.card-divider,
.footer-divider {
    width: 100%;
    height: 8px;
    opacity: 0.4;
    display: block;
}

.section-divider {
    margin-bottom: 2rem;
}

/* --- Category Navigation --- */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.category-tag {
    font-family: "Caveat", cursive;
    font-weight: 400;
    font-size: 1.1rem;
    background: #e8e0f0;
    color: #3e2723;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.3rem 0.9rem;
    cursor: pointer;
    transform: rotate(calc(var(--tag-rotation, 0) * 1deg));
    white-space: nowrap;
}

.category-tag:hover {
    background: #dbd0e8;
}

.category-tag.active {
    background: #795548;
    color: #faf5ee;
    border-color: #3e2723;
}

/* --- Reviews Container --- */
.reviews-container {
    display: flex;
    flex-direction: column;
}

/* --- Review Card --- */
.review-card {
    padding: 2rem;
    background: #f8e8e0;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(62, 39, 35, 0.08);
    position: relative;
}

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

.review-header {
    margin-bottom: 0.75rem;
}

.review-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.review-title {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: clamp(1.4rem, 3.5vw, 1.8rem);
    color: #3e2723;
    line-height: 1.3;
    flex: 1;
}

/* --- Wax Seal Badge --- */
.wax-seal {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, #d32f2f, #b71c1c);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.seal-rating {
    font-family: "Karla", sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    color: #fff;
    line-height: 1;
}

/* --- Review Meta --- */
.review-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.meta-category,
.meta-author,
.meta-dot {
    font-family: "Karla", sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: #8d8d8d;
}

/* --- Star Rating --- */
.star-rating {
    display: flex;
    gap: 4px;
    margin-bottom: 0.75rem;
}

.star {
    display: inline-block;
    width: 16px;
    height: 16px;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.star.filled {
    background-color: #b71c1c;
}

.star.empty {
    background-color: #8d8d8d;
}

/* --- Review Body --- */
.review-body {
    font-family: "Merriweather", Georgia, serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.8;
    color: #3e2723;
    margin-bottom: 1rem;
}

/* --- Postmark Stamp --- */
.postmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border: 2px solid #795548;
    border-radius: 50%;
    position: relative;
    opacity: 0.2;
    transform: rotate(-12deg);
    float: right;
    margin-top: -0.5rem;
}

.postmark::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid #795548;
    border-radius: 50%;
}

.postmark-date {
    font-family: "Karla", sans-serif;
    font-weight: 500;
    font-size: 0.65rem;
    color: #795548;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1.2;
}

.card-divider {
    clear: both;
    margin-top: 0.75rem;
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 1rem 0 2rem;
    margin-top: 1rem;
}

.footer-divider {
    margin-bottom: 1.5rem;
}

.footer-text {
    font-family: "Caveat", cursive;
    font-weight: 400;
    font-size: 1.3rem;
    color: #795548;
    margin-bottom: 0.25rem;
}

.footer-year {
    font-family: "Karla", sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: #8d8d8d;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .page-wrapper {
        padding: 1rem;
    }

    .review-card {
        padding: 1.5rem;
    }

    .hero-frame {
        padding: 2rem 1.5rem 1.5rem;
    }

    .postmark {
        width: 60px;
        height: 60px;
    }

    .postmark-date {
        font-size: 0.55rem;
    }
}
