/* WineDB Design System & Luxury Sommelier Aesthetics */
:root {
    --bg-dark: #0c0a0e;
    --bg-card: rgba(22, 18, 25, 0.7);
    --bg-card-hover: rgba(35, 28, 40, 0.85);
    --border-glass: rgba(212, 175, 55, 0.18);
    --border-glass-hover: rgba(212, 175, 55, 0.45);
    
    --color-primary: #800020; /* Deep Burgundy */
    --color-primary-light: #a81c40;
    --color-gold: #d4af37; /* Luxury Gold */
    --color-gold-light: #f3e5ab;
    
    --text-main: #f5f0f2;
    --text-muted: #a69b9e;
    --text-dark: #120e14;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Playfair Display', serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --shadow-glass: 0 16px 40px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 25px rgba(212, 175, 55, 0.25);
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Glow Orbs */
.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-burgundy {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #800020 0%, transparent 70%);
    top: -150px;
    left: -150px;
}

.orb-gold {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #d4af37 0%, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-delay: -9s;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, 120px) scale(1.15); }
}

/* Glassmorphism Panel Utility */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: var(--shadow-glass);
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: var(--border-glass-hover);
}

/* Typography & Gradients */
.text-gradient-gold {
    background: linear-gradient(135deg, #f3e5ab 0%, #d4af37 50%, #aa820a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gold {
    color: var(--color-gold);
}

.inline-code {
    font-family: var(--font-mono);
    background: rgba(212, 175, 55, 0.12);
    color: var(--color-gold-light);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.88em;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(12, 10, 14, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.logo-icon {
    font-size: 1.6rem;
}

.accent-gold {
    color: var(--color-gold);
}

.badge-version {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    background: rgba(128, 0, 32, 0.6);
    color: #ffd1dc;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--color-gold);
}

.btn-nav-download {
    background: linear-gradient(135deg, var(--color-gold) 0%, #aa820a 100%);
    color: var(--text-dark) !important;
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.btn-nav-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Hero Section */
.hero-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 6rem 2rem 5rem;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(128, 0, 32, 0.35);
    border: 1px solid rgba(212, 175, 55, 0.35);
    padding: 0.45rem 1.1rem;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-gold-light);
    margin-bottom: 2rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #ff3864;
    border-radius: 50%;
    box-shadow: 0 0 10px #ff3864;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    max-width: 780px;
    margin: 0 auto 2.8rem;
    font-size: 1.18rem;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 4.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.8rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #a81c40 100%);
    color: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 8px 25px rgba(128, 0, 32, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(168, 28, 64, 0.6);
    border-color: var(--color-gold);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-3px);
}

.icon-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-primary:hover .icon-arrow {
    transform: translateX(4px);
}

/* Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 960px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(22, 18, 25, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.18);
    padding: 1.5rem 1rem;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-gold);
    box-shadow: var(--shadow-gold);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Section Common */
.explorer-section, .showcase-section, .arch-section, .download-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.section-subtitle {
    max-width: 680px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Explorer Controls & Search */
.explorer-controls {
    padding: 1.25rem 1.8rem;
    margin-bottom: 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.search-bar {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

#search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    color: var(--text-main);
    font-size: 0.96rem;
    font-family: var(--font-sans);
    transition: var(--transition);
}

#search-input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.filter-group {
    display: flex;
    gap: 1rem;
}

.filter-select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus, .filter-select:hover {
    border-color: var(--color-gold);
    outline: none;
}

/* Tabs */
.tabs-container {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(128, 0, 32, 0.7) 0%, rgba(168, 28, 64, 0.7) 100%);
    border-color: var(--color-gold);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(128, 0, 32, 0.4);
}

/* Data Table */
.table-container {
    overflow-x: auto;
    padding: 1rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.92rem;
}

.data-table th {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    color: var(--color-gold);
    font-weight: 600;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.data-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-main);
}

.data-table tr:hover td {
    background: rgba(212, 175, 55, 0.06);
}

.badge-format {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
}

.badge-price {
    font-weight: 600;
    color: #4ade80;
}

.badge-valuation {
    font-weight: 700;
    color: var(--color-gold);
    background: rgba(212, 175, 55, 0.12);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}

.badge-no-obs {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

.badge-trigger-ok {
    color: #4ade80;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Blends Showcase */
.blends-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

.blend-card {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.blend-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.blend-producer {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blend-cuvee {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-main);
}

.blend-abv {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    background: rgba(128, 0, 32, 0.5);
    color: #ffd1dc;
    padding: 3px 10px;
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.blend-bar-container {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.blend-bar {
    display: flex;
    height: 28px;
    border-radius: 16px;
    overflow: hidden;
}

.bar-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease;
}

.bar-segment:hover {
    transform: scaleY(1.15);
}

.variety-cab { background: linear-gradient(90deg, #6b001a, #800020); }
.variety-merlot { background: linear-gradient(90deg, #a81c40, #c4284d); }
.variety-pv { background: linear-gradient(90deg, #483d8b, #6a5acd); }
.variety-cf { background: linear-gradient(90deg, #d4af37, #b8860b); color: #000; text-shadow: none; }
.variety-malbec { background: linear-gradient(90deg, #8b008b, #9932cc); }

.blend-legend {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.blend-legend li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.blend-trigger-badge {
    margin-top: auto;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blend-trigger-badge.verified {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.25);
}

.icon-sm {
    width: 16px;
    height: 16px;
}

/* 3NF Architecture Grid */
.arch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.6rem;
}

.arch-card {
    padding: 2rem 1.6rem;
    text-align: left;
}

.arch-icon {
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
}

.arch-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.arch-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.arch-card code {
    font-family: var(--font-mono);
    color: var(--color-gold);
    background: rgba(212, 175, 55, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.86rem;
}

/* Download Card */
.download-card {
    padding: 3rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    background: linear-gradient(135deg, rgba(22, 18, 25, 0.85) 0%, rgba(45, 15, 25, 0.85) 100%);
}

.download-info {
    flex: 1;
}

.download-info p {
    color: var(--text-muted);
    font-size: 1.08rem;
    margin-bottom: 1.6rem;
}

.file-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.file-tag {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.84rem;
    font-family: var(--font-mono);
}

.sqlite-tag {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--color-gold);
    color: var(--color-gold-light);
    font-weight: 600;
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    min-width: 280px;
}

.btn-lg {
    padding: 1.1rem 2rem;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2rem;
}

.btn-sub {
    font-size: 0.78rem;
    font-weight: 400;
    opacity: 0.85;
}

/* Pricing & Commercial Tiers */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2.5rem;
}

.pricing-card {
    background: linear-gradient(145deg, rgba(26, 20, 30, 0.85) 0%, rgba(18, 14, 22, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

.pricing-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.15);
}

.pricing-card.featured {
    background: linear-gradient(145deg, rgba(45, 15, 28, 0.9) 0%, rgba(26, 18, 32, 0.95) 100%);
    border: 1px solid var(--color-gold);
    box-shadow: 0 10px 30px rgba(128, 0, 32, 0.4), 0 0 15px rgba(212, 175, 55, 0.2);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: var(--color-gold);
    color: #0c0810;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4);
}

.pricing-header {
    margin-bottom: 1.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1.5rem;
}

.pricing-header h3 {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.pricing-header p {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.pricing-price {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.pricing-price .period {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    margin-bottom: 2.5rem;
    flex: 1;
}

.pricing-features li {
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.pricing-features li .check {
    color: var(--color-gold);
    font-weight: 700;
}

.btn-tier {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 1rem;
    font-weight: 600;
}

@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Footer */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #08060a;
    padding: 3rem 2rem;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.4rem;
}

.footer-links {
    display: flex;
    gap: 1.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

/* Responsive */
@media (max-width: 1024px) {
    .hero-stats, .arch-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .blends-grid {
        grid-template-columns: 1fr;
    }
    .download-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.6rem;
    }
    .hero-actions {
        flex-direction: column;
    }
    .explorer-controls {
        flex-direction: column;
    }
    .filter-group {
        width: 100%;
        flex-direction: column;
    }
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}
