:root {
    --bg-base: #fdfbf7;
    --bg-surface: #ffffff;
    --bg-warm-tint: #f6f1e8;
    --bg-card: #ffffff;
    --bg-accent-soft: #fbf2e3;
    
    --brand-primary: #1e1b18;
    --brand-terracotta: #c4552b;
    --brand-terracotta-hover: #ad441c;
    --brand-amber: #d97706;
    --brand-sand: #e6ddce;
    --brand-clay: #78350f;
    --brand-blue: #2563eb;
    
    --text-heading: #1e1b18;
    --text-body: #44403c;
    --text-muted: #78716c;
    --text-light: #a8a29e;
    
    --border-subtle: #e8e4dc;
    --border-warm: #ebd5c1;
    
    --shadow-sm: 0 2px 8px rgba(30, 27, 24, 0.04);
    --shadow-md: 0 10px 30px -5px rgba(30, 27, 24, 0.07);
    --shadow-lg: 0 20px 40px -10px rgba(30, 27, 24, 0.12);
}

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-base);
    color: var(--text-body);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

/* Ambient Background Lights */
.ambient-sphere-1 {
    position: fixed;
    top: -150px;
    right: -100px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(196, 85, 43, 0.06) 0%, rgba(253, 251, 247, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.ambient-sphere-2 {
    position: fixed;
    bottom: -200px;
    left: -150px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.05) 0%, rgba(253, 251, 247, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
.navbar-custom {
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
}

.navbar-brand-title {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--brand-primary);
    letter-spacing: -0.5px;
}

.navbar-brand-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-link {
    color: var(--text-body) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0.9rem !important;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--brand-terracotta) !important;
}

/* Badges & Pills */
.badge-warm {
    background-color: var(--bg-accent-soft);
    color: var(--brand-clay);
    border: 1px solid var(--border-warm);
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Buttons */
.btn-primary-action {
    background: linear-gradient(135deg, var(--brand-terracotta), var(--brand-terracotta-hover));
    color: #ffffff !important;
    font-weight: 700;
    border-radius: 12px;
    padding: 0.85rem 1.75rem;
    border: none;
    box-shadow: 0 4px 14px rgba(196, 85, 43, 0.3);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 85, 43, 0.4);
}

.btn-outline-warm {
    border: 2px solid var(--border-warm);
    color: var(--brand-primary) !important;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.8rem 1.6rem;
    background: #ffffff;
    transition: all 0.2s ease;
}

.btn-outline-warm:hover {
    background: var(--bg-warm-tint);
    border-color: var(--brand-terracotta);
}

/* Cards & Sections */
.card-agent-preview {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 1.85rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
}

.card-agent-preview:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-warm);
}

.tariff-card-main {
    background: #ffffff;
    border: 2px solid var(--border-subtle);
    border-radius: 22px;
    padding: 2.5rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.tariff-card-main.featured {
    border-color: var(--brand-terracotta);
    box-shadow: var(--shadow-md);
}

.tariff-badge-top {
    position: absolute;
    top: -14px;
    right: 28px;
    background: var(--brand-terracotta);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.3rem 0.9rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-benefit-item {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 9999px;
    padding: 0.4rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-body);
}

/* AI Widget Styling */
.ai-robot-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    cursor: pointer;
}

.ai-character-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid var(--brand-terracotta);
    box-shadow: 0 8px 24px rgba(196, 85, 43, 0.35);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.ai-character-avatar:hover {
    transform: scale(1.08);
}

.ai-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 13px;
    height: 13px;
    background-color: #22c55e;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.ai-speech-bubble {
    position: absolute;
    bottom: 74px;
    right: 0;
    background: #ffffff;
    color: var(--brand-primary);
    border: 1px solid var(--border-warm);
    border-radius: 16px 16px 4px 16px;
    padding: 12px 16px;
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    max-width: 270px;
    width: max-content;
    animation: fadeInBubble 0.3s ease;
}

.ai-speech-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-muted);
}

/* Chat Modal */
.ai-chat-container {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 490px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpChat 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-chat-header {
    background: var(--bg-warm-tint);
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-header-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-terracotta);
}

.ai-header-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border: 2px solid #fff;
    border-radius: 50%;
}

.ai-header-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-heading);
}

.ai-header-status {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.ai-chat-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
}

.ai-chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #faf8f5;
}

.ai-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.ai-msg-bot {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    color: var(--text-heading);
    border-bottom-left-radius: 3px;
}

.ai-msg-user {
    align-self: flex-end;
    background: var(--brand-terracotta);
    color: #ffffff;
    border-bottom-right-radius: 3px;
}

.ai-chat-input-area {
    padding: 12px;
    border-top: 1px solid var(--border-subtle);
    background: #ffffff;
    display: flex;
    gap: 8px;
}

.ai-chat-input {
    flex: 1;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.9rem;
    outline: none;
}

.ai-chat-input:focus {
    border-color: var(--brand-terracotta);
}

.ai-chat-send-btn {
    background: var(--brand-terracotta);
    color: #fff;
    border: none;
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

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

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