/* ============================================
   docprep Landing Page - Warm Coffeeshop Aesthetic
   ============================================ */

/* Google Fonts - Fraunces (warm rounded serif) + Inter (clean sans) */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Dark Mode - Navy background, white text (default) */
    --bg-primary: #1e3a5a;
    --bg-secondary: #253f5f;
    --bg-card: #2d4a6a;
    --bg-card-hover: #3a5a7a;
    
    --accent-primary: #ffffff;
    --accent-secondary: #e8edf3;
    --accent-light: #2d4a6a;
    
    --success: #7aaa9a;
    --success-light: #2a4a4e;
    --warning: #d8b87a;
    --error: #d88a8a;
    
    --text-primary: #ffffff;
    --text-secondary: #c8d0da;
    --text-muted: #8a9aaa;
    
    --border-subtle: #3a5a7a;
    --border-accent: #ffffff;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Fraunces', Georgia, serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Radius - rounder for warmth */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Animation - slightly slower for calm feel */
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --duration-fast: 200ms;
    --duration-normal: 350ms;
    --duration-slow: 500ms;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================
   Hero Navigation
   ============================================ */

.hero-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    padding: var(--space-lg) var(--space-xl);
    background: rgba(30, 58, 90, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-link {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
    position: relative;
}

.nav-link:hover {
    color: var(--accent-secondary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--duration-normal) var(--ease-out);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--accent-primary);
}

/* Landing Page Container */
.landing-page {
    width: 100%;
    min-height: 100vh;
    padding-top: 80px; /* Account for fixed nav */
    position: relative;
}

/* ============================================
   Polka Dot Background
   ============================================ */

.polka-dots {
    position: fixed;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    animation: dotFloat 20s ease-in-out infinite;
}

.polka-dot {
    position: absolute;
    border-radius: 50%;
}

@keyframes dotFloat {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(1%, 0.5%);
    }
    50% {
        transform: translate(0.5%, 1%);
    }
    75% {
        transform: translate(-0.5%, 0.5%);
    }
}

/* ============================================
   Landing Sections
   ============================================ */

.landing-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl) var(--space-xl);
    position: relative;
    z-index: 1;
}

.section-content {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ============================================
   Section 1: Hero/Welcome
   ============================================ */

.section-hero {
    background: transparent;
    padding-top: calc(var(--space-2xl) + 40px);
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.welcome-logo {
    margin-bottom: var(--space-lg);
}

.logo-text {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 3.5rem;
    color: var(--accent-primary);
    letter-spacing: -0.02em;
}

.welcome-description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 300px;
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.welcome-formats {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    align-items: center;
    margin-bottom: var(--space-2xl);
}

.format-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    opacity: 0.85;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.format-logo:hover {
    opacity: 1;
}

/* Adjust Word and PowerPoint icons to match Excel visual size */
.format-logo[alt="Word"],
.format-logo[alt="PowerPoint"] {
    width: 40px;
    height: 40px;
}

/* Scroll Indicator */
.scroll-indicator {
    cursor: pointer;
    padding: var(--space-md);
}

.scroll-arrow {
    width: 28px;
    height: 28px;
    color: var(--text-secondary);
    opacity: 0.6;
    transition: opacity var(--duration-fast) var(--ease-out), 
                transform var(--duration-fast) var(--ease-out);
}

.scroll-indicator:hover .scroll-arrow {
    opacity: 1;
    transform: translateY(3px);
}

/* ============================================
   Section 2: The Problem
   ============================================ */

.section-problem {
    background: var(--bg-secondary);
}

.problem-content {
    max-width: 700px;
}

.problem-title {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.problem-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: var(--space-2xl);
    max-width: 480px;
    line-height: 1.6;
}

.size-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.size-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    min-width: 140px;
}

.size-icon-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

/* Bloat rings animation for the "before" card */
.bloat-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    opacity: 0.3;
}

.ring-1 {
    width: 80px;
    height: 80px;
    opacity: 0.25;
}

.ring-2 {
    width: 100px;
    height: 100px;
    opacity: 0.15;
}

.ring-3 {
    width: 120px;
    height: 120px;
    opacity: 0.08;
}

.size-label {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.size-before .size-label {
    color: var(--warning);
}

.size-after .size-label {
    color: var(--success);
}

.size-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.size-arrow {
    width: 32px;
    height: 32px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.size-arrow svg {
    width: 100%;
    height: 100%;
}

.problem-tagline {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* ============================================
   Section 3: Tutorial - How it works
   ============================================ */

.section-tutorial {
    background: var(--bg-secondary);
}

.section-tutorial .tree-panel {
    background: var(--bg-card);
}

.section-tutorial .section-content {
    max-width: 900px;
}

.intro-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro-title {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.intro-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: var(--space-sm);
    max-width: 520px;
    line-height: 1.6;
}

.intro-subtitle:last-of-type {
    margin-bottom: var(--space-xl);
}

.tree-comparison {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-2xl);
    margin-bottom: var(--space-lg);
    width: 100%;
    flex-shrink: 0;
}

.tree-panel {
    flex: 1;
    max-width: 400px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    min-height: 460px;
    display: flex;
    flex-direction: column;
}

.tree-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border-subtle);
}

