/* ========================================
   NowRise Landing Page - Custom Styles
   ======================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #0d0d0d;
}

h1, h2 {
    font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
}

/* ========================================
   Noise Texture Overlay
   ======================================== */

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    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)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ========================================
   Ambient Glow Orbs
   ======================================== */

.glow-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.glow-orb-1 {
    width: 600px;
    height: 600px;
    top: -100px;
    left: -150px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(99, 102, 241, 0) 70%);
}

.glow-orb-2 {
    width: 500px;
    height: 500px;
    top: 200px;
    right: -200px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0) 70%);
}

.glow-orb-3 {
    width: 400px;
    height: 400px;
    top: 60%;
    left: 30%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, rgba(139, 92, 246, 0) 70%);
}

/* ========================================
   Navbar
   ======================================== */

.navbar-scrolled {
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   Nav CTA Button - Rotating Gradient Border
   ======================================== */

@property --cta-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.nav-cta-button {
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.nav-cta-button::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 9999px;
    padding: 2px;
    background: conic-gradient(from var(--cta-angle), transparent 0%, rgba(255, 255, 255, 0.35) 25%, transparent 50%, rgba(255, 255, 255, 0.15) 75%, transparent 100%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
    animation: rotateCTABorder 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-cta-button:hover::before {
    opacity: 1;
}

@keyframes rotateCTABorder {
    to {
        --cta-angle: 360deg;
    }
}

/* Fallback for browsers without @property support */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
    .nav-cta-button::before {
        background: rgba(255, 255, 255, 0.15);
        animation: pulseBorder 2s ease-in-out infinite;
    }

    @keyframes pulseBorder {
        0%, 100% { opacity: 0; }
        50% { opacity: 1; }
    }
}

/* ========================================
   Hero Gradient Text
   ======================================== */

.hero-gradient-text {
    background: linear-gradient(to right, #e0e0e0, #6b7280);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Hero Phone Glow & Reflection
   ======================================== */

.hero-phone-wrapper {
    position: relative;
}

.phone-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    z-index: 0;
}

.phone-reflection {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 40px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
    z-index: 0;
}

/* ========================================
   Section Backgrounds & Transitions
   ======================================== */

.social-proof-section {
    background: linear-gradient(180deg, #0d0d0d 0%, #0a0a0a 50%, #0d0d0d 100%);
}

.showcase-section {
    background: radial-gradient(ellipse at center, #111111 0%, #0a0a0a 70%);
}

.cta-section {
    background: radial-gradient(ellipse at center, #111111 0%, #0a0a0a 70%);
}

/* CTA Section Glow */
.cta-glow-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ========================================
   Feature Cards - Premium Styling
   ======================================== */

.feature-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

/* Subtle gradient border effect via pseudo-element */
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 50%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 30px rgba(99, 102, 241, 0.06),
        0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.feature-card:hover::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 60%);
}

/* Feature card icon glow on hover */
.feature-card:hover .feature-icon-container {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}

/* ========================================
   Feature Card Gradient Backgrounds
   ======================================== */

.feature-card-visual {
    position: relative;
}

/* Noise texture on each card visual area */
.feature-card-noise {
    position: absolute;
    inset: 0;
    opacity: 0.12;
    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)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    pointer-events: none;
    z-index: 1;
}

/* Feature card screenshot styling */
.feature-card-screenshot {
    object-fit: cover;
    object-position: bottom;
    margin-bottom: -1px;
}

/* Top-anchored variant (image peeks from top) */
.feature-card-screenshot-top {
    object-position: top;
    margin-bottom: 0;
    margin-top: -1px;
}

/* Visualize — deep indigo/purple */
.feature-card-visualize .feature-card-visual {
    background: linear-gradient(135deg, #1a1035 0%, #2d1b69 40%, #1e1145 70%, #130d2b 100%);
}

/* Breathe — teal/cyan */
.feature-card-breathe .feature-card-visual {
    background: linear-gradient(135deg, #0d2b2b 0%, #134e4a 40%, #0f3d3a 70%, #0a2525 100%);
}

/* Routines — warm amber/brown */
.feature-card-routines .feature-card-visual {
    background: linear-gradient(135deg, #2b1d0d 0%, #4a3520 40%, #3d2a15 70%, #25190a 100%);
}

/* Affirmations — soft rose/mauve */
.feature-card-affirmations .feature-card-visual {
    background: linear-gradient(135deg, #2b0d1f 0%, #4a1d3a 40%, #3d1530 70%, #250a1e 100%);
}

/* Reflection — slate/blue-gray */
.feature-card-reflection .feature-card-visual {
    background: linear-gradient(135deg, #151c2b 0%, #1e2d4a 40%, #192540 70%, #0f1825 100%);
}

/* Streaks — orange/ember */
.feature-card-streaks .feature-card-visual {
    background: linear-gradient(135deg, #2b1508 0%, #5c2d0e 40%, #4a2209 70%, #251205 100%);
}

/* ========================================
   Showcase Phone Glow & Reflection
   ======================================== */

.showcase-phone-wrapper {
    position: relative;
}

.showcase-phone-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.showcase-phone-reflection {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 30px;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    z-index: 0;
}

/* ========================================
   Showcase Pills - Hover Enhancement
   ======================================== */

.showcase-pill {
    transition: all 0.3s ease;
    cursor: default;
}

.showcase-pill:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
    color: #e0e0e0;
}

/* ========================================
   How It Works - Glass Step Numbers
   ======================================== */

.how-step-number {
    position: relative;
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow:
        0 0 25px rgba(255, 255, 255, 0.12),
        0 0 50px rgba(220, 220, 200, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.how-step-number::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 9999px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 60%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ========================================
   Footer - Gradient Line & Styling
   ======================================== */

.footer-section {
    background: #0a0a0a;
    position: relative;
}

.footer-gradient-line {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
}

/* ========================================
   Hero CSS Fallback Animations
   ======================================== */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Floating animation for phone mockup */
@keyframes phoneFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

.hero-phone {
    animation: phoneFloat 4s ease-in-out infinite;
}

.showcase-phone {
    animation: phoneFloat 4s ease-in-out 0.5s infinite;
}

/* Apply CSS fallback animations (GSAP will override these) */
.hero-headline {
    animation: fadeUp 0.8s ease-out both;
}

.hero-subheadline {
    animation: fadeUp 0.8s ease-out 0.15s both;
}

.hero-cta {
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.hero-phone-wrapper {
    animation: slideInRight 0.8s ease-out 0.2s both;
}

/* ========================================
   GSAP Animation Initial States
   (set by JS, but CSS ensures no flash)
   ======================================== */

.gsap-ready .hero-headline,
.gsap-ready .hero-subheadline,
.gsap-ready .hero-cta,
.gsap-ready .hero-phone-wrapper {
    animation: none;
}

/* Keep float animation even when GSAP is active */
.gsap-ready .hero-phone,
.gsap-ready .showcase-phone {
    animation: phoneFloat 4s ease-in-out infinite;
}

/* ========================================
   Coach Card - Premium Glass Styling
   ======================================== */

.coach-card-wrapper {
    isolation: isolate;
}

.coach-card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 140%;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.15) 0%, rgba(99, 102, 241, 0.08) 40%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.coach-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    z-index: 1;
}

.coach-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 50%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ========================================
   Honeypot Anti-Spam
   ======================================== */

.form-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-headline,
    .hero-subheadline,
    .hero-cta,
    .hero-phone,
    .hero-phone-wrapper,
    .social-proof-text,
    .feature-card,
    .showcase-phone,
    .showcase-pill,
    .testimonial-quote,
    .cta-signup {
        opacity: 1 !important;
        transform: none !important;
    }

    .glow-orb {
        display: none;
    }

    .noise-overlay {
        display: none;
    }

    .nav-cta-button::before {
        display: none;
    }

    .hero-phone,
    .showcase-phone {
        animation: none !important;
    }
}
