/* ========================================
   P.S. Esthetics — Custom Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #059669;
    color: #fefce8;
}

/* --- Section Padding --- */
.section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding-top: 7rem;
        padding-bottom: 7rem;
    }
}

/* --- Navbar --- */
.nav-fixed {
    background: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-fixed.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(4, 120, 87, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #059669;
    transition: width 0.2s ease;
    border-radius: 1px;
}

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

/* --- Mobile Menu --- */
.mobile-menu {
    animation: slideDown 0.3s ease;
}

.mobile-menu.hidden {
    animation: slideUp 0.2s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* --- Buttons --- */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    position: relative;
    overflow: hidden;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
}

/* --- Floating Cards --- */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

.card-1 {
    animation-delay: 0s;
}

.card-2 {
    animation-delay: 1.3s;
}

.card-3 {
    animation-delay: 2.6s;
}

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

/* --- Hero Blobs --- */
.hero-blob {
    animation: blobPulse 6s ease-in-out infinite;
}

.blob-1 {
    animation-delay: 0s;
}

.blob-2 {
    animation-delay: 2s;
}

.blob-3 {
    animation-delay: 4s;
}

@keyframes blobPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.15;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.22;
    }
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

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

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(5, 150, 105, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background 0.3s ease;
}

.service-card:hover::before {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.3), rgba(5, 150, 105, 0.1));
}

/* --- Gallery --- */
.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(4, 78, 59, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0.75rem;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* --- Form Inputs --- */
.input-field {
    font-family: 'Inter', system-ui, sans-serif;
}

.input-field:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.input-field option {
    color: #064e3b;
    background: #fefce8;
}

/* --- Scroll Reveal --- */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .service-card {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
    }
    
    .gallery-item {
        opacity: 0;
        transform: scale(0.96);
    }
    
    .gallery-item.revealed {
        opacity: 1;
        transform: scale(1);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
}

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

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:not(.visible) {
    transform: translateY(10px);
}

.back-to-top:hover {
    transform: translateY(-2px) !important;
}

/* --- Responsive adjustments --- */
@media (max-width: 640px) {
    .section-padding {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }
}

/* --- Focus visible for accessibility --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* --- Print styles --- */
@media print {
    .nav-fixed,
    .back-to-top,
    .scroll-indicator {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
