/* ========================================
   Prompt Property Manager - Design System Styles
   Based on Brand System v1.0
   ======================================== */

/* ----------------------------------------
   CSS Custom Properties (Design Tokens)
   "Composed Confidence" Design System
   ---------------------------------------- */
:root {
    /* Primary Colors - Deep Indigo */
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-pressed: #3730A3;
    --primary-light: #EEF2FF;
    --primary-subtle: #F5F3FF;

    /* Warm Accent - Soft Amber */
    --accent: #F59E0B;
    --accent-light: #FEF3C7;
    --accent-dark: #D97706;

    /* Secondary Colors - Warm Slate */
    --secondary: #57534E;
    --secondary-light: #A8A29E;
    --secondary-lighter: #D6D3D1;
    --secondary-dark: #44403C;

    /* Semantic Colors - Success (Emerald) */
    --success: #059669;
    --success-light: #D1FAE5;
    --success-dark: #047857;

    /* Semantic Colors - Warning (Uses Accent Amber) */
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --warning-dark: #D97706;

    /* Semantic Colors - Error (Warm Red) */
    --error: #DC2626;
    --error-light: #FEE2E2;
    --error-dark: #B91C1C;

    /* Semantic Colors - Info (Uses Primary Indigo) */
    --info: #4F46E5;
    --info-light: #EEF2FF;
    --info-dark: #3730A3;

    /* Neutral Colors - Warm Stone Palette (Light Mode) */
    --neutral-50: #FAFAF9;
    --neutral-100: #F5F5F4;
    --neutral-200: #E7E5E4;
    --neutral-300: #D6D3D1;
    --neutral-400: #A8A29E;
    --neutral-500: #78716C;
    --neutral-600: #57534E;
    --neutral-700: #44403C;
    --neutral-800: #1C1917;
    --neutral-900: #0C0A09;

    /* Backgrounds */
    --bg-app: var(--neutral-50);
    --bg-card: #FFFFFF;
    --bg-assistant-bubble: var(--neutral-100);
    --bg-user-bubble: var(--primary-light);

    /* Text Colors */
    --text-primary: var(--neutral-800);
    --text-secondary: var(--neutral-600);
    --text-muted: var(--neutral-500);
    --text-disabled: var(--neutral-400);

    /* Border Colors */
    --border-default: var(--neutral-200);
    --border-strong: var(--neutral-300);

    /* Spacing Scale (4px base) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

    /* Font Sizes */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */

    /* Line Heights */
    --leading-tight: 1.2;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;

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

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Transitions */
    --transition-fast: 150ms ease-out;
    --transition-medium: 250ms ease-out;
    --transition-slow: 400ms ease-out;

    /* Layout */
    --max-chat-width: 720px;
    --header-height: 64px;
    --input-height: 72px;
}

/* Dark Mode - Warm Dark Palette */
[data-theme="dark"] {
    --bg-app: var(--neutral-900);
    --bg-card: var(--neutral-800);
    --bg-assistant-bubble: var(--neutral-800);
    --bg-user-bubble: #312E81;

    --text-primary: #F5F5F4;
    --text-secondary: var(--neutral-400);
    --text-muted: var(--neutral-500);

    --border-default: var(--neutral-700);
    --border-strong: var(--neutral-600);

    /* Lighter versions for dark mode contrast */
    --primary: #818CF8;
    --primary-hover: #6366F1;
    --primary-light: #312E81;
    --accent: #FBBF24;
    --success: #34D399;
    --warning: #FBBF24;
    --error: #F87171;
    --info: #818CF8;
}

/* ----------------------------------------
   Base Styles
   ---------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--text-primary);
    background-color: var(--bg-app);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ----------------------------------------
   App Layout
   ---------------------------------------- */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    max-width: 100%;
    overflow: hidden;
}

/* ----------------------------------------
   Header
   ---------------------------------------- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-default);
    height: var(--header-height);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-chat-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
    height: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: white;
    border-radius: var(--radius-lg);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    line-height: var(--leading-tight);
}

.logo-community {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: var(--leading-tight);
}

/* Property Selector Dropdown */
.property-selector {
    position: relative;
}

.property-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 0;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.property-selector-btn:hover {
    background-color: var(--neutral-100);
}

.property-selector-btn .logo-text {
    text-align: left;
}

.dropdown-arrow {
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.property-selector.open .dropdown-arrow {
    transform: rotate(180deg);
}

.property-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: -12px;
    min-width: 240px;
    background: #ffffff;
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
    z-index: 1000;
    overflow: hidden;
}

.property-selector.open .property-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.property-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    text-align: left;
}

