/* =============================================
   PSC Marine - AI Quote Chat
   Aesthetic: Maritime industrial / bold navy
   ============================================= */

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

:root {
    --navy: #0a1628;
    --navy-mid: #122040;
    --navy-light: #1e3a5f;
    --teal: #00b4d8;
    --teal-bright: #00e5ff;
    --gold: #e8a020;
    --white: #f4f8ff;
    --gray-light: #e2eaf3;
    --gray-mid: #8fa0b5;
    --bubble-bot-bg: #1e3a5f;
    --bubble-user-bg: #00b4d8;
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius: 18px;
    --radius-sm: 10px;
}

html, body {
    font-family: var(--font-body);
    background: var(--navy);
    color: var(--white);
    min-height: 100vh;
}

/* ---- HEADER ---- */
.site-header {
    background: var(--navy);
    border-bottom: 2px solid var(--teal);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-block {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-mark {
    font-size: 28px;
    line-height: 1;
}
.logo-name {
    display: block;
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: 2px;
    color: var(--teal-bright);
    line-height: 1;
}
.logo-sub {
    display: block;
    font-size: 11px;
    color: var(--gray-mid);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 13px;
    color: var(--gray-mid);
}
.header-contact a {
    color: var(--teal);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

/* ---- HERO ---- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 60px 24px 50px;
    text-align: center;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(0,180,216,0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(0,229,255,0.06) 0%, transparent 60%);
    pointer-events: none;
}
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 40px,
            rgba(0,180,216,0.04) 40px,
            rgba(0,180,216,0.04) 41px
        );
}
.hero-content {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(48px, 8vw, 80px);
    line-height: 1;
    letter-spacing: 3px;
    color: var(--white);
    margin-bottom: 18px;
}
.hero-title span {
    color: var(--teal);
}
.hero-subtitle {
    font-size: 16px;
    color: var(--gray-mid);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.badge {
    background: rgba(0,180,216,0.1);
    border: 1px solid rgba(0,180,216,0.3);
    color: var(--teal);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ---- CHAT SECTION ---- */
.chat-section {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.chat-container {
    background: var(--navy-mid);
    border: 1px solid rgba(0,180,216,0.25);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,229,255,0.05);
}

.chat-header {
    background: var(--navy-light);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(0,180,216,0.2);
}
.chat-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--teal), #006fa6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.chat-title {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: var(--white);
}
.chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4ade80;
}
.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Messages */
.chat-messages {
    padding: 24px 20px;
    min-height: 380px;
    max-height: 520px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--navy-light) transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--navy-light); border-radius: 2px; }

.message {
    display: flex;
    max-width: 82%;
    animation: msgIn 0.25s ease-out;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.message.bot { align-self: flex-start; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }

.bubble {
    padding: 13px 18px;
    border-radius: var(--radius);
    font-size: 14.5px;
    line-height: 1.65;
}
.message.bot .bubble {
    background: var(--bubble-bot-bg);
    color: var(--white);
    border-bottom-left-radius: 4px;
}
.message.user .bubble {
    background: var(--bubble-user-bg);
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 14px 18px;
    background: var(--bubble-bot-bg);
    border-radius: var(--radius);
    border-bottom-left-radius: 4px;
    width: fit-content;
    margin-left: 4px;
}
.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--teal);
    border-radius: 50%;
    animation: bounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* Input area */
.chat-input-area {
    padding: 16px 20px 20px;
    border-top: 1px solid rgba(0,180,216,0.15);
    background: rgba(10,22,40,0.5);
}
.input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.chat-input {
    flex: 1;
    background: var(--navy);
    border: 1.5px solid rgba(0,180,216,0.3);
    border-radius: 50px;
    padding: 12px 20px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.chat-input:focus {
    border-color: var(--teal);
}
.chat-input::placeholder { color: var(--gray-mid); }

.send-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), #006fa6);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.15s, box-shadow 0.15s;
    flex-shrink: 0;
}
.send-btn:hover {
    transform: scale(1.07);
    box-shadow: 0 4px 20px rgba(0,180,216,0.4);
}
.send-btn svg { width: 20px; height: 20px; }

/* Quick replies */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.quick-reply-btn {
    background: rgba(0,180,216,0.1);
    border: 1.5px solid rgba(0,180,216,0.4);
    color: var(--teal);
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.15s, color 0.15s;
}
.quick-reply-btn:hover {
    background: var(--teal);
    color: var(--navy);
}

/* Trust signals */
.trust-signals {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-mid);
}
.trust-icon { font-size: 16px; }

/* Footer */
.site-footer {
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(0,180,216,0.1);
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--gray-mid);
    line-height: 1.8;
}
.site-footer a {
    color: var(--teal);
    text-decoration: none;
}
.footer-copy { margin-top: 8px; font-size: 12px; }

@media (max-width: 600px) {
    .hero { padding: 36px 16px 32px; }
    .header-contact { display: none; }
    .trust-signals { gap: 16px; }
    .trust-item span:last-child { font-size: 12px; }
    .chat-messages { max-height: 380px; }
}
