:root {
    --mtt-gold: #d6b83f;
    --mtt-gold-dark: #b69925;
    --mtt-ink: #151515;
    --mtt-cream: #f8f4eb;
    --mtt-white: #fff;
}

.mtt-sophie-hero,
.mtt-sophie-hero * { box-sizing: border-box; }

.mtt-sophie-hero {
    position: relative;
    width: 100% !important;
    isolation: isolate;
    min-height: clamp(650px, calc(100vh - 205px), 790px);
    overflow: hidden;
    color: var(--mtt-white);
    background: #2c3c45 url('../images/mtt-sophie/hero-background.webp') center center / cover no-repeat;
    font-family: "Raleway", Arial, sans-serif;
}

.mtt-sophie-hero__shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(5, 12, 16, .62) 0%, rgba(5, 12, 16, .38) 34%, rgba(5, 12, 16, .08) 63%, rgba(5, 12, 16, .02) 100%),
        linear-gradient(0deg, rgba(5, 12, 16, .1), transparent 45%);
}

.mtt-sophie-hero__inner {
    width: min(1510px, calc(100% - 64px));
    min-height: inherit;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(430px, .92fr) minmax(580px, 1.08fr);
    align-items: center;
    gap: clamp(28px, 4vw, 72px);
    padding: 54px 0 30px;
}

.mtt-sophie-hero__copy {
    z-index: 3;
    max-width: 660px;
    padding-bottom: 34px;
}

