/* CSS Reset and Variables */
:root {
    --bg-base: #050505;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --accent: #0052FF;
    --accent-glow: rgba(0, 82, 255, 0.5);
    
    /* Theme color for QR Code Generator product */
    --theme-color: #8b5cf6; /* Violet */
    --theme-bg: rgba(139, 92, 246, 0.08); /* #8b5cf614 approx */
    --theme-border: rgba(139, 92, 246, 0.2); /* #8b5cf633 approx */

    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.06);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Effects */
.grid-bg {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    pointer-events: none;
}

.glow-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
}

.glow-1 {
    top: -10%;
    left: 20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,82,255,0.15) 0%, transparent 70%);
}

.glow-2 {
    bottom: -10%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0,82,255,0.1) 0%, transparent 70%);
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.text-accent {
    color: var(--theme-color); /* Changed to product theme color */
    font-style: italic;
    font-family: serif;
    font-weight: normal;
    padding: 0 4px;
}

/* Header */
.navbar {
    padding: 24px 0;
    position: relative;
    z-index: 100;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--accent);
    font-family: serif;
    font-style: italic;
    font-weight: normal;
}

.nav-links {
    display: flex;
    gap: 32px;
}

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

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

/* Mobile Nav Structure */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    z-index: 101;
}

.mobile-nav-overlay {
    position: absolute;
    top: 80px;
    right: 24px;
    width: calc(100% - 48px);
    max-width: 300px;
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 16px 24px;
    
    /* Animation */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-close {
    display: none;
}

.mobile-link {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: color 0.3s ease;
    text-align: left;
}
.mobile-link:last-child {
    border-bottom: none;
}


/* Hero Section */
.hero-section {
    padding: 80px 24px 60px;
    text-align: center;
}

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

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

.hero-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Ad Placeholders */
.ad-placeholder {
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0 auto;
}

.ad-top {
    width: 100%;
    max-width: 728px;
    height: 90px;
    margin-bottom: 40px;
}

.ad-bottom {
    width: 100%;
    max-width: 728px;
    height: 90px;
    margin-top: 60px;
    margin-bottom: 60px;
}

/* Generator Layout */
.generator-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
}

.invoice-layout {
    display: flex;
    justify-content: center;
}

.invoice-controls {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: left;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 95%;
    max-width: 900px;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0;
    overflow: hidden;
}

.modal-close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.modal-close-btn:hover {
    background: rgba(255,255,255,0.15);
}

.modal-header {
    padding: 24px 32px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(20,20,25,0.8);
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.modal-body {
    padding: 40px;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    background: #0a0a0c; /* Deep dark to contrast the white paper */
}

.modal-footer {
    padding: 24px 32px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    background: rgba(20,20,25,0.8);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #71717a;
}

.input-group input, .input-group select {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.3s ease;
}

.input-group select {
    appearance: none;
    cursor: pointer;
}

.input-group input:focus, .input-group select:focus {
    border-color: var(--theme-color);
}

.items-section {
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 24px 0;
    margin: 8px 0;
}

.items-section h3 {
    font-family: var(--font-heading);
    margin-bottom: 16px;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: center;
}

.item-row input {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-main);
    font-size: 0.9rem;
    border: 1px solid var(--glass-border);
    outline: none;
}
.item-row input:focus {
    border-color: var(--theme-color);
}

.remove-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

.remove-btn svg {
    width: 18px;
    height: 18px;
}

.btn-secondary {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 12px;
    padding: 14px 24px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

.totals-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 24px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    width: 200px;
    font-size: 1rem;
    color: var(--text-muted);
}

.total-row.grand-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-heading);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--glass-border);
}

.btn-primary {
    background: var(--theme-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 18px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.3);
}

/* Color Picker */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 8px 16px;
    border-radius: 12px;
}

.color-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.hex-display {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--text-light);
    letter-spacing: 1px;
}

