/* CSS Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #8B5A8F;
    --primary-purple-dark: #6B4A6F;
    --primary-purple-light: #AB7AAF;
    --sage-green: #87A96B;
    --sage-green-dark: #677A4B;
    --coral-accent: #E6A08C;
    --warm-cream: #FDF6F0;
    --warm-beige: #F5E6D3;
    --text-primary: #2C2C2C;
    --text-secondary: #5C5C5C;
    --text-light: #8C8C8C;
    --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 5px 20px rgba(0, 0, 0, 0.08);
    --shadow-large: 0 10px 40px rgba(0, 0, 0, 0.1);
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Body - Prevent Scrolling */
body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--warm-cream) 0%, rgba(139, 90, 143, 0.05) 100%);
    line-height: 1.6;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for modern browsers */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Organic Background */
.organic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.03;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 80%, var(--primary-purple) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--sage-green) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, var(--coral-accent) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-10px, -10px) scale(1.02); }
    66% { transform: translate(10px, -5px) scale(0.98); }
}

/* Main Container */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    -webkit-flex: 1; /* Safari prefix */
    display: -webkit-flex; /* Safari prefix */
    -webkit-flex-direction: column; /* Safari prefix */
    -webkit-justify-content: center; /* Safari prefix */
}

/* Header with Logo */
.header {
    position: absolute;
    top: 2rem;
    left: 50%;
    text-align: center;
    animation: fadeInDown 0.8s ease;
    animation-fill-mode: forwards; /* Keep final state of animation */
    z-index: 100;
    width: auto; /* Explicit width for Safari */
}

.mindhere-logo {
    height: 80px;
    width: auto;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.mindhere-logo:hover {
    opacity: 0.8;
}

/* Client Domain Display */
.client-domain {
    text-align: center;
    animation: fadeInUp 0.8s ease;
    margin-bottom: 1rem;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(135, 169, 107, 0.15);
    color: var(--sage-green);
    padding: 0.4rem 1.2rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.domain-name {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-light) 100%);
    background: -webkit-linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-light) 100%); /* Safari prefix */
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--primary-purple); /* Fallback for Safari issues */
    margin-bottom: 0.5rem;
    word-break: break-word;
    line-height: 1.2;
}

.tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Main Content Grid */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    animation: fadeInUp 1s ease;
    margin: 1rem 0;
}

/* Progress Section Compact */
.progress-compact h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-compact h3 i {
    color: var(--primary-purple);
    font-size: 1.25rem;
}

.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.progress-bar-container {
    flex: 1;
    background: var(--warm-cream);
    height: 8px;
    border-radius: 4px;
    overflow: visible;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-purple) 0%, var(--sage-green) 100%);
    width: 0%;
    border-radius: 4px;
    position: relative;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Thumbs Up Animation */
.thumbs-up {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%) scale(0) rotate(-45deg);
    color: var(--sage-green);
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.thumbs-up.show {
    opacity: 1;
    transform: translateY(-50%) scale(1) rotate(0deg);
}

.thumbs-up.show i {
    animation: bounce 0.5s ease-in-out;
}

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

.progress-percentage {
    font-weight: 600;
    color: var(--primary-purple);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.progress-percentage.pop {
    animation: percentagePop 0.3s ease;
}

@keyframes percentagePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
}

.step {
    color: var(--text-light);
    position: relative;
    padding: 0.25rem 0.5rem;
    transition: all 0.3s ease;
    cursor: default;
}

.step.completed {
    color: var(--sage-green);
    font-weight: 600;
}

.step.active {
    color: var(--primary-purple);
    font-weight: 600;
}

.step.pop-stage {
    animation: stagePop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes stagePop {
    0% { 
        transform: scale(1) translateY(0); 
    }
    40% { 
        transform: scale(1.5) translateY(-8px); 
    }
    100% { 
        transform: scale(1) translateY(0); 
    }
}

/* Services Section Compact */
.services-compact h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--warm-cream);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.service-item:hover {
    background: rgba(139, 90, 143, 0.1);
    transform: translateX(3px);
}

.service-item i {
    font-size: 1.25rem;
    color: var(--primary-purple);
}

.service-item span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* CTA Section */
.cta-section {
    text-align: center;
    animation: fadeInUp 1.2s ease;
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.cta-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.875rem;
}

.cta-button.primary {
    background: var(--primary-purple);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 90, 143, 0.3);
}

