/**
 * drupod Landing Page Styles
 * Matches the React frontend design
 */

:root {
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-50: #ecfdf5;

    /* Light mode */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-input: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Dark mode variables */
.dark-mode {
    --bg-primary: #0f0f0f;
    --bg-secondary: #171717;
    --bg-input: #171717;
    --border-color: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4);
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Light mode gradient */
.light-mode {
    background: linear-gradient(to bottom, rgba(16, 185, 129, 0.05) 0%, #ffffff 30%, #ffffff 100%);
}

/* Dark mode gradient */
.dark-mode {
    background: linear-gradient(to bottom, #0a1f1a 0%, #0f0f0f 30%, #0f0f0f 100%);
}

/* Header */
.header {
    position: relative;
    z-index: 10;
}

.logo-link {
    transition: opacity 0.2s ease;
}

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

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--emerald-500);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-svg {
    width: 20px;
    height: 20px;
    color: white;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 600;
}

.text-emerald {
    color: var(--emerald-500);
}

.text-dark-mode {
    color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--emerald-500);
    background: var(--emerald-50);
}

.dark-mode .theme-toggle:hover {
    background: rgba(16, 185, 129, 0.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.light-mode .moon-icon {
    display: none;
}

.dark-mode .sun-icon {
    display: none;
}

/* Hero Section */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 5rem;
}

.hero-content {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

/* Hero Logo */
.hero-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: var(--emerald-500);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.25);
}

.hero-logo-svg {
    width: 44px;
    height: 44px;
    color: white;
}

/* Hero Text */
.hero-headline {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .hero-headline {
        font-size: 3rem;
    }
}

@media (min-width: 768px) {
    .hero-headline {
        font-size: 3.75rem;
    }
}

.hero-tagline {
    font-size: 1.5rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .hero-tagline {
        font-size: 1.875rem;
    }
}

.hero-description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 32rem;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

@media (min-width: 640px) {
    .hero-description {
        font-size: 1.125rem;
    }
}

/* Demo Video */
.video-container {
    width: 100%;
    max-width: 800px;
    margin: 2.5rem auto 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.demo-video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 15px;
}

/* Subtle glow effect on video container */
.video-container:hover {
    box-shadow: var(--shadow-xl), 0 0 40px rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
}

@media (max-width: 640px) {
    .video-container {
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }

    .demo-video {
        border-radius: 11px;
    }
}

/* Coming Soon Badge */
.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    margin-bottom: 2rem;
}

.badge-text {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--emerald-600);
    background: var(--emerald-50);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 9999px;
}

.dark-mode .badge-text {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--emerald-500);
}

/* Email Form */
.email-form-container {
    max-width: 32rem;
    margin: 0 auto;
}

.email-form {
    width: 100%;
}

.input-wrapper {
    position: relative;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s ease;
}

.input-wrapper.focused {
    border-color: var(--emerald-500);
    box-shadow: var(--shadow-xl), 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.email-input {
    width: 100%;
    padding: 1rem 3.5rem 1rem 1.25rem;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
}

.email-input::placeholder {
    color: var(--text-muted);
}

.submit-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.submit-btn.active {
    background: var(--emerald-500);
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.submit-btn.active:hover {
    background: var(--emerald-600);
}

.submit-btn:disabled {
    opacity: 0.7;
}

.arrow-icon {
    width: 20px;
    height: 20px;
}

/* Spinner */
.spinner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-svg {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.spinner-circle {
    stroke-dasharray: 60;
    stroke-dashoffset: 45;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.form-hint {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--emerald-500);
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

.success-text {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Error Message */
.error-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
}

.error-text {
    font-size: 0.875rem;
    color: #ef4444;
    margin: 0;
}

/* Footer */
.footer {
    padding: 1.5rem 0;
    text-align: center;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
    animation-delay: 0.15s;
    opacity: 0;
}

/* Utility classes */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex !important;
}

/* Accessibility - Screen reader only */
.visually-hidden,
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--emerald-500);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
