/* BoxCraft Keeper Lab - Tech/Gaming Design System */
/* Colors from app: Navy dark (#0f1729), Lime green (#c8e64a), Blue accents */

:root {
    --bg-primary: #0f1729;
    --bg-secondary: #1a2337;
    --bg-card: #1e2a42;
    --accent-lime: #c8e64a;
    --accent-blue: #4a90d9;
    --accent-cyan: #00d4ff;
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #6b7a90;
    --border-color: #2d3a52;
    --success: #48bb78;
    --warning: #ed8936;
    --error: #f56565;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-lime);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 41, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-logo svg {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    flex-wrap: nowrap;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-lime);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-lime);
    transition: width 0.3s ease;
}

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

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    background: none;
    border: none;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(74, 144, 217, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

.hero-badge {
    display: inline-block;
    background: rgba(200, 230, 74, 0.15);
    color: var(--accent-lime);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(200, 230, 74, 0.3);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Device Mockup */
.device-mockup {
    position: relative;
    max-width: 280px;
    margin: 0 auto;
}

.device-frame {
    position: relative;
    background: linear-gradient(145deg, #2d3a52, #1a2337);
    border-radius: 36px;
    padding: 12px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.device-frame::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 24px;
    background: #0f1729;
    border-radius: 0 0 14px 14px;
    z-index: 10;
}

.device-screen {
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-primary);
}

.device-screen img {
    width: 100%;
    height: auto;
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    line-height: 1.4;
}

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

.btn-primary:hover {
    background: #d4f055;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(200, 230, 74, 0.3);
    color: var(--bg-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    text-align: left;
}

.feature-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.6;
}

/* Screenshots Section */
.screenshots-section {
    background: var(--bg-secondary);
    padding: 4rem 0;
    max-height: 500px;
    overflow: visible;
}

.screenshot-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    height: 380px;
}

.carousel-container {
    position: relative;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide {
    position: absolute;
    opacity: 0;
    transition: all 0.5s ease;
    transform: scale(0.9);
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
}

.carousel-device {
    max-width: 200px;
    margin: 0 auto;
}

.carousel-device .device-frame {
    padding: 8px;
    border-radius: 28px;
}

.carousel-device .device-frame::before {
    width: 60px;
    height: 18px;
    top: 8px;
    border-radius: 0 0 10px 10px;
}

.carousel-device .device-screen {
    border-radius: 20px;
}

.carousel-device .device-screen img {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

.carousel-device .device-screen img.loaded {
    filter: blur(0);
}

/* Carousel Controls */
.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    border-color: var(--accent-lime);
    background: rgba(200, 230, 74, 0.1);
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--accent-lime);
    width: 30px;
    border-radius: 5px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-lime);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    text-align: center;
    padding: 5rem 0;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    margin-bottom: 1rem;
}

.cta-content p {
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    max-width: 300px;
    margin-top: 1rem;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

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

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

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Page Header */
.page-header {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
}

.page-header h1 {
    margin-bottom: 1rem;
}

.page-header p {
    max-width: 600px;
    margin: 0 auto;
}

/* Content Sections */
.content-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.content-section h2 {
    color: var(--accent-cyan);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.content-section h3 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.content-section p {
    text-align: left;
    margin-bottom: 1rem;
}

.content-section ul,
.content-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.content-section li {
    margin-bottom: 0.5rem;
    text-align: left;
}

.content-section strong {
    color: var(--text-primary);
}

/* Contact Form */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

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

.contact-info h2 {
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 2rem;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-detail h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.contact-detail p {
    margin: 0;
    font-size: 0.9rem;
}

.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: left;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input[type="file"] {
    padding: 0.75rem;
}

.form-group input[type="file"]::file-selector-button {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 1rem;
}

.form-success {
    display: none;
    background: rgba(72, 187, 120, 0.15);
    border: 1px solid var(--success);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: var(--success);
    text-align: left;
}

.form-success.show {
    display: block;
}

/* Privacy Accept Button (Flutter Integration) */
.privacy-accept-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, rgba(15, 23, 41, 0.95) 100%);
    padding: 1.5rem;
    z-index: 1500;
    display: none;
    border-top: 1px solid var(--border-color);
}

.privacy-accept-container.show {
    display: block;
}

.privacy-accept-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    background: var(--accent-lime);
    color: var(--bg-primary);
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.privacy-accept-btn:hover {
    background: #d4f055;
    transform: scale(1.02);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-text {
        text-align: center;
        order: 1;
    }

    .hero-image {
        order: 0;
    }

    .hero-subtitle {
        margin: 0 auto 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .contact-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 6rem 0 3rem;
        min-height: auto;
    }

    .device-mockup {
        max-width: 220px;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        margin: 1rem auto;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .carousel-device {
        max-width: 180px;
    }

    .screenshots-section {
        max-height: 450px;
    }

    .screenshot-carousel {
        height: 350px;
    }

    .carousel-container {
        height: 290px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .device-mockup {
        max-width: 180px;
    }

    .carousel-device {
        max-width: 160px;
    }

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

    .stat-number {
        font-size: 2.5rem;
    }

    .contact-form-wrapper {
        padding: 1.5rem;
    }
}

/* Landscape orientation handling */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 5rem 0 2rem;
    }

    .hero-content {
        grid-template-columns: 1fr 1fr;
    }

    .device-mockup {
        max-width: 180px;
    }
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

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

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
