/* ========================================
   Crystal Basin Cellars — Style System
   ======================================== */

/* CSS Custom Properties */
:root {
    --color-burgundy: #722F37;
    --color-burgundy-dark: #5A252C;
    --color-burgundy-light: #8B3A42;
    --color-blush: #F4E4E1;
    --color-blush-light: #FAF5F4;
    --color-blush-dark: #E8D5D0;
    --color-cream: #FDF8F7;
    --color-charcoal: #2C2426;
    --color-warm-gray: #6B5E60;
    --color-light-gray: #B8A8A9;
    --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: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    --space-4xl: 8rem;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    
    --shadow-sm: 0 2px 8px rgba(114, 47, 55, 0.08);
    --shadow-md: 0 4px 20px rgba(114, 47, 55, 0.12);
    --shadow-lg: 0 8px 40px rgba(114, 47, 55, 0.16);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

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

body {
    font-family: var(--font-sans);
    color: var(--color-charcoal);
    background-color: var(--color-cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

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

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.15;
    color: var(--color-burgundy);
}

em {
    font-style: italic;
    color: var(--color-burgundy-light);
}

/* Section Labels */
.section-label {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-burgundy);
    margin-bottom: var(--space-sm);
    position: relative;
    padding-left: 2rem;
}

.section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1px;
    background: var(--color-burgundy);
}

/* Section Titles */
.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 300;
    margin-bottom: var(--space-lg);
    color: var(--color-burgundy);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-warm-gray);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.875rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    transition: all var(--transition-normal);
    text-transform: uppercase;
}

.btn-primary {
    background: var(--color-burgundy);
    color: var(--color-white);
    border: 2px solid var(--color-burgundy);
}

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

.btn-secondary {
    background: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-secondary:hover {
    background: var(--color-white);
    color: var(--color-burgundy);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 248, 247, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(114, 47, 55, 0.1);
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-burgundy);
}

.nav-logo:hover {
    color: var(--color-burgundy-dark);
}

.logo-icon {
    color: var(--color-burgundy);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--color-charcoal);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-burgundy);
    transition: width var(--transition-normal);
}

.nav-link:hover {
    color: var(--color-burgundy);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 0.5rem 1.25rem;
    background: var(--color-burgundy);
    color: var(--color-white) !important;
    border-radius: var(--radius-sm);
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    background: var(--color-burgundy-dark);
    color: var(--color-white) !important;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-xs);
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-burgundy);
    transition: all var(--transition-normal);
}

.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-burgundy);
    transition: all var(--transition-normal);
}

.hamburger.active {
    background: transparent;
}

.hamburger.active::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active::after {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: 
        linear-gradient(
            135deg,
            rgba(114, 47, 55, 0.85) 0%,
            rgba(90, 37, 44, 0.9) 50%,
            rgba(114, 47, 55, 0.85) 100%
        ),
        url('https://images.pexels.com/photos/31484078/pexels-photo-31484078.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1920&h=1080') center/cover no-repeat;
    padding: var(--space-4xl) var(--space-lg);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(44, 36, 38, 0.3) 0%,
        rgba(44, 36, 38, 0.1) 50%,
        rgba(44, 36, 38, 0.4) 100%
    );
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-blush);
    margin-bottom: var(--space-lg);
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 300;
    line-height: 1.1;
    color: var(--color-white);
    margin-bottom: var(--space-lg);
}

.headline-line {
    display: block;
}

.headline-line:not(:last-child) {
    margin-bottom: var(--space-xs);
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--color-blush);
    max-width: 550px;
    margin: 0 auto var(--space-xl);
    line-height: 1.8;
}

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

.hero-scroll {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-blush);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ========================================
   About Section
   ======================================== */
.about {
    padding: var(--space-4xl) 0;
    background: var(--color-cream);
}

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

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

.about-image-wrapper img {
    width: 100%;
    height: 750px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.about-image-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 200px;
    height: 200px;
    background: var(--color-blush);
    border-radius: var(--radius-md);
    z-index: -1;
}

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

.about-content p {
    font-size: 1.05rem;
    color: var(--color-warm-gray);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.value-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.value-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-blush);
    border-radius: var(--radius-md);
    color: var(--color-burgundy);
    flex-shrink: 0;
}

