
:root {
    --bg: #05080A;
    --panel: #202C33;
    --panel-deep: #111B21;
    --in-bubble: #202C33;
    --out-bubble: #005C4B;
    --green: #25D366;
    --teal: #128C7E;
    --text: #E9EDEF;
    --muted: #8696A0;
    --chip: #182229;
    --display: 'Space Grotesk', sans-serif;
    --body: 'Inter', -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}


::selection {
    background: var(--green);
    color: #0B141A
}

/* ---------- NAV ---------- */
nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(17, 27, 33, .88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(134, 150, 160, .12);
}

.nav-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.brand img {
    width: 34px;
    height: 34px;
    border-radius: 8px
}

.brand span {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -.01em
}

.brand b {
    color: var(--green);
    font-weight: 700
}

/* language toggle */
.lang-toggle {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--chip);
    border: 1px solid rgba(134, 150, 160, .2);
    border-radius: 999px;
    padding: 3px;
    cursor: pointer;
    user-select: none;
}

.lang-toggle button {
    position: relative;
    z-index: 2;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--display);
    font-weight: 700;
    font-size: .78rem;
    letter-spacing: .06em;
    color: var(--muted);
    padding: 6px 14px;
    border-radius: 999px;
    transition: color .3s ease;
}

.lang-toggle button:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px
}

.lang-toggle .knob {
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: 1;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background: var(--green);
    border-radius: 999px;
    transition: transform .35s cubic-bezier(.6, 0, .2, 1.4);
}

body[data-lang="es"] .lang-toggle .knob {
    transform: translateX(100%)
}

body[data-lang="en"] .lang-toggle .lt-en,
body[data-lang="es"] .lang-toggle .lt-es {
    color: #0B141A
}

/* language visibility */
body[data-lang="en"] .es {
    display: none !important
}

body[data-lang="es"] .en {
    display: none !important
}

/* ---------- HERO ---------- */
header {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto;
    padding: 72px 20px 40px;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--display);
    font-weight: 500;
    font-size: .75rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--green);
    border: 1px solid rgba(37, 211, 102, .3);
    background: rgba(37, 211, 102, .06);
    padding: 7px 16px;
    border-radius: 999px;
    margin-bottom: 26px;
}

.eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, .5)
    }

    50% {
        box-shadow: 0 0 0 7px rgba(37, 211, 102, 0)
    }
}

h1 {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2.1rem, 5.6vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -.03em;
    margin-bottom: 18px;
}

h1 em {
    font-style: normal;
    color: var(--green)
}

.hero-sub {
    color: var(--muted);
    max-width: 520px;
    margin: 0 auto 44px;
    font-size: 1.05rem
}

/* hero chat mock */
.hero-chat {
    max-width: 480px;
    margin: 0 auto;
    background: var(--panel-deep);
    border: 1px solid rgba(134, 150, 160, .15);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
    text-align: left;
}

.hero-chat-top {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--panel);
    padding: 12px 16px;
}

.hero-chat-top .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--display);
    font-weight: 700;
    color: #0B141A;
    font-size: .9rem;
}

.hero-chat-top .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-chat-top .who {
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.2
}

.hero-chat-top .status {
    color: var(--green);
    font-size: .74rem
}

.hero-chat-body {
    padding: 20px 16px 24px;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    gap: 10px
}

/* ---------- CHAT / MESSAGES ---------- */
main {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 20px 90px
}

.divider {
    display: flex;
    justify-content: center;
    margin: 52px 0 22px
}

.divider span {
    font-family: var(--display);
    font-weight: 700;
    font-size: .74rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--chip);
    border: 1px solid rgba(134, 150, 160, .14);
    padding: 8px 18px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.msg {
    position: relative;
    max-width: 74%;
    padding: 14px 16px 24px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: .98rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    opacity: 0;
    transform: scale(.86) translateY(14px);
    transition: opacity .5s ease, transform .5s cubic-bezier(.34, 1.4, .5, 1);
}

.msg.show {
    opacity: 1;
    transform: scale(1) translateY(0)
}

.msg.in {
    background: var(--in-bubble);
    border-top-left-radius: 4px;
    margin-right: auto;
    transform-origin: bottom left;
}

.msg.out {
    background: var(--out-bubble);
    border-top-right-radius: 4px;
    margin-left: auto;
    transform-origin: bottom right;
}

.msg.in::before,
.msg.out::before {
    content: "";
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
}

.msg.in::before {
    left: -8px;
    border-width: 0 10px 10px 0;
    border-color: transparent var(--in-bubble) transparent transparent
}

.msg.out::before {
    right: -8px;
    border-width: 0 0 10px 10px;
    border-color: transparent transparent transparent var(--out-bubble)
}

.msg .sender {
    font-family: var(--display);
    font-weight: 700;
    font-size: .8rem;
    color: var(--green);
    margin-bottom: 5px;
    letter-spacing: .02em;
}

.msg p+p {
    margin-top: 9px
}

.msg strong {
    color: #fff;
    font-weight: 600
}

.msg .meta {
    position: absolute;
    bottom: 6px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .68rem;
    color: rgba(233, 237, 239, .5);
}

.msg .ticks {
    display: inline-block;
    width: 16px;
    height: 10px
}

.msg .ticks svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: #53BDEB
}

.msg.big {
    font-family: var(--display);
    font-weight: 500;
    font-size: 1.12rem;
    line-height: 1.45;
    letter-spacing: -.01em;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 11px
}

.tag {
    font-size: .74rem;
    font-weight: 600;
    color: var(--green);
    background: rgba(37, 211, 102, .1);
    border: 1px solid rgba(37, 211, 102, .28);
    padding: 4px 11px;
    border-radius: 999px;
    white-space: nowrap;
}

.yr {
    display: inline-block;
    font-family: var(--display);
    font-weight: 700;
    font-size: .72rem;
    letter-spacing: .14em;
    color: #0B141A;
    background: var(--green);
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* typing indicator */
.typing {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    background: var(--in-bubble);
    border-radius: 12px;
    border-top-left-radius: 4px;
    padding: 15px 18px;
    width: max-content;
}

.typing i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--muted);
    animation: bounce 1.2s infinite;
}

.typing i:nth-child(2) {
    animation-delay: .15s
}

.typing i:nth-child(3) {
    animation-delay: .3s
}

@keyframes bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: .5
    }

    30% {
        transform: translateY(-5px);
        opacity: 1
    }
}

/* ---------- FOOTER ---------- */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(134, 150, 160, .12);
    background: var(--panel-deep);
    padding: 36px 20px;
    text-align: center;
    color: var(--muted);
    font-size: .85rem;
}

footer .f-brand {
    font-family: var(--display);
    font-weight: 700;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 6px
}

footer .f-brand b {
    color: var(--green)
}

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

footer a:hover {
    text-decoration: underline
}

@media (max-width:600px) {
    .msg {
        max-width: 88%
    }

    header {
        padding-top: 52px
    }

    .hero-chat-body {
        min-height: 170px
    }
}

@media (prefers-reduced-motion:reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important
    }

    .msg {
        opacity: 1;
        transform: none
    }

    html {
        scroll-behavior: auto
    }
}