:root {
    --ink: #242424;
    --muted: #68645e;
    --paper: #f4efe4;
    --paper-light: #fffdf8;
    --folder: #d7b978;
    --folder-dark: #ad8a48;
    --office: #dfddd5;
    --green: #506b58;
    --border: rgba(36, 36, 36, 0.16);
    --shadow: 0 18px 50px rgba(35, 31, 25, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, sans-serif;
    color: var(--ink);
    background:
        linear-gradient(
            90deg,
            rgba(0,0,0,.018) 1px,
            transparent 1px
        ),
        var(--office);
    background-size: 26px 26px;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

.page-shell {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.topbar {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 28px;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-right: auto;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: white;
    border-radius: 6px;
    font-family: "Roboto Slab", serif;
    font-weight: 700;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    margin-top: 3px;
}

nav {
    display: flex;
    gap: 22px;
}

nav a {
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
}

.status-pill {
    padding: 9px 13px;
    background: var(--paper-light);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .78rem;
    white-space: nowrap;
}

.status-pill span,
.chat-header i {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4f8a5b;
    border-radius: 50%;
    margin-right: 6px;
}

.hero {
    display: grid;
    grid-template-columns: 1fr .92fr;
    gap: 56px;
    align-items: center;
    padding: 72px 0 82px;
}

.eyebrow {
    display: block;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 14px;
}

h1,
h2,
h3 {
    font-family: "Roboto Slab", serif;
}

h1 {
    font-size: clamp(2.6rem, 5vw, 4.8rem);
    line-height: 1.02;
    margin: 0 0 22px;
}

.hero-text {
    max-width: 650px;
    line-height: 1.75;
    color: var(--muted);
    font-size: 1.05rem;
}

.hr-quote {
    margin: 28px 0;
    padding: 18px 20px;
    background: var(--paper-light);
    border-left: 5px solid var(--ink);
    box-shadow: var(--shadow);
    font-family: "Roboto Slab", serif;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    display: inline-block;
    padding: 13px 19px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
}

.button.primary {
    background: var(--ink);
    color: white;
}

.button.secondary {
    background: var(--paper-light);
    border: 1px solid var(--border);
}

.mini-stats {
    display: flex;
    gap: 32px;
    margin-top: 34px;
}

.mini-stats strong,
.mini-stats span {
    display: block;
}

.mini-stats span {
    margin-top: 4px;
    color: var(--muted);
    font-size: .75rem;
}

.hero-art-wrap {
    position: relative;
    padding: 14px;
    background: var(--paper-light);
    box-shadow: var(--shadow);
    transform: rotate(1deg);
}

.hero-art {
    display: block;
    width: 100%;
}

.office-stamp {
    position: absolute;
    z-index: 2;
    top: 24px;
    right: 22px;
    padding: 7px 10px;
    border: 3px solid rgba(135, 45, 40, .65);
    color: rgba(135, 45, 40, .78);
    font-weight: 800;
    transform: rotate(8deg);
}

.art-plaque {
    padding: 18px 10px 8px;
}

.art-plaque span,
.art-plaque strong,
.art-plaque small {
    display: block;
}

.art-plaque strong {
    font-family: "Roboto Slab", serif;
    font-size: 1.5rem;
    margin: 3px 0;
}

.art-plaque span,
.art-plaque small {
    color: var(--muted);
}

.office-section,
.services-section,
.about-section {
    padding: 76px 0;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 32px;
}

.section-heading h2,
.about-copy h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin: 0 0 12px;
}

.section-heading p,
.about-copy p {
    line-height: 1.75;
    color: var(--muted);
}

.chat-card {
    background: var(--paper-light);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid var(--border);
}

.avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: white;
    border-radius: 50%;
    font-weight: 800;
}

.chat-header strong,
.chat-header span {
    display: block;
}

.chat-header span {
    color: var(--muted);
    font-size: .78rem;
    margin-top: 3px;
}

.chat-controls {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-button {
    padding: 9px 12px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

#voice-toggle.voice-on {
    background: var(--ink);
    color: white;
}


.chat-messages {
    min-height: 360px;
    max-height: 560px;
    overflow-y: auto;
    padding: 24px;
}

.message {
    margin-bottom: 20px;
}

.message-name {
    font-size: .72rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.bubble {
    width: fit-content;
    max-width: 78%;
    padding: 13px 16px;
    line-height: 1.55;
    border-radius: 7px;
    background: #ece9e1;
    white-space: pre-wrap;
}

.message.user .bubble {
    margin-left: auto;
    background: var(--ink);
    color: white;
}

.message.user .message-name {
    text-align: right;
}

.suggestions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 18px 16px;
}

.suggestions button {
    border: 1px solid var(--border);
    background: var(--paper);
    padding: 8px 11px;
    border-radius: 999px;
    cursor: pointer;
}

.chat-form {
    display: flex;
    gap: 10px;
    padding: 18px;
    border-top: 1px solid var(--border);
}

textarea {
    flex: 1;
    min-width: 0;
    resize: vertical;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font: inherit;
    color: var(--ink);
    background: white;
}

textarea::placeholder {
    color: #827d74;
}

.send-button {
    padding: 0 20px;
    border: 0;
    border-radius: 5px;
    background: var(--ink);
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.chat-footer {
    display: flex;
    justify-content: space-between;
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: .75rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.service-grid article {
    background: var(--paper-light);
    padding: 24px;
    border: 1px solid var(--border);
}

.service-grid article > span {
    color: var(--folder-dark);
    font-weight: 800;
}

.service-grid h3 {
    margin: 12px 0;
}

.service-grid p {
    color: var(--muted);
    line-height: 1.6;
}

.about-section {
    display: grid;
    grid-template-columns: .85fr 1fr;
    gap: 58px;
    align-items: center;
}

.personnel-file {
    background: var(--folder);
    padding: 42px 18px 18px;
    position: relative;
    box-shadow: var(--shadow);
    transform: rotate(-1deg);
}

.file-tab {
    position: absolute;
    top: -17px;
    left: 22px;
    background: var(--folder);
    padding: 10px 22px;
    font-size: .75rem;
    font-weight: 800;
}

.file-content {
    background: var(--paper-light);
    padding: 28px;
}

.file-content h2 {
    font-size: 2.4rem;
}

dl {
    margin: 0;
}

dl div {
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

dt {
    font-size: .72rem;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

dd {
    margin: 4px 0 0;
    font-weight: 600;
}

.traits {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 22px 0;
}

.traits span {
    padding: 7px 10px;
    border: 1px solid var(--border);
    background: var(--paper-light);
    border-radius: 4px;
    font-size: .8rem;
}

blockquote {
    margin: 26px 0 0;
    padding: 18px;
    background: var(--paper-light);
    border-left: 5px solid var(--folder-dark);
    font-family: "Roboto Slab", serif;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 32px 0 46px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: .82rem;
}

footer strong,
footer span {
    display: block;
}

footer strong {
    color: var(--ink);
    margin-bottom: 5px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

@media (max-width: 900px) {
    .hero,
    .about-section {
        grid-template-columns: 1fr;
    }

    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    nav {
        display: none;
    }
}

@media (max-width: 600px) {
    .page-shell {
        width: min(100% - 22px, 1180px);
    }

    .topbar {
        gap: 10px;
    }

    .status-pill {
        display: none;
    }

    .hero {
        padding-top: 42px;
    }

    .mini-stats {
        gap: 15px;
        justify-content: space-between;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .chat-form {
        flex-direction: column;
    }

    .send-button {
        min-height: 46px;
    }

    .bubble {
        max-width: 92%;
    }

    .chat-footer,
    footer {
        flex-direction: column;
    }
}


/* =========================================================
   Zeeb Mobile Chat Mode v1
   ========================================================= */

.exit-chat-button {
    display: none;
}

@media (max-width: 600px) {

    body.zeeb-mobile-chat-open {
        overflow: hidden;
    }

    body.zeeb-mobile-chat-open .chat-card {
        position: fixed;
        inset: 0;
        z-index: 10000;

        width: 100%;
        height: 100vh;
        height: 100dvh;

        display: flex;
        flex-direction: column;

        border: 0;
        border-radius: 0;
        box-shadow: none;

        background: var(--paper-light);
    }

    body.zeeb-mobile-chat-open .chat-header {
        flex: 0 0 auto;
        gap: 10px;
        padding: 10px 12px;
        background: var(--paper-light);
        border-bottom: 1px solid var(--border);
    }

    body.zeeb-mobile-chat-open .avatar {
        width: 56px;
        height: 56px;
        flex: 0 0 auto;
    }

    body.zeeb-mobile-chat-open .chat-header > div:nth-child(2) {
        min-width: 0;
        flex: 1 1 auto;
    }

    body.zeeb-mobile-chat-open .chat-header span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.zeeb-mobile-chat-open .chat-controls {
        flex: 0 0 auto;
        display: grid;
        grid-template-columns: auto auto;
        gap: 6px;
    }

    body.zeeb-mobile-chat-open #voice-toggle {
        grid-column: 1 / -1;
    }

    body.zeeb-mobile-chat-open .chat-controls .icon-button {
        margin: 0;
        padding: 7px 9px;
        white-space: nowrap;
        font-size: .75rem;
    }

    body.zeeb-mobile-chat-open .exit-chat-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body.zeeb-mobile-chat-open .chat-messages {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;

        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;

        padding: 16px 12px;
    }

    body.zeeb-mobile-chat-open .message {
        margin-bottom: 14px;
    }

    body.zeeb-mobile-chat-open .bubble {
        max-width: 94%;
        padding: 12px 14px;
    }

    body.zeeb-mobile-chat-open .message.user .bubble {
        max-width: 88%;
    }

    body.zeeb-mobile-chat-open .suggestions {
        flex: 0 0 auto;
        flex-wrap: nowrap;

        overflow-x: auto;
        -webkit-overflow-scrolling: touch;

        gap: 8px;
        padding: 8px 12px;

        scrollbar-width: none;
    }

    body.zeeb-mobile-chat-open .suggestions::-webkit-scrollbar {
        display: none;
    }

    body.zeeb-mobile-chat-open .suggestions button {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    body.zeeb-mobile-chat-open .chat-form {
        flex: 0 0 auto;
        flex-direction: row;
        align-items: stretch;

        gap: 8px;
        padding: 10px 12px;

        background: var(--paper-light);
        border-top: 1px solid var(--border);
    }

    body.zeeb-mobile-chat-open .chat-form textarea {
        min-width: 0;
        min-height: 48px;
        max-height: 110px;
        resize: none;
    }

    body.zeeb-mobile-chat-open .send-button {
        min-width: 76px;
        min-height: 48px;
        padding: 0 14px;
    }

    body.zeeb-mobile-chat-open .chat-footer {
        flex: 0 0 auto;
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;

        padding: 6px 12px 10px;
        font-size: .7rem;
    }

    body.zeeb-mobile-chat-open .chat-footer span:last-child {
        display: none;
    }
}




/* =========================================================
   Zeeb Live Avatar Cam
   Replaces the Z while Zeeb is speaking.
   ========================================================= */

.zeeb-avatar {
    position: relative;
    overflow: hidden;
}

.zeeb-avatar-letter {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;

    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    position: relative;
    z-index: 2;
}

.zeeb-avatar-cam {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    border-radius: inherit;
}

.zeeb-avatar.is-live .zeeb-avatar-letter {
    display: none;
}

.zeeb-avatar.is-live .zeeb-avatar-cam {
    display: block;
}

/*
 * Enlarge the avatar while the live cam is active.
 * No pulse or animation.
 */
.zeeb-avatar.is-live {
    width: 164px;
    height: 164px;
    flex: 0 0 164px;

    border-radius: 12px;
}

@media (max-width: 680px) {
    .zeeb-avatar.is-live {
        width: 136px;
        height: 136px;
        flex-basis: 136px;
    }
}


/* Keep the normal Z visible inside Zeeb's avatar. */
.chat-header .zeeb-avatar-letter {
    display: none;
}

.chat-header .zeeb-avatar.is-live .zeeb-avatar-letter {
    display: none;
}


/* =========================================================
   FIA Character Handoff System Messages
   ========================================================= */

.message.handoff-system {
    width: 100%;
    margin: 8px 0 20px;
    text-align: center;
}

.message.handoff-system .message-name {
    margin: 0 0 6px;
    text-align: center;
    font-size: .65rem;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.message.handoff-system .bubble {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;
    max-width: 100%;
    padding: 0;

    border: 0;
    background: transparent;

    font-size: .82rem;
    font-style: italic;
    opacity: .72;
}

.message.handoff-system .bubble::before,
.message.handoff-system .bubble::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.message.handoff-system .bubble p {
    margin: 0;
    white-space: nowrap;
}