.value-item span:last-child {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--color-charcoal);
}

/* ========================================
   Products Section
   ======================================== */
.products {
    padding: var(--space-4xl) 0;
    background: var(--color-blush-light);
}

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

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

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

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

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

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

.product-info h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-burgundy);
    margin-bottom: var(--space-sm);
}

.product-info p {
    font-size: 0.95rem;
    color: var(--color-warm-gray);
    line-height: 1.7;
}

/* ========================================
   Gallery Section
   ======================================== */
.gallery {
    padding: var(--space-4xl) 0;
    background: var(--color-cream);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: var(--space-md);
    margin-top: var(--space-3xl);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    cursor: pointer;
}

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

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(114, 47, 55, 0.8) 0%,
        rgba(114, 47, 55, 0) 60%
    );
    display: flex;
    align-items: flex-end;
    padding: var(--space-lg);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--color-white);
    font-style: italic;
}

/* ========================================
   Visit Section
   ======================================== */
.visit {
    padding: var(--space-4xl) 0;
    background: var(--color-blush);
}

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

.visit-info {
    padding: var(--space-xl) 0;
}

.visit-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    margin: var(--space-xl) 0;
}

.visit-detail {
    display: flex;
    gap: var(--space-md);
}

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

.detail-content h4 {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-burgundy);
    margin-bottom: var(--space-xs);
}

.detail-content p {
    font-size: 0.95rem;
    color: var(--color-warm-gray);
    line-height: 1.6;
}

.detail-content a {
    color: var(--color-burgundy);
    transition: color var(--transition-fast);
}

.detail-content a:hover {
    color: var(--color-burgundy-dark);
    text-decoration: underline;
}

.visit-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 450px;
    box-shadow: var(--shadow-md);
}

.visit-map iframe {
    width: 100%;
    height: 100%;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    padding: var(--space-4xl) 0;
    background: var(--color-cream);
}

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

.contact-content p {
    font-size: 1.05rem;
    color: var(--color-warm-gray);
    line-height: 1.8;
}

.contact-form-wrapper {
    background: var(--color-white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-burgundy);
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--color-charcoal);
    background: var(--color-blush-light);
    border: 1px solid var(--color-blush-dark);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-burgundy);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-light-gray);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    text-align: center;
    padding: var(--space-2xl);
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    color: var(--color-burgundy);
}

.form-success h3 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    color: var(--color-burgundy);
    margin-bottom: var(--space-sm);
}

.form-success p {
    color: var(--color-warm-gray);
    line-height: 1.6;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--color-charcoal);
    color: var(--color-blush);
    padding: var(--space-3xl) 0 var(--space-lg);
}

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

.footer-brand p {
    color: var(--color-light-gray);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: var(--space-md);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-blush);
}

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

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

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links a {
    color: var(--color-light-gray);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

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

.footer-contact p {
    color: var(--color-light-gray);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-contact a {
    color: var(--color-light-gray);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    border-top: 1px solid rgba(244, 228, 225, 0.1);
    padding-top: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.footer-bottom p {
    color: var(--color-light-gray);
    font-size: 0.8rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .about-grid,
    .visit-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .about-image-wrapper img {
        height: 500px;
    }

    .about-image-accent {
        display: none;
    }

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

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

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

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

@media (max-width: 768px) {
    :root {
        --space-4xl: 5rem;
        --space-3xl: 4rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--color-cream);
        flex-direction: column;
        justify-content: center;
        gap: var(--space-xl);
        padding: var(--space-2xl);
        box-shadow: var(--shadow-lg);
        transition: right var(--transition-normal);
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-headline {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

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

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

    .gallery-item {
        height: 250px;
    }

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

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

    .section-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

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

    .contact-form-wrapper {
        padding: var(--space-md);
    }
}

/* ========================================
   Accessibility & Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .product-card,
    .gallery-item {
        will-change: transform;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-burgundy);
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    background: var(--color-burgundy);
    color: var(--color-white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    z-index: 10000;
    font-size: 0.875rem;
}

.skip-link:focus {
    top: var(--space-md);
}