.tree-header {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: var(--space-sm);
}

.tree-header-name {
    flex: 1;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.tree-header-size {
    width: 70px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: right;
}

.finder-list {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    line-height: 1.4;
    flex: 1;
    overflow: visible;
}

.finder-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: background var(--duration-fast) var(--ease-out);
}

.finder-row:hover {
    background: var(--bg-card);
}

.finder-row.folder {
    font-weight: 500;
}

.finder-row.folder .icon-folder {
    color: #f5a623;
}

.finder-row .file-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.finder-row .file-size {
    width: 70px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.finder-row.indent-1 {
    padding-left: 1.5rem;
}

.finder-row.indent-2 {
    padding-left: 2.75rem;
}

.finder-row.indent-3 {
    padding-left: 4rem;
}

.finder-row .icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.finder-row .icon-file {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.tree-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    margin-top: 80px;
    flex-shrink: 0;
    min-width: 100px;
}

.tree-arrow {
    width: 40px;
    height: 40px;
    color: var(--accent-primary);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.tree-arrow svg {
    width: 100%;
    height: 100%;
}

.center-size-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.center-size-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.center-size-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.tree-after {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
}

.tree-after .finder-row {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.1s ease-out, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Arrow Pulse Animation Removed */


/* ============================================
   Section 3: Use Case - AI-Ready Data
   ============================================ */

.section-use-case {
    background: transparent;
}

.section-use-case .section-content {
    max-width: 700px;
}

.tutorial-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tutorial-title {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.tutorial-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--space-xl);
    text-align: center;
}

.ide-grid {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    justify-content: center;
}

.ide-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-out);
    min-width: 120px;
}

.ide-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.ide-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    color: var(--text-primary);
    flex-shrink: 0;
}

.ide-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.tutorial-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: var(--space-lg);
    max-width: 500px;
}

.security-notice {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-top: var(--space-xl);
}

.security-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.security-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* ============================================
   Section 4: Download
   ============================================ */

.section-download {
    background: var(--bg-secondary);
    padding-bottom: var(--space-2xl);
}

.download-content {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.download-title {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.download-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: var(--space-2xl);
    padding-top: 15px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    width: 100%;
    max-width: 600px;
}

.download-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-out);
    border: 2px solid transparent;
}

.download-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 90, 0.1);
}

.download-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.docprep-logo-text {
    font-family: var(--font-serif);
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: -0.02em;
    position: relative;
    top: -0.1em;
}

.download-title .docprep-logo-text {
    font-size: 3rem;
    line-height: 1;
}

.download-info {
    flex: 1;
    text-align: left;
}

.download-platform {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.download-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
}

.download-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform var(--duration-fast) var(--ease-out);
}

.download-card:hover .download-arrow {
    transform: translateX(4px);
    color: var(--accent-primary);
}

/* ============================================
   Section 5: Footer
   ============================================ */

.section-footer {
    background: var(--bg-card);
    padding: var(--space-xl) var(--space-xl);
    min-height: auto;
    opacity: 1 !important;
    transform: none !important;
}

.footer-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-social {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-out);
}

.footer-social-link:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.footer-social-link svg {
    width: 20px;
    height: 20px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.footer-link {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

.footer-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.footer-divider {
    color: var(--text-muted);
    opacity: 0.5;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.875rem var(--space-lg);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    text-decoration: none;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

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

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: 0.95rem;
}

.btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ============================================
   Scroll Animations
   ============================================ */

.landing-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
}

.landing-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .hero-nav {
        gap: var(--space-md);
        padding: var(--space-md) var(--space-lg);
        flex-wrap: wrap;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
    
    .landing-page {
        padding-top: 100px;
    }
    
    .landing-section {
        min-height: calc(100vh - 100px);
        padding: var(--space-xl) var(--space-lg);
    }
    
    .tree-comparison {
        flex-direction: column;
        align-items: center;
    }
    
    .tree-panel {
        max-width: 100%;
        height: auto;
        min-height: 300px;
    }
    
    .tree-center {
        margin-top: var(--space-md);
    }
    
    .tree-center .tree-arrow svg {
        transform: rotate(90deg);
    }
    
    .ide-grid {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    
    .ide-card {
        width: auto;
        min-width: 90px;
        padding: var(--space-md);
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-tagline {
        font-size: 1.25rem;
    }
    
    .logo-text {
        font-size: 2.5rem;
    }
    
    .section-content {
        max-width: 100%;
    }
    
    .section-footer {
        padding: var(--space-lg) var(--space-lg);
        min-height: auto;
    }
    
    /* Problem section responsive */
    .size-comparison {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .size-arrow {
        transform: rotate(90deg);
    }
    
    .size-card {
        min-width: 180px;
    }
    
    .problem-title {
        font-size: 1.5rem;
    }
}

/* Arrow Pulse Animation Removed */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card-hover);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
