/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-primary-light: #60a5fa;
    --color-text: #1a1a1a;
    --color-text-muted: #666666;
    --color-text-dark: #999999;
    --color-background: #ffffff;
    --color-surface: #f8f9fa;
    --color-border: rgba(0, 0, 0, 0.08);
    --color-success: #10b981;
    --color-error: #ef4444;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

html {
    scroll-behavior: smooth;
}

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

/* Background elements */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, 
            rgba(255, 255, 255, 1) 0%, 
            rgba(248, 250, 252, 0.98) 25%,
            rgba(241, 245, 249, 0.96) 50%,
            rgba(236, 242, 249, 0.94) 75%,
            rgba(224, 236, 252, 0.92) 100%
        ),
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(96, 165, 250, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 0.2rem 1rem; /* Reduced padding for thinner header */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 48px; /* Reduced from 80px for a thinner header */
    width: auto;
    transition: transform 0.2s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

/* Main content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    padding-top: 8rem;
    padding-bottom: 8rem;
    min-height: 100vh;
    position: relative;
    z-index: 5;
}

.hero {
    max-width: 1000px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 55vh;
    padding: 3rem 0;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 0;
    flex: 1;
    justify-content: center;
    min-height: 50vh;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.intake-form {
    flex: 1;
    max-width: 450px;
}

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

/* Hero badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

/* Hero title */
.hero-title {
    font-size: clamp(2.7rem, 5.5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    color: var(--color-text);
}

.subtitle-accent {
    font-size: clamp(2.5rem, 5vw, 3rem);
    font-weight: 600;
    color: var(--color-primary);
    display: block;
    margin-top: 0.75rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero subtitle */
.hero-subtitle {
    font-size: 1.4rem;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.6s both;
    max-width: 580px;
}

/* Intake form */
.intake-form {
    margin-bottom: 0;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.form-group {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    align-items: stretch;
}

.email-input {
    padding: 1rem 1.25rem;
    font-size: 0.87rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    color: var(--color-text);
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    font-family: var(--font-primary);
    text-align: left;
    letter-spacing: 0.25px;
    box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.08);
    flex: 1;
    min-width: 0;
}

.email-input::placeholder {
    color: var(--color-text-muted);
    font-weight: 400;
}

.email-input:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 8px 25px -5px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 1);
    transform: scale(1.02);
}

.contact-btn {
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 16px -2px rgba(59, 130, 246, 0.4);
    text-transform: none;
    letter-spacing: 0.25px;
    flex-shrink: 0;
    min-width: 180px;
}

.contact-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 20px -2px rgba(59, 130, 246, 0.4);
}

.contact-btn:active:not(:disabled) {
    transform: translateY(-1px) scale(1.01);
}

.contact-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.hidden {
    display: none;
}

/* Message styles */
.message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--color-error);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-note {
    font-size: 0.8rem;
    color: var(--color-text-dark);
    text-align: left;
    margin-top: 0.5rem;
}

/* Trust section */
.trust-section {
    padding: 4rem 2rem;
    background: rgba(248, 250, 252, 0.5);
    border-top: 1px solid var(--color-border);
    animation: fadeInUp 0.8s ease-out 1.5s both;
    opacity: 0.7;
    margin-top: 2rem;
}

.trust-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-dark);
    text-align: center;
    margin-bottom: 2rem;
}

.lawyers-showcase {
    max-width: 100%;
    margin: 0 auto;
}

.lawyers-scroll-container {
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

.lawyers-scroll-container.top-row {
    margin-bottom: 1rem;
}

.lawyers-scroll-container.bottom-row {
    margin-bottom: 2rem;
    padding-left: 120px; /* Offset for non-aligned modern look */
}

.lawyers-scroll {
    display: flex;
    gap: 1rem;
    width: max-content;
}

.lawyers-scroll-top {
    animation: scroll-horizontal-slow 100s linear infinite;
}

.lawyers-scroll-bottom {
    animation: scroll-horizontal-reverse-slow 120s linear infinite;
}

@keyframes scroll-horizontal-slow {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-horizontal-reverse-slow {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

.lawyers-scroll:hover {
    animation-play-state: paused;
}

.lawyer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    min-width: 250px;
    flex-shrink: 0;
}

.lawyer-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
}

.lawyer-item strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
}

.rating {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.more-lawyers {
    text-align: center;
    padding: 1.5rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.plus-count {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-primary-light);
    display: block;
    margin-bottom: 0.5rem;
}

.network-note {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* Footer */
.footer {
    padding: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-dark);
    border-top: 1px solid var(--color-border);
    position: relative;
    z-index: 5;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .main {
        padding-top: 5rem;
        padding-bottom: 5rem;
        min-height: 100vh;
        justify-content: center;
    }
    
    .hero {
        min-height: 65vh;
        padding: 2rem 0;
    }
    
    .hero-content {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
        margin-bottom: 0;
        min-height: 50vh;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .intake-form {
        max-width: 100%;
    }
    
    .form-note {
        text-align: center;
    }
}

@media (max-width: 640px) {
    .nav {
        padding: 0.5rem; /* Reduced padding for thinner mobile header */
    }
    
    .main {
        padding: 1rem;
        padding-top: 4rem;
        padding-bottom: 4rem;
        min-height: 100vh;
        justify-content: center;
    }
    
    .hero {
        min-height: 60vh;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 10vw, 3.8rem);
        margin-bottom: 1.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 2.5rem;
    }
    
    .hero-content {
        gap: 2rem;
        margin-bottom: 0;
        min-height: 45vh;
    }
    
    .form-group {
        gap: 0.875rem;
        flex-direction: column;
    }
    
    .lawyers-scroll-top {
        animation-duration: 60s;
    }
    
    .lawyers-scroll-bottom {
        animation-duration: 80s;
    }
    
    .lawyers-scroll-container.bottom-row {
        padding-left: 60px; /* Reduced offset for mobile */
    }
    
    .lawyer-item {
        min-width: 200px;
        padding: 0.75rem;
    }
    
    .trust-section {
        padding: 3rem 1rem;
        margin-top: 3rem;
    }
    .logo-image {
        height: 36px; /* Smaller logo for mobile */
    }
}

@media (max-width: 480px) {
    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .email-input {
        padding: 1.25rem 1.25rem;
        font-size: 1.125rem;
    }
    
    .contact-btn {
        padding: 1.25rem 2rem;
        font-size: 1.125rem;
    }
    
    .lawyers-scroll-top {
        animation-duration: 40s;
    }
    
    .lawyers-scroll-bottom {
        animation-duration: 50s;
    }
    
    .lawyers-scroll-container.bottom-row {
        padding-left: 30px; /* Further reduced offset for small mobile */
    }
    
    .lawyer-item {
        min-width: 180px;
        padding: 0.5rem;
    }
}