/* ==========================================================================
   InkFlow Premium Stylesheet (Vanilla CSS)
   Warning: Absolute compliance with "no font-family" user rules.
   ========================================================================== */

/* Global Reset & Theme Variables */
:root {
    --bg-dark: #070a13;
    --bg-card: rgba(17, 24, 39, 0.6);
    --bg-card-hover: rgba(31, 41, 55, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-glow: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-hero: radial-gradient(circle at top, #1e1b4b 0%, #070a13 70%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

input, button, select, textarea {
    font-family: inherit;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    background-image: var(--gradient-hero);
    color: var(--text-primary);
    font-family: 'LXGW WenKai', sans-serif;
    line-height: 1.6;
}

/* Hide Scrollbar Globally while preserving scroll function */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE & Edge */
}

::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important; /* Chrome, Safari, Opera */
}

/* Header & Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: rgba(7, 10, 19, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.logo-accent {
    background: var(--accent-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.btn-git {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
}

.btn-git:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.hero-section {
    padding: 160px 8% 100px 8%;
    position: relative;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.badge {
    align-self: flex-start;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 540px;
    text-align: left;
    text-indent: 2em;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 10px;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.btn-primary {
    background: var(--accent-glow);
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.55);
    color: #ffffff !important;
}

.btn-demo {
    background: linear-gradient(135deg, #9333ea 0%, #6366f1 100%) !important;
    box-shadow: 0 4px 20px rgba(147, 51, 234, 0.35) !important;
}

.btn-offline {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%) !important;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35) !important;
}

.btn-online {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.35) !important;
}

.btn-secondary {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

/* Kindle 3D Effect & Float */
.kindle-mockup-3d {
    position: relative;
    max-width: 420px;
    border-radius: 16px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: floatAnim 6s ease-in-out infinite;
    transition: transform 0.5s ease;
}

.kindle-mockup-3d:hover {
    transform: scale(1.02) rotate(-1deg);
}

.carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-inner .hero-img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}

.carousel-inner .hero-img:not(:first-child) {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    object-fit: cover;
}

.carousel-inner .hero-img.active {
    opacity: 1;
    z-index: 2;
}

.glow-effect {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

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



/* Section Common Headers */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.section-title {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
}

/* Features Section */
.features-section {
    padding: 100px 8%;
    background: rgba(11, 15, 25, 0.5);
    position: relative;
}

.features-marquee-container {
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
    position: relative;
    mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0) 100%);
}

.features-marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 28s linear infinite;
}

.features-marquee-container:hover .features-marquee-track {
    animation-play-state: paused;
}

.features-marquee-track .feature-card {
    width: 320px;
    margin-right: 30px;
    flex-shrink: 0;
}

@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 30px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-glow);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

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

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: rgba(167, 139, 250, 0.15);
    color: #a78bfa;
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 8px 20px rgba(167, 139, 250, 0.15);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
    text-align: left;
}

/* Showcase Section & Custom Bezel styling */
.showcase-section {
    padding: 100px 8%;
}

.interactive-showcase {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.showcase-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 6px;
    border-radius: 30px;
}

.tab-btn {
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.showcase-frame {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 50px;
    backdrop-filter: blur(10px);
}

.device-bezel {
    background: #111827;
    border-radius: 32px;
    padding: 24px;
    box-shadow: 0 25px 60px -15px rgba(0,0,0,0.7), 0 0 0 2px rgba(255,255,255,0.05);
    max-width: 380px;
    justify-self: center;
}

.screen-container {
    background: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3/4;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.screen-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: contrast(1.05) saturate(0.9);
}

.showcase-detail {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-box {
    display: none;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.5s ease forwards;
}

.detail-box.active {
    display: flex;
}

.detail-box h3 {
    font-size: 26px;
    font-weight: 800;
}

.detail-box p {
    color: var(--text-secondary);
    text-align: left;
    text-indent: 2em;
}

.detail-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--text-primary);
}

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

/* Setup & Command Terminal styling */
.setup-section {
    padding: 100px 8%;
    background: rgba(11, 15, 25, 0.5);
}

.setup-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.text-left {
    text-align: left;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 17px;
    margin-bottom: 40px;
    text-align: left;
    text-indent: 2em;
}

