/* ==========================================================================
   Domaće Pure — style.css
   Warm, natural farm palette: greens, earthy browns, warm gold, cream.
   Organized by section; colors and common values live in CSS variables.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens (color palette, type, spacing, effects)
   -------------------------------------------------------------------------- */
:root {
    /* Greens — fields and forest */
    --green-900: #1c2b1c;
    --green-800: #2d4a2d;
    --green-700: #3a5f3a;
    --green-600: #4a7c4a;
    --green-100: #e4ecdf;

    /* Earthy browns */
    --brown-900: #2e1d10;
    --brown-800: #3c2415;
    --brown-600: #5d4a32;

    /* Warm gold / straw */
    --gold-500: #d9a441;
    --gold-600: #c08a2d;
    --tan-300: #c8b89a;

    /* Creams */
    --cream-50: #faf7f0;
    --cream-100: #f5f0e4;
    --cream-200: #ede4d0;
    --white: #ffffff;

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

    /* Effects */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 8px rgba(46, 29, 16, 0.08);
    --shadow-md: 0 8px 24px rgba(46, 29, 16, 0.12);
    --shadow-lg: 0 20px 44px rgba(46, 29, 16, 0.18);
    --ease: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Layout */
    --container: 1200px;
    --section-y: clamp(64px, 9vw, 110px);
    --header-h: 72px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Anchored sections land below the fixed header */
section[id] {
    scroll-margin-top: calc(var(--header-h) + 12px);
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--brown-800);
    background-color: var(--cream-50);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--brown-800);
    line-height: 1.15;
    text-wrap: balance;
}

h2 {
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    font-weight: 600;
    margin-bottom: 20px;
}

/* Small uppercase kicker above headings */
.section-label {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-600);
    margin-bottom: 12px;
}

.section-label-center {
    text-align: center;
}

.section-label-dark {
    color: var(--gold-500);
}

/* --------------------------------------------------------------------------
   3. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: transform var(--ease), box-shadow var(--ease), background-color var(--ease), color var(--ease);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--green-800);
    color: var(--cream-50);
}

.btn-primary:hover {
    background: var(--green-700);
}

.btn-outline {
    border: 2px solid var(--green-800);
    color: var(--green-800);
}

.btn-outline:hover {
    background: var(--green-800);
    color: var(--cream-50);
}

.btn-facebook {
    background: var(--green-800);
    color: var(--cream-50);
}

.btn-facebook:hover {
    background: var(--green-700);
}

/* --------------------------------------------------------------------------
   4. Header & navigation
   -------------------------------------------------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(45, 74, 45, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(250, 247, 240, 0.12);
    z-index: 100;
}

.nav {
    height: var(--header-h);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--cream-50);
    text-decoration: none;
}

/* Cream badge so the dark logo mark stays visible on the green bar */
.logo-badge {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--cream-50);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.logo-badge img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 8px;
}

.nav-link {
    color: var(--cream-50);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 999px;
    transition: background-color var(--ease), color var(--ease);
}

.nav-link:hover {
    background: rgba(250, 247, 240, 0.14);
}

.nav-link-cta {
    background: var(--gold-500);
    color: var(--brown-900);
    font-weight: 600;
}

.nav-link-cta:hover {
    background: var(--gold-600);
    color: var(--brown-900);
}

/* Hamburger (pure CSS, checkbox toggle) — hidden on desktop */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle-label span {
    display: block;
    height: 2.5px;
    width: 100%;
    background: var(--cream-50);
    border-radius: 2px;
    transition: transform var(--ease), opacity var(--ease);
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
    padding: calc(var(--header-h) + clamp(48px, 8vw, 90px)) 0 clamp(56px, 8vw, 96px);
    background:
        radial-gradient(1100px 500px at 85% -10%, rgba(217, 164, 65, 0.16), transparent 60%),
        linear-gradient(160deg, var(--cream-100) 0%, var(--cream-200) 55%, var(--green-100) 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: clamp(40px, 5vw, 72px);
    align-items: center;
}

.hero-overline {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--green-600);
    margin-bottom: 14px;
}

.hero-content h1 {
    font-size: clamp(2.1rem, 4.4vw, 3.2rem);
    font-weight: 600;
    margin-bottom: 22px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--brown-600);
    margin-bottom: 32px;
    max-width: 54ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-image img {
    width: 100%;
    height: clamp(300px, 34vw, 440px);
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 6px solid var(--white);
}

/* --------------------------------------------------------------------------
   5b. Features (Zašto naše pure?)
   -------------------------------------------------------------------------- */
.features {
    padding: var(--section-y) 0;
    background: var(--cream-100);
}

.features-title {
    text-align: center;
    margin-bottom: 44px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--cream-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 34px 28px;
    text-align: center;
    transition: transform var(--ease), box-shadow var(--ease);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Emoji icon in a soft gold circle */
.feature-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(217, 164, 65, 0.16);
    font-size: 1.8rem;
    line-height: 1;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--brown-600);
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   6. Story (Naša Priča)
   -------------------------------------------------------------------------- */
.story {
    padding: var(--section-y) 0;
    background: var(--white);
}

.story-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: clamp(40px, 5vw, 72px);
    align-items: center;
}

.story-image img {
    width: 100%;
    height: clamp(300px, 30vw, 420px);
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--ease), box-shadow var(--ease);
}

