@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

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

:root {
    --rose-50:  #fff1f5;
    --rose-100: #ffe0e9;
    --rose-200: #ffc0d3;
    --rose-400: #f4799f;
    --rose-500: #e84d80;
    --rose-600: #c73365;
    --rose-700: #9e1f4d;
    --rose-900: #4a0a22;

    --blush-50:  #fdf4f7;
    --blush-100: #f9e4ed;

    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-400: #94a3b8;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-900: #0f172a;

    --white: #ffffff;

    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body:    'DM Sans', system-ui, sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.08);
    --shadow-chatbot: 0 20px 64px rgba(198,51,101,0.18), 0 8px 32px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: #fdf6f9;
    color: var(--slate-700);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Background decorative layer ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 15% 10%, rgba(244,121,159,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 85% 80%, rgba(232,77,128,0.08) 0%, transparent 55%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(249,228,237,0.4) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ──────────────────────────────────
   HEADER / NAV
────────────────────────────────── */
.site-header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(244,121,159,0.15);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--rose-500), var(--rose-700));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--rose-700);
    letter-spacing: -0.01em;
}

.logo-text span {
    color: var(--rose-400);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-600);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--rose-600); }

.nav-cta {
    background: var(--rose-600) !important;
    color: white !important;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.875rem !important;
    transition: background 0.2s, transform 0.15s !important;
}

.nav-cta:hover {
    background: var(--rose-700) !important;
    transform: translateY(-1px);
}

/* ──────────────────────────────────
   HERO
────────────────────────────────── */
.hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
    max-width: 1160px;
    margin: 0 auto;
    padding: 80px 48px 60px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--rose-100);
    color: var(--rose-700);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
}

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

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

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4vw, 3.4rem);
    line-height: 1.12;
    color: var(--slate-900);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero-title em {
    font-style: italic;
    color: var(--rose-600);
}

.hero-subtitle {
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--slate-600);
    margin-bottom: 36px;
    max-width: 460px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--rose-500), var(--rose-700));
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 13px 28px;
    border-radius: var(--radius-full);
    text-decoration: none;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 20px rgba(232,77,128,0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(232,77,128,0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--rose-700);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--rose-200);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
    background: var(--rose-50);
    border-color: var(--rose-400);
}

/* Hero visual card */
.hero-visual {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(244,121,159,0.12);
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose-100), var(--rose-200));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.hero-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--slate-900);
    margin-bottom: 1px;
}

.hero-card-sub {
    font-size: 0.78rem;
    color: var(--slate-400);
}

.status-online {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #16a34a;
    margin-left: auto;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: #16a34a;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.chat-bubbles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bubble {
    max-width: 85%;
    padding: 11px 15px;
    border-radius: 14px;
    font-size: 0.84rem;
    line-height: 1.5;
}

.bubble-bot {
    background: var(--slate-100);
    color: var(--slate-700);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.bubble-user {
    background: linear-gradient(135deg, var(--rose-500), var(--rose-700));
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

/* Stats row */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    background: white;
    border: 1px solid rgba(244,121,159,0.12);
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--rose-600);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--slate-400);
}

/* ──────────────────────────────────
   FEATURES SECTION
────────────────────────────────── */
.features {
    position: relative;
    z-index: 1;
    max-width: 1160px;
    margin: 0 auto;
    padding: 60px 48px;
}

.section-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rose-500);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--slate-900);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 48px;
    max-width: 520px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: white;
    border: 1px solid rgba(244,121,159,0.1);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    background: var(--rose-50);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 22px;
}

.feature-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 0.86rem;
    line-height: 1.65;
    color: var(--slate-600);
}

/* ──────────────────────────────────
   FOOTER
────────────────────────────────── */
footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 48px;
    border-top: 1px solid rgba(244,121,159,0.1);
    font-size: 0.8rem;
    color: var(--slate-400);
}

footer a { color: var(--rose-500); text-decoration: none; }

/* ──────────────────────────────────
   CHATBOT TOGGLER
────────────────────────────────── */
.chatbot-toggler {
    position: fixed;
    bottom: 32px;
    right: 36px;
    z-index: 1000;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--rose-500), var(--rose-700));
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(232,77,128,0.45);
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
    outline: none;
}

