/* =================================================================
   AnonReply Website - Modern, Minimal, Trust-Evoking Design
   ================================================================= */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Soft Blues & Greens for Trust & Calm */
    --color-primary: #0EA5E9;
    --color-primary-dark: #0284C7;
    --color-primary-light: #38BDF8;
    --color-secondary: #10B981;
    --color-secondary-dark: #059669;
    --color-accent: #6366F1;
    
    /* Neutrals */
    --color-white: #FFFFFF;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Layout */
    --container-max-width: 1200px;
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-2xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-gray-700);
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    color: var(--color-gray-900);
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary-dark);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    text-align: center;
    border: none;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--color-white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-download {
    background-color: var(--color-gray-900);
    color: var(--color-white);
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    min-width: 180px;
}

.btn-download:hover {
    background-color: var(--color-gray-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--color-white);
}

.btn-download .btn-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.btn-download div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.btn-download .btn-label {
    font-size: 0.65rem;
    font-weight: var(--font-weight-normal);
    opacity: 0.9;
}

.btn-download .btn-store {
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
}

.btn-apple {
    background-color: var(--color-gray-900);
}

.btn-google {
    background: linear-gradient(135deg, #34A853 0%, #4285F4 100%);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-base);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem var(--spacing-md);
    gap: var(--spacing-md);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: var(--font-weight-bold);
    font-size: 1.25rem;
    color: var(--color-gray-900);
    z-index: 1001;
    text-decoration: none;
    cursor: pointer;
    transition: opacity var(--transition-base);
}

.nav-brand:hover {
    opacity: 0.8;
    color: var(--color-gray-900);
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-md);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger {
    width: 24px;
    height: 2px;
    background-color: var(--color-gray-900);
    transition: all var(--transition-base);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--color-gray-900);
    transition: all var(--transition-base);
}

.hamburger::before {
    transform: translateY(-8px);
}

.hamburger::after {
    transform: translateY(8px);
}

.nav-toggle.active .hamburger {
    background-color: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--color-gray-700);
    font-weight: var(--font-weight-medium);
    font-size: 0.9375rem;
    transition: color var(--transition-base);
}

.nav-link:hover {
    color: var(--color-primary);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--color-white);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem var(--spacing-lg) var(--spacing-lg);
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-slow);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: var(--spacing-sm);
    }
    
    .nav-link {
        display: block;
        width: 100%;
        padding: var(--spacing-sm);
        font-size: 1.125rem;
    }
    
    .nav-cta {
        width: 100%;
        margin-top: var(--spacing-md);
    }
    
    .nav-cta .btn {
        width: 100%;
    }
}

/* Sections */
.section {
    padding: var(--spacing-3xl) 0;
}

.section:first-of-type {
    padding-top: calc(var(--spacing-3xl) + 72px);
}

@media (max-width: 768px) {
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    .section:first-of-type {
        padding-top: calc(var(--spacing-2xl) + 72px);
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #EFF6FF 0%, #F0FDF4 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: var(--spacing-2xl);
}

.hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.hero-title {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0;
    flex-shrink: 0;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-gray-600);
    margin-bottom: var(--spacing-xl);
    line-height: 1.7;
    max-width: 600px;
}

.hero-header .download-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    flex-shrink: 0;
    margin-left: auto;
}

/* Carousel Container */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: visible; /* Allow progress bar and dots to show */
    padding-bottom: 80px; /* Space for progress bar and dots */
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    min-height: 650px; /* Minimum height, will be adjusted dynamically */
    overflow: visible; /* Allow content to be visible */
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    pointer-events: none;
    visibility: hidden; /* Completely hide inactive slides to prevent flickering */
}

.carousel-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible; /* Make active slide visible */
}

.carousel-slide.slide-out-left {
    transform: translateX(-100%);
    opacity: 0;
}

.carousel-slide.slide-in-right {
    transform: translateX(100%);
    opacity: 0;
}

.hero-section-title {
    font-size: clamp(1.25rem, 3.5vw, 2rem);
    font-weight: var(--font-weight-bold);
    color: var(--color-gray-900);
    margin-bottom: var(--spacing-lg);
    text-align: left;
    line-height: 1.3;
}

/* Carousel Progress Bar */
.carousel-progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--color-gray-200);
    border-radius: 2px;
    margin-top: 0; /* Will be positioned dynamically */
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    position: absolute; /* Positioned dynamically by JavaScript */
    z-index: 10;
}

