/* ==========================================================================
   L'artisane sauvage — Natural Tanning & Primitive Skills
   Forest & parchment · ancient memory · gentle warmth
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
    /* Palette — forest green, warm earth & parchment */
    --color-parchment:     #F7F2EA;
    --color-linen:         #F0E9DE;
    --color-bone:          #E4DCD0;
    --color-leather:       #B8956A;
    --color-leather-light: #D4BC96;
    --color-walnut:        #2C1810;
    --color-bark:          #5C4535;
    --color-sage:          #6B8F71;
    --color-sage-dark:     #4A6E4F;
    --color-sage-light:    #A3C2A5;
    --color-forest:        #2D4A30;
    --color-moss:          #3D5A3E;
    --color-smoke:         #7A6B5D;
    --color-charcoal:      #1A2418;
    --color-white:         #FDFBF6;
    --color-text:          #2C1810;
    --color-text-muted:    #7A6B5D;

    /* Typography */
    --font-heading: "Cormorant Garant", Georgia, "Times New Roman", serif;
    --font-body:    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --fs-xs:   0.75rem;
    --fs-sm:   0.875rem;
    --fs-base: 1rem;
    --fs-md:   1.0625rem;
    --fs-lg:   1.375rem;
    --fs-xl:   1.875rem;
    --fs-2xl:  2.75rem;
    --fs-3xl:  3.75rem;

    /* Spacing */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  1.5rem;
    --space-lg:  2.5rem;
    --space-xl:  4rem;
    --space-2xl: 7rem;

    /* Layout */
    --container-max: 1100px;
    --container-narrow: 720px;
    --radius: 3px;
    --radius-lg: 6px;
    --transition: 0.3s ease;
}

/* ---------- Base ---------- */
body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-parchment);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--color-walnut);
    line-height: 1.15;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ---------- Utilities ---------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-md);
}

.container-narrow {
    max-width: var(--container-narrow);
}

.section {
    padding-block: var(--space-xl);
}

.section-heading {
    font-size: var(--fs-xl);
    font-weight: 600;
    margin-bottom: var(--space-md);
    letter-spacing: 0.01em;
}

.page-intro {
    font-size: var(--fs-md);
    color: var(--color-smoke);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--fs-sm);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background-color var(--transition), color var(--transition), transform var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-sage);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-sage-dark);
    transform: translateY(-1px);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-bone);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--color-walnut);
    letter-spacing: 0.01em;
}

/* Nav toggle (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-walnut);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

/* Nav */
.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

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

.nav-link {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--color-smoke);
    padding-bottom: 2px;
    border-bottom: 1.5px solid transparent;
    transition: color var(--transition), border-color var(--transition);
    letter-spacing: 0.02em;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-walnut);
    border-bottom-color: var(--color-sage);
}

.lang-switcher {
    display: flex;
    gap: var(--space-xs);
}

.lang-link {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-smoke);
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.04em;
    transition: color var(--transition), background-color var(--transition);
}

.lang-link:hover {
    color: var(--color-forest);
    background-color: var(--color-sage-light);
}

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(170deg, #1A1A12 0%, var(--color-forest) 40%, var(--color-bark) 100%);
    color: var(--color-parchment);
    padding-block: var(--space-2xl);
    text-align: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--color-leather) 30%, var(--color-leather) 70%, transparent 100%);
}

.hero-heading {
    font-size: var(--fs-3xl);
    font-weight: 500;
    font-style: italic;
    color: var(--color-parchment);
    margin-bottom: var(--space-md);
    max-width: 720px;
    margin-inline: auto;
    letter-spacing: 0.01em;
    animation: fadeUp 0.9s ease both;
}

.hero-subtitle {
    font-size: var(--fs-md);
    color: var(--color-sage-light);
    max-width: 540px;
    margin-inline: auto;
    margin-bottom: var(--space-lg);
    line-height: 1.7;
    animation: fadeUp 0.9s ease 0.15s both;
}

.hero-subtitle::after {
    content: '';
    display: block;
    width: 50px;
    height: 1px;
    background-color: var(--color-leather);
    margin: var(--space-lg) auto 0;
}

.hero .btn {
    animation: fadeUp 0.9s ease 0.3s both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Intro ---------- */
.intro {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-bone);
}

.intro .section-heading {
    font-size: var(--fs-2xl);
    font-weight: 400;
    margin-bottom: var(--space-md);
}

.intro-body {
    max-width: 660px;
    font-size: var(--fs-md);
    line-height: 1.85;
    color: var(--color-smoke);
}

/* ---------- Showcase grid ---------- */
.showcase .section-heading {
    font-size: var(--fs-2xl);
    font-weight: 400;
    text-align: center;
    margin-bottom: var(--space-lg);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
}

.showcase-item {
    overflow: hidden;
    border-radius: var(--radius-lg);
    position: relative;
}

.showcase-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    cursor: pointer;
    filter: sepia(0.15) saturate(0.9) brightness(0.95);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.showcase-img:hover {
    transform: scale(1.04);
    filter: sepia(0.03) saturate(1.05) brightness(1);
}

