/* ===================
   Self-hosted Google Fonts
   Cormorant Garamond (400, 500, 600) + Outfit (300, 400, 500)
   =================== */

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300;
    font-display: block;
    src: url('fonts/outfit-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('fonts/outfit-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 500;
    font-display: block;
    src: url('fonts/outfit-latin.woff2') format('woff2');
}

/* Cormorant Garamond (self-hosted) */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('fonts/cormorant-garamond-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 500;
    font-display: block;
    src: url('fonts/cormorant-garamond-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 600;
    font-display: block;
    src: url('fonts/cormorant-garamond-latin.woff2') format('woff2');
}

/* ===================
   CSS Variables
   =================== */

:root {
    --gold: #d4a855;
    --gold-light: #f0d89a;
    --gold-dark: #8b6914;
    --cream: #f5f0e6;
    --charcoal: #1a1a1a;
    --charcoal-light: #2d2d2d;
    --panel-bg: rgba(30, 27, 22, 0.6);
}

/* ===================
   Base Styles
   =================== */

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

html {
    scroll-behavior: smooth;
    background-color: rgb(15, 12, 8);
}

body {
    font-family: 'Outfit', sans-serif;
    background: 
        linear-gradient(
            135deg,
            rgba(15, 12, 8, 0.85) 0%,
            rgba(25, 20, 12, 0.7) 50%,
            rgba(15, 12, 8, 0.8) 100%
        ),
        url('/assets/bc-bg.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    color: var(--cream);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ===================
   Homepage Layout
   =================== */

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
}

.content {
    text-align: center;
    max-width: 800px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===================
   Brand / Logo
   =================== */

.brand {
    margin-bottom: 1rem;
}

.brand-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 60px rgba(212, 168, 85, 0.3);
    line-height: 1.3;
    padding-bottom: 0.1em;
}

.brand-tagline {
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(245, 240, 230, 0.5);
    margin-top: 0.5rem;
    font-weight: 300;
}

/* ===================
   Divider
   =================== */

.divider {
    width: 360px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--gold) 44%,
        transparent 44%, 
        transparent 56%, 
        var(--gold) 56%,
        transparent 100%
    );
    margin: 2.5rem auto 5rem auto;
    position: relative;
}

.divider::before {
    content: '✨';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--gold);
    font-size: 1.5rem;
}

/* ===================
   404 Page
   =================== */

.not-found {
    text-align: center;
    margin: 1.5rem 0 2.5rem;
}

.not-found-code {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(4rem, 12vw, 12rem);
    font-weight: 500;
    color: var(--gold);
    line-height: 1;
    margin: 0 0 1rem;
    letter-spacing: 0.05em;
}

.not-found-animation {
    min-height: 120px;
    margin: 1.5rem auto 2rem;
    max-width: 480px;
    /* Reserved for cat-chasing-windblown-page animation */
}

.not-found-text {
    max-width: 560px;
    margin: 0 auto;
    color: var(--cream);
    font-size: 1.05rem;
    line-height: 1.7;
}

.not-found-text p {
    margin: 0 0 1rem;
}

.not-found-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 168, 85, 0.4);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.not-found-link:hover {
    color: var(--gold-light);
    border-color: var(--gold-light);
}

.not-found .section-subtitle {
    margin: 4rem auto;
}

/* ===================
   Product Cards (Homepage)
   =================== */

.products-section {
    margin-bottom: 2.5rem;
}

.products-label {
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(245, 240, 230, 0.4);
    margin-bottom: 1.5rem;
    text-align: center;
}

