/* ==========================================================================
   SEPOLIA DECORATORS & CATERERS - Premium Cinematic Theme (Complete)
   ========================================================================== */

   :root {
    --clr-light: #fdfbf7;         
    --clr-section-alt: #f4f0e6;   
    --clr-dark: #1a1614;          
    --clr-dark-lighter: #3c342f;  
    --clr-accent: #c5a880;        
    --clr-accent-hover: #ad8f65;  
    --clr-text-muted: #6b615a;    
    
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --section-pad: 120px 5%;
}

/* Base Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    background-color: var(--clr-light);
    color: var(--clr-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 500; line-height: 1.1; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; object-fit: cover; }

/* Utilities */
.text-center { text-align: center; }
.text-accent { color: var(--clr-accent); }
.bg-alt { background-color: var(--clr-section-alt); }
.bg-dark { background-color: var(--clr-dark); color: var(--clr-light); }
.section-title { font-size: 3rem; margin-bottom: 0.5rem; color: var(--clr-dark); }
.section-subtitle { font-size: 0.9rem; color: var(--clr-accent); margin-bottom: 3.5rem; text-transform: uppercase; letter-spacing: 3px; font-weight: 600; font-family: var(--font-body); }

/* ==========================================================================
   ELEGANT BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 35px; font-family: var(--font-body); font-size: 0.8rem;
    font-weight: 500; text-transform: uppercase; letter-spacing: 2px;
    cursor: pointer; transition: var(--transition); border-radius: 2px; text-align: center;
}
.btn-primary { background-color: var(--clr-accent); color: #fff; border: 1px solid var(--clr-accent); }
.btn-primary:hover { background-color: var(--clr-accent-hover); border-color: var(--clr-accent-hover); transform: translateY(-2px); }
.btn-secondary { background-color: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.5); }
.btn-secondary:hover { background-color: rgba(255, 255, 255, 0.1); border-color: #fff; transform: translateY(-2px); }
.btn-dark { color: var(--clr-light); background: var(--clr-dark); border: 1px solid var(--clr-dark); }
.btn-dark:hover { background: transparent; color: var(--clr-dark); }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; padding: 30px 5%;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; transition: all 0.5s ease;
}
.navbar .logo, .navbar .nav-links a { color: #fff; }
.navbar .hamburger span { background: #fff; }
.navbar.scrolled {
    background: rgba(253, 251, 247, 0.98); backdrop-filter: blur(15px); 
    padding: 20px 5%; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
}
.navbar.scrolled .logo, .navbar.scrolled .nav-links a { color: var(--clr-dark); }
.navbar.scrolled .hamburger span { background: var(--clr-dark); }
.logo { font-size: 1.8rem; display: flex; flex-direction: column; letter-spacing: 1px; }
.logo span { font-family: var(--font-body); font-size: 0.6rem; letter-spacing: 4px; text-transform: uppercase; color: var(--clr-accent); font-weight: 500; margin-top: 2px; }
.nav-links { display: flex; gap: 35px; }
.nav-links a { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; position: relative; font-weight: 500; }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 1px; bottom: -6px; left: 0; background-color: var(--clr-accent); transition: width 0.4s ease; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 6px; }
.hamburger span { width: 30px; height: 1px; transition: var(--transition); }

/* ==========================================================================
   SUBPAGE HEADERS (Services, About, Portfolio, Contact)
   ========================================================================== */