/* ---------- Card grid ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(44, 24, 16, 0.06), 0 1px 2px rgba(44, 24, 16, 0.04);
    transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    box-shadow: 0 8px 30px rgba(44, 24, 16, 0.1), 0 2px 8px rgba(44, 24, 16, 0.06);
    transform: translateY(-3px);
}

.card-image img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    filter: sepia(0.1) saturate(0.9);
    transition: filter 0.5s ease;
}

.card:hover .card-image img {
    filter: sepia(0.02) saturate(1.05);
}

.card-body {
    padding: var(--space-md);
}

.card-title {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.card-title a {
    color: var(--color-walnut);
}

.card-title a:hover {
    color: var(--color-sage-dark);
}

.card-date {
    display: block;
    font-size: var(--fs-xs);
    color: var(--color-smoke);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-xs);
}

.card-text {
    font-size: var(--fs-sm);
    color: var(--color-smoke);
    line-height: 1.65;
    margin-bottom: var(--space-sm);
}

.card-link {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-sage);
    letter-spacing: 0.02em;
    transition: color var(--transition);
}

.card-link:hover {
    color: var(--color-sage-dark);
}

.product-price {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--color-walnut);
    margin-top: var(--space-xs);
}

/* ---------- Blog post ---------- */
.back-link {
    display: inline-block;
    font-size: var(--fs-sm);
    color: var(--color-sage);
    font-weight: 600;
    margin-bottom: var(--space-md);
    letter-spacing: 0.02em;
}

.back-link:hover {
    color: var(--color-sage-dark);
}

.post-header {
    margin-bottom: var(--space-lg);
}

.post-date {
    display: block;
    font-size: var(--fs-xs);
    color: var(--color-smoke);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-xs);
}

.post-title {
    font-size: var(--fs-2xl);
    font-weight: 400;
}

.post-hero {
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.post-hero img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    filter: sepia(0.1) saturate(0.9);
}

/* Prose (rendered Markdown) */
.prose {
    font-size: var(--fs-md);
    line-height: 1.85;
    color: var(--color-text);
}

.prose h2 {
    font-size: var(--fs-xl);
    font-weight: 500;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.prose h3 {
    font-size: var(--fs-lg);
    font-weight: 600;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-xs);
}

.prose p {
    margin-bottom: var(--space-md);
}

.prose ul, .prose ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-md);
}

.prose ul {
    list-style: disc;
}

.prose ol {
    list-style: decimal;
}

.prose li {
    margin-bottom: var(--space-xs);
}

.prose blockquote {
    border-left: 2px solid var(--color-sage-light);
    padding-left: var(--space-md);
    color: var(--color-smoke);
    font-style: italic;
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    margin-bottom: var(--space-md);
    line-height: 1.6;
}

.prose img {
    border-radius: var(--radius-lg);
    margin-block: var(--space-md);
}

.post-footer {
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-bone);
}

/* ---------- Footer ---------- */
.site-footer {
    background: linear-gradient(175deg, var(--color-moss) 0%, var(--color-walnut) 100%);
    color: var(--color-sage-light);
    padding-block: var(--space-xl);
    margin-top: var(--space-xl);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--color-leather) 30%, var(--color-leather) 70%, transparent 100%);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: var(--space-lg);
    align-items: start;
}

.footer-brand .logo-text {
    color: var(--color-parchment);
    font-size: var(--fs-lg);
}

.footer-tagline {
    font-size: var(--fs-sm);
    color: var(--color-sage-light);
    margin-top: var(--space-xs);
    font-style: italic;
    font-family: var(--font-heading);
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.footer-nav a {
    font-size: var(--fs-sm);
    color: var(--color-sage-light);
    transition: color var(--transition);
}

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

.footer-contact p {
    font-size: var(--fs-sm);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-parchment);
}

.footer-contact a {
    font-size: var(--fs-sm);
    color: var(--color-leather);
    transition: color var(--transition);
}

.footer-contact a:hover {
    color: var(--color-parchment);
}

.footer-copy {
    grid-column: 1 / -1;
    font-size: var(--fs-xs);
    color: var(--color-smoke);
    border-top: 1px solid rgba(163, 194, 165, 0.15);
    padding-top: var(--space-md);
    margin-top: var(--space-md);
}

/* ---------- Lightbox ---------- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(26, 36, 24, 0.94);
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.lightbox.is-open {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    color: var(--color-parchment);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: opacity var(--transition);
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

/* ---------- Page header (products, blog) ---------- */
.page-header {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-bone);
    padding-block: var(--space-lg);
}

.page-header .section-heading {
    font-size: var(--fs-2xl);
    font-weight: 400;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    :root {
        --fs-2xl: 2rem;
        --fs-3xl: 2.5rem;
    }

    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
        padding: var(--space-lg) var(--space-md);
        background-color: var(--color-white);
        transform: translateX(100%);
        transition: transform var(--transition);
        z-index: 99;
    }

    .site-nav.is-open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .nav-link {
        font-size: var(--fs-lg);
    }

    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-block: var(--space-xl);
    }
}

/* Animating the hamburger when open */
.nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
