:root {
    /* Anthropic-inspired Palette */
    --bg-color: #FDFCF8;
    /* Warm White / Cream */
    --bg-secondary: #F4F1EA;
    /* Slightly darker warm beige for sections */
    --text-primary: #1F2937;
    /* Charcoal */
    --text-secondary: #4B5563;
    /* Muted Grey */
    --accent-color: #D97757;
    /* Terracotta/Warm Orange - Professional yet warm */
    --accent-hover: #C05F3E;
    --border-color: #E5E7EB;

    /* Typography */
    --font-serif: 'Merriweather', serif;
    --font-sans: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1280px;
    --header-height: 80px;
    --section-padding: 100px 0;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--text-primary);
    /* Dark button like Anthropic */
    color: #fff;
}

.btn-primary:hover {
    background-color: #000;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    max-width: 800px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}

/* Header */
header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(253, 252, 248, 0.9);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1001;
}

.nav-menu {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.lang-switcher {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    border-left: 1px solid var(--border-color);
    padding-left: 16px;
    margin-left: 16px;
}

.lang-opt {
    color: var(--text-secondary);
    cursor: pointer;
}

.lang-opt:hover,
.lang-opt.active {
    color: var(--accent-color);
    font-weight: 600;
}

/* Hero */
/* Hero */
.hero {
    padding: 140px 0 80px;
    background-color: transparent;
}

.hero-wrapper {
    display: flex;
    align-items: center;
    gap: 60px;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-image {
    flex: 1;
    max-width: 500px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 24px;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

/* Chat Interface */
.chat-interface {
    background: var(--bg-color);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 520px;
    max-width: 450px;
    margin: 0 auto;
    font-family: var(--font-sans);
}

.chat-header {
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-end-btn {
    visibility: hidden;
}

.chat-title h3 {
    font-size: 1rem;
    font-family: var(--font-serif);
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #10B981;
    border-radius: 50%;
}

.chat-history {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: fadeIn 0.3s ease;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
}

.message-content {
    padding: 16px 20px;
    border-radius: 16px;
    font-size: 1rem;
    line-height: 1.6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.chat-message.bot .message-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-message.user .message-content {
    background: var(--text-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    padding: 20px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    align-items: center;
}

#chatInput {
    flex: 1;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

#chatInput:focus {
    border-color: var(--accent-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.1);
}

#chatSendBtn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--text-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#chatSendBtn:hover {
    transform: translateY(-2px);
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Trust Bar */
.trust-bar {
    padding: 40px;
    margin: 0 auto 40px;
    background-color: var(--bg-secondary);
    border-radius: 24px;
    width: calc(100% - 48px);
    max-width: var(--container-width);
}

.trust-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.8;
    flex-wrap: wrap;
    gap: 32px;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 120px;
}

.trust-icon {
    height: 32px;
    width: auto;
    filter: grayscale(100%) brightness(0.2);
    /* Deep gray */
    opacity: 0.5;
    transition: all 0.3s ease;
}

.trust-item:hover .trust-icon {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
}

.trust-logos span {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Services Section & Generic Content Box */
.services,
.content-box {
    padding: 80px 40px;
    background-color: var(--bg-secondary);
    margin: 0 auto 40px;
    border-radius: 24px;
    width: calc(100% - 48px);
    max-width: var(--container-width);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.service-card {
    background: var(--bg-color);
    padding: 40px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 24px;
    color: var(--accent-color);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    font-family: var(--font-sans);
    /* Cleaner look for cards */
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.learn-more {
    font-weight: 600;
    color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.learn-more:hover {
    gap: 8px;
}

/* Footer */
footer {
    background-color: var(--text-primary);
    color: #fff;
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand h4 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    max-width: 300px;
}

.footer-col h5 {
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1rem;
    margin-bottom: 24px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-col ul li a:hover {
    color: #fff;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile */
/* Mobile */
@media (max-width: 768px) {
    .hero-wrapper {
        flex-direction: column;
        gap: 40px;
    }

    .hero-image {
        max-width: 100%;
        width: 100%;
    }

    .chat-interface {
        max-width: 100%;
        height: 450px;
        /* Slightly shorter on mobile */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        background-color: var(--bg-color);
        flex-direction: column;
        padding: 100px 24px 40px;
        /* Top padding to clear header/close button */
        gap: 24px;
        overflow-y: auto;
        z-index: 999;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu .nav-link {
        font-size: 1.25rem;
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu .lang-switcher {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
        padding-top: 16px;
    }

    .nav-menu .btn {
        width: 100%;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .trust-bar,
    .services,
    .content-box {
        margin: 0 16px 24px;
        padding: 24px 16px;
        width: auto;
        max-width: none;
    }

    /* Fix padding and alignment on mobile */
    .container {
        padding: 0 16px;
    }

    .service-card {
        padding: 24px 16px;
        text-align: center;
    }

    /* Fix case study card image alignment on mobile */
    .service-card>div:first-child[style*="margin: -40px"] {
        margin: -24px -16px 24px -16px !important;
    }

    .service-card img,
    .service-icon {
        margin: 0 auto 16px;
    }

    /* Hide small service icon on services page on mobile - we show the big image */
    .services>.container>div[id] .service-icon {
        display: none;
    }

    /* Ensure big image comes first on mobile for all service sections */
    .services>.container>div[id] {
        flex-direction: column !important;
    }

    .services>.container>div[id]>div:has(img[alt*="Illustration"]) {
        order: -1;
    }

    .section-title,
    .section-subtitle {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-content {
        text-align: center;
    }

    .hero-content h1,
    .hero-content p {
        text-align: center;
    }

    .hero-content>div {
        justify-content: center;
    }

    footer .container {
        text-align: center;
    }

    .footer-brand,
    .footer-col {
        text-align: center;
    }

    .footer-brand p {
        max-width: 100%;
        margin: 0 auto;
    }
}