/* ===== Custom Styles for Thank Me Later Nutrition ===== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(251, 191, 36, 0.3);
    color: #FBBF24;
}

/* ===== Floating Card Animations ===== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(1) {
    animation-delay: 0s;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-12px) rotate(0.5deg);
    }
    66% {
        transform: translateY(6px) rotate(-0.5deg);
    }
}

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

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
    }

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

    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }

    .reveal-left.revealed {
        opacity: 1;
        transform: translateX(0);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }

    .reveal-right.revealed {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Navbar Scroll State ===== */
.navbar-scrolled {
    background: rgba(4, 11, 22, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

/* ===== Gold Gradient Text Utility ===== */
.gold-gradient {
    background: linear-gradient(135deg, #FCD34D 0%, #FBBF24 50%, #D97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Subtle Pattern Overlay ===== */
.pattern-overlay {
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
    background-size: 40px 40px;
}

/* ===== Button Hover Glow ===== */
.btn-glow:hover {
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.3) !important;
}

/* ===== Card Shine Effect ===== */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.03) 50%,
        rgba(255, 255, 255, 0) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: transform 0.8s ease;
    pointer-events: none;
}

.card-shine:hover::before {
    transform: rotate(30deg) translate(20%, 20%);
}

/* ===== Mobile Menu Transition ===== */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* ===== Input Autofill Styling ===== */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0A1628 inset !important;
    -webkit-text-fill-color: #fff !important;
    transition: background-color 5s ease-in-out 0.5s;
}

/* ===== Image Loading Placeholder ===== */
img {
    background: linear-gradient(135deg, #0F1F38 0%, #162A4A 100%);
    min-height: 200px;
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0A1628;
}

::-webkit-scrollbar-thumb {
    background: #1D3560;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FBBF24;
}

/* ===== Focus Visible ===== */
:focus-visible {
    outline: 2px solid #FBBF24;
    outline-offset: 2px;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }

    #hero {
        min-height: 100vh;
    }
}

/* ===== Loading State for Images ===== */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
