/* ========================================
   The Back Patio Boutique — Custom Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #FAFAF5;
    color: #1a3a2a;
}

/* --- Hero Background --- */
.hero-bg {
    background: linear-gradient(135deg, 
        #0f2b1a 0%, 
        #1a4a2e 25%, 
        #2d6b45 50%, 
        #1a4a2e 75%, 
        #0f2b1a 100%
    );
    position: relative;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(251, 191, 36, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(99, 179, 108, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(251, 191, 36, 0.1) 0%, transparent 50%);
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* --- Floating Blobs (Background Decoration) --- */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
}

.blob--green {
    width: 500px;
    height: 500px;
    background: #2d6b45;
    top: 10%;
    right: -10%;
    animation: blob-float 20s ease-in-out infinite;
}

.blob--cream {
    width: 400px;
    height: 400px;
    background: #fde68a;
    bottom: 20%;
    left: -5%;
    animation: blob-float 25s ease-in-out infinite reverse;
}

.blob--accent {
    width: 300px;
    height: 300px;
    background: #f472b6;
    top: 50%;
    left: 40%;
    animation: blob-float 18s ease-in-out infinite;
}

@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* --- Animations --- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(45deg); }
    50% { transform: translateY(-15px) rotate(45deg); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
    animation-delay: 2s;
}

/* --- Marquee --- */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Navigation --- */
.nav {
    background: rgba(250, 250, 245, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(45, 107, 69, 0.1);
}

.nav.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

/* Mobile Menu */
.mobile-menu {
    background: rgba(250, 250, 245, 0.98);
    backdrop-filter: blur(20px);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-link {
    transition: color 0.2s, transform 0.2s;
}

.mobile-menu-link:hover {
    color: #2d6b45;
    transform: translateX(8px);
}

/* Nav Toggle */
.nav-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active .nav-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.nav-toggle.active .nav-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .nav-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn--primary {
    background: #2d6b45;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(45, 107, 69, 0.3);
}

.btn--primary:hover {
    background: #1f4b27;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 107, 69, 0.4);
}

.btn--outline {
    background: transparent;
    color: #1a3a2a;
    border: 2px solid #1a3a2a;
}

.btn--outline:hover {
    background: #1a3a2a;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn--outline-light {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn--outline-light:hover {
    background: #ffffff;
    color: #1a3a2a;
    transform: translateY(-2px);
}

.btn--accent {
    background: #fbbf24;
    color: #1a3a2a;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.btn--accent:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.5);
}

/* --- Tags / Badges --- */
.tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tag--green {
    background: #e3efe7;
    color: #1f4b27;
}

.tag--light {
    background: rgba(255, 255, 255, 0.15);
    color: #a7f3d0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #fbbf24;
    color: #1a3a2a;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    z-index: 2;
}

/* --- Section Spacing --- */
.section {
    padding: 6rem 0;
    position: relative;
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
}

/* --- Cards --- */
.card {
    background: #ffffff;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/2;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-img {
    transform: scale(1.08);
}

.card-body {
    padding: 1.5rem;
}

/* --- Why Cards --- */
.why-card {
    background: #ffffff;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(45, 107, 69, 0.08);
}

.why-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(45, 107, 69, 0.2);
}

.why-icon-wrap {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #e3efe7, #c5dfcb);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1f4b27;
    transition: all 0.3s ease;
}

.why-card:hover .why-icon-wrap {
    background: linear-gradient(135deg, #2d6b45, #1f4b27);
    color: #ffffff;
    transform: rotate(-5deg) scale(1.1);
}

/* --- Inputs --- */
.input-field {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e3efe7;
    border-radius: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    color: #1a3a2a;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.input-field::placeholder {
    color: #95c69e;
}

.input-field:hover {
    border-color: #95c69e;
}

.input-field:focus {
    border-color: #2d6b45;
    box-shadow: 0 0 0 4px rgba(45, 107, 69, 0.1);
}

/* --- Contact Form Success --- */
.success-message {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .animate-float,
    .animate-float-delayed,
    .blob,
    .marquee-track {
        animation: none;
    }
}

/* --- Scroll Reveal (progressive enhancement via JS) --- */
.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@media (prefers-reduced-motion: reduce) {
    .reveal-hidden {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