.products-grid {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.product-card {
    background: var(--panel-bg);
    border: 1px solid rgba(212, 168, 85, 0.15);
    border-radius: 14px;
    padding: 1.875rem;
    width: 250px;
    text-align: center;
    transition: all 0.3s ease;
    display: block;
}

.product-card:hover {
    border-color: rgba(212, 168, 85, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.product-card-main {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.product-card-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 50%, #5a4410 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

.product-card-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--cream);
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.product-card-tagline {
    font-size: 0.88rem;
    color: rgba(245, 240, 230, 0.5);
    margin-bottom: 1.25rem;
    min-height: 3em;
    line-height: 1.6;
}

.product-card-stores {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.store-badge {
    background: rgba(212, 168, 85, 0.1);
    border: 1px solid rgba(212, 168, 85, 0.25);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    color: rgba(212, 168, 85, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

a.store-badge:hover {
    background: rgba(212, 168, 85, 0.2);
    border-color: rgba(212, 168, 85, 0.5);
    color: var(--gold-light);
}

.store-badge-disabled {
    opacity: 0.6;
    cursor: default;
}

.store-badge svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Coming Soon Card */
.product-card.coming-soon {
    opacity: 0.5;
    cursor: default;
}

.product-card.coming-soon:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(212, 168, 85, 0.15);
}

.product-card-icon-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, #3a352d, #2a2520);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Products Responsive */
@media (max-width: 480px) {
    .product-card {
        width: 85%;
        max-width: 320px;
        padding: 1.5rem;
    }
    
    .product-card-icon,
    .product-card-icon-placeholder {
        width: 80px;
        height: 80px;
        border-radius: 18px;
    }
    
    .product-card-name {
        font-size: 1.25rem;
    }
    
    .product-card-tagline {
        font-size: 0.9rem;
    }
}

/* ===================
   Quote Section (Homepage)
   =================== */

.quote-section {
    margin: 3rem 0;
    padding: 2rem;
    position: relative;
}

.quote-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    color: rgba(245, 240, 230, 0.8);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.8;
}

.quote-author {
    margin-top: 0.75rem;
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: rgba(212, 168, 85, 0.6);
}

.quote-section::before {
    content: '';
    position: absolute;
    top: 0.8rem;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 180px;
    background-image: url('/assets/quote.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

/* ===================
   Floating Elements (Homepage)
   =================== */

.floating-element {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 168, 85, 0.25) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.floating-element:nth-child(1) {
    top: 10%;
    left: -150px;
    animation: float 20s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    bottom: 10%;
    right: -100px;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(20px, -20px); }
    50% { transform: translate(-10px, 20px); }
    75% { transform: translate(15px, 10px); }
}

/* ===================
   Page Layout (Subpages)
   =================== */

.page-layout {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow: hidden;
}

.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-header .brand-name {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.page-header .brand-name:hover {
    opacity: 0.8;
}

.page-header a {
    text-decoration: none;
}

.page-header .divider {
    width: 360px;
    margin: 1.5rem auto;
}

/* Main content area with sidebar */
.page-main {
    display: flex;
    gap: 1.5rem;
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    min-height: 0;
}

/* Invisible spacer to balance sidebar - keeps content centered */
.page-main::before {
    content: '';
    width: 180px;
    flex-shrink: 0;
}

/* For pages without sidebar - add matching spacer on right */
.page-main.no-sidebar::after {
    content: '';
    width: 180px;
    flex-shrink: 0;
}

/* Fallback for small viewports - switch to page scrolling */
@media (max-height: 800px) {
    .page-layout {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
    
    .page-main {
        min-height: 680px;
    }
    
    .page-content {
        overflow-y: visible;
    }
}

/* ===================
   Content Panel
   =================== */

.page-content {
    flex: 1;
    background: var(--panel-bg);
    border: 1px solid rgba(212, 168, 85, 0.15);
    border-radius: 8px;
    padding: 2rem;
    overflow-y: auto;
}

.page-content::-webkit-scrollbar {
    width: 6px;
}

.page-content::-webkit-scrollbar-track {
    background: transparent;
}

.page-content::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 85, 0.2);
    border-radius: 3px;
}

.page-content::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 85, 0.4);
}

/* Page title */
.page-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.3rem;
    letter-spacing: 0.02em;
}

.page-subtitle {
    font-size: 0.85rem;
    color: rgba(245, 240, 230, 0.5);
    margin-bottom: 2rem;
}

/* Content typography */
.page-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 500;
    color: rgba(245, 240, 230, 0.8);
    margin: 2rem 0 0.8rem;
}

.page-content h2:first-of-type {
    margin-top: 1.5rem;
}

.page-content p {
    font-size: 0.88rem;
    font-weight: 300;
    color: rgba(245, 240, 230, 0.6);
    margin-bottom: 0.8rem;
    line-height: 1.8;
}

.page-content ul {
    margin: 0.5rem 0 0.8rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 300;
    color: rgba(245, 240, 230, 0.6);
}

.page-content li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.page-content strong {
    font-weight: 500;
    color: rgba(245, 240, 230, 0.8);
}

.page-content a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 168, 85, 0.3);
    transition: border-color 0.3s ease;
}

.page-content a:hover {
    border-color: var(--gold);
}

.page-content em {
    font-style: italic;
    color: rgba(245, 240, 230, 0.7);
}

.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(245, 240, 230, 0.7);
    margin: 1.5rem 0 0.5rem;
}

.page-content ol {
    margin: 0.5rem 0 0.8rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 300;
    color: rgba(245, 240, 230, 0.6);
}

.page-content ul ul,
.page-content ol ol,
.page-content ul ol,
.page-content ol ul {
    margin: 0.3rem 0 0.3rem 1rem;
}

.page-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 2px solid rgba(212, 168, 85, 0.3);
    background: rgba(212, 168, 85, 0.03);
    border-radius: 0 4px 4px 0;
}

.page-content blockquote p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: rgba(245, 240, 230, 0.7);
    margin-bottom: 0;
}

.page-content blockquote p + p {
    margin-top: 0.5rem;
}

.page-content details {
    margin-bottom: 0;
}

.page-content summary {
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 400;
    color: rgba(245, 240, 230, 0.7);
    cursor: pointer;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(212, 168, 85, 0.1);
}

.page-content summary:hover {
    color: var(--gold);
}

.page-content details[open] summary {
    color: var(--gold);
    border-bottom-color: rgba(212, 168, 85, 0.25);
}

.page-content details p {
    margin-top: 0.75rem;
}

