:root {
    /* Colors */
    --primary-bg: #0a0a0a;
    --secondary-bg: #121212;
    --accent-red: #500000;
    --accent-red-bright: #7a0000;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --gold: #d4af37;

    /* Fonts */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lora', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #fff;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography Utilities */
.text-gold {
    color: var(--gold);
}

.text-red {
    color: var(--accent-red-bright);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Logo Lockup */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Reduced gap (~33%) */
    text-decoration: none;
    color: inherit;
    flex: 0 0 auto;
}

.logo-symbol {
    height: 65px;
    /* Increased size (~18%) */
    width: auto;
    object-fit: contain;
    /* Subtle gold glow */
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.15));
    transition: transform 0.3s ease;
}

.logo-text {
    font-size: 1.6rem;
    /* Slightly larger text to balance */
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1;
    display: flex;
}

.logo-text span {
    color: var(--accent-red-bright);
}

.nav-links {
    display: flex;
    gap: 2rem;
    margin-right: 60px;
    /* Shift nav left (~5-10%) */
}

.nav-item {
    position: relative;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-red-bright);
    transition: width 0.3s ease;
}

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

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 150px;
    display: none;
    flex-direction: column;
}

.nav-item:hover .dropdown {
    display: flex;
}

.dropdown li {
    padding: 0.5rem 1rem;
}

.dropdown li:last-child {
    margin-bottom: 0;
}

.dropdown li:hover {
    background: var(--accent-red);
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 16px;
    align-items: center;
    flex: 0 0 auto;
}

.social-icon {
    color: #fff;
    transition: color 0.3s ease, filter 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover {
    color: var(--accent-red-bright);
    filter: drop-shadow(0 0 5px var(--accent-red-bright));
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: flex;
}

/* Mobile Menu */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        padding: 2rem;
        margin-right: 0;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        margin-top: 1rem;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent-red);
    color: #fff;
    box-shadow: 0 0 15px rgba(80, 0, 0, 0.3);
}

.btn-primary:hover {
    background: var(--accent-red-bright);
    box-shadow: 0 0 25px rgba(122, 0, 0, 0.5);
}

.btn-outline {
    border-color: var(--accent-red-bright);
    color: #fff;
}

.btn-outline:hover {
    background: var(--accent-red-bright);
    color: #fff;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    padding-top: 80px;
    /* Nav height */
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5%;
    /* Subtle gradient overlay for text readability, blending into image */
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(10, 10, 10, 0.4) 60%, transparent 100%);
    position: relative;
    z-index: 2;
    /* Ensure text is above image fade */
}

.hero-image {
    flex: 1;
    background-size: cover;
    background-position: center top;
    position: relative;
    /* Soft left-edge blend + Vignette */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%, black 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 20%, black 100%);

    /* Animation Initial State */
    opacity: 0;
    transform: scale(1.05);
    /* Slight zoom start */
    animation: heroImageFadeIn 1.4s ease-out forwards 0.3s;
}

@keyframes heroImageFadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Warm red overlay for blending + Vignette */
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.6) 100%);
    box-shadow: inset 50px 0 100px rgba(0, 0, 0, 0.8);
    /* Inner shadow on left */
    mix-blend-mode: multiply;
}

.hero-image::before {
    /* Grain/Texture Overlay */
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(80, 0, 0, 0.1);
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero h2 {
    font-size: 1.5rem;
    font-family: var(--font-body);
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero p {
    max-width: 500px;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Divider */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    margin: 4rem auto;
    width: 60%;
    opacity: 0.5;
}

/* Sections */
section {
    padding: var(--spacing-lg) 5%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--accent-red-bright);
    margin: 10px auto 0;
}

/* About Preview */
.about-preview {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    height: 400px;
    background: #222;
    /* Placeholder */
    border: 1px solid var(--accent-red);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--secondary-bg);
    padding: 2.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    border-color: var(--accent-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

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

/* Form Status & Success */
.form-status {
    margin-top: 1rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    min-height: 1.5rem;
}

.form-status.success {
    color: #4caf50;
}

.form-status.error {
    color: #f44336;
}

.form-success {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    animation: fadeIn 0.5s ease;
}

.form-success h3 {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.form-success p {
    font-family: var(--font-body);
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Portfolio Section */
.portfolio-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    height: 500px;
}

.portfolio-block {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Spacing Adjustments */
#services {
    padding-bottom: 2rem;
}

#portfolio {
    padding-top: 2rem;
    scroll-margin-top: 100px;
    /* Offset for sticky header */
}

.section-divider.compact {
    margin: 2rem auto;
}

.portfolio-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-block:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: background 0.3s ease;
}

.portfolio-block:hover .portfolio-overlay {
    background: rgba(80, 0, 0, 0.7);
}

.portfolio-overlay h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.portfolio-overlay span {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1rem;
    opacity: 0.8;
}

/* Social Proof */
.social-proof {
    text-align: center;
    background: var(--secondary-bg);
}

.proof-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.proof-item h4 {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

/* Contact */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
    /* Subtle bg */
    border-radius: 12px;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: center;
    /* Center labels */
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
    color: var(--accent-gold);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, #800000, #400000);
    /* Dark Red -> Burgundy */
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: bold;
    padding: 12px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 1.5rem auto 0;
    /* Center button */
    width: auto;
    /* Not full width */
    min-width: 200px;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #a00000, #500000);
    /* Brighter */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.3);
}

