/* ===== BASE STYLES ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(192, 47, 71, 0.15);
    color: #6e1c27;
}

/* ===== NAVBAR ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #c02f47, #d44561);
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #d44561 !important;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(255, 252, 249, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(110, 28, 39, 0.08);
}

.nav-scrolled .nav-link {
    color: #6e1c27;
}

/* ===== MOBILE MENU ===== */
.mobile-link {
    position: relative;
    padding-left: 0;
}

.mobile-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(192, 47, 71, 0.08), transparent);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.mobile-link:hover::before {
    width: 100%;
}

/* ===== HERO ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

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

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes scroll-line {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

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

.animate-float-delay {
    animation: float-delay 7s ease-in-out infinite 1s;
}

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

.animate-scroll-line {
    animation: scroll-line 2s ease-in-out infinite;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .about-text,
    .candle-header,
    .candle-card,
    .gallery-header,
    .gallery-item,
    .why-header,
    .why-card,
    .contact-header,
    .contact-info,
    .contact-form {
        opacity: 1;
        transform: none;
    }
}

/* ===== ABOUT SECTION ===== */
.about-image {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.about-image:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 60px rgba(110, 28, 39, 0.15);
}

.about-text {
    opacity: 1;
    transform: none;
}

/* ===== CANDLE CARDS ===== */
.candle-card {
    opacity: 1;
    transform: none;
}

/* ===== GALLERY ===== */
.gallery-item {
    opacity: 1;
    transform: none;
    cursor: pointer;
}

.gallery-item:hover .gallery-item img {
    filter: brightness(1.05);
}

/* ===== WHY US CARDS ===== */
.why-card {
    opacity: 1;
    transform: none;
}

/* ===== CONTACT ===== */
.contact-info,
.contact-form {
    opacity: 1;
    transform: none;
}

/* ===== FORM STYLES ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(192, 47, 71, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #d4a8ad;
}

/* ===== BACK TO TOP ===== */
#backToTop {
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    transform: translateY(0);
}

#backToTop:not(.visible) {
    transform: translateY(10px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }

    #hero h1 {
        font-size: 2.5rem !important;
    }

    #hero h1 span.font-serif {
        font-size: 1.75rem !important;
    }

    .floating-card {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        margin-top: 1rem;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2rem !important;
    }

    .font-serif.text-3xl {
        font-size: 1.5rem !important;
    }
}

/* ===== FOCUS VISIBLE ===== */
*:focus-visible {
    outline: 2px solid #c02f47;
    outline-offset: 2px;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
