/* ===========================
   NutriTracker Vitrine Styles
   Editorial Wellness Aesthetic
   =========================== */

/* --- Base --- */
body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #fafaf7;
    color: #1a1a2e;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-heading {
    font-family: 'Montserrat', sans-serif;
}

/* --- Navigation --- */
.glass-nav {
    background: rgba(250, 250, 247, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* --- Mobile Menu --- */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: #fff;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

.mobile-menu.open .mobile-menu-panel {
    transform: translateX(0);
}

/* --- Gradient Text --- */
.text-gradient {
    background: linear-gradient(135deg, #22c55e 0%, #0d9488 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.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; }

/* Hero entrance */
.hero-fade {
    opacity: 0;
    transform: translateY(24px);
    animation: heroFade 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-fade-d1 { animation-delay: 0.15s; }
.hero-fade-d2 { animation-delay: 0.3s; }
.hero-fade-d3 { animation-delay: 0.45s; }
.hero-fade-d4 { animation-delay: 0.6s; }

@keyframes heroFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Phone Mockup --- */
.phone-mockup {
    position: relative;
    width: 260px;
    height: 520px;
    background: #131318;
    border-radius: 2.5rem;
    overflow: hidden;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 24px;
    background: #0a0a0e;
    border-radius: 0 0 1rem 1rem;
    z-index: 10;
}

.phone-screen {
    position: absolute;
    inset: 0;
    padding: 32px 16px 16px;
    display: flex;
    flex-direction: column;
    color: #e5e5e5;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}

/* Phone mockup inner elements */
.mock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 4px;
}

.mock-header .mock-title {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
}

.mock-progress-ring {
    width: 110px;
    height: 110px;
    margin: 0 auto 16px;
    position: relative;
}

.mock-progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.mock-progress-ring .ring-bg {
    fill: none;
    stroke: #2a2a35;
    stroke-width: 6;
}

.mock-progress-ring .ring-fill {
    fill: none;
    stroke: #22c55e;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 85;
    transition: stroke-dashoffset 1s ease;
}

.mock-progress-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mock-progress-center .kcal-value {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.mock-progress-center .kcal-label {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 2px;
}

.mock-macros {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.mock-macro-item {
    background: #1e1e28;
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
}

.mock-macro-item .macro-label {
    font-size: 10px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.mock-macro-item .macro-bar {
    height: 4px;
    border-radius: 2px;
    background: #2a2a35;
    margin-bottom: 6px;
    overflow: hidden;
}

.mock-macro-item .macro-bar-fill {
    height: 100%;
    border-radius: 2px;
}

.mock-macro-item .macro-value {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

/* Meal items in mockup */
.mock-meal {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #1e1e28;
    border-radius: 12px;
    margin-bottom: 8px;
}

.mock-meal-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.mock-meal-info {
    flex: 1;
    min-width: 0;
}

.mock-meal-name {
    font-weight: 600;
    font-size: 12px;
    color: #fff;
}

.mock-meal-detail {
    font-size: 10px;
    color: #9ca3af;
}

.mock-meal-kcal {
    font-size: 12px;
    font-weight: 700;
    color: #22c55e;
    white-space: nowrap;
}

/* Microphone pulse */
.mic-pulse {
    animation: micPulse 2s ease-in-out infinite;
}

@keyframes micPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(34, 197, 94, 0); }
}

/* Voice wave animation */
.voice-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 40px;
}

.voice-wave span {
    display: block;
    width: 3px;
    background: #22c55e;
    border-radius: 2px;
    animation: waveBar 1.2s ease-in-out infinite;
}

.voice-wave span:nth-child(1) { height: 12px; animation-delay: 0s; }
.voice-wave span:nth-child(2) { height: 24px; animation-delay: 0.15s; }
.voice-wave span:nth-child(3) { height: 36px; animation-delay: 0.3s; }
.voice-wave span:nth-child(4) { height: 20px; animation-delay: 0.45s; }
.voice-wave span:nth-child(5) { height: 28px; animation-delay: 0.6s; }
.voice-wave span:nth-child(6) { height: 16px; animation-delay: 0.75s; }
.voice-wave span:nth-child(7) { height: 32px; animation-delay: 0.9s; }

@keyframes waveBar {
    0%, 100% { transform: scaleY(0.4); }
    50% { transform: scaleY(1); }
}

/* --- Step connector line --- */
.step-connector {
    position: absolute;
    top: 36px;
    left: calc(12.5% + 24px);
    right: calc(12.5% + 24px);
    height: 2px;
    background: linear-gradient(to right, #22c55e, #0d9488);
    opacity: 0.2;
    z-index: 0;
}

/* --- Pricing card highlight --- */
.pricing-popular {
    position: relative;
}

.pricing-popular::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, #22c55e, #0d9488);
    z-index: -1;
}

/* --- Testimonial cards --- */
.testimonial-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transform: translateY(-4px);
}

/* --- Section divider --- */
.section-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #22c55e, #0d9488);
    border-radius: 2px;
}

/* --- Floating badge --- */
.float-badge {
    animation: floatBadge 3s ease-in-out infinite;
}

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

/* --- CTA gradient background --- */
.cta-gradient {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #0d9488 100%);
}

/* --- Organic blob shapes --- */
.blob-shape {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: blobMorph 8s ease-in-out infinite;
}

@keyframes blobMorph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

/* --- Photo placeholder --- */
.photo-placeholder {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
}

/* --- Noise texture overlay --- */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* --- Responsive adjustments --- */
@media (max-width: 767px) {
    .phone-mockup {
        width: 220px;
        height: 440px;
    }

    .phone-mockup::before {
        width: 80px;
        height: 20px;
    }

    .phone-screen {
        padding: 28px 12px 12px;
        font-size: 11px;
    }

    .mock-progress-ring {
        width: 90px;
        height: 90px;
    }

    .mock-progress-center .kcal-value {
        font-size: 18px;
    }

    .step-connector {
        display: none;
    }
}

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

::-webkit-scrollbar-track {
    background: #fafaf7;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
