/* Wasatch Cleaners - Premium Design System */

/* Smooth link underline animation */
.premium-link {
    position: relative;
    text-decoration: none;
}
.premium-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}
.premium-link:hover::after {
    width: 100%;
}

/* Card hover lift */
.premium-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0,0,0,0.08);
}

/* Button hover effect */
.premium-btn {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(107, 127, 107, 0.3);
}
.premium-btn:active {
    transform: translateY(0);
}

/* Image zoom on hover */
.premium-img-zoom {
    overflow: hidden;
}
.premium-img-zoom img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.premium-img-zoom:hover img {
    transform: scale(1.05);
}

/* Fade in on load */
@keyframes premiumFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.premium-fade-in {
    animation: premiumFadeIn 0.6s ease forwards;
}

/* Gradient text for headings */
.premium-gradient-text {
    background: linear-gradient(135deg, #6B7F6B 0%, #8B9E8B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle grain texture */
.premium-grain::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.02;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%%' height='100%%' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Glass card effect */
.premium-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Divider */
.premium-divider {
    width: 50px;
    height: 1px;
    background: #C4A882;
    margin: 1.5rem auto;
}

/* iOS select fix */
@media (max-width: 640px) {
    select, input, textarea { font-size: 16px !important; }
}


/* ===== ROUND 5 ADDITIONS ===== */

/* Smooth page load fade */
body { animation: pageLoad 0.5s ease; }
@keyframes pageLoad { from { opacity: 0; } to { opacity: 1; } }

/* Hover glow effect for CTA buttons */
.premium-glow:hover {
    box-shadow: 0 0 20px rgba(107, 127, 107, 0.25), 0 8px 25px -5px rgba(107, 127, 107, 0.3);
}

/* Text selection color */
::selection { background: rgba(107, 127, 107, 0.2); color: #2f3830; }
::-moz-selection { background: rgba(107, 127, 107, 0.2); color: #2f3830; }

/* Smooth focus states for all interactive elements */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #8b9e8b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Premium scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #FAFAF7; }
::-webkit-scrollbar-thumb { background: #d4daca; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b3bda5; }

/* Animated underline on links in content */
.content-area a:not(.btn-book):not(.btn-outline) {
    text-decoration: none;
    background-image: linear-gradient(#C4A882, #C4A882);
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: background-size 0.3s ease;
}
.content-area a:not(.btn-book):not(.btn-outline):hover {
    background-size: 100% 1px;
}

/* Stagger animation for grid children */
.stagger-children > *:nth-child(1) { animation-delay: 0s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.5s; }

/* Pulse ring for emergency/live elements */
.pulse-ring {
    position: relative;
}
.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid currentColor;
    opacity: 0;
    animation: pulseRing 2s ease-out infinite;
}
@keyframes pulseRing {
    0% { transform: scale(0.95); opacity: 0.5; }
    100% { transform: scale(1.1); opacity: 0; }
}

/* Smooth number transition */
.number-animate {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    font-variant-numeric: tabular-nums;
}

/* Badge/chip style */
.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Tooltip */
.premium-tooltip {
    position: relative;
}
.premium-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    padding: 6px 12px;
    background: #3D372F;
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
}
.premium-tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Image skeleton loading */
img[loading="lazy"] {
    background: linear-gradient(110deg, #F5F0EB 8%, #faf8f5 18%, #F5F0EB 33%);
    background-size: 200% 100%;
    animation: shimmerLoad 1.5s linear infinite;
}
img[loading="lazy"].loaded {
    animation: none;
    background: none;
}
@keyframes shimmerLoad {
    to { background-position: -200% 0; }
}

/* Form input premium style */
.premium-input {
    border: 1px solid #EDE5DB;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    background: white;
    transition: all 0.3s ease;
    color: #3D372F;
}
.premium-input:focus {
    outline: none;
    border-color: #8b9e8b;
    box-shadow: 0 0 0 3px rgba(139, 158, 139, 0.15);
}
.premium-input::placeholder {
    color: #C4B09A;
}

/* Accordion smooth open */
.premium-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
    padding: 0 1.5rem;
}
.premium-accordion-content.open {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

/* Floating label input */
.floating-label-group {
    position: relative;
}
.floating-label-group label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    color: #C4B09A;
    pointer-events: none;
    transition: all 0.2s ease;
}
.floating-label-group input:focus ~ label,
.floating-label-group input:not(:placeholder-shown) ~ label {
    top: 0.25rem;
    font-size: 0.625rem;
    color: #6B7F6B;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Parallax helper */
.parallax-slow { will-change: transform; }

/* Count-up animation trigger */
.count-up { opacity: 0; transform: translateY(10px); transition: all 0.5s ease; }
.count-up.visible { opacity: 1; transform: translateY(0); }

/* Ribbon badge (for pricing cards) */
.premium-ribbon {
    position: absolute;
    top: -1px;
    right: 20px;
    background: #C4A882;
    color: #3D372F;
    padding: 4px 12px 6px;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 0 0 6px 6px;
}
