/* 
 * LexiDesk Clone - Styles
 * Sophisticated legal aesthetic with modern touches
 */

:root {
    /* Deep navy and gold palette - legal/professional feel */
    --navy-900: #0a1628;
    --navy-800: #111d35;
    --navy-700: #1a2744;
    --navy-600: #243352;
    --navy-500: #2e4063;
    
    --gold-500: #c9a227;
    --gold-400: #d4b13d;
    --gold-300: #e0c35c;
    --gold-200: #f0d98a;
    
    --cream-100: #faf8f5;
    --cream-200: #f5f1ea;
    --cream-300: #ebe5d9;
    
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--navy-900);
    color: var(--cream-100);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ============================================
   Background Effects
   ============================================ */

.bg-gradient {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(201, 162, 39, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(201, 162, 39, 0.08), transparent),
        radial-gradient(ellipse 50% 30% at 0% 80%, rgba(201, 162, 39, 0.05), transparent),
        linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
    z-index: -2;
}

.bg-pattern {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
}

/* ============================================
   Navigation
   ============================================ */

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--cream-100);
}

.brand-icon {
    width: 32px;
    height: 32px;
    color: var(--gold-400);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--cream-300);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-status 2s ease infinite;
}

.status-indicator.connecting {
    background: var(--warning);
}

.status-indicator.error {
    background: var(--danger);
    animation: none;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

/* ============================================
   Main Content
   ============================================ */

.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: var(--space-2xl) 0;
}

.hero-content {
    animation: slideUp 0.8s ease-out;
}

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

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: var(--space-lg);
    letter-spacing: -0.02em;
}

.highlight {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--cream-300);
    max-width: 500px;
    margin-bottom: var(--space-2xl);
    font-weight: 300;
}

/* ============================================
   Call Button
   ============================================ */

.cta-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.phone-cta {
    position: relative;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    border: none;
    border-radius: 16px;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    text-decoration: none;
    display: inline-block;
}

.phone-cta:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 20px 40px rgba(201, 162, 39, 0.3),
        0 0 60px rgba(201, 162, 39, 0.15);
}

.phone-cta:active {
    transform: translateY(0);
}

.phone-cta-inner {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg) var(--space-xl);
    position: relative;
    z-index: 1;
}

.phone-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-900);
}

.phone-icon svg {
    width: 24px;
    height: 24px;
}

.phone-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.phone-number-display {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--navy-900);
    letter-spacing: 0.5px;
}

.phone-sublabel {
    font-size: 0.875rem;
    color: var(--navy-600);
}

.phone-ripple {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.phone-cta:hover .phone-ripple {
    opacity: 1;
}

/* ============================================
   Hero Visual
   ============================================ */

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    animation: slideUp 0.8s ease-out 0.2s both;
}

.visual-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: float 8s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.4), rgba(201, 162, 39, 0.1));
    top: 10%;
    right: 20%;
}

.orb-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.2), transparent);
    bottom: 20%;
    left: 10%;
    animation-delay: -3s;
}

.orb-3 {
    width: 150px;
    height: 150px;
    background: rgba(201, 162, 39, 0.15);
    top: 40%;
    right: 10%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(10px, -20px) scale(1.05); }
    66% { transform: translate(-10px, 10px) scale(0.95); }
}

.gavel-icon {
    width: 200px;
    height: 200px;
    color: var(--gold-400);
    opacity: 0.6;
    animation: gentleRotate 20s linear infinite;
}

@keyframes gentleRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   Features Section
   ============================================ */

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    padding: var(--space-3xl) 0;
}

.feature-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(201, 162, 39, 0.15);
    border-radius: 16px;
    padding: var(--space-xl);
    transition: transform var(--transition-base), border-color var(--transition-base);
    animation: slideUp 0.8s ease-out backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.3s; }
.feature-card:nth-child(2) { animation-delay: 0.4s; }
.feature-card:nth-child(3) { animation-delay: 0.5s; }

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 162, 39, 0.4);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}

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

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    color: var(--cream-100);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--cream-300);
    line-height: 1.6;
}

/* ============================================
   Call Overlay (Active Call UI)
   ============================================ */

.call-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

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

.call-modal {
    width: 100%;
    max-width: 500px;
    padding: var(--space-2xl);
    text-align: center;
}

.call-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-xl);
}

.pulse-ring {
    position: absolute;
    inset: 0;
    border: 2px solid var(--gold-400);
    border-radius: 50%;
    animation: pulse-ring 2s ease-out infinite;
}

.pulse-ring.delay-1 { animation-delay: 0.5s; }
.pulse-ring.delay-2 { animation-delay: 1s; }

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

.call-avatar {
    position: absolute;
    inset: 10px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-900);
}

.call-avatar svg {
    width: 48px;
    height: 48px;
}

.call-info h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.call-info p {
    font-size: 2rem;
    font-weight: 300;
    color: var(--cream-300);
    font-variant-numeric: tabular-nums;
}

.call-transcript {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: 12px;
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    max-height: 200px;
    overflow-y: auto;
    text-align: left;
}

.transcript-placeholder {
    color: var(--cream-300);
    font-style: italic;
    opacity: 0.6;
}

.transcript-message {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.transcript-message:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.transcript-message.user {
    color: var(--cream-200);
}

.transcript-message.assistant {
    color: var(--gold-300);
}

.transcript-role {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
    opacity: 0.6;
}

/* Call Controls */
.call-controls {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
}

.control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    color: var(--cream-100);
    cursor: pointer;
    transition: all var(--transition-base);
    min-width: 100px;
}

.control-btn svg {
    width: 28px;
    height: 28px;
}

.control-btn span {
    font-size: 0.875rem;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.control-btn.mute-btn.active {
    background: var(--warning);
    border-color: var(--warning);
    color: var(--navy-900);
}

.control-btn.end-btn {
    background: var(--danger);
    border-color: var(--danger);
}

.control-btn.end-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: var(--space-xl);
    text-align: center;
    border-top: 1px solid rgba(201, 162, 39, 0.1);
    margin-top: var(--space-2xl);
}

.footer p {
    font-size: 0.8rem;
    color: var(--cream-300);
    opacity: 0.7;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        min-height: auto;
        padding: var(--space-xl) 0;
    }
    
    .hero-content {
        order: 1;
    }
    
    .hero-visual {
        order: 0;
        height: 250px;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .cta-container {
        align-items: center;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav {
        padding: var(--space-md);
    }
    
    .main {
        padding: 0 var(--space-md);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .phone-cta-inner {
        padding: var(--space-md) var(--space-lg);
    }
    
    .call-controls {
        gap: var(--space-md);
    }
    
    .control-btn {
        padding: var(--space-md);
        min-width: 80px;
    }
}
