/* Font Face Declarations */
@font-face {
    font-family: 'JUST Sans';
    src: url('JUST Sans/JUST Sans ExLight.otf') format('opentype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'JUST Sans';
    src: url('JUST Sans/JUST Sans Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'JUST Sans';
    src: url('JUST Sans/JUST Sans Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'JUST Sans';
    src: url('JUST Sans/JUST Sans Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'JUST Sans';
    src: url('JUST Sans/JUST Sans SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'JUST Sans';
    src: url('JUST Sans/JUST Sans Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'JUST Sans';
    src: url('JUST Sans/JUST Sans ExBold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
}

/* CSS Variables for easy customization */
:root {
    --video-max-width: 400px;
    --glow-color-primary: #9333EA; /* Purple */
    --glow-color-secondary: #EC4899; /* Pink */
    --glow-color-accent: #3B82F6; /* Blue */
    --video-border: rgba(255, 255, 255, 0.25);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0a0a0a; /* Very dark base */
    font-family: 'JUST Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Sophisticated multi-layered gradient background - mindfulness inspired */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Multi-directional gradient with meditation-inspired colors */
    background: 
        /* Central breathing orb - soft peach/pink for love & healing */
        radial-gradient(ellipse at 50% 45%, 
            rgba(255, 228, 225, 0.18) 0%,     /* Warm peach for healing */
            rgba(236, 72, 153, 0.08) 20%,     /* Soft pink for love */
            rgba(0, 0, 0, 0.5) 60%,            /* Fade to black */
            transparent 100%),
        /* Top-left spiritual purple - for growth & transformation */
        radial-gradient(ellipse at 15% -10%, 
            rgba(147, 51, 234, 0.25) 0%,      /* Deeper purple for spiritual growth */
            rgba(230, 215, 255, 0.12) 25%,    /* Lighter purple */
            transparent 50%),
        /* Bottom-right golden glow - for gratitude & warmth */
        radial-gradient(ellipse at 85% 110%, 
            rgba(255, 245, 230, 0.22) 0%,     /* Golden cream for gratitude */
            rgba(255, 200, 100, 0.08) 30%,    /* Warm amber */
            transparent 50%),
        /* Right-side blue serenity - for calm & connection */
        radial-gradient(ellipse at 110% 50%, 
            rgba(59, 130, 246, 0.18) 0%,      /* Calming blue for connection */
            rgba(224, 242, 255, 0.08) 25%,    /* Light sky blue */
            transparent 45%),
        /* Base gradient with richer dark tones */
        linear-gradient(135deg,
            rgba(15, 8, 20, 0.95) 0%,         /* Deep purple-black */
            rgba(50, 35, 65, 0.85) 30%,       /* Rich purple-black */
            rgba(35, 25, 30, 0.9) 50%,        /* Dark with warm undertone */
            rgba(25, 35, 50, 0.85) 70%,       /* Dark with blue undertone */
            rgba(20, 15, 10, 0.95) 100%);     /* Deep warm black */
    
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: normal;
}

/* Additional subtle animated gradient overlay */
@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle breathing gradient - mimics meditation breathing */
    background: radial-gradient(circle at 40% 60%, 
        rgba(147, 51, 234, 0.08) 0%,      /* Purple for mindfulness */
        rgba(236, 72, 153, 0.05) 30%,     /* Pink for love */
        transparent 60%);
    animation: gradientShift 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Noise texture overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.02;
    pointer-events: none;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255, 255, 255, 0.03) 2px, rgba(255, 255, 255, 0.03) 4px),
        repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(255, 255, 255, 0.02) 2px, rgba(255, 255, 255, 0.02) 4px);
    animation: noise 8s steps(10) infinite;
}

@keyframes noise {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-0.5%, -0.5%); }
    20% { transform: translate(0.5%, 0); }
    30% { transform: translate(0, 0.5%); }
    40% { transform: translate(-0.5%, 0.5%); }
    50% { transform: translate(0.5%, -0.5%); }
}

/* Main container */
.container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Video wrapper */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: var(--video-max-width);
    /* Glow effect that won't be clipped by mask */
    filter: drop-shadow(0 10px 40px rgba(147, 51, 234, 0.7))
            drop-shadow(0 20px 60px rgba(59, 130, 246, 0.5))
            drop-shadow(0 30px 90px rgba(236, 72, 153, 0.3));
}