.story-image img:hover {
    transform: scale(1.015);
    box-shadow: var(--shadow-lg);
}

.story-content p:not(.section-label) {
    font-size: 1.1rem;
    color: var(--brown-600);
    line-height: 1.8;
}

.story-content p + p {
    margin-top: 16px;
}

/* --------------------------------------------------------------------------
   7. Products (Naši Proizvodi)
   -------------------------------------------------------------------------- */
.products {
    padding: var(--section-y) 0;
    background: var(--cream-100);
}

.products-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: clamp(40px, 5vw, 72px);
    align-items: center;
}

.products-intro {
    font-size: 1.1rem;
    color: var(--brown-600);
    margin-bottom: 28px;
    max-width: 56ch;
}

.product-cards {
    display: grid;
    gap: 16px;
}

.product-card {
    background: var(--white);
    padding: 26px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--cream-200);
    border-top: 4px solid var(--gold-500);
    transition: transform var(--ease), box-shadow var(--ease);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.product-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-card p {
    font-size: 1rem;
    color: var(--brown-600);
}

.products-image img {
    width: 100%;
    height: clamp(340px, 34vw, 560px);
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--ease), box-shadow var(--ease);
}

.products-image img:hover {
    transform: scale(1.015);
    box-shadow: var(--shadow-lg);
}

/* --------------------------------------------------------------------------
   8. Gallery (Galerija)
   Local images for now. See the comment in index.html about wiring this
   to the farm's Facebook page later (Graph API or a third-party widget).
   -------------------------------------------------------------------------- */
.gallery {
    padding: var(--section-y) 0;
    background: var(--white);
}

.gallery h2 {
    text-align: center;
}

.gallery-intro {
    text-align: center;
    color: var(--brown-600);
    font-size: 1.1rem;
    max-width: 62ch;
    margin: 0 auto 44px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 16px;
}

/* Featured tiles span two columns for a lively, editorial rhythm */
.gallery-item-wide {
    grid-column: span 2;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin: 0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

/* Caption slides up over a soft green gradient on hover */
.gallery-item figcaption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 36px 16px 12px;
    color: var(--cream-50);
    font-size: 0.9rem;
    font-weight: 500;
    background: linear-gradient(to top, rgba(28, 43, 28, 0.78), transparent);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--ease), transform var(--ease);
}

.gallery-item:hover figcaption {
    opacity: 1;
    transform: translateY(0);
}

.gallery-cta {
    margin-top: 44px;
    text-align: center;
}

.gallery-cta p {
    color: var(--brown-600);
    margin-bottom: 18px;
}

/* --------------------------------------------------------------------------
   9. Contact (Kontakt)
   -------------------------------------------------------------------------- */
.contact {
    padding: var(--section-y) 0;
    background:
        radial-gradient(900px 420px at 15% 0%, rgba(217, 164, 65, 0.10), transparent 60%),
        var(--green-800);
}

.contact h2 {
    color: var(--cream-50);
    text-align: center;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--green-100);
    max-width: 700px;
    margin: 0 auto 48px;
    text-align: center;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    text-decoration: none;
    background: rgba(250, 247, 240, 0.07);
    border: 1px solid rgba(250, 247, 240, 0.16);
    border-radius: var(--radius-md);
    padding: 30px 22px;
    transition: transform var(--ease), background-color var(--ease), border-color var(--ease);
}

.contact-card:hover {
    transform: translateY(-4px);
    background: rgba(250, 247, 240, 0.12);
    border-color: var(--gold-500);
}

.contact-icon {
    font-size: 1.6rem;
    color: var(--gold-500);
    margin-bottom: 6px;
    line-height: 1;
}

.contact-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cream-50);
}

.contact-card-text {
    color: var(--green-100);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.footer {
    background: var(--green-900);
    color: var(--tan-300);
    padding: 28px 0;
    text-align: center;
}

.footer p {
    font-size: 0.875rem;
}

.footer-tagline {
    color: var(--cream-100);
    margin-bottom: 4px;
}

/* --------------------------------------------------------------------------
   11. Responsive — tablet (≤ 900px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .hero .container,
    .story-grid,
    .products-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hero-content {
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    /* Text reads first on mobile: image drops below the story text */
    .story-image {
        order: 2;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    .contact-cards {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    /* --- Mobile navigation --- */
    .nav-toggle-label {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        background: var(--green-800);
        padding: 12px 24px 20px;
        border-bottom: 1px solid rgba(250, 247, 240, 0.12);
        box-shadow: var(--shadow-md);

        /* closed state */
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
    }

    .nav-toggle:checked ~ .nav-menu {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-link {
        display: block;
        text-align: center;
        padding: 12px 16px;
    }

    /* Hamburger morphs into an X when open */
    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }

    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }
}

/* --------------------------------------------------------------------------
   12. Responsive — phone (≤ 560px)
   -------------------------------------------------------------------------- */
@media (max-width: 560px) {
    .container {
        padding: 0 18px;
    }

    .brand-text {
        font-size: 1.15rem;
    }

    .hero-image img {
        height: 260px;
        border-width: 4px;
    }

    .story-image img,
    .products-image img {
        height: 260px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
    }

    .gallery-item-wide {
        grid-column: span 1;
    }

    .product-card {
        padding: 26px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