.carousel-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-radius: 2px;
    width: 0%;
    transition: width 100ms linear;
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: 0; /* Will be positioned dynamically */
    position: absolute; /* Positioned dynamically by JavaScript */
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-gray-300);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    padding: 0;
}

.carousel-dot:hover {
    background-color: var(--color-gray-400);
    transform: scale(1.2);
}

.carousel-dot.active {
    background-color: var(--color-primary);
    width: 32px;
    border-radius: 6px;
}

/* Hero Feature Card */
.hero-feature-card {
    background-color: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-gray-100);
}

.hero-feature-item {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--color-gray-100);
}

.hero-feature-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hero-feature-item:first-child {
    padding-top: 0;
}

.hero-feature-item h3 {
    font-size: 1.0625rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-gray-900);
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
}

.hero-feature-item p {
    font-size: 0.9375rem;
    color: var(--color-gray-600);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Features Section */
.features {
    background-color: var(--color-white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-2xl);
}

.section-title {
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-gray-600);
}

.features-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background-color: var(--color-gray-50);
    border-radius: var(--border-radius-xl);
    transition: all var(--transition-base);
}

.feature-item:hover {
    background-color: var(--color-white);
    box-shadow: var(--shadow-md);
    transform: translateX(8px);
}

.feature-item-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-item-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-white);
}

.feature-item-content h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.feature-item-content p {
    color: var(--color-gray-600);
    margin-bottom: 0;
}

/* Benefits Section */
.benefits {
    background: linear-gradient(180deg, var(--color-gray-50) 0%, var(--color-white) 100%);
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 640px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.benefit-card {
    background-color: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-slow);
    border: 2px solid transparent;
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary-light);
}

.benefit-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
    border-radius: var(--border-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.benefit-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-white);
}

.benefit-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.benefit-card p {
    color: var(--color-gray-600);
    line-height: 1.7;
    margin-bottom: 0;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.cta-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-2xl);
}

.cta-title {
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
}

.cta-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

.cta-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

@media (min-width: 768px) {
    .cta-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

.cta-feature {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-xl);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-base);
}

.cta-feature:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(14, 165, 233, 0.5);
    transform: translateY(-4px);
}

.cta-feature-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-white);
}

.cta-feature h3 {
    color: var(--color-white);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xs);
}

.cta-feature p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.policy-link {
    color: var(--color-primary-light);
    text-decoration: underline;
    font-weight: var(--font-weight-medium);
}

.policy-link:hover {
    color: var(--color-white);
}

.cta-download {
    text-align: center;
    padding: var(--spacing-xl);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-2xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-download-title {
    color: var(--color-white);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
}

.cta-download .download-buttons {
    justify-content: center;
}

/* Footer */
.footer {
    background-color: var(--color-gray-900);
    color: var(--color-gray-400);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: var(--font-weight-bold);
    font-size: 1.125rem;
    color: var(--color-white);
}

.footer-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-md);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
}

.footer-link {
    color: var(--color-gray-400);
    font-size: 0.9375rem;
    transition: color var(--transition-base);
}

.footer-link:hover {
    color: var(--color-white);
}

.footer-copy {
    font-size: 0.875rem;
    color: var(--color-gray-500);
    margin: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Stagger animation delays */
.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4) { animation-delay: 0.4s; }
.feature-item:nth-child(5) { animation-delay: 0.5s; }

.benefit-card:nth-child(1) { animation-delay: 0.1s; }
.benefit-card:nth-child(2) { animation-delay: 0.2s; }
.benefit-card:nth-child(3) { animation-delay: 0.3s; }
.benefit-card:nth-child(4) { animation-delay: 0.4s; }
.benefit-card:nth-child(5) { animation-delay: 0.5s; }

.cta-feature:nth-child(1) { animation-delay: 0.1s; }
.cta-feature:nth-child(2) { animation-delay: 0.2s; }
.cta-feature:nth-child(3) { animation-delay: 0.3s; }
.cta-feature:nth-child(4) { animation-delay: 0.4s; }

/* Responsive Typography */
@media (max-width: 768px) {
    .hero-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
    
    .hero-header .download-buttons {
        width: 100%;
        margin-left: 0;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .btn-download {
        width: 100%;
    }
    
    /* Carousel wrapper height is set dynamically by JavaScript on mobile */
    
    .carousel-container {
        padding-bottom: 100px; /* Extra space on mobile for progress bar and dots */
    }
}

/* Accessibility */
.btn:focus-visible,
.nav-link:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .nav-toggle,
    .download-buttons {
        display: none;
    }
}

