/* === CSS Variables === */
:root {
    --primary: #1a3a1a;
    --primary-light: #2d5a2d;
    --primary-dark: #0f2a0f;
    --accent: #d4a843;
    --accent-light: #e6c46a;
    --background: #fdfcf8;
    /* Warmer, premium off-white */
    --background-muted: #f4f3ef;
    --foreground: #2c2c2c;
    --foreground-muted: #595959;
    --card-bg: rgba(255, 255, 255, 0.9);
    --border: #e5e5e0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* === Utilities === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

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

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* Scroll Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in:nth-child(1) {
    animation-delay: 0.1s;
}

.animate-fade-in:nth-child(2) {
    animation-delay: 0.2s;
}

.animate-fade-in:nth-child(3) {
    animation-delay: 0.3s;
}

.animate-fade-in:nth-child(4) {
    animation-delay: 0.4s;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--primary-dark);
    border-color: var(--accent);
}

.btn-primary:hover {
    background-color: var(--accent-light);
    border-color: var(--accent-light);
    transform: scale(1.05);
    box-shadow: 0 10px 30px var(--shadow-lg);
}

.btn-outline {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary);
}

.btn-full {
    width: 100%;
}

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-image: url('hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Behind overlay */
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 2;
    /* Ensure it's above canvas */
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.hero-logo {
    width: 16rem;
    margin: 0 auto 2rem;
    filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.3));
}

.hero-title {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    animation: bounce 2s infinite;
}

@media (min-width: 640px) {
    .hero-logo {
        width: 24rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-buttons {
        flex-direction: row;
    }
}

/* === Section Styles === */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--foreground-muted);
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 3rem;
    }
}

/* === Services Section === */
.services {
    padding: 5rem 0;
    background-color: var(--background-muted);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    /* Glassmorphism */
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    /* Glass border */
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow-lg);
}

.service-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(26, 58, 26, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.service-title {
    font-size: 1.25rem;
    color: var(--foreground);
    margin-bottom: 0.75rem;
}

.service-description {
    color: var(--foreground-muted);
    line-height: 1.7;
}

@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === About Section === */
.about {
    padding: 5rem 0;
    background-color: var(--background);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.about-content {
    order: 2;
}

.about-content .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
}

.about-text {
    color: var(--foreground-muted);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text strong {
    color: var(--primary);
}

.about-features {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.about-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--foreground);
}

.feature-icon {
    width: 1.5rem;
    height: 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.about-image {
    order: 1;
}

.about-image-wrapper {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px var(--shadow-lg);
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 4px solid var(--accent);
    border-radius: 1rem;
    pointer-events: none;
}

.about-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

@media (min-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }

    .about-content {
        order: 1;
    }

    .about-image {
        order: 2;
    }
}

/* === Contact Section === */
.contact {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.contact .section-title {
    color: white;
}

.contact .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.contact-info {
    display: grid;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-details h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    font-family: 'Lora', serif;
}

.contact-details p {
    color: rgba(255, 255, 255, 0.8);
}

.contact-details a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

.contact-details a:hover {
    color: var(--accent);
}

.contact-form-wrapper {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: grid;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--foreground);
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--foreground);
    background: var(--background);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 58, 26, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--foreground-muted);
}

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

@media (min-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* === Footer === */
.footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

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

.footer-logo {
    width: 8rem;
    margin: 0 auto 1rem;
    opacity: 0.9;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
}

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

.footer-links h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.footer-links ul {
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        text-align: left;
    }

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

    .footer-logo {
        margin: 0 0 1rem;
    }

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

/* === Gallery Section === */
.gallery {
    padding: 5rem 0;
    background-color: var(--background);
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-item {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    box-shadow: 0 20px 40px var(--shadow-lg);
}

.gallery-caption {
    background: var(--card-bg);
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--foreground);
}

/* === Before/After Slider === */
.before-after-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
}

.slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
}

.gallery-item.vertical .slider-container {
    aspect-ratio: 3/4;
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.before-image {
    z-index: 1;
    clip-path: inset(0 50% 0 0);
}

.after-image {
    z-index: 0;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.handle-line {
    flex: 1;
    width: 3px;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.handle-circle {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: var(--primary);
    flex-shrink: 0;
}

/* === Toast Notification === */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}