/* Modern Design Enhancements for DokuAI Website */
/* Accessibility and Contemporary Design Improvements */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-color: #667eea;
    --accent-hover: #5568d3;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Accessibility: Visually hidden but available to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Skip to main content link for accessibility */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 0 0 4px 0;
}

.skip-to-main:focus {
    left: 0;
    top: 0;
}

/* Enhanced focus styles for accessibility */
*:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

a:focus, button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Modern button enhancements */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75em;
    vertical-align: middle;
}

/* Use more specific selector to override main.css styles */
input[type="submit"].button.primary,
input[type="reset"].button.primary,
input[type="button"].button.primary,
button.button.primary,
a.button.primary {
    background: var(--primary-gradient);
    border: none;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Ensure buttons in action lists are aligned and same size */
ul.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

ul.actions li {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

ul.actions.special {
    justify-content: center;
}

/* Make buttons side-by-side have consistent sizing */
ul.actions li .button {
    min-width: 9.25em; /* Use em units for better scaling with font size */
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.button.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s;
}

.button.primary:hover::before {
    left: 100%;
}

.button.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.button.primary:active {
    transform: translateY(0);
}

/* Modern card-like sections */
.main section {
    transition: var(--transition);
}

.spotlight {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

/* Enhanced feature icons */
.features li {
    transition: var(--transition);
}

.features li:hover {
    transform: translateY(-5px);
}

.features .icon {
    transition: var(--transition);
}

.features li:hover .icon {
    transform: scale(1.1);
}

/* Trust signals styling */
.trust-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.trust-signal-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 50px;
    border-left: 3px solid #4CAF50;
    transition: var(--transition);
}

.trust-signal-item:hover {
    background: rgba(76, 175, 80, 0.15);
    transform: translateX(5px);
}

/* Social proof card */
.social-proof-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border-left: 4px solid #f9c74f;
    transition: var(--transition);
}

.social-proof-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Statistics enhancement */
.statistics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.statistics li {
    transition: var(--transition);
    flex: 0 1 auto;
    min-width: 150px;
}

.statistics li:hover {
    transform: scale(1.05);
}

/* Responsive statistics */
@media screen and (max-width: 768px) {
    .statistics {
        flex-direction: column;
        align-items: center;
    }
    
    .statistics li {
        width: 100%;
        max-width: 300px;
    }
}

/* Language switcher modern styling */
.language-switcher .button {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.language-switcher .button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.language-switcher .button.primary {
    background: var(--primary-gradient);
    border: none;
}

/* Improved image handling - prevent distortion */
.image img {
    transition: var(--transition);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    width: 100%;
    height: auto;
    object-fit: cover;
    max-width: 100%;
}

.image:hover img {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* Fix spotlight images - remove circular forcing, allow natural aspect ratio */
/* Using more specific selectors to override main.css without !important */
#main .spotlight .image,
.spotlight .image {
    border-radius: 8px;
    padding: 0;
    border: none;
    margin-left: 2em;
}

#main .spotlight .image img,
.spotlight .image img {
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: cover;
}

/* Improve spotlight layout - stack on smaller screens */
@media screen and (max-width: 980px) {
    .spotlight {
        flex-direction: column !important;
        text-align: center;
    }
    
    #main .spotlight .image,
    .spotlight .image {
        margin-left: 0 !important;
        margin-top: 2em;
        order: 2;
    }
    
    .spotlight .content {
        order: 1;
    }
    
    #main .spotlight .image img,
    .spotlight .image img {
        max-width: 100%;
        width: 100%;
    }
}

/* Header gradient overlay */
#header {
    position: relative;
}

#header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Ensure header content is above gradient */
#header > * {
    position: relative;
    z-index: 1;
}

/* Fix hero logo to prevent distortion on mobile */
#header .logo,
#header.alt .logo {
    display: block;
    position: relative;
    z-index: 1;
}

#header .logo img,
#header.alt .logo img {
    max-width: 200px !important;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block !important;
    margin: 0 auto !important;
}

@media screen and (max-width: 768px) {
    #header .logo img,
    #header.alt .logo img {
        max-width: 150px !important;
    }
}

@media screen and (max-width: 480px) {
    #header .logo img,
    #header.alt .logo img {
        max-width: 120px !important;
    }
}

/* CTA section enhancement */
#cta {
    position: relative;
}

#cta::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, transparent, rgba(102, 126, 234, 0.1));
}

/* App Store badge hover effect */
.actions a[href*="apple.com"] img {
    transition: var(--transition);
}

.actions a[href*="apple.com"]:hover img {
    transform: scale(1.05);
}

/* Navigation improvements */
#nav {
    backdrop-filter: blur(10px);
}

#nav ul li a {
    transition: var(--transition);
    position: relative;
}

#nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

#nav ul li a:hover::after,
#nav ul li a.active::after {
    width: 80%;
}