/* Container with overflow hidden for cropping */
.video-crop-container {
    position: relative;
    width: 100%;
    /* Aspect ratio for cropped video (390x719 after removing 105pt top, 20pt bottom from 390x844) */
    padding-bottom: 184.36%; /* 719/390 = 1.8436 */
    overflow: hidden;
    background: transparent;
    
    /* GPU acceleration */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    isolation: isolate;
    
    /* Box-shadow removed - using drop-shadow on wrapper instead */
    
    /* Restore squircle mask */
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M 100,37.5 C 100,16.789 100,6.434 96.783,3.217 C 93.566,0 83.211,0 62.5,0 L 37.5,0 C 16.789,0 6.434,0 3.217,3.217 C 0,6.434 0,16.789 0,37.5 L 0,62.5 C 0,83.211 0,93.566 3.217,96.783 C 6.434,100 16.789,100 37.5,100 L 62.5,100 C 83.211,100 93.566,100 96.783,96.783 C 100,93.566 100,83.211 100,62.5 Z" fill="white"/></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M 100,37.5 C 100,16.789 100,6.434 96.783,3.217 C 93.566,0 83.211,0 62.5,0 L 37.5,0 C 16.789,0 6.434,0 3.217,3.217 C 0,6.434 0,16.789 0,37.5 L 0,62.5 C 0,83.211 0,93.566 3.217,96.783 C 6.434,100 16.789,100 37.5,100 L 62.5,100 C 83.211,100 93.566,100 96.783,96.783 C 100,93.566 100,83.211 100,62.5 Z" fill="white"/></svg>');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    
    /* Fallback */
    border-radius: 60px;
}

/* Video element with exact cropping */
.app-video {
    position: absolute;
    top: -12.48%; /* Crop 105pt from top (105/844 = 12.48%) */
    left: 0;
    width: 100%;
    height: 117.39%; /* Full height plus cropped portions (844/719 = 117.39%) */
    
    /* Force sizing for Safari/iOS */
    min-width: 100%;
    min-height: 117.39%;
    
    /* Use fill to prevent black bars */
    object-fit: fill;
    
    /* Safari fix for initial scale */
    -webkit-transform: scale(1);
    transform: scale(1);
    
    /* Ensure smooth rendering */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    
    /* Force GPU acceleration */
    will-change: transform;
    
    /* Disable user interaction */
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}


/* Mobile responsiveness */
@media (max-width: 768px) {
    :root {
        --video-max-width: 300px;
    }
    
    
    /* Mobile video adjustments - maintain desktop aspect ratio */
    .video-crop-container {
        /* Same aspect ratio as desktop for consistency */
        padding-bottom: 184.36%;
    }
    
    .app-video {
        /* Keep same positioning as desktop */
        position: absolute;
        top: -12.48%;
        left: 0;
        width: 100%;
        height: 117.39%; /* Same as desktop */
        min-width: 100%;
        min-height: 117.39%;
        object-fit: fill;
    }
}

