/* styles.css */

/* General Styles */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

/* Gradient Background */
.gradient-bg {
    background: linear-gradient(135deg, #ffffff 0%, #e0f7fa 100%);
}

/* Fade-in animation on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade-in animation for header */
@keyframes fade-in {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out forwards;
}

/* Throwing card animation for Core Benefits */
@keyframes throw-card {
    0% {
        opacity: 0;
        transform: translateX(-100px) scale(0.8);
    }
    70% {
        opacity: 1;
        transform: translateX(20px) scale(1.05); /* Slight overshoot */
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1); /* Settle into place */
    }
}

/* Loader Styles */
#loader {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100%;
    background: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    transition: opacity 0.5s ease; /* Smooth fade-out */
}

.loader-spinner {
    width: 200px;
    height: 4px;
    background: #e5e7eb; /* Light gray background */
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.loader-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #2563EB, #9333EA);
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* Header Styles */
header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

header .logo {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 800; /* font-extrabold */
}

header .logo span {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(to right, #2563EB, #9333EA);
    transition: transform 0.3s ease;
}

header .logo span:hover {
    transform: scale(1.05);
}

/* Navigation Styles (Header) */
header nav {
    display: flex;
    gap: 1.5rem; /* space-x-6 */
}

header nav a {
    position: relative;
    color: #1F2937; /* text-gray-800 */
    font-weight: 600; /* font-semibold */
    font-size: 1.125rem; /* text-lg */
    transition: all 0.3s ease;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem; /* rounded-md */
}

header nav a:hover {
    color: #ffffff;
}

/* Active State Styles */
header nav a[href="/contact"].active {
    background-color: #3B82F6; /* Slightly lighter than hover:bg-blue-600 (#2563EB) */
    color: white;
    font-weight: 600;
}

header nav a[href="/"].active {
    background-color: #A855F7; /* Slightly lighter than hover:bg-purple-600 (#9333EA) */
    color: white;
    font-weight: 600;
}

header nav a[href="/updates"].active {
    background-color: #6366F1;
    color: ghostwhite;
    font-weight: 600;
}

header nav a[href="/download"].active {
    background-color: #1E40AF;
    color: white;
    font-weight: 600;
}

header nav a[href="/privacy-statement"].active {
    background-color: #562fec;
    color: white;
    font-weight: 600;
}

/* Hover Styles */
header nav a[href="/contact"]:hover {
    background-color: #2563EB; /* hover:bg-blue-600 */
}

header nav a[href="/"]:hover {
    background-color: #9333EA; /* hover:bg-purple-600 */
}

header nav a[href="/updates"]:hover {
    background-color: #4F46E5; /* hover:bg-indigo-600 */
}

header nav a[href="/download"]:hover {
    background-color: #1E3A8A; /* Darker blue for download */
}

header nav a[href="/privacy-statement"]:hover {
    background-color: #562fec;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1F2937;
}

#menu-toggle {
    display: none;
}

/* Mobile Navigation (Header) */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(8px);
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    #menu-toggle:checked ~ nav {
        display: flex;
    }

    header nav a {
        padding: 0.75rem 1rem;
        text-align: center;
        font-size: 1rem;
        border-bottom: 1px solid #e5e7eb;
    }

    header nav a:last-child {
        border-bottom: none;
    }
}

/* Mockup Styling */
.mock-screen {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background: transparent;
}

/* Screen Containers */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #f5f7fa 0%, #f9f7fa 100%);
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    visibility: hidden;
}

.screen.snap {
    animation: show-screen 9s ease-in-out infinite;
}

.screen.share {
    animation: show-screen 9s ease-in-out 3s infinite;
}

