/* ========================================
   Sunrise Nutrition — Custom Styles
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #0a1628;
    color: #e8eef5;
}

/* Selection */
::selection {
    background-color: rgba(74, 222, 128, 0.3);
    color: #f0fdf4;
}

/* ========================================
   Geometric Background Shapes
   ======================================== */
.geo-shape {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.shape-circle-1 {
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.06) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: float-slow 20s ease-in-out infinite;
}

.shape-circle-2 {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.05) 0%, transparent 70%);
    bottom: 20%;
    left: -80px;
    animation: float-slow 25s ease-in-out infinite reverse;
}

.shape-circle-3 {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.04) 0%, transparent 70%);
    top: 50%;
    right: 10%;
    animation: float-slow 18s ease-in-out infinite;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid rgba(74, 222, 128, 0.04);
    top: 40%;
    left: 5%;
    animation: rotate-slow 30s linear infinite;
}

.shape-diamond {
    width: 60px;
    height: 60px;
    background: rgba(251, 191, 36, 0.06);
    top: 60%;
    right: 8%;
    transform: rotate(45deg);
    animation: float-slow 22s ease-in-out infinite;
}

.shape-ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(74, 222, 128, 0.08);
    bottom: 15%;
    right: 20%;
    animation: rotate-slow 40s linear infinite reverse;
}

/* ========================================
   Floating Stat Cards (Hero)
   ======================================== */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    animation-delay: 0s;
}

.card-2 {
    animation-delay: 2s;
}

.card-3 {
    animation-delay: 4s;
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

/* ========================================
   Scroll Reveal Animations
   ======================================== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Progressive enhancement: only animate if user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Staggered delays for grid items */
    .reveal:nth-child(1) { transition-delay: 0.05s; }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.15s; }
    .reveal:nth-child(4) { transition-delay: 0.2s; }
    .reveal:nth-child(5) { transition-delay: 0.25s; }
    .reveal:nth-child(6) { transition-delay: 0.3s; }
}

/* ========================================
   Keyframe Animations
   ======================================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(15px, -20px) rotate(2deg); }
    50% { transform: translate(-10px, -35px) rotate(-1deg); }
    75% { transform: translate(-20px, -15px) rotate(1deg); }
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   Navbar Scroll State
   ======================================== */
.nav-scrolled {
    background: rgba(10, 22, 40, 0.92) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(74, 222, 128, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-scrolled .nav-link {
    color: #c5d3e4;
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-menu-link {
    display: block;
}

/* ========================================
   Smooth Image Loading
   ======================================== */
img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Focus Styles
   ======================================== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2a5a8a;
}

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