/* ============================================
   SANDERS HOUSE AND HOME — Custom Styles
   ============================================ */

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

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #fefcf6;
    color: #1a110e;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf8e8;
}
::-webkit-scrollbar-thumb {
    background: #c2254c;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a11536;
}

/* --- Hero Section --- */
#hero {
    position: relative;
    min-height: 100vh;
}

/* Hero decorative shapes */
.hero-shape {
    position: absolute;
    opacity: 0.08;
    pointer-events: none;
}

.shape-circle-1 {
    width: 500px;
    height: 500px;
    background: #ff82a3;
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.shape-circle-2 {
    width: 300px;
    height: 300px;
    background: #ffb4c7;
    border-radius: 50%;
    bottom: 10%;
    left: 5%;
    animation: float 10s ease-in-out infinite reverse;
}

.shape-rect-1 {
    width: 200px;
    height: 200px;
    background: #f9a8d4;
    top: 20%;
    left: 10%;
    transform: rotate(45deg);
    animation: spin 20s linear infinite;
    opacity: 0.05;
}

.shape-rect-2 {
    width: 120px;
    height: 300px;
    background: #ff82a3;
    bottom: 5%;
    right: 15%;
    transform: rotate(15deg);
    animation: float 6s ease-in-out infinite;
    opacity: 0.06;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 173px solid #f9a8d4;
    top: 40%;
    right: 5%;
    opacity: 0.05;
    animation: spin 15s linear infinite reverse;
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 252, 246, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-text {
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-text {
    color: #1a110e;
}

/* Mobile menu */
#mobileMenu {
    background: rgba(254, 252, 246, 0.98);
    backdrop-filter: blur(20px);
}

.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobileMenu.open .mobile-link {
    animation: slideIn 0.4s ease forwards;
}

#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { animation-delay: 0.3s; }

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

/* --- Service Cards --- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #70162e, #dc4466, #ff82a3);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* --- Project Cards --- */
.project-card {
    position: relative;
    cursor: pointer;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    pointer-events: none;
}

.project-card:hover::after {
    border-color: rgba(255, 130, 163, 0.4);
}

/* --- Contact Form --- */
select option {
    background: #fefcf6;
    color: #1a110e;
}

/* --- Scroll Reveal Animations --- */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Only animate when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* --- Selection --- */
::selection {
    background: #fce7eb;
    color: #70162e;
}

/* --- Focus visible --- */
*:focus-visible {
    outline: 2px solid #dc4466;
    outline-offset: 2px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .shape-circle-1 {
        width: 250px;
        height: 250px;
    }
    .shape-circle-2 {
        width: 150px;
        height: 150px;
    }
    .shape-rect-1, .shape-rect-2, .shape-triangle {
        display: none;
    }
}