.property-option:hover {
    background-color: var(--neutral-100);
}

.property-option.active {
    background-color: var(--primary-subtle);
}

.property-option-name {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text-primary);
}

.property-option-type {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

.property-option.active .property-option-name {
    color: var(--primary);
}

.demos-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-family);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.demos-button:hover {
    background-color: var(--primary-hover);
    color: white;
}

/* ----------------------------------------
   Chat Container
   ---------------------------------------- */
.chat-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-4);
    scroll-behavior: smooth;
}

.chat-container > * {
    max-width: var(--max-chat-width);
    margin-left: auto;
    margin-right: auto;
}

/* ----------------------------------------
   Welcome Section
   ---------------------------------------- */
.welcome-section {
    animation: fadeIn var(--transition-medium) ease-out;
}

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

.welcome-section.hidden {
    display: none;
}

/* ----------------------------------------
   Messages
   ---------------------------------------- */
.messages-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.message {
    max-width: 85%;
    animation: messageIn var(--transition-medium) ease-out;
}

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

.message-content {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    word-wrap: break-word;
}

.message-content p {
    margin: 0 0 var(--space-3) 0;
}

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

.message-content strong {
    font-weight: 600;
}

/* User Messages */
.user-message {
    align-self: flex-end;
    margin-left: auto;
}

.user-message .message-content {
    background-color: var(--bg-user-bubble);
    color: var(--text-primary);
    border-top-right-radius: var(--radius-sm);
}

/* Assistant Messages */
.assistant-message {
    align-self: flex-start;
}

.assistant-message .message-content {
    background-color: var(--bg-assistant-bubble);
    color: var(--text-primary);
    border-top-left-radius: var(--radius-sm);
}

/* Message Lists */
.message-content ul,
.message-content ol {
    margin: var(--space-3) 0;
    padding-left: var(--space-5);
}

.message-content li {
    margin-bottom: var(--space-2);
}

.message-content li:last-child {
    margin-bottom: 0;
}

/* Message Headers */
.message-content h4 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin: var(--space-4) 0 var(--space-2) 0;
}

.message-content h4:first-child {
    margin-top: 0;
}

/* Source Citations */
.source-citation {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-default);
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.source-citation svg {
    flex-shrink: 0;
}

.source-citation a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color var(--transition-fast);
}

.source-citation a:hover {
    text-decoration-color: var(--primary);
}

/* Inline Disclaimer */
.inline-disclaimer {
    margin-top: var(--space-3);
    font-size: var(--text-xs);
    font-style: italic;
    color: var(--text-muted);
}

/* Follow-up Prompt */
.followup-prompt {
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-default);
    color: var(--text-secondary);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
}

.status-badge svg {
    width: 14px;
    height: 14px;
}

.status-allowed {
    background-color: var(--success-light);
    color: var(--success-dark);
}

.status-conditional {
    background-color: var(--warning-light);
    color: var(--warning-dark);
}

.status-prohibited {
    background-color: var(--error-light);
    color: var(--error-dark);
}

