/* ========================================
   Jinta Vineyards & Wineary
   Bold Editorial Style
   Forest Green + Off-White Palette
======================================== */

/* CSS Custom Properties */
:root {
    --color-forest: #1a3c2a;
    --color-forest-light: #2d5a3f;
    --color-forest-dark: #0f2418;
    --color-off-white: #f8f6f1;
    --color-cream: #f0ebe3;
    --color-warm: #e8e2d6;
    --color-text: #1a1a1a;
    --color-text-light: #4a4a4a;
    --color-text-muted: #6b6b6b;
    --color-accent: #8b6914;
    --color-white: #ffffff;
    
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 8rem;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(26, 60, 42, 0.08);
    --shadow-md: 0 8px 30px rgba(26, 60, 42, 0.12);
    --shadow-lg: 0 20px 60px rgba(26, 60, 42, 0.15);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-off-white);
    overflow-x: hidden;
}

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

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

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

em {
    font-style: italic;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Section Base */
.section {
    padding: var(--space-2xl) 0;
}

.section-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-forest);
    margin-bottom: var(--space-sm);
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: var(--color-forest);
    margin-bottom: var(--space-md);
}

.lead {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 1rem 2.5rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: var(--color-forest-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background-color: var(--color-white);
    color: var(--color-forest);
    border-color: var(--color-white);
}

/* Header */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(248, 246, 241, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(26, 60, 42, 0.1);
    transition: var(--transition);
}

#main-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-serif {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-forest);
}

.logo-sans {
    font-family: var(--font-sans);
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

#main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
}

#main-nav a {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text);
    position: relative;
}

#main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-forest);
    transition: var(--transition);
}

#main-nav a:hover::after {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-forest);
    transition: var(--transition);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-forest);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-white);
    padding: var(--space-xs);
}

.mobile-menu ul {
    list-style: none;
    text-align: center;
}

.mobile-menu li {
    margin-bottom: var(--space-md);
}

.mobile-link {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--color-white);
    transition: var(--transition);
}

.mobile-link:hover {
    color: var(--color-cream);
}

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

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--color-forest-dark) 0%,
        var(--color-forest) 50%,
        var(--color-forest-light) 100%
    );
    opacity: 0.85;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 36, 24, 0.3) 0%,
        rgba(15, 36, 24, 0.6) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding-top: var(--space-xl);
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-md);
}

.hero-headline {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--space-md);
    line-height: 1;
}

.hero-headline em {
    font-style: italic;
    color: var(--color-cream);
}

.hero-headline .accent {
    display: block;
    font-size: 0.6em;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--color-accent);
}

.hero-subtext {
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-scroll svg {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(8px);
    }
    60% {
        transform: translateY(4px);
    }
}

/* About Section */
.about {
    background-color: var(--color-off-white);
}

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

.about-image-wrap {
    position: relative;
}

.about-image {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 4px;
}

.about-accent {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 200px;
    height: 200px;
    background-color: var(--color-cream);
    border-radius: 4px;
    z-index: -1;
}

.about-content {
    padding: var(--space-md);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-warm);
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-forest);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* Products Section */
.products {
    background-color: var(--color-cream);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

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

.product-card {
    background-color: var(--color-white);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
}

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

.product-image {
    height: 400px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: var(--space-md);
}

.product-info h3 {
    font-size: 1.75rem;
    color: var(--color-forest);
    margin-bottom: var(--space-sm);
}

.product-info p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text-light);
}

/* Bakery Section */
.bakery {
    background-color: var(--color-forest);
    color: var(--color-white);
}

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

.bakery-text .section-eyebrow {
    color: var(--color-cream);
}

.bakery-text .section-title {
    color: var(--color-white);
}

.bakery-text .lead {
    color: rgba(255, 255, 255, 0.8);
}

.bakery-features {
    list-style: none;
    margin-bottom: var(--space-lg);
}

.bakery-features li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.bakery-features svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

.bakery-image {
    position: relative;
}

.bakery-main {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 4px;
}

.bakery-secondary {
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 280px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
}

/* Features Section */
.features {
    background-color: var(--color-off-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.feature {
    text-align: center;
    padding: var(--space-md);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-cream);
    border-radius: 50%;
    color: var(--color-forest);
}

.feature h3 {
    font-size: 1.5rem;
    color: var(--color-forest);
    margin-bottom: var(--space-sm);
}

.feature p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text-light);
}

/* Visit Section */
.visit {
    background-color: var(--color-cream);
}

.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: stretch;
}

.visit-info {
    padding: var(--space-lg);
    background-color: var(--color-white);
    border-radius: 4px;
}

.contact-details {
    margin-top: var(--space-lg);
}

.contact-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-warm);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-forest);
    border-radius: 50%;
    color: var(--color-white);
    flex-shrink: 0;
}

.contact-text h4 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.contact-text p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
}

.contact-text a {
    color: var(--color-forest);
}

.contact-text a:hover {
    color: var(--color-forest-light);
    text-decoration: underline;
}

.visit-map {
    border-radius: 4px;
    overflow: hidden;
    min-height: 500px;
}

/* Footer */
.footer {
    background-color: var(--color-forest-dark);
    color: var(--color-white);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
    margin-bottom: var(--space-sm);
}

.footer-logo .logo-serif {
    font-size: 2rem;
}

.footer-logo .logo-sans {
    color: rgba(255, 255, 255, 0.6);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: var(--space-md);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: var(--color-white);
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

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

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

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Loader */
#loader {
    position: fixed;
    inset: 0;
    background-color: var(--color-forest-dark);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.loader-logo {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-white);
    display: block;
    margin-bottom: var(--space-sm);
}

.loader-line {
    width: 60px;
    height: 2px;
    background-color: var(--color-accent);
    margin: 0 auto;
    animation: loader-expand 1s ease-in-out infinite;
}

@keyframes loader-expand {
    0%, 100% {
        transform: scaleX(0.5);
        opacity: 0.5;
    }
    50% {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .about-grid,
    .bakery-content,
    .visit-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .about-image {
        height: 400px;
    }
    
    .bakery-main {
        height: 400px;
    }
    
    .bakery-secondary {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --space-xl: 4rem;
        --space-2xl: 5rem;
    }
    
    #main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-headline {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-sm);
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .visit-map {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
