/* ============================================
   Monreal Flooring and Supply — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(46, 107, 31, 0.15);
    color: #1c4113;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf9f7;
}
::-webkit-scrollbar-thumb {
    background: #c5dfb2;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #99c77e;
}

/* --- Navigation --- */
.nav {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.nav.scrolled {
    background: rgba(250, 249, 247, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(46, 107, 31, 0.08);
}

.nav.scrolled .nav-logo-text {
    color: #1c4113;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #458930;
    transition: width 0.3s ease;
}

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

/* --- Hero --- */
.hero {
    background: linear-gradient(135deg, #0a1a07 0%, #163310 25%, #235218 50%, #2e6b1f 75%, #458930 100%);
    position: relative;
}

.hero-gradient {
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(69, 137, 48, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(153, 199, 126, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(10, 26, 7, 0.5) 0%, transparent 60%);
}

.hero-decor {
    animation: float 8s ease-in-out infinite;
}

.hero-decor-2 {
    animation-delay: -2s;
    animation-duration: 12s;
}

.hero-decor-3 {
    animation: pulse 4s ease-in-out infinite;
}

.hero-decor-4 {
    animation: pulse 5s ease-in-out infinite;
    animation-delay: -1s;
}

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

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.hero-headline {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
    animation-delay: 0.3s;
}

.hero-subtitle {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
    animation-delay: 0.6s;
}

.hero-badge {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
    animation-delay: 0.1s;
}

.hero-cta {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
    animation-delay: 0.9s;
}

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

.hero-scroll {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
    animation-delay: 1.2s;
}

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

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
    50% { opacity: 0.8; transform: scaleY(1); }
}

/* --- Section Headers --- */
.section-label {
    letter-spacing: 0.15em;
}

.section-title {
    font-weight: 300;
}

.section-line {
    transition: width 0.5s ease;
}

/* --- Product Cards --- */
.product-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(197, 223, 178, 0.3);
    transition: all 0.4s ease;
}

.product-card:hover {
    border-color: rgba(153, 199, 126, 0.5);
    box-shadow: 0 20px 60px rgba(46, 107, 31, 0.08);
    transform: translateY(-4px);
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
}

.product-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-link {
    margin-top: 0.5rem;
}

.product-link::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
    margin-top: 2px;
}

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

/* --- Why Us --- */
.why-item {
    transition: all 0.3s ease;
}

.why-item:hover .why-icon {
    background: rgba(69, 137, 48, 0.15);
    border-color: rgba(69, 137, 48, 0.4);
}

.why-img {
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.2);
}

/* --- Gallery --- */
.gallery-item {
    overflow: hidden;
}

.gallery-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

/* --- CTA Section --- */
.cta-btn-primary {
    transition: all 0.3s ease;
}

.cta-btn-primary:hover {
    transform: translateY(-2px);
}

.cta-btn-secondary {
    transition: all 0.3s ease;
}

/* --- Contact Form --- */
.form-label {
    letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d9d4cc;
    border-radius: 0.75rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 300;
    color: #1c4113;
    background: #faf9f7;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #6aad4e;
    background: white;
    box-shadow: 0 0 0 3px rgba(106, 173, 78, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #d9d4cc;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2399c77e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-submit {
    transition: all 0.3s ease;
}

.form-submit:hover {
    transform: translateY(-1px);
}

.form-success {
    animation: fadeInUp 0.5s ease forwards;
}

/* --- Back to Top --- */
.back-to-top {
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(46, 107, 31, 0.3);
}

/* --- Mobile Menu --- */
.mobile-menu {
    transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

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

.mobile-nav-link {
    transition: all 0.3s ease;
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* 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;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-title {
        font-size: 2.25rem;
    }
    
    .hero-headline {
        font-size: 2rem;
    }
    
    .hero-headline span {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 640px) {
    .hero {
        min-height: 100vh;
        min-height: 100dvh;
    }
}