/* Action Buttons in Messages */
.message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background-color: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.action-btn:hover {
    border-color: var(--primary);
    background-color: var(--primary-subtle);
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

/* ----------------------------------------
   Quick Actions
   ---------------------------------------- */
.quick-actions {
    margin-top: var(--space-6);
}

.quick-actions-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    margin: 0 0 var(--space-3) 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

@media (min-width: 640px) {
    .quick-actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 88px;
    padding: var(--space-4);
    background-color: var(--primary-subtle);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-action-btn svg {
    color: var(--primary);
}

.quick-action-btn:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.quick-action-btn:active {
    transform: translateY(0);
}

/* ----------------------------------------
   Session Disclaimer
   ---------------------------------------- */
.session-disclaimer {
    margin-top: var(--space-8);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-default);
}

.session-disclaimer p {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: var(--leading-relaxed);
}

/* ----------------------------------------
   Typing Indicator
   ---------------------------------------- */
.typing-indicator {
    display: none;
}

.typing-indicator.visible {
    display: block;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: var(--space-4);
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background-color: var(--neutral-400);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        opacity: 0.4;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ----------------------------------------
   Input Area
   ---------------------------------------- */
.input-area {
    position: sticky;
    bottom: 0;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-default);
    padding: var(--space-4);
}

.input-container {
    display: flex;
    align-items: center;
    max-width: var(--max-chat-width);
    margin: 0 auto;
    position: relative;
}

.message-input {
    flex: 1;
    height: 48px;
    padding: var(--space-3) 56px var(--space-3) var(--space-4);
    background-color: var(--bg-app);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    font-family: var(--font-family);
    font-size: var(--text-base);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.message-input::placeholder {
    color: var(--text-disabled);
}

.message-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

[data-theme="dark"] .message-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.send-button {
    position: absolute;
    right: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.send-button:hover {
    background-color: var(--primary-hover);
}

.send-button:active {
    transform: scale(0.95);
}

.send-button:disabled {
    background-color: var(--neutral-300);
    cursor: not-allowed;
}

/* ----------------------------------------
   Modal
   ---------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-medium), visibility var(--transition-medium);
}

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

.modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    background-color: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform var(--transition-medium);
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--neutral-100);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-close:hover {
    background-color: var(--neutral-700);
}

/* ----------------------------------------
   Contact Card
   ---------------------------------------- */
.contact-card {
    padding: var(--space-6);
    text-align: center;
}

.contact-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-3);
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: var(--text-xl);
    font-weight: 600;
    border-radius: 50%;
}

.contact-info {
    margin-bottom: var(--space-4);
}

.contact-name {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.contact-title {
    margin: var(--space-1) 0 0 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
    text-align: left;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background-color: var(--bg-app);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

a.contact-row:hover {
    background-color: var(--neutral-200);
}

[data-theme="dark"] a.contact-row:hover {
    background-color: var(--neutral-700);
}

.contact-row svg {
    flex-shrink: 0;
    color: var(--text-muted);
}

.contact-actions {
    display: flex;
    gap: var(--space-3);
}

/* ----------------------------------------
   Buttons
   ---------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    flex: 1;
    height: 44px;
    padding: 0 var(--space-4);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

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

.btn-secondary {
    background-color: var(--neutral-100);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--neutral-200);
}

[data-theme="dark"] .btn-secondary {
    background-color: var(--neutral-700);
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: var(--neutral-600);
}

/* ----------------------------------------
   Utility Classes
   ---------------------------------------- */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ----------------------------------------
   Reduced Motion
   ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ----------------------------------------
   Focus Visible
   ---------------------------------------- */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* ----------------------------------------
   Scrollbar Styling
   ---------------------------------------- */
.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background-color: var(--neutral-300);
    border-radius: var(--radius-full);
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--neutral-400);
}

[data-theme="dark"] .chat-container::-webkit-scrollbar-thumb {
    background-color: var(--neutral-600);
}

[data-theme="dark"] .chat-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--neutral-500);
}

/* ========================================
   Landing Page Styles
   ======================================== */

.landing-page {
    background: var(--bg-primary);
    min-height: 100vh;
}

/* Landing Navigation */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--neutral-200);
    z-index: 100;
}

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

.landing-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 18px;
    color: var(--text-primary);
}

.landing-logo svg {
    color: var(--primary);
}

.nav-cta {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: background var(--transition-fast);
}

.nav-cta:hover {
    background: var(--primary-hover);
}

/* Landing Container */
.landing-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Hero Section */
.landing-hero {
    padding: 140px 0 80px;
    text-align: center;
    background: var(--primary);
}