/* Responsive improvements */
@media screen and (max-width: 768px) {
    .spotlight {
        padding: 1rem;
    }
    
    .trust-signal-item {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .social-proof-card {
        padding: 1.5rem;
    }
    
    /* Ensure buttons stack nicely on mobile */
    ul.actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    ul.actions li {
        width: 100%;
    }
    
    ul.actions li .button {
        width: 100%;
        min-width: unset;
    }
    
    /* Fix spotlight layout on mobile */
    .spotlight .image img {
        max-width: 100%;
    }
}

/* Tablet responsive adjustments */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    ul.actions li .button {
        min-width: 9em;
        font-size: 0.9em;
    }
}

/* Accessibility: High contrast mode support */
@media (prefers-contrast: high) {
    .button.primary {
        border: 2px solid #fff !important;
    }
    
    .trust-signal-item {
        border-width: 2px;
    }
}

/* Accessibility: Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Accessibility: Focus visible (for keyboard navigation) */
.button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}

/* Improved list styling */
section ul li {
    position: relative;
    padding-left: 0;
}

/* Remove arrow bullets - they were added everywhere and shouldn't be there */
section ul li::before {
    content: none;
}

/* Loading animation for smoother experience */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main section {
    animation: fadeIn 0.6s ease-out;
}

/* Feature grid modern layout */
.features {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: start;
    justify-content: center;
    width: 100% !important;
    margin: 0 0 3em 0 !important;
}

/* Prevent feature items from overlapping */
.features li {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center !important;
    padding: 1.5rem;
    width: 100% !important;
    margin: 0 !important;
}

.features li h3,
.features li p {
    text-align: center !important;
}

/* Ensure icons are consistent size */
.features .icon {
    flex-shrink: 0;
    margin-bottom: 1rem;
}

/* Responsive feature grid */
@media screen and (max-width: 768px) {
    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        justify-items: center;
    }
    
    .features li {
        max-width: 400px;
        margin: 0 auto !important;
    }
}

/* Urgency element styling */
.urgency-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #f9c74f 0%, #f3722c 100%);
    color: #000;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: var(--shadow-md);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* Footer enhancements */
#footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#footer section {
    backdrop-filter: blur(5px);
}

/* Icon hover effects */
.icons a {
    transition: var(--transition);
    position: relative;
}

.icons a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: var(--transition);
}

.icons a:hover::before {
    width: 120%;
    height: 120%;
}

.icons a:hover {
    transform: translateY(-3px);
}

/* Improved text readability */
.main p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.main h2 {
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism effect for modern look */
.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

/* Enhanced color variables matching design specs */
:root {
    --primary-indigo: #6366F1;
    --accent-sky: #0EA5E9;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* Hero stats styling */
.hero-stats {
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.hero-stats li {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5em 1.2em;
    border-radius: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.hero-stats li:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Pain points cards styling */
.pain-point-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1em;
    border-radius: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.pain-point-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

/* How It Works section styling */
#how-it-works .glass-card {
    transition: all 0.3s ease;
}

#how-it-works .glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* Benefits grid styling */
#benefit .benefit-card {
    transition: all 0.3s ease;
}

#benefit .benefit-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
}

/* Testimonials section styling */
#testimonials .testimonial-card {
    transition: all 0.3s ease;
}

#testimonials .testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Smooth animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add animation to sections */
.main section {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.main section:nth-child(1) { animation-delay: 0.1s; }
.main section:nth-child(2) { animation-delay: 0.2s; }
.main section:nth-child(3) { animation-delay: 0.3s; }
.main section:nth-child(4) { animation-delay: 0.4s; }
.main section:nth-child(5) { animation-delay: 0.5s; }
.main section:nth-child(6) { animation-delay: 0.6s; }

/* Glow effect for CTA */
#cta .button.primary {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

#cta .button.primary:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.7);
}

/* Rounded corners (2xl) */
.rounded-2xl {
    border-radius: 16px;
}

/* Gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%);
}

/* Text gradients */
.text-gradient {
    background: linear-gradient(135deg, #6366F1, #0EA5E9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive adjustments for new sections */
@media screen and (max-width: 768px) {
    .hero-stats {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-stats li {
        text-align: center;
    }
    
    #how-it-works > div,
    #benefit .benefit-grid,
    #testimonials > div {
        grid-template-columns: 1fr;
    }
}

/* Enhanced backdrop blur support */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .glass-effect,
    .hero-stats li,
    .pain-point-card {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
    .glass-effect,
    .hero-stats li,
    .pain-point-card {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* Ensure proper text alignment - center all major sections */
.main section {
    text-align: center;
}

.main section .content {
    text-align: left;
}

.main .spotlight .content {
    text-align: left;
}

/* Center all headings by default */
.main section header {
    text-align: center;
}

/* Ensure features and stats are centered */
.features,
.statistics {
    justify-content: center;
    text-align: center;
}

/* Center trust signals and social proof elements */
.trust-signals,
.trust-signal-item {
    justify-content: center;
    text-align: center;
}

