/**
 * Quip Messenger Landing Page Styles
 * Modern design with animations
 */

:root[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f0f2f5;
    --bg-tertiary: #e4e6eb;
    --text-primary: #111b21;
    --text-secondary: #667781;
    --text-tertiary: #8696a0;
    --border-color: #e9edef;
    --accent-color: #008069;
    --accent-hover: #017561;
    --shadow: rgba(0, 0, 0, 0.1);
    --gradient-start: #008069;
    --gradient-end: #00a884;
}

:root[data-theme="dark"] {
    --bg-primary: #111b21;
    --bg-secondary: #202c33;
    --bg-tertiary: #2a3942;
    --text-primary: #e9edef;
    --text-secondary: #8696a0;
    --text-tertiary: #667781;
    --border-color: #313d45;
    --accent-color: #00a884;
    --accent-hover: #008069;
    --shadow: rgba(0, 0, 0, 0.3);
    --gradient-start: #00a884;
    --gradient-end: #008069;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

[data-theme="dark"] .navbar {
    background: rgba(17, 27, 33, 0.9);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo i {
    color: var(--accent-color);
    font-size: 28px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: var(--bg-tertiary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--accent-color);
    color: white;
    transform: rotate(20deg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 128, 105, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--gradient-end), var(--gradient-start));
    top: 50%;
    right: -150px;
    animation-delay: 5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    bottom: -125px;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.feature-item i {
    color: var(--accent-color);
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.phone-mockup {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.phone-screen {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 12px;
    box-shadow: 0 20px 60px var(--shadow);
    border: 8px solid var(--bg-primary);
}

.chat-preview {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    min-height: 500px;
}

.chat-header {
    background: var(--bg-secondary);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

.chat-info {
    flex: 1;
}

.chat-name {
    width: 100px;
    height: 16px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    margin-bottom: 8px;
}

.chat-status {
    width: 60px;
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.messages {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    display: flex;
    max-width: 70%;
}

.message.received {
    align-self: flex-start;
}

.message.sent {
    align-self: flex-end;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--bg-tertiary);
    min-height: 40px;
}

.message.sent .message-bubble {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.animate-fade-in-delay-3 {
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.animate-slide-in {
    animation: slideInRight 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Sections */
section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-primary);
}

/* Features Section */
.features {
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow);
    border-color: var(--accent-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.feature-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Screenshots Section */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.screenshot-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px var(--shadow);
    transition: transform 0.3s ease;
}

.screenshot-item:hover {
    transform: scale(1.05);
}

.screenshot-placeholder {
    background: var(--bg-secondary);
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    border: 2px dashed var(--border-color);
}

.screenshot-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Platforms Section */
.platforms {
    background: var(--bg-secondary);
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.platform-card {
    background: var(--bg-primary);
    padding: 32px 24px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.platform-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow);
    border-color: var(--accent-color);
}

.platform-card i {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.platform-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.platform-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    text-align: center;
    padding: 100px 0;
}

.cta-content h2 {
    font-size: 48px;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-primary {
    background: white;
    color: var(--accent-color);
}

.cta .btn-primary:hover {
    background: var(--bg-secondary);
}

.cta .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.cta .btn-secondary:hover {
    background: white;
    color: var(--accent-color);
}

/* Footer */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .section-title {
        font-size: 32px;
    }

    .features-grid,
    .platforms-grid {
        grid-template-columns: 1fr;
    }

    .cta-content h2 {
        font-size: 32px;
    }
}

/* Download Page Styles */
.download-section {
    padding: 120px 0 80px;
}

.download-header {
    text-align: center;
    margin-bottom: 60px;
}

.download-header h1 {
    font-size: 48px;
    margin-bottom: 16px;
}

.download-header p {
    font-size: 20px;
    color: var(--text-secondary);
}

.platform-section {
    margin-bottom: 80px;
    scroll-margin-top: 100px;
}

.platform-section h2 {
    font-size: 32px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.platform-section h2 i {
    color: var(--accent-color);
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.download-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
}

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--shadow);
    border-color: var(--accent-color);
}

.download-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.download-card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.download-card-title {
    font-size: 20px;
    font-weight: 600;
}

.download-card-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.download-card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.download-card-actions .btn {
    flex: 1;
    justify-content: center;
    min-width: 120px;
}

.version-info {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

/* API Page Styles */
.api-section {
    padding: 120px 0 80px;
}

.api-endpoint {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.api-endpoint:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px var(--shadow);
}

.api-method {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    margin-right: 12px;
}

.api-method.get {
    background: #e3f2fd;
    color: #1976d2;
}

.api-method.post {
    background: #e8f5e9;
    color: #388e3c;
}

.api-method.put {
    background: #fff3e0;
    color: #f57c00;
}

.api-method.delete {
    background: #ffebee;
    color: #d32f2f;
}

.api-path {
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
    font-size: 16px;
}

.api-description {
    color: var(--text-secondary);
    margin: 12px 0;
    line-height: 1.6;
}

.code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
    position: relative;
}

.code-block pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--text-primary);
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 12px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--accent-color);
}

/* FAQ Page Styles */
.faq-section {
    padding: 120px 0 80px;
}

.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    padding: 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question i {
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 24px 24px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Protocol Page Styles */
.protocol-section {
    padding: 120px 0 80px;
}

.protocol-content {
    max-width: 900px;
    margin: 0 auto;
}

.protocol-section h2 {
    font-size: 32px;
    margin: 40px 0 24px;
    color: var(--text-primary);
}

.protocol-section h3 {
    font-size: 24px;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

.protocol-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.protocol-section ul,
.protocol-section ol {
    margin: 16px 0;
    padding-left: 24px;
    color: var(--text-secondary);
}

.protocol-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