.screen.go {
    animation: show-screen 9s ease-in-out 6s infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@keyframes show-screen {
    0% { opacity: 0; visibility: hidden; }
    5% { opacity: 1; visibility: visible; }
    28.33% { opacity: 1; visibility: visible; }
    33.33% { opacity: 0; visibility: hidden; }
    100% { opacity: 0; visibility: hidden; }
}

/* Snap Screen Elements */
.snap .cursor {
    width: 24px;
    height: 24px;
    background: url('https://img.icons8.com/material-outlined/24/000000/mouse-cursor.png') no-repeat center;
    background-size: contain;
    position: absolute;
    left: 10%;
    top: 10%;
    animation: move-cursor 3s ease-in-out infinite;
}

@keyframes move-cursor {
    0% { left: 10%; top: 10%; }
    28.33% { left: 20%; top: 20%; }
    100% { left: 20%; top: 20%; }
}

.snap .selection {
    position: absolute;
    border: 2px dashed #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
    top: 20%;
    left: 20%;
    width: 0;
    height: 0;
    animation: select-area 3s ease-in-out infinite;
}

@keyframes select-area {
    0% { width: 0; height: 0; }
    28.33% { width: 60%; height: 50%; }
    100% { width: 60%; height: 50%; }
}

/* Share Screen Elements */
.share {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.share::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.2; }
    100% { transform: scale(1); opacity: 0.5; }
}

.share .captured-image {
    width: 60%;
    height: 50%;
    background: url('https://placehold.co/200x100?text=Captured+Area') no-repeat center;
    background-size: contain;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1), 0 0 10px rgba(59, 130, 246, 0.3);
    animation: show-captured 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .share .captured-image {
        width: 80%;
        height: 40%;
    }
}

@keyframes show-captured {
    0% { opacity: 0; transform: scale(0.95); }
    5% { opacity: 1; transform: scale(1); }
    95% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.95); }
}

.share .particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.share .particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
    opacity: 0;
    animation: particle-burst 3s ease-in-out infinite;
}

.share .particle:nth-child(1) { top: 20%; left: 20%; animation-delay: 0.2s; }
.share .particle:nth-child(2) { top: 20%; left: 80%; animation-delay: 0.4s; }
.share .particle:nth-child(3) { top: 70%; left: 20%; animation-delay: 0.6s; }
.share .particle:nth-child(4) { top: 70%; left: 80%; animation-delay: 0.8s; }
.share .particle:nth-child(5) { top: 45%; left: 50%; animation-delay: 0.3s; }

@keyframes particle-burst {
    0% { opacity: 0; transform: scale(0) translate(0, 0); }
    20% { opacity: 1; transform: scale(1) translate(10px, -10px); }
    100% { opacity: 0; transform: scale(0) translate(-20px, 20px); }
}

.share .toast-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}

.share .toast {
    background-color: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    animation: show-toast 3s ease-in-out infinite;
}

@media (max-width: 768px) {
    .share .toast {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

@keyframes show-toast {
    0% { opacity: 0; transform: translateY(-10px); }
    5% { opacity: 1; transform: translateY(0); }
    95% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

.share .clipboard-icon {
    width: 20px;
    height: 20px;
    background: url('https://img.icons8.com/material-outlined/24/0a910a/clipboard.png') no-repeat center;
    background-size: contain;
    animation: bounce 3s ease-in-out infinite;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    10% { transform: translateY(-5px); }
    20% { transform: translateY(0); }
    30% { transform: translateY(-3px); }
    40% { transform: translateY(0); }
    100% { transform: translateY(0); }
}

/* Simplified Go/Done Screen Elements */
.go .success-image {
    width: 60%;
    height: 50%;
    background: #10b981;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1), 0 0 10px rgba(59, 130, 246, 0.3);
    z-index: 2;
}

@media (max-width: 768px) {
    .go .success-image {
        width: 80%;
        height: 40%;
    }
}

.go .checkmark {
    width: 80px;
    height: 80px;
    stroke: #fff;
    stroke-width: 4;
    stroke-miterlimit: 10;
    fill: none;
}

@media (max-width: 768px) {
    .go .checkmark {
        width: 60px;
        height: 60px;
    }
}

.go .checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 4;
    stroke-miterlimit: 10;
    stroke: #fff;
    fill: none;
    animation: stroke-circle 3s ease-in-out infinite;
}

.go .checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #fff;
    animation: stroke-check 3s ease-in-out infinite;
}

@keyframes stroke-circle {
    0%, 5% { stroke-dashoffset: 166; }
    15%, 95% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 166; }
}

