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

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: color 0.3s ease, background-color 0.3s ease;
    overflow-x: hidden;
}

/* Modern CSS Variables for Light/Dark Theme */
:root {
    --text-primary: #0f0f23;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-elevated: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --border-color: #e2e8f0;
    --accent-primary: #667eea;
    --accent-primary-hover: #5a67d8;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient-hover: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    --shadow: rgba(0, 0, 0, 0.04);
    --shadow-elevated: rgba(0, 0, 0, 0.08);
    --shadow-strong: rgba(0, 0, 0, 0.12);
    --blur: blur(20px);
}

[data-theme="dark"] {
    --text-primary: #f7fafc;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1b3a;
    --bg-elevated: #252659;
    --bg-glass: rgba(15, 15, 35, 0.8);
    --border-color: #2d3748;
    --accent-primary: #7c3aed;
    --accent-primary-hover: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    --accent-gradient-hover: linear-gradient(135deg, #8b5cf6 0%, #c084fc 100%);
    --shadow: rgba(0, 0, 0, 0.2);
    --shadow-elevated: rgba(0, 0, 0, 0.3);
    --shadow-strong: rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --text-primary: #f7fafc;
        --text-secondary: #a0aec0;
        --text-muted: #718096;
        --bg-primary: #0f0f23;
        --bg-secondary: #1a1b3a;
        --bg-elevated: #252659;
        --bg-glass: rgba(15, 15, 35, 0.8);
        --border-color: #2d3748;
        --accent-primary: #7c3aed;
        --accent-primary-hover: #8b5cf6;
        --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
        --accent-gradient-hover: linear-gradient(135deg, #8b5cf6 0%, #c084fc 100%);
        --shadow: rgba(0, 0, 0, 0.2);
        --shadow-elevated: rgba(0, 0, 0, 0.3);
        --shadow-strong: rgba(0, 0, 0, 0.4);
    }
}

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

/* Modern Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(2.25rem, 4vw, 3rem);
    margin-bottom: 2rem;
    font-weight: 700;
}

h3 {
    font-size: clamp(1.5rem, 2.5vw, 1.875rem);
    margin-bottom: 1rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

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

a:hover,
a:focus {
    color: var(--accent-primary-hover);
}

a:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* Fixed Theme Toggle */
.theme-toggle-fixed {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.4rem;
    box-shadow: 0 4px 20px var(--shadow-elevated);
    backdrop-filter: var(--blur);
    z-index: 1000;
}

.theme-toggle-fixed:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px var(--shadow-strong);
    background: var(--accent-primary);
}

.theme-toggle-fixed:hover .theme-icon {
    transform: rotate(20deg);
}

.theme-toggle-fixed .theme-icon {
    transition: transform 0.3s ease;
    filter: grayscale(0.2);
}

[data-theme="dark"] .theme-toggle-fixed .theme-icon::after {
    content: "☀️";
}

[data-theme="light"] .theme-toggle-fixed .theme-icon::after {
    content: "🌙";
}

.theme-toggle-fixed .theme-icon::after {
    content: "🌙";
}

@media (max-width: 768px) {
    .theme-toggle-fixed {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        top: 1.5rem;
        right: 1.5rem;
    }
}

/* Modern Buttons */
.cta-primary,
.cta-secondary,
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cta-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px var(--shadow-elevated);
    transform: translateY(0);
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-gradient-hover);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cta-primary:hover::before {
    opacity: 1;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--shadow-strong);
}

.cta-primary > * {
    position: relative;
    z-index: 1;
}

.cta-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-elevated);
}

.cta-button {
    background: var(--accent-gradient);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    border-radius: 8px;
}

.cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow-elevated);
}

/* Hero Section */
.hero {
    padding: 6rem 0 6rem;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, var(--accent-primary)20, transparent 70%);
    opacity: 0.1;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-logo {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 4px 20px var(--shadow-elevated));
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.hero-headline {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

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

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0;
        min-height: 100vh;
    }
    
    .hero-brand {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-logo {
        width: 60px;
        height: 60px;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }
    
    .hero-headline {
        font-size: clamp(1.75rem, 6vw, 2.25rem);
        margin-bottom: 1.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .cta-primary {
        width: 280px;
    }
}

/* Sections */
section {
    padding: 6rem 0;
    position: relative;
}

section:nth-child(even) {
    background: var(--bg-secondary);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.service-card {
    background: var(--bg-elevated);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow-elevated);
}

.service-card h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.1rem;
}

/* Process Steps */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.process-step {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 auto 2rem;
    box-shadow: 0 6px 20px var(--shadow-elevated);
    position: relative;
}

.step-number::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: var(--accent-gradient);
    opacity: 0.3;
    z-index: -1;
    animation: pulse 2s infinite;
}

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

.process-step h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.process-step p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1.1rem;
}

/* FAQ */
.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-elevated);
    padding: 2.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-elevated);
}

.faq-item h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.faq-item p {
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.7;
}

/* Footer */
.footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.footer-section a {
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--accent-primary);
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

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

/* Content Pages */
.content-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 0;
}

.content-page h1 {
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 4rem;
}

.content-page section {
    margin-bottom: 4rem;
    padding: 0;
    background: none;
}

.content-page h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.content-page ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.content-page li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Error Page */
.error-page {
    text-align: center;
    padding: 8rem 0;
}

.error-page h1 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.error-page p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

.error-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .error-actions .cta-primary {
        width: 250px;
    }
}

/* Additional Modern Touches */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

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

/* Scroll animations */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .process-step,
    .faq-item {
        opacity: 0;
        animation: fadeInUp 0.6s ease-out forwards;
    }
    
    .service-card:nth-child(1) { animation-delay: 0.1s; }
    .service-card:nth-child(2) { animation-delay: 0.2s; }
    .service-card:nth-child(3) { animation-delay: 0.3s; }
    
    .process-step:nth-child(1) { animation-delay: 0.1s; }
    .process-step:nth-child(2) { animation-delay: 0.2s; }
    .process-step:nth-child(3) { animation-delay: 0.3s; }
    .process-step:nth-child(4) { animation-delay: 0.4s; }
}