/*
 * Chat look for the inner pages (Mission, Transparency, Imprint, Privacy).
 * The start page (index.html) has the same look built in.
 *
 * Every page is a conversation: each section is a bubble, and each
 * bubble sits on the left (class "row left") or on the right
 * (class "row right"). To move a bubble to the other side, swap
 * the word "left" for "right" in its row.
 */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: #0b141a;
    color: #e9edef;
    font: 1.05rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Our background picture, with a soft dark layer so the text stays
   easy to read. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(4, 10, 18, 0.5), rgba(4, 10, 18, 0.6)),
        url("assets/images/hero.jpg") center / cover no-repeat;
}

a {
    color: inherit;
}

/* ---------- Header (like the top bar of a chat) ---------- */
.chat-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px 10px 8px;
    background: rgba(32, 44, 51, 0.92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-header .back {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #e9edef;
    text-decoration: none;
    font-size: 2rem;
    line-height: 1;
}

.chat-header .back:hover,
.chat-header .back:focus-visible {
    background: rgba(255, 255, 255, 0.1);
}

.chat-header .who {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #e9edef;
}

.avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #38bdf8;
    color: #02101f;
    font: 800 0.95rem ui-monospace, Consolas, "Courier New", monospace;
}

.chat-header .name {
    display: block;
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
}

.chat-header .status {
    display: block;
    font-size: 0.82rem;
    color: #a7b4bb;
}

/* ---------- Message list ---------- */
.chat {
    max-width: 820px;
    margin: 0 auto;
    padding: 16px 14px 110px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.day-chip {
    align-self: center;
    margin: 10px 0 2px;
    padding: 5px 14px;
    border-radius: 10px;
    background: rgba(24, 34, 41, 0.92);
    color: #a7b4bb;
    font: 600 0.75rem ui-monospace, Consolas, "Courier New", monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.row {
    display: flex;
}

.row.left {
    justify-content: flex-start;
}

.row.right {
    justify-content: flex-end;
}

/* ---------- Bubbles ---------- */
.bubble {
    --bg: #202c33;
    position: relative;
    display: block;
    max-width: min(94%, 700px);
    margin: 0;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 1.05rem;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    color: #e9edef;
    background: var(--bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    overflow-wrap: anywhere;
}

.row.right .bubble {
    --bg: #005c4b;
}

.row.left .bubble {
    border-top-left-radius: 4px;
}

.row.right .bubble {
    border-top-right-radius: 4px;
}

/* the little tail */
.bubble::before {
    content: "";
    position: absolute;
    top: 0;
    border-style: solid;
}

.row.left .bubble::before {
    left: -9px;
    border-width: 0 10px 12px 0;
    border-color: transparent var(--bg) transparent transparent;
}

.row.right .bubble::before {
    right: -9px;
    border-width: 0 0 12px 10px;
    border-color: transparent transparent transparent var(--bg);
}

.bubble h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    line-height: 1.3;
    color: #7dd3fc;
}

.bubble p {
    margin: 0 0 10px;
}

.bubble > :last-child {
    margin-bottom: 0;
}

.bubble ul {
    margin: 6px 0 10px;
    padding-left: 1.2rem;
}

.bubble li {
    margin-bottom: 6px;
}

.bubble a {
    color: #bae6fd;
}

.bubble code {
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    font: 0.92em ui-monospace, Consolas, "Courier New", monospace;
}

.bubble .small-note {
    font-size: 0.88rem;
    opacity: 0.85;
}

.bubble .wallet {
    margin: 8px 0 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    font: 0.92rem ui-monospace, Consolas, "Courier New", monospace;
    overflow-wrap: anywhere;
}

/* A link bubble, for example "Back to the start page".
   Blue with dark text, on the left and on the right. */
.row .bubble.link {
    --bg: #38bdf8;
    color: #02101f;
    font: 700 1.1rem ui-monospace, Consolas, "Courier New", monospace;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.row .bubble.link:hover,
.row .bubble.link:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.row .bubble.link:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/* ---------- Bottom bar (like the message bar of a chat) ---------- */
.bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(32, 44, 51, 0.92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bottom-bar a {
    padding: 8px 15px;
    border-radius: 999px;
    background: #2a3942;
    color: #e9edef;
    text-decoration: none;
    font-size: 0.92rem;
}

.bottom-bar a:hover,
.bottom-bar a:focus-visible {
    background: #36484f;
}

.bottom-bar a[aria-current="page"] {
    background: #38bdf8;
    color: #02101f;
    font-weight: 700;
}

@media (max-width: 600px) {
    body {
        font-size: 1rem;
    }

    .chat {
        padding: 12px 10px 130px;
    }

    .bubble {
        max-width: 95%;
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .row .bubble.link {
        transition: none;
    }
}