.chatbot-toggler:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 32px rgba(232,77,128,0.55);
}

body.show-chatbot .chatbot-toggler {
    transform: rotate(45deg);
}

.chatbot-toggler span {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, transform 0.2s;
}

.chatbot-toggler span:first-child svg,
.chatbot-toggler span:last-child svg {
    width: 26px;
    height: 26px;
    fill: white;
    stroke: none;
}

.chatbot-toggler span:last-child { opacity: 0; }
body.show-chatbot .chatbot-toggler span:first-child { opacity: 0; }
body.show-chatbot .chatbot-toggler span:last-child  { opacity: 1; }

/* ──────────────────────────────────
   CHATBOT WINDOW
────────────────────────────────── */
.chatbot {
    position: fixed;
    bottom: 104px;
    right: 36px;
    z-index: 999;
    width: 400px;
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.88) translateY(12px);
    transform-origin: bottom right;
    box-shadow: var(--shadow-chatbot);
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34,1.4,0.64,1);
    border: 1px solid rgba(244,121,159,0.15);
}

body.show-chatbot .chatbot {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}

/* Header */
.chatbot header {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--rose-600) 0%, var(--rose-900) 100%);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.chatbot-header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    border: 1.5px solid rgba(255,255,255,0.25);
}

.chatbot-header-info { flex: 1; }

.chatbot-header-info h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    margin-bottom: 2px;
}

.chatbot-header-info small {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.73rem;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
}

.chatbot-header-info small::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6ee7b7;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

/* Chatbox */
.chatbox {
    height: 380px;
    overflow-y: auto;
    padding: 20px 18px 100px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.chatbox::-webkit-scrollbar { width: 4px; }
.chatbox::-webkit-scrollbar-track { background: transparent; }
.chatbox::-webkit-scrollbar-thumb { background: var(--rose-200); border-radius: 4px; }

/* Chat messages */
.chat {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    list-style: none;
}

.chat.outgoing {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--rose-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-bottom: 2px;
}

.chat p {
    max-width: 72%;
    padding: 10px 14px;
    font-size: 0.875rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.chat.incoming p {
    background: var(--slate-100);
    color: var(--slate-700);
    border-radius: 16px 16px 16px 4px;
}

.chat.outgoing p {
    background: linear-gradient(135deg, var(--rose-500), var(--rose-700));
    color: white;
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 2px 8px rgba(232,77,128,0.25);
}

.chat p.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 12px;
}

/* Typing dots */
.typing-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--slate-400);
    border-radius: 50%;
    margin: 0 2px;
    animation: bounce 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

/* Input area */
.chat-input {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid var(--rose-100);
}

.chat-input textarea {
    flex: 1;
    min-height: 42px;
    max-height: 120px;
    border: 1.5px solid var(--rose-200);
    border-radius: 22px;
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--slate-700);
    outline: none;
    resize: none;
    transition: border-color 0.2s;
    background: var(--rose-50);
}

.chat-input textarea:focus {
    border-color: var(--rose-400);
    background: white;
}

.chat-input textarea::placeholder { color: var(--slate-400); }

.chat-input #send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose-500), var(--rose-700));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 3px 10px rgba(232,77,128,0.35);
}

.chat-input #send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(232,77,128,0.45);
}

.chat-input #send-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
    transform: translateX(1px);
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
    .site-header { padding: 16px 24px; }
    .nav-links { display: none; }

    .hero {
        grid-template-columns: 1fr;
        padding: 48px 24px 40px;
        gap: 40px;
    }

    .hero-visual { order: -1; }

    .features { padding: 40px 24px; }
    .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 490px) {
    .chatbot {
        right: 0; bottom: 0;
        width: 100%; height: 100%;
        border-radius: 0;
    }
    .chatbox { height: calc(100vh - 140px); }
    .chatbot-toggler { right: 20px; bottom: 20px; }
    .hero-stats { grid-template-columns: 1fr 1fr; }
}