.landing-hero h1 {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-subhead {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.5;
}

/* Hero CTA - White button on purple background */
.landing-hero .cta-button {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.landing-hero .cta-button:hover {
    background: var(--neutral-100);
    color: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.landing-hero .cta-note {
    color: rgba(255, 255, 255, 0.7);
}

.cta-button {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.cta-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.cta-large {
    padding: 20px 48px;
    font-size: 18px;
}

/* Landing Sections */
.landing-section {
    padding: 80px 0;
}

.landing-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 16px;
}

.section-subhead {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Problem Section */
.landing-problem {
    background: var(--primary-subtle);
}

.problem-quote {
    font-size: 22px;
    font-style: italic;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 48px;
}

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

.stat-card {
    background: white;
    padding: 32px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--primary);
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Solution Section */
.deploy-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.deploy-card {
    background: var(--primary-light);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--primary-subtle);
}

.deploy-icon {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.deploy-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.deploy-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Digitization Section */
.landing-digitize {
    background: var(--primary);
}

.landing-digitize h2 {
    color: white;
}

.landing-digitize .section-subhead {
    color: rgba(255, 255, 255, 0.85);
}

.focus-list {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    background: white;
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.focus-intro {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.focus-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.focus-list li {
    font-size: 16px;
    color: var(--text-secondary);
    padding: 12px 16px;
    border-bottom: 1px solid var(--primary-light);
    transition: all var(--transition-fast);
}

.focus-list li:hover {
    background: var(--primary-light);
    color: var(--text-primary);
}

.focus-list li:last-child {
    border-bottom: none;
}

/* Use Cases Section */
.usecase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.usecase-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 16px;
    background: var(--primary-subtle);
    border-radius: var(--radius-md);
    border: 1px solid var(--primary-light);
    transition: all var(--transition-fast);
}

.usecase-item:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.usecase-item svg {
    color: var(--primary);
}

.usecase-item span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Final CTA Section */
.landing-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-pressed) 100%);
    text-align: center;
    padding: 100px 0;
}

.landing-cta h2 {
    color: white;
    margin-bottom: 32px;
}

.landing-cta .cta-button {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.landing-cta .cta-button:hover {
    background: var(--neutral-100);
    transform: translateY(-2px);
}

/* Footer */
.landing-footer {
    background: var(--neutral-900);
    padding: 32px 0;
    text-align: center;
}

.landing-footer p {
    color: var(--neutral-400);
    font-size: 14px;
}

/* Responsive - Landing Page */
@media (max-width: 768px) {
    .landing-hero h1 {
        font-size: 32px;
    }

    .hero-subhead {
        font-size: 17px;
    }

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

    .deploy-options {
        grid-template-columns: 1fr;
    }

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

    .landing-section h2 {
        font-size: 26px;
    }

    .cta-large {
        padding: 16px 32px;
        font-size: 16px;
    }
}

/* CTA Wrapper and Note */
.cta-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.cta-note {
    font-size: 14px;
    color: var(--text-muted);
}

.cta-note-light {
    color: rgba(255, 255, 255, 0.8);
}

/* Demo Preview Section */
.landing-preview {
    background: linear-gradient(180deg, var(--primary-subtle) 0%, var(--neutral-100) 100%);
}

/* Phone Mockup - Desktop */
.phone-mockup {
    position: relative;
    width: 375px;
    margin: 0 auto;
    background: #1a1a1a;
    border-radius: 50px;
    padding: 12px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.phone-frame {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 30px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    z-index: 10;
}

.phone-notch {
    width: 80px;
    height: 6px;
    background: #333;
    border-radius: 3px;
    margin: 12px auto 0;
}

.phone-screen {
    background: white;
    border-radius: 38px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.phone-header {
    background: white;
    padding: 50px 20px 12px;
    border-bottom: 1px solid var(--neutral-200);
    text-align: center;
}

.phone-header-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.preview-chat {
    padding: 16px;
    height: 500px;
    background: var(--neutral-50);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

.phone-input-bar {
    background: white;
    padding: 12px 20px 30px;
    border-top: 1px solid var(--neutral-200);
}

.phone-input-bar span {
    display: block;
    background: var(--neutral-100);
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--neutral-400);
}

.phone-home-bar {
    width: 134px;
    height: 5px;
    background: white;
    border-radius: 3px;
    margin: 8px auto;
}

/* Chat Messages */
.preview-message {
    margin-bottom: 14px;
}

.preview-message:last-child {
    margin-bottom: 0;
}

.preview-user {
    display: flex;
    justify-content: flex-end;
}

.preview-user .preview-bubble {
    background: var(--primary);
    color: white;
    padding: 12px 18px;
    border-radius: 18px 18px 4px 18px;
    max-width: 85%;
    font-size: 15px;
    line-height: 1.4;
}

.preview-assistant .preview-bubble {
    background: white;
    padding: 16px 18px;
    border-radius: 18px 18px 18px 4px;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.preview-assistant .preview-bubble p {
    margin: 0 0 10px;
}

.preview-assistant .preview-bubble p:last-child {
    margin-bottom: 0;
}

.preview-assistant .preview-bubble ul,
.preview-assistant .preview-bubble ol {
    margin: 0 0 10px;
    padding-left: 20px;
}

.preview-assistant .preview-bubble li {
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.5;
}

.preview-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.preview-allowed {
    background: var(--success-light);
    color: var(--success);
}

.preview-citation {
    font-size: 12px;
    color: var(--primary);
    padding-top: 10px;
    border-top: 1px solid var(--neutral-200);
    margin-top: 10px;
}

.preview-followup {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    margin-top: 6px !important;
}

/* Chat Animation */
.chat-msg {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.4s ease, margin 0.4s ease;
}

.chat-msg.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
    max-height: 500px;
}

.chat-msg.faded-out {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    transform: translateY(-10px);
}

/* Mobile: Remove phone frame, show as card */
@media (max-width: 768px) {
    .phone-mockup {
        width: 100%;
        max-width: 100%;
        background: transparent;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
    }

    .phone-frame,
    .phone-home-bar {
        display: none;
    }

    .phone-screen {
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }

    .phone-header {
        padding: 16px 20px;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .phone-input-bar {
        padding: 12px 16px 16px;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    .preview-chat {
        height: 420px;
    }
}
