/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:wght@500;600&display=swap');

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

* {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: color 0.3s ease, background-color 0.3s ease;
    overflow-x: hidden;
    font-feature-settings: 'liga' 1, 'kern' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Refined CSS Variables for Light/Dark Theme */
:root {
    --text-primary: #1a1a2e;
    --text-secondary: #555566;
    --text-muted: #888899;
    --bg-primary: #fafafa;
    --bg-secondary: #f5f5f5;
    --bg-elevated: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.9);
    --border-color: #e8e8e8;
    --accent-primary: #2d3436;
    --accent-primary-hover: #1a1a2e;
    --accent-gradient: linear-gradient(135deg, #2d3436 0%, #4a5568 100%);
    --accent-gradient-hover: linear-gradient(135deg, #1a1a2e 0%, #2d3436 100%);
    --accent-warm: #c9a962;
    --shadow: rgba(0, 0, 0, 0.03);
    --shadow-elevated: rgba(0, 0, 0, 0.06);
    --shadow-strong: rgba(0, 0, 0, 0.1);
    --blur: blur(20px);
}

[data-theme="dark"] {
    --text-primary: #f0f0f0;
    --text-secondary: #a8a8b8;
    --text-muted: #707080;
    --bg-primary: #0d0d12;
    --bg-secondary: #14141c;
    --bg-elevated: #1c1c28;
    --bg-glass: rgba(13, 13, 18, 0.9);
    --border-color: #2a2a38;
    --accent-primary: #e8e8e8;
    --accent-primary-hover: #ffffff;
    --accent-gradient: linear-gradient(135deg, #e8e8e8 0%, #c8c8d0 100%);
    --accent-gradient-hover: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    --accent-warm: #d4b06a;
    --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: #f0f0f0;
        --text-secondary: #a8a8b8;
        --text-muted: #707080;
        --bg-primary: #0d0d12;
        --bg-secondary: #14141c;
        --bg-elevated: #1c1c28;
        --bg-glass: rgba(13, 13, 18, 0.9);
        --border-color: #2a2a38;
        --accent-primary: #e8e8e8;
        --accent-primary-hover: #ffffff;
        --accent-gradient: linear-gradient(135deg, #e8e8e8 0%, #c8c8d0 100%);
        --accent-gradient-hover: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
        --accent-warm: #d4b06a;
        --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;
    }
}

/* Simplified Typography - 3 sizes only */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-primary);
}

h2 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1rem;
    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;
    }
}

/* Page Header for secondary pages */
.page-header {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.page-header-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 1rem;
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.page-header-logo:hover {
    opacity: 0.7;
    color: var(--text-primary);
}

.page-header-logo img {
    width: 32px;
    height: 32px;
}

/* Buttons */
.cta-primary,
.cta-secondary,
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 2px;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    position: relative;
}

.cta-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.cta-primary:hover {
    background: var(--accent-warm);
    color: var(--text-primary);
}

.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;
    border-radius: 8px;
}

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

/* Hero Section */
.hero {
    padding: 8rem 0;
    text-align: center;
    position: relative;
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero .container {
    position: relative;
}

.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: 2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.hero-headline {
    font-size: 2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 1.5rem;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-trust {
    font-size: 0.875rem;
    color: var(--accent-warm);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease-out 0.5s 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: 1.75rem;
    }

    .hero-headline {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .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(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: var(--bg-elevated);
    padding: 2.5rem 2rem;
    border-radius: 0;
    transition: all 0.25s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.service-card:hover {
    border-color: var(--accent-warm);
}

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

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

/* Process Steps */
.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .process-steps {
        grid-template-columns: 1fr;
    }
}

.process-step {
    text-align: center;
    padding: 1rem 0.5rem;
}

.step-number {
    width: 36px;
    height: 36px;
    background: transparent;
    color: var(--accent-warm);
    border: 1px solid var(--accent-warm);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Playfair Display', Georgia, serif;
    margin: 0 auto 0.75rem;
}

.process-step h3 {
    margin-bottom: 0.5rem;
}

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

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

.faq-item {
    background: transparent;
    padding: 2rem 0;
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.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: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-family: 'Playfair Display', Georgia, serif;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.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.875rem;
}

/* 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.875rem;
    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: 1rem;
    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: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Subtle scroll animations */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .process-step {
        opacity: 0;
        animation: fadeInUp 0.5s ease-out forwards;
    }

    .service-card:nth-child(1) { animation-delay: 0.05s; }
    .service-card:nth-child(2) { animation-delay: 0.1s; }
    .service-card:nth-child(3) { animation-delay: 0.15s; }
    .service-card:nth-child(4) { animation-delay: 0.2s; }

    .process-step:nth-child(1) { animation-delay: 0.05s; }
    .process-step:nth-child(2) { animation-delay: 0.1s; }
    .process-step:nth-child(3) { animation-delay: 0.15s; }
    .process-step:nth-child(4) { animation-delay: 0.2s; }
}