html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero image fade into white (desktop overlay only — mobile uses a
   separate stacked banner image with a bottom-edge fade instead) */
.hero-image-container {
    opacity: 0.5;
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 80% 50%, black 20%, transparent 70%);
    mask-image: radial-gradient(ellipse 90% 80% at 80% 50%, black 20%, transparent 70%);
}

/* Mobile hero banner: fixed image with a bottom-edge fade. The mask
   stops are animated by JS on scroll so the fade line moves upward,
   dissolving the image away while the position stays fixed. */
.hero-banner-mobile {
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 80%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 80%);
    will-change: mask-image;
}

/* Left-aligned hero image fade */
.hero-image-left {
    opacity: 0.5;
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 20% 50%, black 20%, transparent 70%);
    mask-image: radial-gradient(ellipse 90% 80% at 20% 50%, black 20%, transparent 70%);
}

/* Mobile dropdown menu animation */
#mobile-menu {
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#mobile-menu.menu-closed {
    opacity: 0;
    transform: scale(0.95) translateY(-0.5rem);
    pointer-events: none;
}

#mobile-menu.menu-open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* Form input autofill styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill {
    -webkit-text-fill-color: #1f2937;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;
    border-color: #d1d5db;
    transition: background-color 5000s ease-in-out 0s;
}

/* Loading spinner for form buttons */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Fade-in animation for success messages */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

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