/* Scroll Container and Pages */
.scroll-container {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    /* Remove scroll-snap for custom behavior */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.page-section {
    height: 100vh;
    height: 100dvh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Page Indicator */
.page-indicator {
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dot {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.dot.active {
    background: white;
    transform: scale(1.4);
    box-shadow: 
        0 2px 8px rgba(147, 51, 234, 0.4),
        0 4px 16px rgba(59, 130, 246, 0.2);
}

.dot.active::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* Hide scrollbar for cleaner look */
.scroll-container::-webkit-scrollbar {
    display: none;
}

.scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Smaller mobile devices */
@media (max-width: 480px) {
    :root {
        --video-max-width: 200px;
    }
    
    .container {
        padding: 0;
    }
    
    .video-wrapper {
        max-width: 180px; /* Even smaller for small phones */
        /* Even smaller glow */
        filter: drop-shadow(0 4px 20px rgba(147, 51, 234, 0.7))
                drop-shadow(0 8px 30px rgba(59, 130, 246, 0.5))
                drop-shadow(0 12px 45px rgba(236, 72, 153, 0.3));
    }
    
    .video-crop-container {
        /* Proportional squircle for smaller screens */
        border-radius: 30px;
        clip-path: inset(0 round 30px);
        -webkit-clip-path: inset(0 round 30px);
        /* Glow handled by video-wrapper */
    }
    
    .hero-section {
        padding: 15px 10px;
        gap: 15px;
    }
    
    .app-name {
        font-size: 36px;
    }
    
    .app-tagline {
        font-size: 20px;
    }
    
    .app-description {
        font-size: 15px;
    }
    
    /* Further reduce title margins for smaller screens */
    .page-2-title,
    .page-4-title {
        margin-bottom: 14px !important; /* Even tighter for small phones */
    }
    
    .page-3-title {
        margin-bottom: 11px !important; /* Maximum reduction for page 3 */
    }
    
    .store-badge {
        height: 36px;
    }
}

/* Page Transition Animations */
.app-content {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-content.fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.app-content.fade-out {
    animation: fadeOutUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

@keyframes fadeOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Video Transitions */
.video-wrapper {
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-wrapper.fade-in {
    animation: videoFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.video-wrapper.fade-out {
    animation: videoFadeOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes videoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes videoFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Staggered animations for individual elements */
.app-name, 
.page-2-title, 
.page-3-title, 
.page-4-title {
    animation-delay: 0s;
}

.app-tagline,
.app-description,
.page-2-subtitle,
.page-3-subtitle,
.page-4-subtitle {
    animation-delay: 0.1s;
}

.download-buttons {
    animation-delay: 0.2s;
}

/* Initial state for pages */
.page-section:not(.active) .app-content {
    opacity: 0;
    transform: translateY(30px);
}

.page-section:not(.active) .video-wrapper {
    opacity: 0;
    transform: scale(0.95);
}

.page-section.active .app-content {
    opacity: 1;
    transform: translateY(0);
}

.page-section.active .video-wrapper {
    opacity: 1;
    transform: scale(1);
}

/* Desktop/Mobile text visibility */
.desktop-text {
    display: inline;
}

.mobile-text {
    display: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .app-video {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .noise-overlay {
        animation: none;
    }
    
    .app-content,
    .video-wrapper {
        animation: none !important;
        transition: opacity 0.2s ease !important;
    }
    
    .app-content.fade-in,
    .video-wrapper.fade-in {
        opacity: 1;
        transform: none;
    }
    
    .app-content.fade-out,
    .video-wrapper.fade-out {
        opacity: 0;
        transform: none;
    }
}

/* Loading state */
.app-video:not([src]) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Hero Section Layout */
.hero-section {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 80px;
    min-height: 100vh;
}

/* Video Column */
.video-column {
    flex: 0 0 45%;
    display: flex;
    justify-content: center;
}

/* Content Column */
.content-column {
    flex: 0 0 55%;
    display: flex;
    align-items: center;
}

/* App Content Styling */
.app-content {
    max-width: 500px;
}

/* App Name */
.app-name {
    font-family: 'JUST Sans', -apple-system, sans-serif;
    font-size: clamp(58px, 7.2vw, 86px); /* 20% bigger */
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 20px 0;
    letter-spacing: 1px;
    line-height: 1;
    /* Reduced opacity by 40% and increased spread */
    filter: drop-shadow(0 10px 40px rgba(147, 51, 234, 0.33))
            drop-shadow(0 20px 60px rgba(59, 130, 246, 0.21))
            drop-shadow(0 30px 90px rgba(236, 72, 153, 0.15));
}

/* App Tagline */
.app-tagline {
    font-family: 'JUST Sans', -apple-system, sans-serif;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 450; /* Light weight */
    color: #ffffff;
    margin: 0 0 16px 0;
    line-height: 1.2;
    opacity: 0.95;
    /* Reduced opacity by 40% and increased spread */
    text-shadow: 
        0 6px 30px rgba(147, 51, 234, 0.3),
        0 12px 50px rgba(236, 72, 153, 0.21),
        0 18px 75px rgba(59, 130, 246, 0.15);
}

/* App Description */
.app-description {
    font-family: 'JUST Sans', -apple-system, sans-serif;
    font-size: clamp(19px, 2.4vw, 26px); /* Same size as page 2&3 subtitles */
    font-weight: 200; /* Light weight */
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 40px 0;
    line-height: 1.5;
    /* Reduced opacity by 40% and increased spread */
    text-shadow: 
        0 5px 25px rgba(147, 51, 234, 0.21),
        0 10px 40px rgba(59, 130, 246, 0.15);
}

/* Page 2 Styles */
.page-2-title {
    font-family: 'JUST Sans', -apple-system, sans-serif;
    font-size: clamp(48px, 6vw, 72px); /* Same as original h1 */
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 24px 0;
    letter-spacing: 1px;
    line-height: 1.1;
    /* Reduced opacity by 40% and increased spread */
    filter: drop-shadow(0 10px 40px rgba(147, 51, 234, 0.33))
            drop-shadow(0 20px 60px rgba(59, 130, 246, 0.21))
            drop-shadow(0 30px 90px rgba(236, 72, 153, 0.15));
}

.page-2-subtitle {
    font-family: 'JUST Sans', -apple-system, sans-serif;
    font-size: clamp(19px, 2.4vw, 26px); /* 20% smaller */
    font-weight: 200; /* Light weight */
    color: rgba(255, 255, 255, 0.7); /* Same opacity as page 1 */
    margin: 0 0 40px 0;
    line-height: 1.4;
    /* Reduced opacity by 40% and increased spread */
    text-shadow: 
        0 5px 25px rgba(147, 51, 234, 0.21),
        0 10px 40px rgba(59, 130, 246, 0.15);
}

/* Page 3 Styles */
.page-3-title {
    font-family: 'JUST Sans', -apple-system, sans-serif;
    font-size: clamp(48px, 6vw, 72px); /* Same as original h1 */
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 24px 0;
    letter-spacing: 1px;
    line-height: 1.1;
    /* Reduced opacity by 40% and increased spread */
    filter: drop-shadow(0 10px 40px rgba(147, 51, 234, 0.33))
            drop-shadow(0 20px 60px rgba(59, 130, 246, 0.21))
            drop-shadow(0 30px 90px rgba(236, 72, 153, 0.15));
}

.page-3-subtitle {
    font-family: 'JUST Sans', -apple-system, sans-serif;
    font-size: clamp(19px, 2.4vw, 26px); /* 20% smaller */
    font-weight: 200; /* Light weight */
    color: rgba(255, 255, 255, 0.7); /* Same opacity as page 1 */
    margin: 0 0 40px 0;
    line-height: 1.4;
    /* Reduced opacity by 40% and increased spread */
    text-shadow: 
        0 5px 25px rgba(147, 51, 234, 0.21),
        0 10px 40px rgba(59, 130, 246, 0.15);
}

/* Page 4 Styles */
.page-4-title {
    font-family: 'JUST Sans', -apple-system, sans-serif;
    font-size: clamp(48px, 6vw, 72px); /* Same as original h1 */
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 24px 0;
    letter-spacing: 1px;
    line-height: 1.1;
    /* Reduced opacity by 40% and increased spread */
    filter: drop-shadow(0 10px 40px rgba(147, 51, 234, 0.33))
            drop-shadow(0 20px 60px rgba(59, 130, 246, 0.21))
            drop-shadow(0 30px 90px rgba(236, 72, 153, 0.15));
}

.page-4-subtitle {
    font-family: 'JUST Sans', -apple-system, sans-serif;
    font-size: clamp(19px, 2.4vw, 26px); /* Same as other pages */
    font-weight: 200; /* Light weight */
    color: rgba(255, 255, 255, 0.7); /* Same opacity as other pages */
    margin: 0 0 40px 0;
    line-height: 1.4;
    /* Reduced opacity by 40% and increased spread */
    text-shadow: 
        0 5px 25px rgba(147, 51, 234, 0.21),
        0 10px 40px rgba(59, 130, 246, 0.15);
}

/* Download Button */
.download-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.app-store-btn {
    display: inline-block;
    transition: all 0.3s ease;
}

.app-store-btn:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 8px 30px rgba(147, 51, 234, 0.4));
}

.store-badge {
    display: block;
    width: auto;
    height: 48px;
}


/* iPad Pro and similar tablets in landscape */
@media (min-width: 769px) and (max-width: 1194px) and (orientation: landscape) {
    :root {
        --video-max-width: 280px; /* Smaller than desktop but larger than mobile */
    }
    
    .video-wrapper {
        max-width: var(--video-max-width);
        /* Reduce glow for better fit */
        filter: drop-shadow(0 6px 25px rgba(147, 51, 234, 0.6))
                drop-shadow(0 12px 35px rgba(59, 130, 246, 0.4))
                drop-shadow(0 18px 50px rgba(236, 72, 153, 0.3));
    }
    
    .hero-section {
        padding: 30px 20px;
        gap: 40px; /* Reduce gap between video and text */
    }
    
    .container {
        padding: 0 3%;
        overflow: visible; /* Ensure shadows aren't clipped */
    }
    
    /* Reduce title sizes to prevent shadow clipping */
    .app-name {
        font-size: clamp(52px, 6vw, 72px); /* Smaller than desktop */
        filter: drop-shadow(0 6px 20px rgba(147, 51, 234, 0.5))
                drop-shadow(0 12px 30px rgba(59, 130, 246, 0.3))
                drop-shadow(0 18px 45px rgba(236, 72, 153, 0.2));
    }
    
    .page-2-title, .page-3-title, .page-4-title {
        font-size: clamp(42px, 5.5vw, 60px);
        filter: drop-shadow(0 6px 20px rgba(147, 51, 234, 0.5))
                drop-shadow(0 12px 30px rgba(59, 130, 246, 0.3))
                drop-shadow(0 18px 45px rgba(236, 72, 153, 0.2));
    }
    
    /* Adjust content sizing */
    .app-content {
        max-width: 450px; /* Slightly smaller than desktop */
    }
    
    .video-column {
        flex: 0 0 35%; /* Smaller video column */
    }
    
    .content-column {
        flex: 0 0 65%; /* More space for content */
    }
    
    /* Ensure consistent squircle corner radius proportional to video size */
    .video-crop-container {
        /* Proportional border-radius for smaller video size (280px * 15% = 42px) */
        border-radius: 42px;
        
        /* Add clip-path for better squircle effect */
        clip-path: inset(0 round 42px);
        -webkit-clip-path: inset(0 round 42px);
        
        /* Match the squircle mask */
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M 100,37.5 C 100,16.789 100,6.434 96.783,3.217 C 93.566,0 83.211,0 62.5,0 L 37.5,0 C 16.789,0 6.434,0 3.217,3.217 C 0,6.434 0,16.789 0,37.5 L 0,62.5 C 0,83.211 0,93.566 3.217,96.783 C 6.434,100 16.789,100 37.5,100 L 62.5,100 C 83.211,100 93.566,100 96.783,96.783 C 100,93.566 100,83.211 100,62.5 Z" fill="white"/></svg>');
        mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M 100,37.5 C 100,16.789 100,6.434 96.783,3.217 C 93.566,0 83.211,0 62.5,0 L 37.5,0 C 16.789,0 6.434,0 3.217,3.217 C 0,6.434 0,16.789 0,37.5 L 0,62.5 C 0,83.211 0,93.566 3.217,96.783 C 6.434,100 16.789,100 37.5,100 L 62.5,100 C 83.211,100 93.566,100 96.783,96.783 C 100,93.566 100,83.211 100,62.5 Z" fill="white"/></svg>');
        -webkit-mask-size: 100% 100%;
        mask-size: 100% 100%;
        
        /* Force smooth rendering */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* Tablet Layout */
@media (max-width: 1024px) {
    .hero-section {
        gap: 60px;
    }
    
    .video-column {
        flex: 0 0 40%;
    }
    
    .content-column {
        flex: 0 0 60%;
    }
    
    /* Tablet video - maintain desktop aspect ratio */
    .video-crop-container {
        padding-bottom: 184.36%; /* Same as desktop */
        /* Enhanced squircle for tablets */
        border-radius: 45px;
        clip-path: inset(0 round 45px);
        -webkit-clip-path: inset(0 round 45px);
        /* Glow handled by video-wrapper */
        /* Force antialiasing and smooth rendering */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        will-change: transform;
    }
    
    .app-video {
        position: absolute;
        top: -12.48%;
        left: 0;
        width: 100%;
        height: 117.39%; /* Same as desktop */
        min-width: 100%;
        min-height: 117.39%;
        object-fit: fill;
    }
}

/* Height-based constraints for landscape orientation */
@media (max-height: 850px) and (orientation: landscape) {
    .video-wrapper {
        max-height: 60vh; /* Limit video height to 60% of viewport */
    }
    
    .video-crop-container {
        max-height: 60vh;
    }
    
    .hero-section {
        min-height: auto;
        padding: 20px;
    }
    
    /* Prevent vertical overflow */
    .page-section {
        height: 100vh;
        overflow: hidden;
    }
}

/* Mobile adjustments for page indicator */
@media (max-width: 768px) {
    .page-indicator {
        right: 20px;
        gap: 15px;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
    
    .dot.active {
        transform: scale(1.3);
    }
}

/* Mobile Layout - Stack vertically */
@media (max-width: 768px) {
    .container {
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
        padding: 0;
    }
    
    .video-wrapper {
        max-width: 220px; /* Smaller for better mobile fit */
        /* Scaled-down glow for mobile */
        filter: drop-shadow(0 6px 25px rgba(147, 51, 234, 0.7))
                drop-shadow(0 12px 40px rgba(59, 130, 246, 0.5))
                drop-shadow(0 18px 60px rgba(236, 72, 153, 0.3));
    }
    
    .video-crop-container {
        /* True squircle with continuous antialiased corners */
        border-radius: 36px;
        /* Add smooth clipping for squircle effect */
        clip-path: inset(0 round 36px);
        -webkit-clip-path: inset(0 round 36px);
        overflow: hidden;
        /* Glow handled by video-wrapper */
        /* Force antialiasing and smooth rendering */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        will-change: transform;
        /* Re-enable mask for better squircle */
        -webkit-mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M 100,37.5 C 100,16.789 100,6.434 96.783,3.217 C 93.566,0 83.211,0 62.5,0 L 37.5,0 C 16.789,0 6.434,0 3.217,3.217 C 0,6.434 0,16.789 0,37.5 L 0,62.5 C 0,83.211 0,93.566 3.217,96.783 C 6.434,100 16.789,100 37.5,100 L 62.5,100 C 83.211,100 93.566,100 96.783,96.783 C 100,93.566 100,83.211 100,62.5 Z" fill="white"/></svg>');
        mask-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M 100,37.5 C 100,16.789 100,6.434 96.783,3.217 C 93.566,0 83.211,0 62.5,0 L 37.5,0 C 16.789,0 6.434,0 3.217,3.217 C 0,6.434 0,16.789 0,37.5 L 0,62.5 C 0,83.211 0,93.566 3.217,96.783 C 6.434,100 16.789,100 37.5,100 L 62.5,100 C 83.211,100 93.566,100 96.783,96.783 C 100,93.566 100,83.211 100,62.5 Z" fill="white"/></svg>');
        -webkit-mask-size: 100% 100%;
        mask-size: 100% 100%;
    }
    
    .hero-section {
        flex-direction: column;
        gap: 20px; /* Reduced gap */
        padding: 60px 15px 20px; /* More top padding for better positioning */
        min-height: 100vh;
        min-height: 100dvh;
        align-items: center;
        justify-content: flex-start; /* Changed from center to prevent extra spacing */
    }
    
    .video-column,
    .content-column {
        flex: none;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .app-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-width: 100%;
        padding: 0 20px;
        gap: 0; /* No gap - control spacing with margins */
    }
    
    .download-buttons {
        justify-content: center;
    }
    
    /* Smaller text for mobile */
    .app-name {
        font-size: clamp(45px, 9vw, 58px); /* Responsive scaling */
        margin-bottom: 12px;
    }
    
    .page-2-title, .page-3-title, .page-4-title {
        font-size: clamp(36px, 7vw, 48px);
    }
    
    .page-2-title {
        margin-bottom: 18px !important; /* 25% less than desktop 24px */
    }
    
    .page-3-title {
        margin-bottom: 14px !important; /* Further reduced from 19px */
    }
    
    .page-4-title {
        margin-bottom: 18px !important; /* 25% less than desktop 24px */
    }
    
    .page-2-subtitle, 
    .page-3-subtitle, 
    .page-4-subtitle {
        font-size: clamp(16px, 3.2vw, 19px); /* 20% smaller for mobile */
        margin: 0 0 8px 0 !important; /* Override desktop margin completely */
    }
    
    /* Show mobile text, hide desktop text on mobile */
    .desktop-text {
        display: none;
    }
    
    .mobile-text {
        display: inline;
    }
    
    .app-tagline {
        font-size: 22px;
        margin-bottom: 10px;
    }
    
    .app-description {
        font-size: clamp(16px, 3.2vw, 19px); /* Updated to match page 2&3 mobile size */
        margin: 0 0 8px 0 !important; /* Override desktop margin completely */
    }
    
    .download-buttons {
        justify-content: center;
        line-height: 0; /* Remove line-height spacing */
        margin: 0; /* Remove all margins */
    }
    
    .app-store-btn {
        display: block; /* Remove inline-block spacing */
        line-height: 0; /* Remove line-height spacing */
    }
    
    .store-badge {
        height: 40px; /* Smaller download button */
        display: block; /* Ensure block display */
        margin: 0; /* Remove any margins */
    }
}

/* Footer Styles */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 0 1rem;
    text-align: center;
    z-index: 1000;
}

.footer-content {
    margin-bottom: 0.4rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.656rem; /* 25% smaller: 0.875 * 0.75 */
    font-weight: 400;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

.footer-divider {
    margin: 0 1rem;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.656rem; /* 25% smaller: 0.875 * 0.75 */
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.563rem; /* 25% smaller: 0.75 * 0.75 */
    margin: 0;
}

/* Adjust last page section to accommodate footer */
.page-section[data-page="3"] {
    position: relative;
}

/* Mobile adjustments for footer */
@media (max-width: 768px) {
    .site-footer {
        padding: 1rem 0 0.75rem;
    }
    
    .footer-content {
        margin-bottom: 0.3rem;
    }
    
    .footer-link {
        font-size: 0.6rem; /* 25% smaller: 0.8 * 0.75 */
    }
    
    .footer-divider {
        margin: 0 0.75rem;
        font-size: 0.6rem; /* 25% smaller to match links */
    }
    
    .footer-copyright {
        font-size: 0.525rem; /* 25% smaller: 0.7 * 0.75 */
    }
}