/* ============================================
   PATENTVERSE — ENTERPRISE LIGHT MODE (REFINED)
   ============================================ */

:root {
    /* Enterprise Light Mode Palette */
    --canvas-bg: #F8FAFC;
    --surface-bg: #FFFFFF;
    --border-subtle: #E2E8F0;
    --border-strong: #CBD5E1;
    
    --text-heading: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --text-inverse: #FFFFFF;

    --accent-primary: #4F46E5;
    --accent-hover: #4338CA;
    --accent-tint: #EEF2FF;
    
    --success-bg: #F0FDF4;
    --success-border: #BBF7D0;
    --success-text: #166534;
    
    --error-bg: #FEF2F2;
    --error-border: #FECACA;
    --error-text: #991B1B;

    /* Darker accents */
    --navy-bg: #0F172A;
    --navy-text: #F8FAFC;
    --navy-muted: #CBD5E1;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    
    /* Layout */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    /* Sub-pixel Shadow */
    --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--canvas-bg);
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-heading);
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-heading);
}

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

.nav-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

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

.nav-cta {
    background: var(--surface-bg);
    color: var(--text-heading);
    border: 1px solid var(--border-strong);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: var(--shadow-subtle);
    transition: all 0.2s;
}

.nav-cta:hover {
    background: var(--canvas-bg);
    border-color: var(--text-muted);
}

/* ============================================
   HERO SECTION (DARK ACCENT)
   ============================================ */
.hero {
    position: relative;
    overflow: hidden;
    padding: 140px 24px 60px;
    text-align: center;
    background: linear-gradient(180deg, #0b1120 0%, #1e293b 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-bg-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    color: rgba(255, 255, 255, 0.02);
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

#technology {
    background: linear-gradient(180deg, #f1f5f9 0%, var(--canvas-bg) 200px);
}

.hero-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy-text);
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--text-inverse);
    letter-spacing: -0.04em;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--navy-muted);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--text-inverse);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-subtle);
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

/* ============================================
   BENTO BOX / TECHNICAL GRID
   ============================================ */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-tint);
    color: var(--accent-primary);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

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

.bento-card {
    background: var(--surface-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
}

.bento-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--canvas-bg);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--text-heading);
}

.bento-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.bento-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* ============================================
   ADMIN MONITORING SECTION (DARK NAVY)
   ============================================ */
.admin-section {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.1), inset 0 -10px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.admin-section h2 {
    color: var(--text-inverse);
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.admin-section p {
    color: var(--navy-muted);
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   TWO-COLUMN DEMO FRAME
   ============================================ */
.demo-section {
    background: var(--surface-bg);
    border-bottom: 1px solid var(--border-subtle);
}

.demo-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 48px;
    align-items: flex-start;
}

.demo-content {
    padding-right: 16px;
}

.demo-block {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-subtle);
}
.demo-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.demo-block h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-heading);
}

.demo-block p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.capability-list {
    list-style: none;
}

.capability-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-body);
    font-weight: 500;
    font-size: 0.9rem;
}

.capability-list li svg {
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.demo-visuals {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.ui-mockup-light {
    background: var(--surface-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-modal);
}

.mockup-header-light {
    height: 28px;
    background: var(--canvas-bg);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 5px;
}

.mockup-dot-gray {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #CBD5E1;
}

.ui-mockup-light img {
    display: block;
    width: 100%;
    height: auto;
}

/* ============================================
   ACCESS BANNER
   ============================================ */
.access-banner {
    background: var(--success-bg);
    border-top: 1px solid var(--success-border);
    padding: 60px 24px;
    text-align: center;
}

.access-banner h2 {
    font-size: 1.75rem;
    margin-bottom: 12px;
    color: var(--success-text);
}

.access-banner p {
    color: #15803D;
    max-width: 600px;
    margin: 0 auto 24px;
    font-size: 1rem;
}

.contact-card-light {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-bg);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    box-shadow: var(--shadow-subtle);
}

.contact-card-light span {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--success-text);
    font-weight: 600;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 32px 24px;
    background: var(--surface-bg);
}

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

.footer-links a {
    color: var(--text-muted);
    margin-left: 20px;
    font-size: 0.85rem;
}

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

.footer-bottom {
    max-width: 1200px;
    margin: 16px auto 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================
   MODALS (LOGIN & PRIVACY)
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
}

.modal-panel {
    position: relative;
    background: var(--surface-bg);
    border: 1px solid var(--border-subtle);
    width: 100%;
    max-width: 440px;
    border-radius: var(--radius-md);
    z-index: 1;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-modal);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-heading);
}

.modal-header {
    padding: 32px 32px 0;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 6px;
    color: var(--text-heading);
}

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

.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-subtle);
    margin-top: 24px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.form-container {
    display: none;
    padding: 24px 32px 32px;
}

.form-container.active {
    display: block;
}

.invite-notice-small {
    background: var(--accent-tint);
    border: 1px solid var(--border-subtle);
    color: var(--accent-hover);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    background: var(--surface-bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-heading);
    transition: all 0.2s;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-tint);
}

.btn-submit {
    width: 100%;
    background: var(--accent-primary);
    color: var(--text-inverse);
    border: none;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    box-shadow: var(--shadow-subtle);
    transition: background 0.2s;
}

.btn-submit:hover {
    background: var(--accent-hover);
}

.btn-submit:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.message-box {
    display: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    margin-bottom: 16px;
}
.message-box.error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}
.message-box.success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE OVERRIDES
   ============================================ */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .demo-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .demo-content {
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-title { font-size: 2.2rem; }
    .hero { padding: 80px 16px 40px; }
    
    .login-wrapper {
        padding: 0 16px;
    }
    .login-card {
        padding: 32px 24px;
        width: 100%;
    }
    
    .modal-panel {
        width: 95%;
        padding: 24px 20px;
        margin: 0 10px;
    }
    .modal-header h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.8rem; }
    .login-card { padding: 24px 16px; }
}

/* ============================================
   COOKIE BANNER & T&C
   ============================================ */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface-bg);
    border-top: 1px solid var(--border-subtle);
    padding: 24px;
    z-index: 2000;
    box-shadow: var(--shadow-modal);
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.cookie-banner h4 { margin-bottom: 8px; }
.cookie-banner p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; max-width: 600px; }
.cookie-buttons { display: flex; gap: 12px; }
.btn-secondary {
    background: transparent;
    color: var(--text-body);
    border: 1px solid var(--border-strong);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-secondary:hover { background: var(--canvas-bg); }
.terms-checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.terms-checkbox-group label { margin-bottom: 0; font-size: 0.85rem; font-weight: normal; }
.terms-checkbox-group input { width: auto; margin: 0; box-shadow: none; }
.blurred-overlay { pointer-events: none; opacity: 0.5; filter: blur(2px); }
