/* BubblyGuide Custom Styles */
/* Authentic, distinctive, friendly but authoritative design */

/* Natural color palette variables */
:root {
    --terroir-50: #fbf8f3;
    --terroir-100: #f5efe4;
    --terroir-200: #ebe1cf;
    --terroir-300: #dccbae;
    --terroir-400: #c4ab85;
    --terroir-500: #a88d66;
    --terroir-600: #86704f;
    --terroir-700: #6b5940;
    --terroir-800: #544634;
    --terroir-900: #3f3528;
    
    --wine-50: #fbf4f5;
    --wine-100: #f5e6e9;
    --wine-200: #e9c8cf;
    --wine-300: #d6a0ab;
    --wine-400: #b86f7f;
    --wine-500: #94485b;
    --wine-600: #7a3446;
    --wine-700: #66283a;
    --wine-800: #521f2f;
    --wine-900: #3d1622;

    --gold-300: #d9bc7a;
    --gold-500: #b38a43;
    
    --earth-50: #faf8f6;
    --earth-100: #f4f0eb;
    --earth-200: #e8dfd3;
    --earth-300: #d6c5b1;
    --earth-400: #c0a689;
    --earth-500: #a88b6f;
    --earth-600: #93755a;
    --earth-700: #785f4b;
    --earth-800: #644f40;
    --earth-900: #2a221d;
    
    --sage-50: #f6f7f4;
    --sage-100: #eaede5;
    --sage-200: #d5dcc9;
    --sage-300: #b6c2a3;
    --sage-400: #95a57c;
    --sage-500: #788a5f;
    --sage-600: #5d6d4a;
    --sage-700: #4a563c;
    --sage-800: #3e4633;
    --sage-900: #363c2d;
}

/* Base typography - authoritative yet friendly */
body {
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings - distinctive and authoritative */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--earth-900);
}

/* The logo: BubblyGuide in a calligraphic script */
.logo {
    font-family: 'Parisienne', cursive;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
}

/* Small capitals label above headings */
.eyebrow {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* Thin gold rule used under section headings */
.rule {
    width: 3rem;
    height: 1px;
    background: var(--gold-500);
}

/* Display text - elegant and distinctive */
.display-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Line clamp utilities for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility - natural wine color */
*:focus {
    outline: 2px solid var(--wine-600);
    outline-offset: 2px;
    border-radius: 2px;
}

/* HTMX loading states */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Custom animations - subtle and natural */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Natural texture overlay for depth */
.texture-overlay {
    position: relative;
}

.texture-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0,0,0,0.02) 1px, transparent 0);
    background-size: 20px 20px;
    pointer-events: none;
    opacity: 0.5;
}

/* Card styles - hairline border, lifts slightly on hover */
.card {
    background: white;
    border: 1px solid var(--terroir-200);
    border-radius: 4px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    border-color: var(--terroir-300);
    box-shadow: 0 8px 24px -12px rgba(42, 34, 29, 0.18);
}

/* Button styles - friendly but authoritative */
.btn-primary {
    background: var(--wine-700);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--wine-800);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(142, 29, 58, 0.25);
}

.btn-secondary {
    background: var(--terroir-100);
    color: var(--earth-800);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--terroir-300);
}

.btn-secondary:hover {
    background: var(--terroir-200);
    border-color: var(--terroir-400);
}

/* Badge styles - natural colors */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-grower {
    background: var(--sage-100);
    color: var(--sage-700);
}

.badge-premium {
    background: var(--amber-100);
    color: var(--amber-800);
}

/* Link styles - friendly but clear */
a {
    color: var(--wine-700);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--wine-800);
}

/* Form inputs - natural, clean */
input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
    border: 1px solid var(--terroir-300);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--wine-600);
    box-shadow: 0 0 0 3px rgba(122, 52, 70, 0.12);
}

/* Separator - natural divider */
.separator {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--terroir-300), transparent);
    margin: 2rem 0;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Responsive typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* Accessibility - high contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --wine-700: #521f2f;
        --earth-900: #1a1a1a;
    }
}

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