/* ==========================================================================
   Sita — Natural Tanning & Primitive Skills
   Earthy / organic palette, serif headings, clean layout
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
    /* Palette */
    --color-cream:      #F5F0E8;
    --color-tan:        #C8A96E;
    --color-tan-light:  #DCC9A0;
    --color-bark:       #3B2A1A;
    --color-bark-mid:   #5C3D24;
    --color-sage:       #7A8B6F;
    --color-sage-light: #A3B299;
    --color-ember:      #B85C38;
    --color-white:      #FFFCF7;
    --color-text:       #2E2017;
    --color-text-muted: #6B5D50;

    /* Typography */
    --font-heading: "Lora", 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.125rem;
    --fs-lg:   1.5rem;
    --fs-xl:   2rem;
    --fs-2xl:  2.75rem;
    --fs-3xl:  3.5rem;

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

    /* Layout */
    --container-max: 1120px;
    --container-narrow: 760px;
    --radius: 6px;
    --transition: 0.25s ease;
}

/* ---------- Base ---------- */
body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--color-text);
    background-color: var(--color-cream);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-bark);
}

a {
    transition: color var(--transition);
}

/* ---------- 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);
    margin-bottom: var(--space-md);
}

.page-intro {
    font-size: var(--fs-md);
    color: var(--color-text-muted);
    max-width: 620px;
    margin-bottom: var(--space-lg);
}

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

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

.btn-primary:hover {
    background-color: var(--color-bark-mid);
}

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

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

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

.site-logo-mark {
    display: block;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--color-bark);
}

/* 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-bark);
    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-text-muted);
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

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

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

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

.lang-link:hover {
    color: var(--color-bark);
    background-color: var(--color-tan-light);
}

.lang-link.active {
    color: var(--color-white);
    background-color: var(--color-ember);
}

/* ---------- Hero ---------- */
.hero {
    background-color: var(--color-bark);
    background-image:
        linear-gradient(rgba(46, 32, 23, 0.45), rgba(46, 32, 23, 0.68)),
        url("../images/hero.jpg");
    background-size: cover;
    background-position: center 60%;
    color: var(--color-cream);
    padding-block: var(--space-2xl);
    text-align: center;
}

.hero-heading {
    font-size: var(--fs-2xl);
    color: var(--color-cream);
    margin-bottom: var(--space-sm);
    max-width: 700px;
    margin-inline: auto;
}

.hero-subtitle {
    font-size: var(--fs-md);
    color: var(--color-tan-light);
    max-width: 560px;
    margin-inline: auto;
    margin-bottom: var(--space-lg);
}

/* ---------- Intro ---------- */
.intro .section-heading {
    text-align: center;
}

.intro-body {
    max-width: 620px;
    margin-inline: auto;
    font-size: var(--fs-md);
    line-height: 1.8;
    color: var(--color-text-muted);
}

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

.intro-body p:last-child {
    margin-bottom: 0;
}

.intro-body p:first-child {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    line-height: 1.5;
    color: var(--color-bark);
}

/* ---------- Showcase grid (home) ---------- */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.showcase-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-tan-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

.showcase-card:hover {
    box-shadow: 0 6px 24px rgba(59, 42, 26, 0.10);
    transform: translateY(-2px);
}

.showcase-card-body {
    padding: var(--space-sm) var(--space-md) var(--space-md);
    text-align: center;
}

.showcase-card-title {
    font-size: var(--fs-md);
    margin-bottom: 2px;
}

.showcase-card-price {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-bark);
    margin-bottom: var(--space-xs);
}

.showcase-card-link {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-ember);
}

.showcase-card-link:hover {
    color: var(--color-bark-mid);
}

/* ---------- Carousel ---------- */
.carousel {
    position: relative;
    background-color: var(--color-cream);
}

.carousel-viewport {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.carousel-viewport::-webkit-scrollbar {
    display: none;
}

.carousel-track {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
}

.carousel-slide img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    filter: sepia(0.1) saturate(0.95);
    cursor: zoom-in;
}

/* Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: rgba(255, 252, 247, 0.82);
    color: var(--color-bark);
    border: 1px solid var(--color-tan-light);
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition), background-color var(--transition);
    z-index: 2;
}

.carousel-arrow--prev { left: var(--space-xs); }
.carousel-arrow--next { right: var(--space-xs); }

.carousel:hover .carousel-arrow,
.carousel:focus-within .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background-color: var(--color-white);
}

.carousel-arrow[disabled] {
    opacity: 0 !important;
    cursor: default;
}

/* Dots */
.carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--space-xs);
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 2;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: rgba(255, 252, 247, 0.55);
    box-shadow: 0 0 0 1px rgba(46, 32, 23, 0.3);
    cursor: pointer;
    transition: background-color var(--transition), transform var(--transition);
}