.setup-steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.step-item {
    display: flex;
    gap: 20px;
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-glow);
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.step-item h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.step-item p {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: left;
}

/* Terminal Design */
.setup-terminal {
    background: #090d16;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0,0,0,0.5);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

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

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 10px;
}

.terminal-body {
    padding: 24px;
    font-size: 14px;
}

.cmd-line {
    margin-bottom: 8px;
}

.prompt {
    color: #60a5fa;
    font-weight: 700;
    margin-right: 8px;
}

.cmd-output {
    color: #6b7280;
    margin-bottom: 12px;
}

.cmd-output-highlight {
    color: #10b981;
    margin-bottom: 12px;
    font-weight: 600;
}

.cursor {
    animation: blink 1s step-end infinite;
    font-weight: 700;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Footer Section */
.footer {
    padding: 60px 8% 40px 8%;
    border-top: 1px solid var(--border-color);
    background: #05070c;
}

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

.footer-brand {
    font-size: 20px;
    font-weight: 800;
}

.copyright {
    color: #4b5563;
    font-size: 13px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   Interaction & Entrance Animations
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-content .fade-in:nth-child(1) { animation-delay: 0.1s; }
.hero-content .fade-in:nth-child(2) { animation-delay: 0.2s; }
.hero-content .fade-in:nth-child(3) { animation-delay: 0.3s; }
.hero-content .fade-in:nth-child(4) { animation-delay: 0.4s; }
.hero-visual.fade-in { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 968px) {
    .navbar {
        padding: 12px 24px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .nav-links {
        gap: 16px;
    }
    
    .nav-links a {
        font-size: 13px;
        white-space: nowrap;
    }
    
    .hero-section {
        padding: 100px 4% 60px 4%;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .hero-title {
        font-size: 26px;
        white-space: nowrap;
    }
    
    .hero-content {
        align-items: center;
        text-align: center;
    }

    .features-section, .showcase-section, .setup-section {
        padding: 60px 4%;
    }

    .section-title {
        font-size: 28px;
    }

    .section-header {
        margin-bottom: 32px;
    }
    
    .hero-desc {
        margin: 0 auto;
    }
    
    .hero-actions {
        justify-content: center;
        gap: 12px;
    }

    .btn-primary, .btn-secondary {
        padding: 11px 22px;
        font-size: 14px;
    }

    .showcase-tabs {
        padding: 4px;
        border-radius: 20px;
    }

    .tab-btn {
        padding: 8px 16px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .showcase-frame {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }

    .device-bezel {
        padding: 12px;
        border-radius: 18px;
        max-width: 100%;
    }
    
    .setup-container {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .features-marquee-track .feature-card {
        width: 280px;
        margin-right: 20px;
    }

    .feature-card {
        padding: 24px 20px;
    }
    
    .feature-icon {
        margin-bottom: 16px;
    }
    
    .feature-card h3 {
        font-size: 17px;
        margin-bottom: 8px;
    }
    
    .feature-card p {
        font-size: 13px;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 10px 12px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .nav-links {
        gap: 10px;
    }
    
    .nav-links a {
        font-size: 12px;
    }

    .section-title {
        font-size: 22px;
    }

    .hero-title {
        font-size: 20px;
        white-space: nowrap;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 10px auto 0 auto;
        gap: 10px;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
        padding: 11px 16px;
        font-size: 13px;
    }

    .tab-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .device-bezel {
        padding: 8px;
        border-radius: 12px;
    }
}

/* ==========================================================================
   Lightbox Overlay Preview Styling
   ========================================================================== */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 7, 12, 0.93);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 82vh;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
    transform: scale(0.96);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--text-secondary);
    font-size: 44px;
    font-weight: 200;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.lightbox-close:hover {
    color: var(--text-primary);
    transform: scale(1.15) rotate(90deg);
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    width: 100%;
    letter-spacing: 1px;
}

/* Make images zoomable */
.carousel-inner .hero-img,
.screen-img {
    cursor: zoom-in;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-inner .hero-img:hover,
.screen-img:hover {
    transform: scale(1.01) translateY(-2px);
}