/* PDF Template Styles (Premium Redesign) */
.pdf-template {
    width: 800px; /* Standard A4 width for rendering */
    background: #ffffff;
    color: #111827;
    padding: 60px 80px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
    border-bottom: 2px solid var(--theme-color, #0f172a);
    padding-bottom: 30px;
}

.pdf-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    color: var(--theme-color, #0f172a);
    margin: 0;
    line-height: 1;
    letter-spacing: -1px;
}

.pdf-meta {
    text-align: right;
}

.pdf-meta p {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #6b7280;
}

.pdf-meta strong {
    color: #111827;
    margin-right: 8px;
}

.pdf-parties {
    display: flex;
    justify-content: space-between;
    margin-bottom: 60px;
}

.pdf-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--theme-color, #0f172a);
    margin-bottom: 12px;
    font-weight: 700;
}

.pdf-parties h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #111827;
    font-weight: 600;
    line-height: 1.4;
}

.pdf-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 60px;
}

.pdf-table th {
    color: #6b7280;
    padding: 16px 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}

.pdf-table td {
    padding: 20px 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 15px;
    color: #374151;
}

.pdf-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.pdf-total-row {
    display: flex;
    justify-content: space-between;
    width: 320px;
    padding: 12px 16px;
    font-size: 16px;
    color: #4b5563;
}

.pdf-grand-total {
    border-top: 2px solid var(--theme-color, #0f172a);
    margin-top: 10px;
    padding-top: 20px;
    font-size: 24px;
    font-weight: 700;
    color: var(--theme-color, #0f172a);
}

/* Sections */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 48px;
}

.how-it-works-section, .faq-section {
    padding: 80px 24px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Clevra Product Card Format (Replicated from Clevra Main Site) */
.feature-card {
    padding: 32px;
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15); /* Product Glow */
    border-color: rgba(139, 92, 246, 0.3);
}

.feature-icon-container {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--theme-bg);
    border: 1px solid var(--theme-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-icon-container svg {
    color: var(--theme-color);
    width: 24px;
    height: 24px;
}

.feature-tagline {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--theme-color);
    margin-bottom: 4px;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    transition: color 0.3s ease;
}

.feature-card:hover h3 {
    color: #fff;
}

.feature-card p {
    color: #9f9fa9;
    font-size: 14.5px;
    line-height: 1.6;
}

/* SEO Content Section */
.seo-section {
    padding: 20px 24px 60px;
}

.seo-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px;
    text-align: left;
}

.seo-content h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #fff;
}

.seo-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 16px;
    color: #fff;
}

.seo-content p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.seo-content p:last-child {
    margin-bottom: 0;
}

/* FAQ */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.faq-item {
    border-bottom: 1px solid var(--glass-border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 24px 0;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer p {
    color: var(--text-muted);
    padding-bottom: 24px;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

/* Footer */
.footer {
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

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

.footer-brand p {
    color: var(--text-muted);
    margin-top: 16px;
    font-size: 0.9rem;
}

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

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 12px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: #fff;
}

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

/* Page Standard Layout (for legal/about pages) */
.page-header {
    padding: 100px 24px 60px;
    text-align: center;
}
.page-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
}
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    margin-bottom: 100px;
}
.page-content h2 {
    font-family: var(--font-heading);
    margin-top: 40px;
    margin-bottom: 20px;
}
.page-content p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

/* Responsive Media Queries (Mobile First & Tablet) */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-body {
        align-items: flex-start;
        justify-content: flex-start;
    }
    
    .pdf-template {
        transform: scale(0.6);
        transform-origin: top left;
        margin-bottom: -40%;
    }
}

@media (max-width: 600px) {
    .hero-section {
        padding: 40px 16px;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none; /* Hide on small mobile, replaced by hamburger menu */
    }

    .mobile-menu-btn {
        display: block; /* Show hamburger icon on mobile */
    }

    .generator-card {
        padding: 24px 16px;
        border-radius: 20px;
    }

    .form-row, .item-row {
        grid-template-columns: 1fr;
    }

    .item-row {
        gap: 8px;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .remove-btn {
        width: 100%;
    }

    .pdf-template {
        transform: scale(0.4);
        margin-bottom: -60%;
    }

    .ad-top, .ad-bottom {
        max-width: 320px;
        height: 50px;
    }

    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 32px;
    }
}
