/* Landing Page Specific Styles */

/* Hero Section Styles - Use original mesh background from main.css */
/* The mesh-bg class is already defined in main.css with the original blue gradient mesh */

/* Subtle background noise texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.015; /* Very subtle - barely visible */
    z-index: 1;
    pointer-events: none;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0, 0, 0, 0.1) 2px, rgba(0, 0, 0, 0.1) 4px),
        repeating-linear-gradient(-45deg, transparent, transparent 2px, rgba(0, 0, 0, 0.05) 2px, rgba(0, 0, 0, 0.05) 4px);
    background-size: 8px 8px;
}

/* Ensure content appears above noise */
body > * {
    position: relative;
    z-index: 2;
}

/* Typewriter Animation */
.typewriter-container {
    height: 1.2em;
    display: inline-block;
    position: relative;
    min-width: 200px; /* Prevent layout shift */
}

.typewriter-text {
    display: inline-block;
    position: relative;
}

#typewriter {
    background: linear-gradient(to right, #468BE6, #1A5799);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typewriter-cursor {
    display: inline-block;
    width: 6px;
    height: 70px;
    background-color: #468BE6;
    /* animation: blink 1s ease-in-out infinite; */
    margin-left: 6px;
    vertical-align: middle;
    transform: translateY(-0.09em);
    border-radius: 2px;
}