.cta-button.primary:hover {
    background: var(--primary-purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 90, 143, 0.5);
}

.cta-button.secondary {
    background: transparent;
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
}

.cta-button.secondary:hover {
    background: var(--primary-purple);
    color: white;
    transform: translateY(-2px);
}

/* Shine effect */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 12s ease-in-out infinite;
}

@keyframes shine {
    0% { left: -100%; }
    10%, 100% { left: 100%; }
}

/* Footer - Compact */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 1rem;
    text-align: center;
    font-size: 0.875rem;
    margin-top: 2rem;
}

.footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.footer a {
    color: var(--primary-purple-light);
    text-decoration: none;
}

.footer a:hover {
    color: white;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .container {
        padding: 1rem;
        gap: 1.5rem;
        justify-content: flex-start;
        min-height: 100vh;
        min-height: -webkit-fill-available;
        padding-top: 1rem; /* Reset padding */
    }

    .header {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        -webkit-transform: none;
        margin: 0 0 2rem 0;
        margin-top: env(safe-area-inset-top); /* For notched devices */
        padding: 0;
        text-align: center;
        width: 100%;
        animation: none; /* Disable animation on mobile */
    }

    .mindhere-logo {
        height: 50px; /* Slightly larger */
        width: auto;
        display: inline-block;
        max-width: 90%;
    }

    .client-domain {
        margin-top: 0;
        margin-bottom: 2rem; /* Add spacing after domain */
        padding: 0;
    }

    .domain-badge {
        font-size: 0.7rem;
        padding: 0.3rem 1rem;
        margin-bottom: 1rem; /* More space below badge */
    }

    .domain-name {
        font-size: 1.75rem;
        margin-bottom: 1rem; /* More space below domain name */
    }

    .tagline {
        font-size: 0.9rem;
        padding: 0 1rem; /* Add horizontal padding */
    }

    .main-content {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    /* Mobile-specific progress bar adjustments */
    .progress-bar-container {
        overflow: visible; /* Allow thumbs up to show outside container */
    }

    .thumbs-up {
        right: -25px;
        font-size: 1.25rem;
    }

    .step {
        font-size: 0.65rem;
        padding: 0.2rem 0.3rem;
    }

    .step.pop-stage {
        animation: stagePop-mobile 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    @keyframes stagePop-mobile {
        0% { 
            transform: scale(1) translateY(0); 
        }
        40% { 
            transform: scale(1.3) translateY(-5px); 
        }
        100% { 
            transform: scale(1) translateY(0); 
        }
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        max-width: 250px;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .footer {
        margin-top: 1rem;
    }
}

/* Tablet adjustments */
@media (max-width: 992px) and (min-width: 769px) {
    .container {
        padding: 2rem 1.5rem 1.5rem;
        justify-content: flex-start;
        min-height: 100vh;
        min-height: -webkit-fill-available; /* Safari fix */
        padding-top: 100px; /* Space for header - reduced */
    }

    .header {
        position: relative; /* Changed for Safari compatibility */
        top: auto;
        left: auto;
        right: auto;
        transform: none;
        -webkit-transform: none;
        background: transparent;
        padding: 1rem;
        margin-bottom: 1rem;
        box-shadow: none;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    
    .mindhere-logo {
        height: 60px;
        display: block;
        margin: 0 auto;
    }
    
    .domain-name {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }

    .thumbs-up {
        right: -28px;
        font-size: 1.4rem;
    }
}

/* Small desktop screens */
@media (max-height: 768px) {
    .container {
        padding: 5rem 1rem 1rem;
        gap: 1rem;
        justify-content: flex-start;
    }
    
    .header {
        top: 1rem;
    }
    
    .mindhere-logo {
        height: 40px;
    }
    
    .domain-name {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
}

/* Very small mobile devices */
@media (max-width: 375px) {
    .container {
        padding: 1rem 0.75rem;
        padding-top: 70px;
    }

    .header {
        padding: 0.75rem;
    }

    .mindhere-logo {
        height: 35px;
    }
    
    .domain-name {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .service-item {
        font-size: 0.8125rem;
    }

    .thumbs-up {
        right: -20px;
        font-size: 1rem;
    }

    .step {
        font-size: 0.6rem;
        padding: 0.15rem 0.25rem;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .organic-bg {
        display: none;
    }
    
    .cta-button {
        border: 1px solid var(--primary-purple);
    }
}