/* ==========================================
   CSS Variables & Reset
   ========================================== */
:root {
    /* Colors - Swiss Style Palette (Light Mode) */
    --color-bg: #ffffff;
    /* Pure White */
    --color-bg-light: #f8f9fa;
    /* Very light grey for contrast */
    --color-surface: #ffffff;
    --color-border: #e5e5e5;
    /* Light grey border */
    --color-text: #111111;
    /* Almost Black */
    --color-text-secondary: #666666;
    /* Dark Grey */
    --color-text-muted: #888888;

    --color-primary: #111111;
    /* Black primary */
    --color-primary-hover: #333333;
    --color-accent: #111111;
    /* Monochromatic accent */

    /* Spacing - "Perfect Balance" */
    --spacing-xs: 0.5rem;
    /* 8px */
    --spacing-sm: 1rem;
    /* 16px */
    --spacing-md: 2rem;
    /* 32px */
    --spacing-lg: 4rem;
    /* 64px */
    --spacing-xl: 8rem;
    /* 128px */
    --spacing-2xl: 12rem;
    /* 192px */

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 24px;

    /* Shadows - Soft & Elegant */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);

    /* Animation */
    --transition-base: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* Smooth Apple-like easing */
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

.container {
    max-width: 1100px;
    /* Slightly narrower for focus */
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: 1.25rem 0;
    transition: all var(--transition-base);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.logo svg {
    color: var(--color-text);
    width: 24px;
    height: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color var(--transition-base);
}

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

.btn-login {
    padding: 0.625rem 1.25rem;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-login:hover {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: radial-gradient(circle at 50% 0%, #f5f5f7 0%, var(--color-bg) 60%);
    /* Light gradient */
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.03);
    /* Darker tint for light mode */
    border: 1px solid var(--color-border);
    border-radius: 999px;
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: var(--spacing-md);
    letter-spacing: 0.02em;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.03em;
    background: linear-gradient(to bottom, #111111 0%, #666666 100%);
    /* Dark gradient text */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.qr-code {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
}

.contact-qr {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.contact-qr span {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2.5rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--color-text);
    color: var(--color-bg);
    border: 1px solid var(--color-text);
}

.btn-primary:hover {
    background: transparent;
    color: var(--color-text);
}

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

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

.hero-stats {
    display: flex;
    gap: 4rem;
    justify-content: center;
    align-items: center;
    padding: 2rem 4rem;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-border);
}

/* ==========================================
   Features Section
   ========================================== */
.features {
    padding: var(--spacing-2xl) 0;
    background: var(--color-bg);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

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

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

.feature-card {
    padding: 3rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-text-secondary);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    color: var(--color-text);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.feature-description {
    color: var(--color-text-secondary);
    line-height: 1.7;
    font-size: 0.9375rem;
}

/* ==========================================
   Showcase Section
   ========================================== */
.showcase {
    padding: var(--spacing-lg) 0 var(--spacing-2xl);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    overflow: visible;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Changed to 2 columns for larger images */
    gap: 2rem;
    /* Reduced gap */
    padding: 2rem 0;
    max-width: 1200px;
    /* Wider container */
    margin: 0 auto;
}

.screenshot-card {
    position: relative;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    /* Increased padding */
    transition: all var(--transition-base);
    z-index: 1;
}

/* Make the 7th card span full width */
.card-wide {
    grid-column: 1 / -1;
    max-width: 900px;
    /* Increased max-width */
    margin: 0 auto;
    width: 100%;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    /* Fixed height for consistency */
    border-radius: var(--radius-sm);
    overflow: visible;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
    object-fit: contain;
    /* Maintain aspect ratio */
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.4s ease;
    transform-origin: center center;
    position: relative;
    z-index: 1;
    will-change: transform;
    /* GPU acceleration */
}

/* Hover Effect */
.screenshot-card:hover {
    z-index: 100;
    border-color: var(--color-text);
}

.screenshot-card:hover .card-image-wrapper {
    overflow: hidden;
    /* Keep contained */
}

.screenshot-card:hover .card-image-wrapper img {
    transform: scale(1.03);
    /* Subtle hint */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    cursor: zoom-in;
    /* Indicate clickable */
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

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

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    animation: zoomIn 0.3s ease;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.card-label {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    /* Bolder label */
    color: var(--color-text);
    letter-spacing: -0.01em;
}

/* Responsive adjustments for showcase */
@media (max-width: 1024px) {
    .showcase-grid {
        grid-template-columns: 1fr;
        /* Stack on tablets */
        gap: 2rem;
    }

    .card-wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .screenshot-card:hover .card-image-wrapper img {
        transform: scale(1.2);
    }

    .card-image-wrapper {
        min-height: 200px;
    }
}

/* ==========================================
   About Section
   ========================================== */
.about {
    padding: var(--spacing-2xl) 0;
    background: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.about-text .section-title {
    text-align: left;
}

.about-description {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.0625rem;
}

.about-highlights {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-base);
}

.highlight-item:hover {
    border-color: var(--color-text-secondary);
}

.highlight-item svg {
    color: var(--color-text);
    flex-shrink: 0;
}

.about-visual {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.visual-card {
    padding: 2.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--transition-base);
}

.visual-card:hover {
    border-color: var(--color-text);
}

.visual-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.visual-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.visual-card p {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    /* Use grid for better control: Brand takes 2 parts, others 1 part */
    gap: 4rem;
    margin-bottom: 3rem;
    align-items: start;
}

.footer-brand {
    /* No fixed width, let grid handle it */
}

.footer-brand .logo {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    /* Slightly larger logo */
}

.footer-description {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 300px;
}

.footer-links {
    display: contents;
    /* Remove the wrapper div's display property so children participate in the main grid */
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-column a {
    display: block;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    transition: color var(--transition-base);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    position: relative;
}

.contact-item svg {
    color: var(--color-text);
    opacity: 0.6;
    width: 16px;
    height: 16px;
}

.contact-wecom {
    cursor: pointer;
    transition: color var(--transition-base);
}

.contact-wecom:hover {
    color: var(--color-text);
}

.qr-popup {
    position: absolute;
    bottom: 100%;
    left: 0;
    transform: translateY(-10px);
    background: var(--color-surface);
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 100;
    text-align: center;
    pointer-events: none;
    min-width: 120px;
}

.contact-wecom:hover .qr-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
    pointer-events: auto;
}

.qr-code {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 0.25rem;
    border-radius: var(--radius-sm);
    display: block;
}

.qr-popup span {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    display: block;
}

/* Remove old styles */
.contact-qr {
    display: none;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-brand {
        flex: auto;
    }

    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
}

/* ==========================================
   Modal
   ========================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.4s ease;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    color: var(--color-text-secondary);
}

.modal-close:hover {
    color: var(--color-text);
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.modal-header p {
    color: var(--color-text-secondary);
    font-size: 0.9375rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input {
    padding: 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-base);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-text);
}

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

.form-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.form-notice svg {
    color: var(--color-text);
    flex-shrink: 0;
}

.btn-submit {
    padding: 1rem;
    background: var(--color-text);
    color: var(--color-bg);
    border: 1px solid var(--color-text);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-top: 0.5rem;
}

.btn-submit:hover:not(:disabled) {
    background: transparent;
    color: var(--color-text);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.form-error {
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: #ef4444;
    font-size: 0.8125rem;
    text-align: center;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-link {
        display: none;
    }

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

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

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

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 0;
    }

    .stat-divider {
        width: 100%;
        height: 1px;
    }

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

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

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

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

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

.footer-links {
    grid-template-columns: 1fr;
}

.modal-content {
    padding: var(--spacing-lg);
}
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

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