/* Reset and base styles.
   Mobile browsers treat 100vh as the *large* viewport (chrome hidden). That
   makes a "full screen" page slightly taller than the visible area while the
   address/nav bars are showing, so a swipe "scrolls" and Edge/Chrome Android
   hide all browser UI. For a no-scroll layout, lock to the *small* viewport
   (svh), clamp max-height, and pin the body so the document cannot scroll. */
html {
    height: 100%;
    height: 100dvh; /* mid fallback if svh unsupported */
    height: 100svh;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    height: 100%;
    height: 100dvh;
    height: 100svh;
    max-height: 100%;
    max-height: 100dvh;
    max-height: 100svh;
    overflow: hidden;
    overscroll-behavior: none;
    position: fixed;
    inset: 0;
    width: 100%;
}

/* ===== ANIMATIONS ===== */

/* Fade-in and slide-up animation for hero content */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Gentle floating animation for logo */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* Subtle pulse glow for icon buttons on hover */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(125, 174, 131, 0.4);
    }
    50% {
        box-shadow: 0 0 15px 3px rgba(125, 174, 131, 0.6);
    }
}

/* Slow zoom animation for hero background */
@keyframes slowZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.05);
    }
}

/* Staggered fade-in for child elements */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtle text shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Hero background */
.hero {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/mcnishnsu-1600x900.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    /* Animation: very slow subtle zoom effect */
    animation: slowZoom 20s ease-in-out infinite alternate;
}

/* Header Icons */
.header-icons {
    display: grid;
    grid-template-columns: repeat(3, 70px);
    gap: 1.5rem;
    margin-top: 1.5rem;
    justify-content: center;
}

/* Staggered animation for each icon button */
.header-icons .icon-button:nth-child(1) {
    animation: fadeIn 0.5s ease-out 0.6s both;
}

.header-icons .icon-button:nth-child(2) {
    animation: fadeIn 0.5s ease-out 0.75s both;
}

.header-icons .icon-button:nth-child(3) {
    animation: fadeIn 0.5s ease-out 0.9s both;
}

.icon-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.icon-button {
    color: white;
    text-decoration: none;
    background-color: rgba(24, 72, 52, 0.9);
    width: 70px;
    height: 70px;
    min-width: 70px;
    min-height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0;
    box-sizing: border-box;
    flex-shrink: 0;
    /* Animation: smooth hover transitions */
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.icon-button:hover {
    transform: scale(1.1);
    background-color: rgba(24, 72, 52, 1);
    border-color: rgba(125, 174, 131, 0.8);
    box-shadow: 0 0 20px 4px rgba(125, 174, 131, 0.5);
}

/* Inline SVG icons */
.icon-svg {
    width: 50%;
    height: 50%;
    transition: transform 0.3s ease;
}

.icon-button:hover .icon-svg {
    transform: rotate(8deg) scale(1.1);
}

/* Venmo V icon - slightly larger to match visual weight */
.venmo-v {
    width: 55%;
    height: 55%;
}

/* Hero Text Container */
.hero-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    background-color: rgba(0, 19, 12, 0.6);
    padding: 2rem;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Animation: fade in and slide up on page load */
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Logo */
.logo {
    width: 300px;
    height: auto;
    margin-bottom: 2rem;
    /* Animation: gentle floating effect */
    animation: float 4s ease-in-out infinite;
}

/* Text Styles */
.hero-text h1 {
    margin: 0 0 1rem;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6),
                 -1px -1px 0 rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    /* Animation: staggered fade-in + shimmer effect */
    animation: fadeIn 0.6s ease-out 0.3s both;
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #ffffff 40%,
        #a8d4ae 50%,
        #ffffff 60%,
        #ffffff 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: white;
}

.hero-text h1:hover {
    animation: fadeIn 0.6s ease-out 0.3s both, shimmer 3s ease-in-out infinite;
}

.hero-text h3 {
    animation: fadeIn 0.6s ease-out 0.5s both;
}

.hero-text p {
    margin: 0;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 19, 12, 0.6);
    /* Animation: staggered fade-in */
    animation: fadeIn 0.6s ease-out 0.4s both;
}

/* Footer */
.site-footer {
    background-color: rgba(0, 19, 12, 0.6);
    color: #7DAE83;
    padding: 0.5rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 2;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    /* Animation: slide up from bottom */
    animation: fadeIn 0.5s ease-out 1.1s both;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Footer Links */
.maps-link {
    color: #7DAE83;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.maps-link:hover {
    color: #a8d4ae;
    text-shadow: 0 0 8px rgba(125, 174, 131, 0.6);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .hero-text {
        padding: 1.5rem 1.5rem 6.5rem 1.5rem; /* Increased bottom padding to prevent footer overlap */
        max-width: 90%; /* Slightly reduce width on mobile for better margins */
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .icon-button {
        width: 60px;
        height: 60px;
        min-width: 60px;
        min-height: 60px;
        font-size: 1.6rem;
    }

    .header-icons {
        grid-template-columns: repeat(3, 60px);
        gap: 1.25rem;
        margin-top: 1.2rem;
    }

    /* Ensure footer doesn't cover content on mobile */
    .site-footer {
        padding: 0.8rem 0.5rem; /* Slightly more padding */
        padding-bottom: calc(0.8rem + env(safe-area-inset-bottom)); /* Safe area support */
    }

    .footer-content p {
        font-size: 0.8rem; /* Smaller footer text on mobile */
    }

    /* Logo size adjustment for mobile */
    .logo {
        width: 250px; /* Smaller logo on mobile */
        margin-bottom: 1.5rem;
    }
}

/* Extra small devices (phones in portrait mode) */
@media (max-width: 480px) {
    .hero-text {
        padding: 1rem 1rem 7rem 1rem; /* Increased bottom padding for very small screens */
        width: 95%; /* Almost full width on very small screens */
    }

    .hero-text h1 {
        font-size: 1.8rem; /* Smaller heading on very small screens */
    }

    .hero-text h3 {
        font-size: 1.1rem; /* Smaller subheading */
    }

    .logo {
        width: 200px; /* Even smaller logo on very small screens */
        margin-bottom: 1rem;
    }

    .icon-button {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        font-size: 1.5rem;
    }

    .header-icons {
        grid-template-columns: repeat(3, 56px);
        gap: 1rem;
        margin-top: 1rem;
    }

    .site-footer {
        padding: 0.6rem 0.3rem;
        padding-bottom: calc(0.6rem + env(safe-area-inset-bottom));
    }

    .footer-content p {
        font-size: 0.7rem; /* Very small footer text */
        line-height: 1.2;
    }
}

/* Landscape orientation adjustments for phones */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-text {
        padding: 1rem 1.5rem 3rem 1.5rem; /* Less bottom padding in landscape */
        transform: translate(-50%, -45%); /* Slightly higher position in landscape */
    }

    .logo {
        width: 180px; /* Smaller logo in landscape mode */
        margin-bottom: 0.8rem;
    }

    .hero-text h1 {
        font-size: 1.6rem; /* Smaller heading in landscape */
        margin-bottom: 0.5rem;
    }

    .site-footer {
        padding: 0.4rem 0.5rem;
        padding-bottom: calc(0.4rem + env(safe-area-inset-bottom));
    }
}