/* Uncle Aden · the house voice on the landing page.
   One pose and one line per stop. A small dock repeats the line only
   after that stop has scrolled away, so two copies never share the screen. */

.host {
    --host-ink: rgba(17, 14, 8, 0.72);
    --host-line: rgba(214, 173, 69, 0.42);
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    align-items: end;
    gap: 0 2px;
    width: fit-content;
    max-width: min(100%, 38rem);
    margin: 26px 0;
    text-align: start;
}

.host--mid {
    margin-inline: auto;
}

.host--hero {
    margin-top: 6px;
    margin-bottom: 18px;
}

.host__body {
    width: 124px;
    height: 158px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.host__img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.32));
    user-select: none;
    -webkit-user-drag: none;
}

.host__say {
    position: relative;
    min-width: 0;
    max-width: 26rem;
    margin-bottom: 18px;
    padding: 12px 14px 13px;
    border: 1px solid var(--host-line);
    border-radius: 4px 18px 18px 18px;
    background:
        linear-gradient(180deg, rgba(46, 38, 23, 0.2), transparent 40%),
        var(--host-ink);
    box-shadow: 0 16px 30px -22px rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.host__say::before {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: #221c10;
    border-inline-start: 1px solid var(--host-line);
    border-bottom: 1px solid var(--host-line);
    top: 22px;
    inset-inline-start: -6px;
    transform: rotate(45deg);
}

.host__name {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-gold-main, #d6ad45);
}

.host__line {
    margin: 4px 0 0;
    font-family: var(--font-en-header, Palatino, serif);
    font-size: 1.02rem;
    line-height: 1.45;
    color: #f6f1e2;
}

html[dir="rtl"] .host__name,
html[dir="rtl"] .host__line,
html[dir="rtl"] .host-dock__line {
    font-family: "Amiri", var(--font-ar-body, serif);
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.7;
}

body[data-locale="zh-CN"] :is(.host__line, .host__name, .host-dock__line) {
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
    text-transform: none;
}

body[data-locale="yue-HK"] :is(.host__line, .host__name, .host-dock__line) {
    font-family: "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", sans-serif;
    letter-spacing: 0;
    text-transform: none;
}

body[data-locale="ko"] :is(.host__line, .host__name, .host-dock__line) {
    font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    letter-spacing: 0;
    text-transform: none;
}

body[data-locale="hi"] :is(.host__line, .host-dock__line) {
    font-family: "Noto Sans Devanagari", "Nirmala UI", "Mangal", sans-serif;
}

/* Dock: only while the inline host for this stretch is off screen. */
.host-dock,
.host-peek {
    position: fixed;
    z-index: 1900;
    inset-inline-start: 16px;
    bottom: calc(20px + env(safe-area-inset-bottom));
}

.host-dock {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto;
    align-items: end;
    gap: 0 2px;
    width: min(300px, calc(100vw - 32px));
    margin: 0;
    padding: 0;
    border: 0;
    pointer-events: none;
}

.host-dock[hidden],
.host-peek[hidden] {
    display: none !important;
}

.host-dock__fig {
    width: 78px;
    height: 104px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.host-dock__img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.4));
    user-select: none;
    -webkit-user-drag: none;
}

.host-dock__line {
    pointer-events: none;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--host-line, rgba(214, 173, 69, 0.42));
    border-radius: 4px 16px 16px 16px;
    background: rgba(17, 14, 8, 0.9);
    color: #f6f1e2;
    font-family: var(--font-en-header, Palatino, serif);
    font-size: 0.92rem;
    line-height: 1.4;
    box-shadow: 0 16px 28px -18px rgba(0, 0, 0, 0.9);
}

.host-dock__min,
.host-peek {
    pointer-events: auto;
    border: 1px solid rgba(214, 173, 69, 0.45);
    background: rgba(17, 14, 8, 0.92);
    color: var(--color-gold-highlight, #fbeea8);
    cursor: pointer;
}

.host-dock__min {
    align-self: start;
    width: 28px;
    height: 28px;
    margin-bottom: 14px;
    border-radius: 50%;
    font: inherit;
    font-size: 1.05rem;
    line-height: 1;
}

.host-dock__min:focus-visible,
.host-peek:focus-visible {
    outline: 2px solid var(--color-gold-main, #d6ad45);
    outline-offset: 2px;
}

.host-peek {
    width: 64px;
    height: 64px;
    padding: 0;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 12px 22px -12px rgba(0, 0, 0, 0.8);
}

.host-peek img {
    width: 100%;
    height: 130%;
    object-fit: cover;
    object-position: top center;
    transform: translateY(-4%);
}

@media (max-width: 900px) {
    .host {
        grid-template-columns: 96px minmax(0, 1fr);
        margin: 18px 0;
    }

    .host__body {
        width: 96px;
        height: 124px;
    }

    .host__line {
        font-size: 0.96rem;
    }

    .host--hero .host__body {
        width: 108px;
        height: 136px;
    }

    .host-dock,
    .host-peek {
        bottom: calc(74px + env(safe-area-inset-bottom));
    }

    body.has-order .host-dock,
    body.has-order .host-peek {
        bottom: calc(146px + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .host__img,
    .host-dock,
    .host-peek {
        animation: none !important;
        transition: none !important;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .host-dock {
        animation: host-dock-in 0.28s ease;
    }
}

@keyframes host-dock-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