@keyframes stroke-check {
    0%, 15% { stroke-dashoffset: 48; }
    25%, 95% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 48; }
}

.go .toast-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}

.go .toast {
    background-color: #10b981;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    animation: show-toast 3s ease-in-out infinite;
}

@media (max-width: 768px) {
    .go .toast {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

.go .success-icon {
    width: 24px;
    height: 24px;
    background: url('https://img.icons8.com/material-outlined/24/0a910a/checkmark.png') no-repeat center;
    background-size: contain;
    animation: bounce 3s ease-in-out infinite;
}

/* Step Labels */
.step-label {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.25rem;
    font-weight: bold;
    color: #1e40af;
    opacity: 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    z-index: 10;
}

@media (max-width: 768px) {
    .step-label {
        font-size: 1rem;
        padding: 0.2rem 0.5rem;
    }
}

.step-label.snap {
    animation: show-label 9s ease-in-out infinite;
}

.step-label.share {
    animation: show-label 9s ease-in-out 3s infinite;
}

.step-label.go {
    animation: show-label 9s ease-in-out 6s infinite;
}

@keyframes show-label {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    5% { opacity: 1; transform: translateX(-50%) translateY(0); }
    28.33% { opacity: 1; transform: translateX(-50%) translateY(0); }
    33.33% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* Hero Section */
.hero-section {
    padding: 4rem 1rem;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-section h1 {
        font-size: 2rem; /* text-4xl */
        line-height: 2.5rem;
    }

    .hero-section p {
        font-size: 1rem; /* text-lg */
    }

    .hero-section .mock-screen {
        height: 12rem; /* h-48 instead of h-64 */
    }
}

/* Core Benefits Section */
.core-benefits {
    padding: 4rem 1rem;
    opacity: 0; /* Initially hidden */
    transition: opacity 0.3s ease; /* Smooth transition when shown */
}

.core-benefits.animate-core-benefits {
    opacity: 1; /* Show when animation is triggered */
}

.core-benefits h2 {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 700;
    color: #1F2937;
    text-align: center;
    margin-bottom: 3rem;
}

.core-benefits .grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2rem;
}

.core-benefits .grid > div {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0; /* Initially invisible */
    will-change: transform, opacity; /* Optimize for animation */
}

/* Base styling for icons */
.core-benefits i {
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Highlight and scale the specific div on hover */
.core-benefits .grid > div:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Change the icon color and scale only for the hovered div */
.core-benefits .grid > div:hover i {
    transform: scale(1.3);
    color: #2563eb; /* color */
}

/* Simplified lightweight animation */
@keyframes slide-in {
    0% {
        opacity: 0;
        transform: translateX(-30px); /* Reduced distance for lighter animation */
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Apply slide-in animation with staggered delays when parent has animate-core-benefits class */
.core-benefits.animate-core-benefits .grid > div:nth-child(1) {
    animation: slide-in 0.5s ease-out forwards;
    animation-delay: 0.1s;
}

.core-benefits.animate-core-benefits .grid > div:nth-child(2) {
    animation: slide-in 0.5s ease-out forwards;
    animation-delay: 0.2s;
}

.core-benefits.animate-core-benefits .grid > div:nth-child(3) {
    animation: slide-in 0.5s ease-out forwards;
    animation-delay: 0.3s;
}

.core-benefits.animate-core-benefits .grid > div:nth-child(4) {
    animation: slide-in 0.5s ease-out forwards;
    animation-delay: 0.4s;
}

.core-benefits.animate-core-benefits .grid > div:nth-child(5) {
    animation: slide-in 0.5s ease-out forwards;
    animation-delay: 0.5s;
}

.core-benefits .grid > div span {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 1rem;
}

.core-benefits .grid > div h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 0.5rem;
}

.core-benefits .grid > div p {
    color: #4B5563;
}

@media (max-width: 1024px) {
    .core-benefits .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .core-benefits {
        padding: 2rem 1rem;
    }

    .core-benefits h2 {
        font-size: 1.5rem; /* text-2xl */
        margin-bottom: 2rem;
    }

    .core-benefits .grid {
        grid-template-columns: 1fr; /* Stack items vertically */
        gap: 1rem; /* Reduce gap for mobile */
    }

    .core-benefits .grid > div {
        padding: 1rem;
    }

    .core-benefits .grid > div span {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .core-benefits .grid > div h3 {
        font-size: 1rem;
    }

    .core-benefits .grid > div p {
        font-size: 0.875rem;
    }
}

/* Testimonial Section */
.testimonial {
    padding: 4rem 1rem;
}

.testimonial blockquote {
    max-width: 600px;
    margin: 0 auto;
}

.testimonial p {
    font-size: 1.25rem; /* text-xl */
    color: #1F2937;
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial cite {
    font-size: 0.875rem; /* text-sm */
    color: #4B5563;
    font-style: normal;
}

@media (max-width: 768px) {
    .testimonial {
        padding: 2rem 1rem;
    }

    .testimonial blockquote {
        max-width: 100%;
        padding: 0 1rem;
    }

    .testimonial p {
        font-size: 1rem; /* text-base */
    }

    .testimonial cite {
        font-size: 0.75rem; /* text-xs */
    }
}

/* Footer */
footer {
    background: linear-gradient(to right, #EFF6FF, #F3E8FF);
    padding: 2rem 0;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1.5rem; /* Ensure padding on all sides */
    max-width: 1200px; /* Match Tailwind's container max-width */
    margin: 0 auto; /* Center the container */
}

@media (min-width: 768px) {
    footer .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

footer .logo {
    font-size: 1.5rem;
    font-weight: 700;
}

footer .logo span {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(to right, #2563EB, #9333EA);
    transition: transform 0.3s ease;
}

footer .logo span:hover {
    transform: scale(1.05);
}

footer .version {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6B7280;
    background: #E5E7EB;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

footer .footer-nav {
    display: flex;
    gap: 2rem;
}

footer .footer-nav a {
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Footer Link Colors */
footer .footer-nav a[href="/contact"] {
    color: #2563EB;
}

footer .footer-nav a[href="/"] {
    color: #9333EA;
}

footer .footer-nav a[href="/updates"] {
    color: #4F46E5;
}

footer .footer-nav a[href="/download"] {
    color: #1E3A8A; /* Darker blue for download */
}

footer .footer-nav a[href="/privacy-statement"] {
    color: #562fec;
}

/* Footer Hover Styles */
footer .footer-nav a[href="/contact"]:hover {
    color: #2563EB;
}

footer .footer-nav a[href="/"]:hover {
    color: #9333EA;
}

footer .footer-nav a[href="/updates"]:hover {
    color: #4F46E5;
}

footer .footer-nav a[href="/download"]:hover {
    color: #1E40AF; /* Slightly lighter on hover */
}

footer .footer-nav a[href="/privacy-statement"]:hover {
    color: #704ff4;
}

footer .copyright {
    font-size: 0.875rem;
    color: #4B5563;
}

@media (max-width: 768px) {
    footer .container {
        padding: 0 1rem; /* Consistent padding on mobile */
        gap: 1rem; /* Reduce gap for mobile */
    }

    footer .footer-nav {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        width: 100%;
    }

    footer .footer-nav a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1rem;
    }

    footer .footer-nav a:hover {
        background-color: #9333EA; /* hover:bg-blue-600 */
        transform: scale(1.05);
    }

    footer .flex {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    footer .copyright {
        margin-top: 0.5rem;
    }
}

.countdown-timer {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#countdown span {
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

#countdown div:hover {
    transform: scale(1.05);
}