.page-header {
    height: 45vh; min-height: 350px;
    background: linear-gradient(180deg, rgba(26, 22, 20, 0.9), rgba(26, 22, 20, 0.95));
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; padding: 100px 5% 0; border-bottom: 1px solid #3c342f;
}
.page-header .hero-title, .page-header .hero-desc { color: #fff; }

/* ==========================================================================
   HOMEPAGE HERO SECTION
   ========================================================================== */
.hero {
    position: relative; height: 100vh; min-height: 700px;
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 0 5%;
}
.hero-image-bg { position: absolute; inset: 0; z-index: 1; overflow: hidden; background: #000; }
.hero-image-bg img {
    width: 100%; height: 100%; object-fit: cover; opacity: 0.9;
    animation: gentlePan 25s ease-in-out infinite alternate;
}
@keyframes gentlePan { 0% { transform: scale(1.02); } 100% { transform: scale(1.08); } }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(20, 15, 10, 0.2) 0%, rgba(20, 15, 10, 0.55) 50%, rgba(20, 15, 10, 0.75) 100%);
    z-index: 2;
}
.hero-content { position: relative; z-index: 3; max-width: 900px; margin-top: 40px; color: #fff; }
.hero-eyebrow { font-size: 0.85rem; letter-spacing: 4px; color: #e6d3ba; text-transform: uppercase; margin-bottom: 25px; display: block; font-weight: 500; }
.hero-title { font-size: 6.5rem; margin-bottom: 10px; line-height: 1; letter-spacing: 0.02em; }
.hero-subtitle { font-size: 2.2rem; font-weight: 400; font-style: italic; margin-bottom: 30px; color: #e6d3ba; }
.hero-desc { font-size: 1.1rem; color: rgba(255,255,255,0.85); margin-bottom: 45px; font-weight: 300; letter-spacing: 0.5px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.scroll-indicator {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    z-index: 3; color: rgba(255,255,255,0.6); font-family: var(--font-body);
    font-size: 0.7rem; letter-spacing: 3px; text-transform: uppercase;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-arrow { animation: bounce 2s infinite; font-size: 1.2rem; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 60% { transform: translateY(-5px); } }

/* ==========================================================================
   SECTIONS & SERVICES CARDS
   ========================================================================== */
section { padding: var(--section-pad); }
.intro-section { text-align: center; max-width: 900px; margin: 0 auto; }
.intro-text { font-size: 2.2rem; font-style: italic; margin-bottom: 40px; color: var(--clr-dark); line-height: 1.4; }
.services-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.service-card { background: #ffffff; padding: 60px 50px; border: 1px solid #eae5da; transition: var(--transition); position: relative; }
.service-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--clr-accent); transform: scaleX(0); transition: transform 0.5s ease; transform-origin: left; }
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.03); transform: translateY(-3px); }
.service-card h3 { font-size: 2.2rem; margin-bottom: 25px; }
.service-card ul { margin-bottom: 35px; color: var(--clr-text-muted); font-size: 1.05rem; }
.service-card li { margin-bottom: 12px; border-bottom: 1px solid #f4f0e6; padding-bottom: 12px; }

/* ==========================================================================
   PORTFOLIO UNIFORM GRID (Fixes display issues & aspects)
   ========================================================================== */
.portfolio-filters { display: flex; justify-content: center; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn { background: none; border: none; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 1px; cursor: pointer; color: var(--clr-text-muted); transition: var(--transition); font-weight: 600; }
.filter-btn.active, .filter-btn:hover { color: var(--clr-accent); }

.portfolio-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 25px !important;
    width: 100% !important;
    min-height: 200px !important; 
    margin-top: 30px;
}
.portfolio-item {
    position: relative !important; overflow: hidden !important;
    cursor: pointer !important; border-radius: 4px !important; display: block !important;
}
.portfolio-item img {
    width: 100% !important; height: 100% !important;
    aspect-ratio: 4 / 5; object-fit: cover !important; display: block !important;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.portfolio-overlay {
    position: absolute; inset: 0; background: rgba(26, 22, 20, 0.6);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition);
}
.portfolio-item:hover img { transform: scale(1.05); }
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-category { color: #fff; font-family: var(--font-body); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 3px; }

/* ==========================================================================
   LIGHTBOX ZOOM & FULLSCREEN VIEWER
   ========================================================================== */
.lightbox {
    position: fixed; inset: 0; background: rgba(26, 22, 20, 0.96); z-index: 99999;
    display: none; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.lightbox.active { display: flex; opacity: 1; }
.lightbox-img {
    max-height: 85vh; max-width: 90vw; object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); border: 4px solid #fff; border-radius: 4px;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute; background: none; border: none; color: #fff;
    font-size: 2.5rem; cursor: pointer; transition: var(--transition); z-index: 100000;
}
.lightbox-close { top: 25px; right: 35px; }
.lightbox-prev { left: 30px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 30px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { color: var(--clr-accent); }

/* ==========================================================================
   CONTACT FORM & LAYOUT FIX
   ========================================================================== */
.contact-container { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; }
.contact-info { padding: 50px; border-radius: 4px; }
.form-group { margin-bottom: 25px; }
.form-control {
    width: 100%; padding: 15px 0; background: transparent; border: none; border-bottom: 1px solid #dcd5c6;
    font-family: var(--font-body); font-size: 1rem; transition: var(--transition); color: var(--clr-dark);
}
.form-control:focus { outline: none; border-bottom-color: var(--clr-accent); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--clr-dark); color: var(--clr-light); padding: 80px 5% 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 60px; }
.footer-title { font-family: var(--font-heading); font-size: 1.2rem; margin-bottom: 20px; color: var(--clr-accent); }
.footer-links li { margin-bottom: 12px; font-size: 0.9rem; }
.footer-links a:hover { color: var(--clr-accent); padding-left: 5px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 20px; text-align: center; font-size: 0.8rem; color: #887f78; }

/* ==========================================================================
   ANIMATIONS & RESPONSIVE LAYOUT
   ========================================================================== */
.fade-up { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1024px) { 
    .hero-title { font-size: 5rem; } 
    .portfolio-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        background: var(--clr-light); flex-direction: column; justify-content: center; align-items: center;
        transition: right 0.4s ease; box-shadow: -5px 0 15px rgba(0,0,0,0.05);
    }
    .nav-links.active { right: 0; }
    .nav-links a { color: var(--clr-dark) !important; font-size: 1.2rem; }
    .hamburger { display: flex; z-index: 1001; }
    .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--clr-dark); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--clr-dark); }
    
    .hero-title { font-size: 3.5rem; }
    .hero-subtitle { font-size: 1.5rem; }
    .hero-buttons { flex-direction: column; width: 100%; max-width: 300px; margin: 0 auto; }
    .btn { width: 100%; }
    
    .services-preview, .contact-container, .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    
    .lightbox-prev, .lightbox-next { display: none; } /* On mobile, users will use screen taps */
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
/* ==========================================
   SMOOTH SCROLL ANIMATIONS
   ========================================== */
/* 1. Initial State: Hidden and pushed down 40px */
.fade-up, .portfolio-item, .service-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

/* 2. Final State: Fully visible and in original position */
.fade-up.is-visible, .portfolio-item.is-visible, .service-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}
/* ==========================================
   HEADER ANTI-JITTER FIX
   ========================================== */
   header, .header, .navbar, #header {
    /* 1. Stop animating 'all' properties, only animate what is needed */
    transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease !important;
    
    /* 2. Force hardware (GPU) acceleration */
    transform: translateZ(0) !important; 
    -webkit-transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    
    /* 3. Tell the browser what will change in advance */
    will-change: background-color, padding !important;
}
