/**
 * Morya Solution Custom Styles
 * 
 * This stylesheet contains custom visual effects and refinements
 * that enhance the professional aesthetic inspired by reference sites.
 */

/* ===================================
   Smooth Scroll Behavior
   =================================== */
html.scroll-smooth {
    scroll-behavior: smooth;
}

/* ===================================
   Hero Gradient Background
   =================================== */
.hero-gradient {
    background: linear-gradient(135deg, rgba(27, 38, 59, 0.95) 0%, rgba(13, 27, 42, 0.9) 100%), 
                url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&q=80&w=2070');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* ===================================
   Glassmorphism Navigation
   =================================== */
.glassmorphism-nav {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--wp--preset--color--alert-gold);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Fixed navigation styling */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 300ms ease-in-out;
}

/* ===================================
   Section Dividers
   =================================== */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--wp--preset--color--alert-gold), transparent);
    opacity: 0.6;
}

/* ===================================
   Card Hover Effects
   =================================== */
.service-card,
.feature-card {
    transition: all 300ms ease-in-out;
    border: 1px solid var(--wp--preset--color--alert-gold);
}

.service-card:hover,
.feature-card:hover {
    border-color: var(--wp--preset--color--slate-teal);
    box-shadow: 0 8px 16px rgba(27, 38, 59, 0.08);
    transform: translateY(-2px);
}

/* Icon hover transitions */
.service-icon {
    transition: all 300ms ease-in-out;
}

.service-card:hover .service-icon {
    background-color: var(--wp--preset--color--oxford-navy) !important;
    color: var(--wp--preset--color--white) !important;
}

/* ===================================
   Typography Refinements
   =================================== */
.text-balance {
    text-wrap: balance;
}

.section-label {
    font-family: var(--wp--preset--font-family--inter);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--wp--preset--color--slate-teal);
}

/* Heading tracking adjustments */
h1, .wp-block-heading.is-style-display {
    letter-spacing: -0.02em;
}

/* ===================================
   Button Transitions
   =================================== */
.wp-block-button__link,
.wp-element-button {
    transition: background-color 300ms ease, color 300ms ease, box-shadow 300ms ease, border-color 300ms ease;
}

.wp-block-button.is-style-primary .wp-block-button__link {
    background-color: var(--wp--preset--color--slate-teal);
    border: none;
}

.wp-block-button.is-style-primary .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--oxford-navy);
    box-shadow: 0 4px 12px rgba(27, 38, 59, 0.15);
}

.wp-block-button.is-style-outline .wp-block-button__link {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: transparent;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ===================================
   Badge Styles
   =================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.badge-pulse {
    height: 0.5rem;
    width: 0.5rem;
    border-radius: 50%;
    background-color: var(--wp--preset--color--slate-teal);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===================================
   Feature Numbers
   =================================== */
.feature-number {
    font-family: var(--wp--preset--font-family--inter);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--wp--preset--color--oxford-navy);
    opacity: 0.2;
}

/* ===================================
   Border Accent Elements
   =================================== */
.border-accent-left {
    border-left: 2px solid var(--wp--preset--color--slate-teal);
    padding-left: 1rem;
}

/* ===================================
   Background Overlays
   =================================== */
.bg-overlay-dark {
    position: relative;
}

.bg-overlay-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.7);
    z-index: 1;
}

.bg-overlay-dark > * {
    position: relative;
    z-index: 2;
}

/* ===================================
   Responsive Images
   =================================== */
.wp-block-image img {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===================================
   Mobile Menu
   =================================== */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }
    
    .desktop-nav {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-nav-toggle {
        display: none;
    }
    
    .mobile-nav-menu {
        display: none !important;
    }
}

/* ===================================
   Spacing Utilities
   =================================== */
.section-padding {
    padding-top: var(--wp--preset--spacing--2xl);
    padding-bottom: var(--wp--preset--spacing--2xl);
}

@media (max-width: 768px) {
    .section-padding {
        padding-top: var(--wp--preset--spacing--lg);
        padding-bottom: var(--wp--preset--spacing--lg);
    }
}

/* ===================================
   Link Transitions
   =================================== */
a {
    transition: color 300ms ease-in-out;
}

/* ===================================
   Container Constraints
   =================================== */
.constrained-width {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================
   Footer Styling
   =================================== */
.site-footer {
    border-top: 1px solid var(--wp--preset--color--alert-gold);
}

/* ===================================
   Accessibility Improvements
   =================================== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--wp--preset--color--oxford-navy);
    color: var(--wp--preset--color--white);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* ===================================
   Stat Items (About Page)
   =================================== */
.stat-item {
    text-align: center;
    position: relative;
    transition: all 300ms ease-in-out;
}

.stat-item:hover {
    transform: translateY(-4px);
}

.stat-item::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: var(--wp--preset--color--alert-gold);
}

.wp-block-column:last-child .stat-item::after {
    display: none;
}

/* Value Cards (About Page) */
.value-card {
    min-height: 280px;
}

/* ===================================
   Framer-style Scroll Animations
   =================================== */

/* Animated gradient line for section dividers */
.section-divider {
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--wp--preset--color--alert-gold) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer-line 3s ease-in-out infinite;
}

@keyframes shimmer-line {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Smooth GPU-accelerated transitions for animated elements */
.animate-on-scroll {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Service card — lift-and-glow on hover */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 400ms ease;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(65, 90, 119, 0.06),
        transparent 60%
    );
    pointer-events: none;
}

.service-card:hover::after {
    opacity: 1;
}

/* Feature card — subtle inner border glow */
.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--wp--preset--color--slate-teal),
        transparent
    );
    opacity: 0;
    transition: opacity 500ms ease;
}

.feature-card:hover::before {
    opacity: 1;
}

/* Hero — subtle text glow on the accent mark */
.hero-gradient mark.has-inline-color {
    transition: text-shadow 600ms ease;
}

.hero-gradient mark.has-inline-color:hover {
    text-shadow: 0 0 30px rgba(65, 90, 119, 0.4);
}

/* Badge pulse — enhanced with scale */
.badge-pulse {
    animation: pulse-scale 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-scale {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.3);
    }
}

/* Smooth border-accent reveal */
.border-accent-left {
    position: relative;
}

.border-accent-left::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 0;
    background: var(--wp--preset--color--slate-teal);
    transition: height 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* When revealed, grow the accent line */
.border-accent-left[style*="opacity: 1"]::before,
.border-accent-left:not(.animate-on-scroll)::before {
    height: 100%;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }

    .section-divider {
        animation: none;
    }

    .badge-pulse {
        animation: none;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .site-header,
    .site-footer,
    .wp-block-button {
        display: none;
    }
}