.page-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 168, 85, 0.3), transparent);
    margin: 2rem 0;
}

.page-content code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.82rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

.page-content pre {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(212, 168, 85, 0.1);
    border-radius: 6px;
    overflow-x: auto;
}

.page-content pre code {
    background: none;
    padding: 0;
    font-size: 0.8rem;
    line-height: 1.6;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.85rem;
}

.page-content th {
    text-align: left;
    font-weight: 500;
    color: rgba(245, 240, 230, 0.75);
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(212, 168, 85, 0.25);
}

.page-content td {
    padding: 0.5rem 0.8rem;
    color: rgba(245, 240, 230, 0.6);
    border-bottom: 1px solid rgba(212, 168, 85, 0.08);
}

.page-content tr:last-child td {
    border-bottom: none;
}

/* ===================
   Sidebar
   =================== */

.page-sidebar {
    width: 180px;
    flex-shrink: 0;
}

.page-nav {
    background: var(--panel-bg);
    border: 1px solid rgba(212, 168, 85, 0.15);
    border-radius: 8px;
    padding: 1.2rem;
    position: sticky;
    top: 2rem;
}

.page-nav-title {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(212, 168, 85, 0.8);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(212, 168, 85, 0.15);
}

.page-nav-item {
    display: block;
    font-size: 0.82rem;
    color: rgba(245, 240, 230, 0.5);
    text-decoration: none;
    padding: 0.5rem 0 0.5rem 0.8rem;
    margin-left: -0.8rem;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
}

.page-nav-item:hover {
    color: rgba(245, 240, 230, 0.8);
}

.page-nav-item.active {
    border-left-color: var(--gold);
    color: var(--gold);
}

/* ===================
   Page Footer (all pages)
   =================== */

.page-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    font-size: 0.75rem;
    color: rgba(245, 240, 230, 0.3);
    max-width: 732px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.page-footer-left,
.page-footer-center,
.page-footer-right {
    flex: 1;
}

.page-footer-left {
    text-align: left;
}

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

.page-footer-right {
    text-align: right;
}

/* Push footer to bottom on homepage */
.content .page-footer {
    margin-top: auto;
    padding-top: 3rem;
}

.page-footer a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-footer a:hover {
    color: rgba(245, 240, 230, 0.5);
}

.page-footer-legal {
    letter-spacing: 0.1em;
}

/* Footer stacks on small screens */
@media (max-width: 480px) {
    .page-footer {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .page-layout > .page-footer {
        padding: 0;
    }

    .page-footer-left,
    .page-footer-center,
    .page-footer-right {
        text-align: center;
    }
}

/* ===================
   Language Toggle (bilingual pages)
   =================== */

.lang-toggle {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.lang-btn {
    background: none;
    border: 1px solid rgba(212, 168, 85, 0.2);
    color: rgba(245, 240, 230, 0.5);
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    padding: 0.35rem 0.8rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
}

.lang-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.lang-btn.active {
    background: rgba(212, 168, 85, 0.15);
    border-color: var(--gold);
    color: var(--gold);
}

/* Last updated note */
.last-updated {
    margin-top: 2rem !important;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(212, 168, 85, 0.1);
    font-size: 0.8rem !important;
    color: rgba(245, 240, 230, 0.35) !important;
}

/* ===================
   Language Switcher (footer)
   =================== */

.lang-switch {
    display: inline-flex;
    gap: 0.35rem;
    justify-content: flex-end;
}

.lang-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    border-radius: 2rem;
    border: 1px solid rgba(212, 168, 85, 0.2);
    background: none;
    color: rgba(245, 240, 230, 0.35);
    font-family: 'Outfit', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lang-switch-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.lang-switch-btn.active {
    border-color: var(--gold);
    color: var(--gold);
}

/* ===================
   Responsive - Homepage
   =================== */

@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    .quote-section {
        padding: 1.5rem 1rem;
    }
}

/* ===================
   Responsive - Page Layout
   =================== */

@media (max-width: 768px) {
    .page-layout {
        height: auto;
        min-height: 100vh;
        padding: 1.5rem 1rem;
        overflow: visible;
    }
    
    .page-main {
        flex-direction: column-reverse;
        gap: 1rem;
        min-height: auto;
    }
    
    .page-main::before {
        display: none;
    }
    
    .page-main.no-sidebar::after {
        display: none;
    }
    
    .page-sidebar {
        width: 100%;
    }
    
    .page-nav {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .page-nav-title {
        width: 100%;
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .page-nav-item {
        padding: 0.4rem 0.8rem;
        margin-left: 0;
        border-left: none;
        border: 1px solid rgba(212, 168, 85, 0.15);
        border-radius: 2rem;
    }
    
    .page-nav-item.active {
        border-color: var(--gold);
        background: rgba(212, 168, 85, 0.1);
    }
    
    .page-content {
        padding: 1.5rem;
        overflow-y: visible;
    }

    .page-layout > .page-footer {
        padding: 0;
    }
}

/* ===================
   Reduced Motion
   =================== */

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