/* =============================================
   OrcaFile Download Website — Style System
   Nord-inspired color palette with premium feel
   ============================================= */

/* ── CSS Custom Properties (Design Tokens) ── */
:root {
    /* Nord Palette */
    --nord0: #2E3440;
    --nord1: #3B4252;
    --nord2: #434C5E;
    --nord3: #4C566A;
    --nord4: #D8DEE9;
    --nord5: #E5E9F0;
    --nord6: #ECEFF4;
    --nord7: #8FBCBB;
    --nord8: #88C0D0;
    --nord9: #81A1C1;
    --nord10: #5E81AC;
    --nord11: #BF616A;
    --nord12: #D08770;
    --nord13: #EBCB8B;
    --nord14: #A3BE8C;
    --nord15: #B48EAD;

    /* Semantic Tokens */
    --bg-primary: #1a1e26;
    --bg-secondary: #212631;
    --bg-card: rgba(59, 66, 82, 0.35);
    --bg-card-hover: rgba(59, 66, 82, 0.55);
    --bg-glass: rgba(46, 52, 64, 0.65);
    --text-primary: #ECEFF4;
    --text-secondary: #D8DEE9;
    --text-muted: #8892a6;
    --accent: #88C0D0;
    --accent-hover: #8FBCBB;
    --accent-glow: rgba(136, 192, 208, 0.15);
    --border-color: rgba(136, 192, 208, 0.12);
    --border-hover: rgba(136, 192, 208, 0.25);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ── Animated Background Particles ── */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

/* ── Navigation ── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 var(--space-xl);
    transition: all 0.4s var(--ease-out);
    background: transparent;
}

.nav.scrolled {
    background: rgba(26, 30, 38, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
    transition: opacity 0.2s;
}

.nav-logo:hover {
    opacity: 0.85;
}

.nav-logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

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

.nav-link-github {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: all 0.25s var(--ease-out);
}

.nav-link-github:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-mobile-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
}

.nav-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(26, 30, 38, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-lg) var(--space-xl);
    flex-direction: column;
    gap: var(--space-md);
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s var(--ease-out);
}

.mobile-menu.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 500;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.2s;
}

.mobile-menu-link:last-child {
    border-bottom: none;
}

.mobile-menu-link:hover {
    color: var(--accent);
}

/* ── Hero Section ── */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px var(--space-xl) var(--space-3xl);
    text-align: center;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(136, 192, 208, 0.08) 0%, rgba(129, 161, 193, 0.04) 40%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.4rem 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    background: rgba(136, 192, 208, 0.06);
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.8s var(--ease-out) 0.1s both;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nord14);
    animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.8s var(--ease-out) 0.2s both;
}

.hero-title-emoji {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.hero-title-text {
    background: linear-gradient(135deg, var(--nord6) 0%, var(--nord8) 50%, var(--nord9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.7;
    animation: fadeInUp 0.8s var(--ease-out) 0.3s both;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
    line-height: 1.7;
    animation: fadeInUp 0.8s var(--ease-out) 0.4s both;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-2xl);
    animation: fadeInUp 0.8s var(--ease-out) 0.5s both;
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    animation: fadeInUp 0.8s var(--ease-out) 0.6s both;
}

.hero-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-meta-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
}

.hero-meta-value {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.hero-meta-divider {
    width: 1px;
    height: 32px;
    background: var(--border-color);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-sans);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--nord8) 0%, var(--nord9) 100%);
    color: var(--nord0);
    box-shadow: 0 4px 20px rgba(136, 192, 208, 0.25), 0 0 0 1px rgba(136, 192, 208, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(136, 192, 208, 0.35), 0 0 0 1px rgba(136, 192, 208, 0.2);
}

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

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

/* ── Screenshot ── */
.hero-screenshot {
    max-width: 900px;
    width: 100%;
    margin: var(--space-3xl) auto 0;
    animation: fadeInUp 1s var(--ease-out) 0.7s both;
    position: relative;
    z-index: 1;
}

.screenshot-frame {
    background: var(--nord1);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.25),
        0 0 80px rgba(136, 192, 208, 0.05);
    transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

.screenshot-frame:hover {
    transform: translateY(-4px) scale(1.005);
    box-shadow: 
        0 8px 12px rgba(0, 0, 0, 0.12),
        0 32px 80px rgba(0, 0, 0, 0.3),
        0 0 120px rgba(136, 192, 208, 0.08);
}