/* Override gradient-text for typewriter container */
.gradient-text.typewriter-container {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

@keyframes blink {
    0%, 45% { opacity: 1; }
    50%, 95% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

.typewriter-word {
    opacity: 0;
    animation: fadeInWord 0.5s ease-out forwards;
}

@keyframes fadeInWord {
    to { opacity: 1; }
}

/* Adjust hero section to accommodate larger preview */
.hero-section {
    position: relative;
    padding-bottom: 0;
    overflow: hidden; /* Hide the cut-off part */
}

/* Mac window that extends to bottom */
.hero-section .mac-window {
    height: auto;
    margin-bottom: -200px; /* Extend beyond hero section */
    position: relative;
    z-index: 10;
}

/* Navigation Hover Underline Override */
.hover\:nav-underline:hover {
    border-bottom: 2px solid rgba(70, 139, 230, 0.4) !important;
    border-radius: 1px !important;
    padding-bottom: 8px !important;
    margin-bottom: -2px !important;
}

/* Primary Button Styles - Pill/Capsule Style */
.btn-primary {
    background: linear-gradient(135deg, #468BE6 0%, #1A5799 100%);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px; /* Full pill/capsule shape */
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(70, 139, 230, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Ripple Effect */
.btn-primary.ripple {
    position: relative;
    overflow: hidden;
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Email Input Field */
.email-input-group {
    display: flex;
    gap: 0.75rem;
    max-width: 560px;
    margin: 0 auto;
}

.email-input {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 9999px; /* Pill shape to match button */
    font-size: 1rem;
    transition: all 0.3s ease;
}

.email-input:focus {
    outline: none;
    border-color: #468BE6;
    box-shadow: 0 0 0 3px rgba(70, 139, 230, 0.1);
}

/* Popular Tag Fix */
.popular-tag {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Newsletter Preview - Mac Window Style */
.mac-window {
    max-width: 800px;
    margin: 3rem auto 0;
    background: #f6f6f6;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.3s ease;
    position: relative;
}

/* Hover effect removed for static presentation */

.mac-window-header {
    background: #e5e5e5;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #d1d1d1;
}

.mac-window-buttons {
    display: flex;
    gap: 0.5rem;
}

.mac-window-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f57;
}

.mac-window-button:nth-child(2) {
    background: #ffbd2e;
}

.mac-window-button:nth-child(3) {
    background: #28ca42;
}

.mac-window-title {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.mac-window-content {
    background: #f0f0f0;
    height: 700px; /* Increased height to extend further */
    overflow: hidden;
    position: relative;
    padding: 1.5rem;
}

.newsletter-preview {
    background: white;
    height: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Animated Content Icons */
.content-icons-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    font-size: 28px;
    opacity: 0;
    animation: floatIntoNewsletter 8s infinite;
    filter: drop-shadow(0 0 10px rgba(70, 139, 230, 0.5));
}

@keyframes floatIntoNewsletter {
    0% {
        opacity: 0;
        transform: translate(var(--start-x), var(--start-y)) scale(0.5) rotate(0deg);
    }
    20% {
        opacity: 0.8;
        transform: translate(var(--mid-x), var(--mid-y)) scale(1.2) rotate(180deg);
    }
    50% {
        opacity: 0.8;
        transform: translate(calc(var(--mid-x) + 50px), calc(var(--mid-y) + 30px)) scale(1) rotate(360deg);
    }
    80% {
        opacity: 0.6;
        transform: translate(var(--end-x), var(--end-y)) scale(0.8) rotate(540deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--end-x), var(--end-y)) scale(0.3) rotate(720deg);
    }
}

/* Individual icon positioning */
.floating-icon:nth-child(1) {
    --start-x: -50px;
    --start-y: 50px;
    --mid-x: 150px;
    --mid-y: 100px;
    --end-x: 350px;
    --end-y: 200px;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    --start-x: 850px;
    --start-y: 100px;
    --mid-x: 650px;
    --mid-y: 150px;
    --end-x: 450px;
    --end-y: 250px;
    animation-delay: 1s;
}

.floating-icon:nth-child(3) {
    --start-x: -50px;
    --start-y: 300px;
    --mid-x: 200px;
    --mid-y: 250px;
    --end-x: 400px;
    --end-y: 300px;
    animation-delay: 2s;
}

.floating-icon:nth-child(4) {
    --start-x: 850px;
    --start-y: 200px;
    --mid-x: 600px;
    --mid-y: 300px;
    --end-x: 350px;
    --end-y: 350px;
    animation-delay: 3s;
}

.floating-icon:nth-child(5) {
    --start-x: -50px;
    --start-y: 450px;
    --mid-x: 250px;
    --mid-y: 400px;
    --end-x: 450px;
    --end-y: 450px;
    animation-delay: 4s;
}

.floating-icon:nth-child(6) {
    --start-x: 850px;
    --start-y: 350px;
    --mid-x: 550px;
    --mid-y: 350px;
    --end-x: 300px;
    --end-y: 400px;
    animation-delay: 5s;
}

.floating-icon:nth-child(7) {
    --start-x: -50px;
    --start-y: 150px;
    --mid-x: 300px;
    --mid-y: 200px;
    --end-x: 500px;
    --end-y: 150px;
    animation-delay: 6s;
}

.floating-icon:nth-child(8) {
    --start-x: 850px;
    --start-y: 450px;
    --mid-x: 500px;
    --mid-y: 450px;
    --end-x: 250px;
    --end-y: 500px;
    animation-delay: 7s;
}

.newsletter-preview-header {
    background: linear-gradient(135deg, #468BE6 0%, #1A5799 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.newsletter-preview-content {
    padding: 30px 20px;
    background-color: #f9fafb;
}

/* Widget Grid Layout */
.widget-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Widget Cards */
.widget-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
}

.widget-card.full-width {
    grid-column: span 2;
}

.widget-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
}

.widget-value {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1.1;
}

.widget-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 8px 0 0 0;
}

.widget-change {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 20px;
}

.widget-change.positive {
    background-color: #dcfce7;
    color: #166534;
}

.widget-change.negative {
    background-color: #fef2f2;
    color: #dc2626;
}

.widget-details {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.widget-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 14px;
}

.widget-detail-label {
    color: #6b7280;
}

.widget-detail-value {
    color: #111827;
    font-weight: 500;
}

/* Feature Cards */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* Pricing Cards */
.pricing-card {
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

/* Testimonial Cards */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-3px);
}

/* Navigation Improvements */
nav .btn-primary {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
}

/* Footer CTA */
.footer-cta {
    background: linear-gradient(135deg, #468BE6 0%, #1A5799 100%);
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.footer-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Standardized Box Styles for Landing Page */
.standard-box {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.standard-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
}

/* Override for feature boxes specifically - use standard shadows */
#features .standard-box {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#features .standard-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
}

/* Color variations for boxes */
.standard-box.blue {
    border: 1px solid rgba(70, 139, 230, 0.15);
}

.standard-box.green {
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.standard-box.purple {
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.standard-box.orange {
    border: 1px solid rgba(251, 146, 60, 0.15);
}

.standard-box.gradient {
    background: linear-gradient(to bottom right, #f0f9ff, #e0e7ff);
    border: 1px solid rgba(70, 139, 230, 0.15);
}

/* FAQ Box specific override */
.standard-box.faq {
    padding: 0;
    overflow: hidden;
}

.standard-box.faq button {
    padding: 1.5rem 2rem;
}

.standard-box.faq .faq-answer {
    padding: 0 2rem 1.5rem 2rem;
}

/* Popular pricing box */
.standard-box.popular-pricing {
    position: relative;
}

/* Keep ring border on hover for popular pricing */
.standard-box.popular-pricing.ring-2 {
    border: 1px solid rgb(59, 130, 246);
    box-shadow: 0 0 0 1px rgb(59, 130, 246), 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
}

.standard-box.popular-pricing.ring-2:hover {
    border: 1px solid rgb(59, 130, 246);
    box-shadow: 0 0 0 1px rgb(59, 130, 246), 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
}

/* Feature Box - with standard effects */
.feature-box-wrapper {
    position: relative;
}

.feature-box-wrapper .feature-gradient-blur {
    display: none; /* Hide the blur effect */
}

.feature-box-wrapper .standard-box {
    position: relative;
    background: white;
}

/* Responsive styles for email input group */
@media (max-width: 640px) {
    .email-input-group {
        flex-direction: column;
        gap: 1.25rem; /* Increased gap from 0.75rem to 1.25rem for more space */
    }
    
    .email-input {
        width: 100%;
    }
    
    .email-input-group .btn-primary {
        width: 100%;
    }
}