/* EcoPoint Mulch — Premium Custom Styles */

[x-cloak] {
    display: none !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 1024px) {
    html {
        scroll-padding-top: 6rem;
    }
}

.safe-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

::selection {
    background-color: #2E6B2F;
    color: white;
}

:focus-visible {
    outline: 2px solid #2E6B2F;
    outline-offset: 2px;
    border-radius: 4px;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F4F4F4;
}

::-webkit-scrollbar-thumb {
    background: #2E6B2F;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #245424;
}

/* ─── Cross-browser image handling ─── */

img, video, svg {
    max-width: 100%;
    height: auto;
}

img {
    display: block;
}

/* ─── iOS Safari form reset ─── */

input, select, textarea, button {
    font: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 32px;
    border-radius: 12px;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    border-radius: 12px;
}

/* ─── iOS Safari safe area support ─── */

@supports (padding: env(safe-area-inset-bottom)) {
    .safe-bottom {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

/* ─── Microanimations ─── */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 5s ease-in-out 1s infinite;
}

.animate-pulse-soft {
    animation: pulse-soft 3s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* ─── Card hover microinteractions ─── */

.card-hover {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .card-hover:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.12);
    }
}

/* ─── Icon containers ─── */

.icon-box {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
}

.group:hover .icon-box {
    transform: scale(1.1) rotate(-3deg);
}

/* ─── Button press effect ─── */

.btn-press {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-press:active {
    transform: scale(0.97);
}

/* ─── Gradient text ─── */

.gradient-text {
    background: linear-gradient(135deg, #2E6B2F 0%, #5FAF3A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── SVG divider positioning ─── */

.section-divider {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.section-divider-top {
    top: -1px;
}

.section-divider-bottom {
    bottom: -1px;
}

.section-divider svg {
    display: block;
    width: 100%;
    height: 40px;
}

@media (min-width: 768px) {
    .section-divider svg {
        height: 60px;
    }
}

/* ─── Photo overlay panels ─── */

.photo-overlay {
    position: relative;
    overflow: hidden;
}

.photo-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    z-index: 1;
}

.photo-overlay > * {
    position: relative;
    z-index: 2;
}

/* ─── Hero parallax-like depth ─── */

.hero-bg {
    background-attachment: scroll;
    background-size: cover;
    background-position: center;
}

@supports (background-attachment: fixed) {
    @media (min-width: 1024px) and (hover: hover) {
        .hero-bg {
            background-attachment: fixed;
        }
    }
}

/* ─── Touch-friendly tap targets (48px minimum) ─── */

@media (pointer: coarse) {
    a, button {
        min-height: 44px;
    }
}

/* ─── Prevent content overflow in all sections ─── */

section, footer {
    overflow-x: clip;
}

/* ─── Stagger animation delays for AOS ─── */

[data-aos][data-aos-delay="100"] { transition-delay: 100ms; }
[data-aos][data-aos-delay="200"] { transition-delay: 200ms; }
[data-aos][data-aos-delay="300"] { transition-delay: 300ms; }
[data-aos][data-aos-delay="400"] { transition-delay: 400ms; }