.carousel-dot.is-active {
    background-color: var(--color-white);
    transform: scale(1.3);
}

/* Touch devices: arrows can't be hovered, so keep them visible */
@media (hover: none) {
    .carousel-arrow { opacity: 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);
    overflow: hidden;
    border: 1px solid var(--color-tan-light);
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: 0 4px 20px rgba(59, 42, 26, 0.08);
}

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

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

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

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

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

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

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

.card-link {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-ember);
}

.card-link:hover {
    color: var(--color-bark-mid);
}

.product-price {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--color-bark);
}

/* ---------- Product feature (products page) ---------- */
.product-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
}

.product-feature {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.product-feature-media {
    border: 1px solid var(--color-tan-light);
    border-radius: var(--radius);
    overflow: hidden;
}

.product-feature-title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-xs);
}

.product-feature-tagline {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: var(--fs-md);
    color: var(--color-ember);
    margin-bottom: var(--space-md);
}

.product-feature-text p {
    color: var(--color-text-muted);
    line-height: 1.75;
    margin-bottom: var(--space-sm);
}

.product-feature .product-price {
    margin-top: var(--space-sm);
}

.product-contact-btn {
    margin-top: var(--space-md);
}

/* Sizes block */
.product-sizes {
    margin-bottom: var(--space-md);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-tan-light);
}

.product-sizes-heading {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.product-sizes-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    list-style: none;
    margin-bottom: var(--space-sm);
}

.product-sizes-list li {
    font-size: var(--fs-sm);
    color: var(--color-text);
    background-color: var(--color-cream);
    border: 1px solid var(--color-tan-light);
    border-radius: var(--radius);
    padding: 3px 10px;
}

.product-sizes-note {
    font-size: var(--fs-sm);
    line-height: 1.6;
    color: var(--color-text-muted);
}

.product-price-note {
    font-size: var(--fs-sm);
    line-height: 1.6;
    color: var(--color-text-muted);
    margin-top: 2px;
    max-width: 46ch;
}

/* Alternate image / text sides for rhythm on wider screens */
@media (min-width: 769px) {
    .product-feature:nth-child(even) .product-feature-media {
        order: 2;
    }
}

@media (max-width: 768px) {
    .product-feature {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

/* ---------- Info page ---------- */
.info-body h2:first-child {
    margin-top: 0;
}

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

.back-link:hover {
    color: var(--color-bark-mid);
}

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

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

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

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

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

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

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

.prose h3 {
    font-size: var(--fs-lg);
    margin-top: var(--space-md);
    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: 3px solid var(--color-tan);
    padding-left: var(--space-md);
    color: var(--color-text-muted);
    font-style: italic;
    margin-bottom: var(--space-md);
}

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

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

/* ---------- Contact ---------- */
.contact-info .section-heading {
    margin-top: 0;
}

.contact-email-line {
    margin-top: var(--space-lg);
    text-align: center;
}

.contact-portrait {
    margin: var(--space-xl) auto 0;
    max-width: 320px;
}

.contact-portrait img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.contact-email {
    font-size: var(--fs-lg);
    color: var(--color-ember);
    transition: color 0.2s ease;
}

.contact-email:hover,
.contact-email:focus {
    color: var(--color-bark-mid);
}

/* ---------- Footer ---------- */
.site-footer {
    background-color: var(--color-bark);
    padding-block: var(--space-md);
    margin-top: var(--space-2xl);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.footer-copy {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

/* ---------- Lightbox ---------- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(46, 32, 23, 0.92);
    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-cream);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

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

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    background-color: rgba(245, 240, 232, 0.12);
    color: var(--color-cream);
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--transition);
}

.lightbox-nav:hover {
    background-color: rgba(245, 240, 232, 0.28);
}

.lightbox-nav[hidden] {
    display: none;
}

.lightbox-prev { left: var(--space-md); }
.lightbox-next { right: var(--space-md); }

.lightbox-count {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--space-md);
    text-align: center;
    color: var(--color-tan-light);
    font-size: var(--fs-sm);
    letter-spacing: 0.05em;
}

.lightbox-count[hidden] {
    display: none;
}

@media (max-width: 768px) {
    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.6rem;
    }
    .lightbox-prev { left: var(--space-xs); }
    .lightbox-next { right: var(--space-xs); }
}

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

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

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

    /* Compact header: show only the logo (the name lives inside the seal).
       Keep the wordmark for screen readers, just hidden visually. */
    .logo-text {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
    }

    .site-logo-mark {
        width: 52px;
        height: 52px;
    }

    .nav-toggle {
        display: flex;
        order: 3;
        margin-left: var(--space-sm);
    }

    /* Group the language picker + toggle together on the right */
    .lang-switcher {
        order: 2;
        margin-left: auto;
    }

    .site-nav {
        position: fixed;
        top: 64px;
        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);
}