.mtt-sophie-hero__eyebrow {
    margin: 0 0 13px;
    color: #f0d54b;
    font-size: clamp(14px, 1.1vw, 18px);
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.mtt-sophie-hero h1 {
    margin: 0 0 14px;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(49px, 4.25vw, 74px);
    line-height: .98;
    font-weight: 700;
    letter-spacing: -.035em;
    text-shadow: 0 3px 18px rgba(0, 0, 0, .35);
}

.mtt-sophie-hero__intro {
    max-width: 620px;
    margin: 0 0 22px;
    color: #fff !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(18px, 1.35vw, 23px);
    line-height: 1.37;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}

.mtt-sophie-hero__cta {
    width: min(100%, 365px);
    min-height: 59px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 27px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 7px;
    color: #151515 !important;
    background: linear-gradient(135deg, #f0cf49, #d0ad2d);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
    font-size: 20px;
    font-weight: 800;
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.mtt-sophie-hero__cta:hover,
.mtt-sophie-hero__cta:focus-visible {
    color: #111 !important;
    transform: translateY(-2px);
    box-shadow: 0 15px 38px rgba(0, 0, 0, .34);
    filter: brightness(1.04);
}

.mtt-sophie-hero__help {
    margin: 12px 0 3px;
    color: #fff !important;
    font-size: 16px;
}

.mtt-sophie-hero__help button {
    margin: 0;
    padding: 0;
    border: 0;
    color: #fff;
    background: transparent;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.mtt-sophie-hero__phone {
    display: inline-block;
    color: #fff !important;
    font-size: 17px;
    text-decoration: underline !important;
    text-underline-offset: 4px;
}

.mtt-sophie-trust {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.mtt-sophie-trust li {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 22px;
    border-left: 1px solid rgba(255, 255, 255, .62);
    font-size: 14px;
    line-height: 1.25;
    font-weight: 700;
}

.mtt-sophie-trust li:first-child { padding-left: 0; border-left: 0; }
.mtt-sophie-trust__icon { flex: 0 0 42px; color: #f0d54b; }
.mtt-sophie-trust svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.mtt-sophie-hero__guide {
    align-self: stretch;
    position: relative;
    min-height: 620px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.mtt-sophie-hero__portrait {
    position: absolute;
    z-index: 1;
    width: min(620px, 82%);
    height: auto;
    top: 6px;
    right: 2%;
    filter: drop-shadow(0 22px 28px rgba(0, 0, 0, .28));
    pointer-events: none;
    user-select: none;
}

.mtt-sophie-card {
    position: relative;
    z-index: 2;
    width: min(610px, 100%);
    margin: 0 1.5% 20px auto;
    padding: 20px 25px 16px;
    border: 1px solid rgba(202, 174, 133, .48);
    border-radius: 16px;
    color: var(--mtt-ink);
    background: rgba(255, 253, 249, .97);
    box-shadow: 0 22px 55px rgba(17, 22, 23, .3);
    backdrop-filter: blur(9px);
}

.mtt-sophie-card__heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mtt-sophie-card h2 { margin: 0; color: #121212; font-family: Georgia, "Times New Roman", serif; font-size: 30px; line-height: 1; font-weight: 500; }
.mtt-sophie-card__heading p { margin: 5px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: 17px; }
.mtt-sophie-card__rule { width: 40px; height: 2px; margin: 11px 0 9px; background: var(--mtt-gold); }
.mtt-sophie-card__question { margin: 0 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.25; }
.mtt-sophie-card__back { display: none; margin: -3px 0 9px; padding: 0; border: 0; color: #78641d; background: transparent; font-size: 12px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.mtt-sophie-card.is-chatting .mtt-sophie-card__back { display: inline-block; }

.mtt-sophie-card__sound,
.mtt-sophie-card__expand,
.mtt-sophie-card__close,
.mtt-sophie-card__mic,
.mtt-sophie-card__send {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mtt-sophie-card__sound { width: 34px; height: 34px; color: #8d7521; border-radius: 50%; }
.mtt-sophie-card__controls { display: flex; align-items: center; gap: 3px; }
.mtt-sophie-card__expand,
.mtt-sophie-card__close { display: none; min-height: 34px; color: #6b5a25; border-radius: 999px; }
.mtt-sophie-card__expand { width: auto; padding: 0 11px; border: 1px solid #d8c98f; font-size: 12px; font-weight: 700; }
.mtt-sophie-card__close { width: 34px; padding: 0; }
.mtt-sophie-card.is-chatting .mtt-sophie-card__expand,
.mtt-sophie-card.is-chatting .mtt-sophie-card__close { display: inline-grid; }
.mtt-sophie-card__sound:hover,
.mtt-sophie-card__expand:hover,
.mtt-sophie-card__close:hover { background: #f2ebda; }
.mtt-sophie-card__sound svg,
.mtt-sophie-card__expand svg,
.mtt-sophie-card__close svg,
.mtt-sophie-card__mic svg,
.mtt-sophie-card__send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.mtt-sophie-card__choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.mtt-sophie-card.is-chatting .mtt-sophie-card__choices { display: none; }
.mtt-sophie-card__choices button {
    min-height: 37px;
    padding: 7px 10px;
    border: 1px solid #dccfbf;
    border-radius: 999px;
    color: #2a2926;
    background: #f9f6f1;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.mtt-sophie-card__choices button:hover,
.mtt-sophie-card__choices button:focus-visible { border-color: var(--mtt-gold-dark); background: #f6edcf; transform: translateY(-1px); }

.mtt-sophie-card__conversation {
    max-height: 118px;
    margin: 0 0 10px;
    padding: 9px;
    overflow-y: auto;
    border: 1px solid #e7ded2;
    border-radius: 11px;
    background: #fff;
    font-size: 13px;
    line-height: 1.4;
}
.mtt-sophie-hero.has-active-chat {
    z-index: 99990;
    overflow: visible;
}
.mtt-sophie-card.is-chatting:not(.is-expanded) {
    position: fixed;
    z-index: 99991;
    right: 24px;
    bottom: 24px;
    width: min(610px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    margin: 0;
}
.mtt-sophie-card.is-expanded {
    position: fixed;
    z-index: 100001;
    top: 50%;
    left: 50%;
    width: min(820px, calc(100vw - 32px));
    max-height: 90vh;
    margin: 0;
    padding: 26px 30px 22px;
    transform: translate(-50%, -50%);
}
.mtt-sophie-card.is-expanded .mtt-sophie-card__conversation { max-height: 52vh; padding: 15px; font-size: 16px; line-height: 1.55; }
.mtt-sophie-card.is-expanded .mtt-sophie-card__form { min-height: 60px; }
.mtt-sophie-hero.has-expanded-chat { z-index: 100000; overflow: visible; }
.mtt-sophie-hero.has-expanded-chat::after { content: ""; position: fixed; z-index: 100000; inset: 0; background: rgba(8, 13, 16, .68); }
body.mtt-sophie-chat-open { overflow: hidden !important; }
.mtt-sophie-message { max-width: 88%; margin: 0 0 7px; padding: 7px 10px; border-radius: 10px; }
.mtt-sophie-message--assistant { white-space: pre-line; }
.mtt-sophie-message--assistant p { margin: 0 0 9px; }
.mtt-sophie-message--assistant p:last-child { margin-bottom: 0; }
.mtt-sophie-itinerary {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 14px;
    margin: 8px 0;
    padding: 11px 13px;
    border: 1px solid #dbc778;
    border-radius: 10px;
    color: #25231d !important;
    background: linear-gradient(135deg, #fffdf7, #f6edcf);
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgba(83, 69, 24, .08);
}
.mtt-sophie-itinerary strong { grid-column: 1 / -1; font-size: 14px; }
.mtt-sophie-itinerary span { color: #655925; font-size: 12px; }
.mtt-sophie-itinerary b { color: #806817; font-size: 12px; text-align: right; }
.mtt-sophie-itinerary:hover { border-color: #ae8e20; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(83, 69, 24, .14); }
.mtt-sophie-message:last-child { margin-bottom: 0; }
.mtt-sophie-message--user { margin-left: auto; background: #f4e9bd; }
.mtt-sophie-message--assistant { background: #f0f2f3; }
.mtt-sophie-message.is-pending { display: flex; align-items: center; gap: 9px; color: #555; }
.mtt-sophie-typing { display: inline-flex; align-items: center; gap: 3px; }
.mtt-sophie-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9b842c; animation: mtt-typing 1.1s infinite ease-in-out; }
.mtt-sophie-typing i:nth-child(2) { animation-delay: .15s; }
.mtt-sophie-typing i:nth-child(3) { animation-delay: .3s; }
.mtt-sophie-retry { display: block; margin: 9px 0 0; padding: 7px 12px; border: 1px solid #b69925; border-radius: 999px; color: #5f501d; background: #fffaf0; font-weight: 700; cursor: pointer; }

.mtt-sophie-card__form {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 5px 4px 15px;
    border: 1px solid #d9cdbd;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 13px rgba(0, 0, 0, .05);
}
.mtt-sophie-card__form:focus-within { border-color: var(--mtt-gold-dark); box-shadow: 0 0 0 3px rgba(214, 184, 63, .18); }
.mtt-sophie-card__form input { min-width: 0; flex: 1; border: 0 !important; outline: 0 !important; padding: 0 !important; color: #222; background: transparent !important; font-size: 14px; box-shadow: none !important; }
.mtt-sophie-card__form input::placeholder { color: #777; }
.mtt-sophie-card__mic { width: 37px; height: 37px; color: #174f8c; border-radius: 50%; }
.mtt-sophie-card__mic.is-listening { color: #fff; background: #a62c2c; animation: mtt-pulse 1.2s infinite; }
.mtt-sophie-card__send { width: 43px; height: 43px; color: #fff; border-radius: 50%; background: linear-gradient(145deg, #d0b447, #ae8e20); }
.mtt-sophie-card__send:hover { filter: brightness(1.08); }
.mtt-sophie-card__notice { margin: 11px 0 0; color: #737373; font-size: 11px; line-height: 1.35; font-style: italic; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

@keyframes mtt-pulse { 50% { box-shadow: 0 0 0 6px rgba(166, 44, 44, .18); } }
@keyframes mtt-typing { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 1180px) {
    .mtt-sophie-hero__inner { width: min(1120px, calc(100% - 38px)); grid-template-columns: .92fr 1.08fr; gap: 20px; }
    .mtt-sophie-hero h1 { font-size: clamp(45px, 5vw, 61px); }
    .mtt-sophie-hero__portrait { width: min(560px, 92%); right: -3%; }
    .mtt-sophie-trust li { padding: 0 13px; font-size: 12px; }
}

@media (max-width: 900px) {
    .mtt-sophie-hero { min-height: auto; background-position: 38% center; }
    .mtt-sophie-hero__shade { background: linear-gradient(90deg, rgba(5, 12, 16, .84), rgba(5, 12, 16, .42)), linear-gradient(0deg, rgba(5, 12, 16, .48), transparent 50%); }
    .mtt-sophie-hero__inner { width: min(720px, calc(100% - 32px)); display: block; padding: 50px 0 28px; }
    .mtt-sophie-hero__copy { max-width: 610px; padding: 0; }
    .mtt-sophie-hero__guide { min-height: 620px; margin-top: 20px; }
    .mtt-sophie-hero__portrait { width: min(570px, 88%); top: 0; right: 2%; }
    .mtt-sophie-card { margin: 0 auto 10px; }
}

@media (max-width: 590px) {
    .mtt-sophie-hero { background-position: 35% center; }
    .mtt-sophie-hero__inner { width: calc(100% - 24px); padding-top: 36px; }
    .mtt-sophie-hero__eyebrow { font-size: 12px; letter-spacing: .14em; }
    .mtt-sophie-hero h1 { font-size: clamp(41px, 12vw, 53px); }
    .mtt-sophie-hero__intro { font-size: 17px; }
    .mtt-sophie-trust { flex-wrap: wrap; row-gap: 18px; }
    .mtt-sophie-trust li { width: 50%; padding: 0 10px; border: 0; }
    .mtt-sophie-trust li:first-child { padding-left: 10px; }
    .mtt-sophie-hero__guide { min-height: 590px; margin-left: -4px; margin-right: -4px; }
    .mtt-sophie-hero__portrait { width: 112%; max-width: 540px; top: 10px; right: -7%; }
    .mtt-sophie-card { width: 100%; padding: 17px 14px 14px; border-radius: 14px; }
    .mtt-sophie-card.is-chatting:not(.is-expanded) { right: 10px; bottom: 10px; width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
    .mtt-sophie-card h2 { font-size: 26px; }
    .mtt-sophie-card__heading p { font-size: 15px; }
    .mtt-sophie-card__question { font-size: 17px; }
    .mtt-sophie-card__choices { grid-template-columns: 1fr; gap: 7px; }
    .mtt-sophie-card__choices button { min-height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
    .mtt-sophie-hero *, .mtt-sophie-hero *::before, .mtt-sophie-hero *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
