/* === Custom Styles for Frosty Freeze Creamery === */

/* Base */
html {
    scroll-behavior: smooth;
}

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

::selection {
    background: #1B4332;
    color: #fdfcf7;
}

/* === Geometric Background Shapes === */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

.geo-circle-1 {
    top: 10%;
    left: 5%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(27, 67, 50, 0.04) 0%, transparent 70%);
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle-2 {
    top: 60%;
    right: 0%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.06) 0%, transparent 70%);
    animation: float-slow 25s ease-in-out infinite reverse;
}

.geo-rect-1 {
    top: 25%;
    right: 8%;
    width: 120px;
    height: 120px;
    background: rgba(27, 67, 50, 0.03);
    border-radius: 24px;
    transform: rotate(45deg);
    animation: spin-slow 30s linear infinite;
}

.geo-triangle {
    bottom: 15%;
    left: 3%;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(251, 191, 36, 0.05);
    animation: float-slow 15s ease-in-out infinite;
}

.geo-dots {
    top: 40%;
    left: 15%;
    width: 80px;
    height: 80px;
    background-image: radial-gradient(circle, rgba(27, 67, 50, 0.08) 1px, transparent 1px);
    background-size: 12px 12px;
    animation: float-slow 18s ease-in-out infinite reverse;
}

/* === Animations === */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(2deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes spin-slow {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* === Hero Animations === */
.hero-badge {
    opacity: 0;
    animation: fade-up 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-badge {
    animation-delay: 0.1s;
}

h1, h1 .font-semibold, h1 .italic, h1 .relative {
    opacity: 0;
    animation: fade-up 0.8s ease forwards;
}

h1 { animation-delay: 0.2s; }
h1 > :nth-child(1) { animation-delay: 0.2s; }
h1 > :nth-child(2) { animation-delay: 0.35s; }
h1 > :nth-child(3) { animation-delay: 0.5s; }
h1 > :nth-child(4) { animation-delay: 0.65s; }
h1 > :nth-child(5) { animation-delay: 0.8s; }
h1 > :nth-child(6) { animation-delay: 0.95s; }

p.text-lg ~ p,
p.text-lg:nth-of-type(2) {
    opacity: 0;
    animation: fade-up 0.8s ease forwards;
    animation-delay: 0.7s;
}

/* All hero paragraphs */
#hero p {
    opacity: 0;
    animation: fade-up 0.8s ease forwards;
    animation-delay: 0.7s;
}

#hero .flex.flex-wrap {
    opacity: 0;
    animation: fade-up 0.8s ease forwards;
    animation-delay: 0.85s;
}

#hero .flex.gap-12 {
    opacity: 0;
    animation: fade-up 0.8s ease forwards;
    animation-delay: 1s;
}

#hero .relative:last-child .rounded-3xl {
    opacity: 0;
    animation: fade-in 1s ease forwards;
    animation-delay: 0.5s;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === Scroll Reveal === */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* === Navbar === */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 252, 247, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #1B4332;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* === Mobile Menu === */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

.menu-line {
    transition: all 0.3s ease;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
}

/* === Flavor Cards === */
.flavor-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.5s ease;
}

.flavor-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.flavor-card.visible:nth-child(1) { transition-delay: 0.05s; }
.flavor-card.visible:nth-child(2) { transition-delay: 0.1s; }
.flavor-card.visible:nth-child(3) { transition-delay: 0.15s; }
.flavor-card.visible:nth-child(4) { transition-delay: 0.2s; }
.flavor-card.visible:nth-child(5) { transition-delay: 0.25s; }
.flavor-card.visible:nth-child(6) { transition-delay: 0.3s; }

/* === Smooth image loading === */
img {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img.loaded {
    opacity: 1;
}

/* === Contact Form === */
#contact-form input:focus,
#contact-form textarea:focus {
    box-shadow: 0 0 0 4px rgba(27, 67, 50, 0.08);
}

/* === Responsive === */
@media (max-width: 768px) {
    .geo-circle-1 {
        width: 150px;
        height: 150px;
    }
    
    .geo-circle-2 {
        width: 250px;
        height: 250px;
    }
    
    .geo-rect-1 {
        width: 60px;
        height: 60px;
    }
    
    .geo-triangle {
        border-left-width: 30px;
        border-right-width: 30px;
        border-bottom-width: 52px;
    }
}

/* === Print === */
@media print {
    .geo-shape,
    .animate-float {
        display: none;
    }
}
