﻿/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f4;
}

::-webkit-scrollbar-thumb {
    background: #d6d3d1;
    border-radius: 4px;
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

body {
    font-family: 'Inter', sans-serif;
    color: #292524;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.font-serif {
    font-family: 'Playfair Display', serif;
}

/* Header Logic */
#main-header {
    transition: background-color 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

/* Scrolled State & Solid Variant */
#main-header.scrolled,
#main-header.header-solid {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.1);
}

/* Text Colors */
#main-header.scrolled .nav-text,
#main-header.header-solid .nav-text {
    color: #1c1917;
    /* stone-900 */
}

#main-header.scrolled .logo-text,
#main-header.header-solid .logo-text {
    color: #1c1917;
}

#main-header.scrolled .logo-sub,
#main-header.header-solid .logo-sub {
    color: #78716c;
    /* stone-500 */
}

#main-header.scrolled .burger-icon,
#main-header.header-solid .burger-icon {
    color: #1c1917;
}

/* Transparent State (Default for Home) */
#main-header:not(.scrolled):not(.header-solid) {
    background-color: transparent;
}

#main-header:not(.scrolled):not(.header-solid) .nav-text {
    color: white;
}

#main-header:not(.scrolled):not(.header-solid) .logo-text {
    color: white;
}

#main-header:not(.scrolled):not(.header-solid) .logo-sub {
    color: rgba(255, 255, 255, 0.8);
}

#main-header:not(.scrolled):not(.header-solid) .burger-icon {
    color: white;
}

/* Mobile Menu Overlay - Premium Glassmorphism */
#mobile-menu-overlay {
    position: fixed;
    inset: 0;
    top: 0;
    background-color: rgba(255, 252, 248, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 40;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

#mobile-menu-overlay.open {
    transform: translateX(0);
    opacity: 1;
}

/* Nav Hover Effects */
.nav-link-hover {
    position: relative;
}

.nav-link-hover::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: #C5A059;
    transition: width 0.3s ease;
}

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

/* Active Nav Item */
#main-header .nav-text.active {
    color: #C5A059 !important;
}

/* Menu Open State Overrides (Fix for White logo on light overlay) */
#main-header.menu-open .logo-text,
#main-header.menu-open .nav-text {
    color: #1c1917 !important;
}

#main-header.menu-open .logo-sub {
    color: #78716c !important;
}

/* Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.animate-zoom-out {
    animation: zoomOut 30s infinite alternate cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

@keyframes zoomOut {
    from {
        transform: scale(1.1);
    }

    to {
        transform: scale(1);
    }
}

/* Selection */
::selection {
    background: #C5A059;
    color: white;
}

/* Burger Menu Animations */
#mobile-menu-btn[aria-expanded="true"] .burger-icon {
    color: #1c1917 !important;
}

#mobile-menu-btn[aria-expanded="true"] .burger-icon:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#mobile-menu-btn[aria-expanded="true"] .burger-icon:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn[aria-expanded="true"] .burger-icon:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

#mobile-menu-btn[aria-expanded=true] {
    color: #1c1917 !important;
}

/* Blog Post Typography & Readability */
.prose {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #44403c;
    /* stone-700 */
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    color: #1c1917;
    /* stone-900 */
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    line-height: 1.3;
}

.prose h1 {
    font-size: 2.5rem;
}

.prose h2 {
    font-size: 2.1rem;
    border-bottom: 1px solid #e7e5e4;
    padding-bottom: 0.5rem;
}

.prose h3 {
    font-size: 1.75rem;
}

.prose h4 {
    font-size: 1.4rem;
}

.prose p {
    margin-bottom: 1.6rem;
}

.prose a {
    color: #C5A059;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.prose a:hover {
    color: #8B6914;
    text-decoration-thickness: 2px;
}

.prose ul,
.prose ol {
    margin-bottom: 1.6rem;
    padding-left: 0 !important;
}

.prose ul li {
    position: relative;
    padding-left: 1.75rem !important;
    margin-bottom: 0.75rem;
    list-style-type: none !important;
}

.prose ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 6px;
    height: 6px;
    background-color: #C5A059;
    border-radius: 50%;
}

.prose ol {
    list-style-type: none !important;
    counter-reset: blog-counter;
}

.prose ol li {
    position: relative;
    padding-left: 2rem !important;
    margin-bottom: 0.75rem;
    counter-increment: blog-counter;
    list-style-type: none !important;
}

.prose ol li::before {
    content: counter(blog-counter) ".";
    position: absolute;
    left: 0;
    color: #C5A059;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.prose blockquote {
    font-style: italic;
    font-size: 1.25rem;
    color: #1c1917;
    border-left: 3px solid #C5A059;
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    background-color: #fcfaf7;
    font-family: 'Playfair Display', serif;
}

.prose img {
    border-radius: 0.25rem;
    margin: 2.5rem auto;
    display: block;
    box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.2);
}

.prose hr {
    border: 0;
    border-top: 1px solid #e7e5e4;
    margin: 3.5rem 0;
}

.prose strong {
    color: #1c1917;
    font-weight: 700;
}

.prose-lg {
    font-size: 1.125rem;
}

@media (max-width: 768px) {
    .prose {
        font-size: 1.05rem;
    }

    .prose h1 {
        font-size: 2rem;
    }

    .prose h2 {
        font-size: 1.75rem;
    }

    .prose h3 {
        font-size: 1.5rem;
    }
}