/* Form Status & Success */

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: var(--font-body);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-red);
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: #000;
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        /* Remove overflow: hidden to allow scrolling */
        overflow-x: hidden;
        position: relative;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .about-content {
        flex-direction: column;
    }

    .about-image {
        min-height: 300px;
        flex: 0 0 300px;
        /* Reduced specific height constraint */
        width: 100%;
    }

    .masonry-grid {
        width: 100% !important;
        grid-template-columns: 1fr 1fr;
        /* 2 columns on mobile if possible, or 1fr */
        gap: 10px;
        padding: 0 10px;
        box-sizing: border-box;
    }

    .grid-item {
        width: 100%;
    }

    .portfolio-header {
        padding: 100px 20px 40px;
        text-align: center;
    }

    .portfolio-header h1 {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }

    .portfolio-header p {
        font-size: 1rem;
        max-width: 100%;
        margin: 0 auto;
    }

    /* Fix Video Grid Mobile */
    .video-grid {
        grid-template-columns: 1fr;
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .video-item {
        width: 100%;
        min-width: 0;
        /* Allow shrinking */
    }

    iframe {
        width: 100%;
    }

    .hero {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        /* Ensure full viewport */
        padding-top: 60px;
    }

    .hero-content {
        padding: 6rem 5% 4rem;
        /* More safe padding */
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
        text-align: center;
        align-items: center;
    }

    /* Fix Hero Clipping */
    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        /* Responsive sizing */
        line-height: 1.3;
        white-space: normal;
        /* Allow wrap */
        margin-bottom: 1.5rem;
    }

    .hero p {
        padding: 0 1rem;
    }

    .hero-image {
        height: 50vh;
        width: 100%;
        flex: none;
        /* Mobile: Mask top edge instead of left */
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 100%);
        mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 100%);
    }

    .logo-symbol {
        height: 50px;
        /* Scale down on mobile */
    }

    .nav-links {
        display: none;
        /* Hide for now, will toggle with JS */
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--secondary-bg);
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--accent-red);
        margin-right: 0;
        /* Reset desktop margin */
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    /* About Section Mobile */
    .about-preview {
        flex-direction: column;
    }

    .about-text {
        text-align: center;
        margin-bottom: 2rem;
    }

    .section-title.about-title {
        /* Desktop Default (overridden by mobile) */
        left: 0;
        transform: none;
        text-align: left;
    }

    .about-image {
        width: 100%;
        min-height: 400px;
        /* Force height */
        flex: 0 0 400px;
        /* Prevent collapse */
        order: -1;
        margin-bottom: 2rem;
        display: block;
        background-size: cover;
        background-position: center;
    }
}

@media (min-width: 769px) {
    .section-title.about-title {
        left: 0;
        transform: none;
        text-align: left;
    }
}

/* Portfolio Mobile */
@media (max-width: 768px) {
    .portfolio-preview-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .portfolio-overlay {
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroTextReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto;
    /* Ensure vertical scroll */
}

/* Scroll Reveal Base Class - SAFETY FIX: Default to visible */
.scroll-reveal {
    opacity: 1;
    /* Was 0 */
    transform: translateY(0);
    /* Was 30px */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Staged Reveal */
.hero h1 {
    opacity: 0;
    animation: heroTextReveal 0.8s ease-out 0.45s forwards;
}

.hero h2,
.hero p {
    opacity: 0;
    animation: heroTextReveal 0.8s ease-out 0.65s forwards;
}

.hero-buttons {
    opacity: 0;
    animation: heroTextReveal 0.7s ease-out 0.85s forwards;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {

    .hero-image,
    .hero h1,
    .hero h2,
    .hero p,
    .hero-buttons,
    .scroll-reveal {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Modeling Gallery Grid */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 2rem 5%;
}

.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    /* Remove transform on container to prevent overlap */
    /* transition: transform 0.3s ease; */
}

/* Scale Image Instead */
.grid-item:hover {
    /* transform: scale(1.02); */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.grid-item:hover img {
    transform: scale(1.1);
}

.grid-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    /* Ensure overlay is above image */
}

.grid-item:hover .overlay {
    opacity: 1;
}

.grid-item .overlay span {
    color: var(--text-light);
    font-family: var(--font-heading);
    border: 1px solid var(--text-light);
    padding: 0.5rem 1rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.6);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    border: 2px solid var(--gold);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--text-light);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s;
}

.close-lightbox:hover {
    color: var(--accent-red);
}

@media (max-width: 768px) {
    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(45%, 1fr));
        gap: 10px;
        padding: 1rem;
    }
}

/* Footer Link */
footer a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    padding-bottom: 2px;
}

footer a:hover {
    border-bottom-color: var(--text-gold);
    color: var(--text-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}