.screenshot-toolbar {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    background: rgba(46, 52, 64, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.screenshot-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.screenshot-dot--red { background: #BF616A; }
.screenshot-dot--yellow { background: #EBCB8B; }
.screenshot-dot--green { background: #A3BE8C; }

.screenshot-img {
    width: 100%;
    display: block;
}

/* ── Section Commons ── */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: var(--space-md);
    padding: 0.3rem 0.9rem;
    border: 1px solid rgba(136, 192, 208, 0.2);
    border-radius: var(--radius-full);
    background: rgba(136, 192, 208, 0.06);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Features Section ── */
.features {
    position: relative;
    z-index: 1;
    padding: var(--space-4xl) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(33, 38, 49, 0.5) 50%, transparent 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.feature-card {
    padding: var(--space-2xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    background: rgba(136, 192, 208, 0.1);
    color: var(--nord8);
    border: 1px solid rgba(136, 192, 208, 0.15);
}

.feature-icon--theme { background: rgba(180, 142, 173, 0.1); color: var(--nord15); border-color: rgba(180, 142, 173, 0.15); }
.feature-icon--search { background: rgba(163, 190, 140, 0.1); color: var(--nord14); border-color: rgba(163, 190, 140, 0.15); }
.feature-icon--tree { background: rgba(235, 203, 139, 0.1); color: var(--nord13); border-color: rgba(235, 203, 139, 0.15); }
.feature-icon--explorer { background: rgba(208, 135, 112, 0.1); color: var(--nord12); border-color: rgba(208, 135, 112, 0.15); }
.feature-icon--threads { background: rgba(94, 129, 172, 0.1); color: var(--nord10); border-color: rgba(94, 129, 172, 0.15); }

.feature-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.feature-description {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ── Installation Section ── */
.installation {
    position: relative;
    z-index: 1;
    padding: var(--space-4xl) 0;
}

.install-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    backdrop-filter: blur(12px);
    max-width: 700px;
    margin: 0 auto;
}

.install-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.install-step {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
}

.install-step-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--nord8), var(--nord9));
    color: var(--nord0);
    font-weight: 800;
    font-size: 1rem;
}

.install-step-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.install-step-content p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.install-step-content code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 2px 8px;
    background: rgba(136, 192, 208, 0.1);
    border: 1px solid rgba(136, 192, 208, 0.15);
    border-radius: 6px;
    color: var(--accent);
}

.install-cta {
    text-align: center;
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-xl);
}

.install-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.install-includes h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.install-includes ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.install-includes li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.install-includes li svg {
    color: var(--nord14);
    flex-shrink: 0;
}

/* ── Credits Section ── */
.credits {
    position: relative;
    z-index: 1;
    padding: var(--space-4xl) 0;
    background: linear-gradient(180deg, transparent 0%, rgba(33, 38, 49, 0.5) 50%, transparent 100%);
}

.credits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 900px;
    margin: 0 auto;
}

.credit-card {
    text-align: center;
    padding: var(--space-2xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    transition: all 0.4s var(--ease-out);
}

.credit-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.credit-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.credit-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.credit-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-md);
}

.credit-link {
    font-size: 0.85rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* ── Footer ── */
.footer {
    position: relative;
    z-index: 1;
    padding: var(--space-3xl) 0 var(--space-xl);
    border-top: 1px solid var(--border-color);
    background: rgba(26, 30, 38, 0.6);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3xl);
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--border-color);
}

.footer-brand {
    max-width: 320px;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    display: block;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.footer-links {
    display: flex;
    gap: var(--space-3xl);
}

.footer-link-group h4 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.footer-link-group a {
    display: block;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 4px 0;
    transition: color 0.2s;
}

.footer-link-group a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 0.83rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: var(--accent-hover);
}

/* ── Animations ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

/* ── Responsive ── */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-mobile-toggle {
        display: flex;
    }

    .hero {
        padding: 100px var(--space-md) var(--space-2xl);
    }

    .hero-br {
        display: none;
    }

    .hero-meta {
        gap: var(--space-md);
    }

    .hero-meta-divider {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .feature-card {
        padding: var(--space-xl);
    }

    .credits-grid {
        grid-template-columns: 1fr;
    }

    .install-card {
        padding: var(--space-xl);
    }

    .footer-top {
        flex-direction: column;
        gap: var(--space-2xl);
    }

    .footer-links {
        gap: var(--space-2xl);
    }

    .btn {
        padding: 0.65rem 1.2rem;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 0.85rem 1.6rem;
        font-size: 1rem;
    }

    .section-container {
        padding: 0 var(--space-md);
    }

    .install-step {
        gap: var(--space-md);
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-meta {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .hero-meta-item {
        flex-direction: row;
        gap: var(--space-sm);
    }

    .footer-links {
        flex-direction: column;
        gap: var(--space-xl);
    }
}
