/* ============================================================
   THE AFFLUENT MAN — CONVERSION LAYER
   Sticky CTA bar · Concierge chat · AEO answer blocks · Paid landing page
   Extends style.css. Uses the same tokens; adds none of its own colours.
   ============================================================ */

:root {
    --taf-bar-h: 92px;          /* mobile sticky bar height (status strip + actions) */
    --taf-open: #3f9d5a;
    --taf-closed: #a8843a;
    --taf-z-sticky: 1040;
    --taf-z-chat: 1050;
}

/* ============================================================
   1. STICKY CONVERSION BAR
   ============================================================ */

.taf-sticky {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: var(--taf-z-sticky);
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(201, 162, 39, 0.35);
    padding-bottom: env(safe-area-inset-bottom, 0);
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.taf-sticky.is-visible { transform: translateY(0); }

/* Status strip — open/closed and the price anchor */
.taf-sticky-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 5px 14px;
    background: rgba(201, 162, 39, 0.1);
    border-bottom: 1px solid rgba(201, 162, 39, 0.16);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    text-align: center;
    line-height: 1.3;
}
.taf-status-price {
    color: var(--color-gold-light);
    font-weight: 700;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 8px;
}

.taf-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: var(--taf-closed);
}
.taf-sticky.is-open .taf-dot,
.taf-dot.on {
    background: var(--taf-open);
    box-shadow: 0 0 0 0 rgba(63, 157, 90, 0.7);
    animation: taf-pulse 2.4s infinite;
}
.taf-dot.off { background: var(--taf-closed); }

@keyframes taf-pulse {
    70%  { box-shadow: 0 0 0 7px rgba(63, 157, 90, 0); }
    100% { box-shadow: 0 0 0 0 rgba(63, 157, 90, 0); }
}

/* Actions */
.taf-sticky-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.taf-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 62px;
    padding: 9px 6px;
    color: rgba(255, 255, 255, 0.86);
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    text-align: center;
    transition: background 0.25s ease, color 0.25s ease;
}
.taf-cta:last-child { border-right: none; }
.taf-cta:hover,
.taf-cta:focus-visible { background: rgba(201, 162, 39, 0.16); color: #fff; }
.taf-cta:focus-visible { outline: 2px solid var(--color-gold-light); outline-offset: -3px; }

.taf-cta i { font-size: 1.05rem; color: var(--color-gold); }

.taf-cta-label {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.1;
}
.taf-cta-sub {
    font-size: 0.62rem;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* The clock-aware primary action */
.taf-cta.is-primary {
    background: var(--color-gold-gradient);
    color: var(--color-black);
}
.taf-cta.is-primary i { color: var(--color-black); }
.taf-cta.is-primary .taf-cta-sub { color: rgba(0, 0, 0, 0.62); }
.taf-cta.is-primary:hover,
.taf-cta.is-primary:focus-visible {
    background: var(--color-gold-light);
    color: var(--color-black);
}

/* Keep the footer clear of the bar on mobile */
@media (max-width: 991.98px) {
    body.has-sticky-cta { padding-bottom: calc(var(--taf-bar-h) + 26px); }
}

/* --- Desktop: slim dock, bottom-left (chat owns bottom-right) --- */
@media (min-width: 992px) {
    .taf-sticky {
        left: 28px;
        right: auto;
        bottom: 28px;
        width: auto;
        max-width: 420px;
        border: 1px solid rgba(201, 162, 39, 0.4);
        border-radius: 2px;
        box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
        transform: translateY(140%);
    }
    .taf-sticky.is-visible { transform: translateY(0); }

    .taf-sticky-status {
        justify-content: flex-start;
        text-align: left;
        padding: 7px 18px;
        font-size: 0.68rem;
    }

    .taf-sticky-actions { grid-template-columns: repeat(3, minmax(108px, 1fr)); }

    .taf-cta { min-height: 66px; padding: 10px 14px; }
    .taf-cta-sub { font-size: 0.64rem; }
}

/* Lift the existing back-to-top clear of the chat launcher */
.back-to-top { bottom: 104px; right: 28px; }
@media (max-width: 991.98px) {
    .back-to-top {
        bottom: calc(var(--taf-bar-h) + 92px);
        right: 18px;
        width: 42px; height: 42px;
    }
}

/* ============================================================
   2. CONCIERGE CHAT
   ============================================================ */

.taf-chat-launcher {
    position: fixed;
    right: 28px; bottom: 28px;
    z-index: var(--taf-z-chat);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px 13px 15px;
    background: var(--color-black);
    color: #fff;
    border: 1px solid rgba(201, 162, 39, 0.5);
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}
.taf-chat-launcher:hover {
    transform: translateY(-3px);
    border-color: var(--color-gold);
    box-shadow: 0 18px 46px rgba(201, 162, 39, 0.28);
}
.taf-chat-launcher:focus-visible { outline: 2px solid var(--color-gold-light); outline-offset: 3px; }
.taf-chat-launcher[aria-expanded="true"] { opacity: 0; pointer-events: none; }

.taf-chat-icon {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    background: var(--color-gold-gradient);
    color: var(--color-black);
    border-radius: 50%;
    font-size: 0.85rem;
    flex: 0 0 auto;
}
.taf-chat-badge {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 19px; height: 19px;
    display: grid; place-items: center;
    background: #c0392b;
    color: #fff;
    border-radius: 50%;
    font-size: 0.66rem;
    font-weight: 700;
}
.taf-chat-badge.is-hidden { display: none; }

@media (max-width: 991.98px) {
    .taf-chat-launcher {
        right: 16px;
        bottom: calc(var(--taf-bar-h) + 20px);
        padding: 11px 16px 11px 12px;
        font-size: 0.8rem;
    }
    .taf-chat-launcher-text { display: none; }
    .taf-chat-launcher { padding: 12px; border-radius: 50%; }
}

/* Panel */
.taf-chat-panel {
    position: fixed;
    right: 28px; bottom: 28px;
    z-index: calc(var(--taf-z-chat) + 1);
    width: min(380px, calc(100vw - 32px));
    max-height: min(620px, calc(100vh - 110px));
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(10, 10, 10, 0.12);
    border-radius: 4px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    transition: opacity 0.28s ease, transform 0.28s ease;
}
.taf-chat-panel.is-open { opacity: 1; transform: none; }

@media (max-width: 575.98px) {
    .taf-chat-panel {
        right: 8px; left: 8px;
        bottom: 8px;
        width: auto;
        max-height: calc(100vh - 80px);
    }
}

.taf-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 15px;
    background: var(--color-black);
    color: #fff;
    flex: 0 0 auto;
}
.taf-chat-identity { display: flex; align-items: center; gap: 11px; }
.taf-chat-avatar { border-radius: 50%; object-fit: cover; border: 1px solid rgba(201,162,39,0.55); }
.taf-chat-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.98rem;
    letter-spacing: 0.02em;
    color: #fff;
}
.taf-chat-sub {
    margin: 1px 0 0;
    display: flex; align-items: center; gap: 6px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.62);
}
.taf-chat-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
}
.taf-chat-close:hover { color: var(--color-gold); }
.taf-chat-close:focus-visible { outline: 2px solid var(--color-gold-light); outline-offset: 2px; }

/* Log */
.taf-chat-log {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 15px 6px;
    background: var(--color-cream);
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}
.taf-chat-log::-webkit-scrollbar { width: 5px; }
.taf-chat-log::-webkit-scrollbar-track { background: transparent; }
.taf-chat-log::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 3px; }

.taf-msg {
    max-width: 86%;
    padding: 10px 13px;
    font-size: 0.86rem;
    line-height: 1.55;
    border-radius: 3px;
    animation: taf-msg-in 0.3s ease both;
}
@keyframes taf-msg-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}
.taf-msg-bot {
    align-self: flex-start;
    background: #fff;
    color: #222;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-left: 2px solid var(--color-gold);
}
.taf-msg-user {
    align-self: flex-end;
    background: var(--color-black);
    color: #fff;
}
.taf-msg a { color: var(--color-gold-dark); text-decoration: underline; }
.taf-msg-user a { color: var(--color-gold-light); }

.taf-typing { display: flex; gap: 4px; align-self: flex-start; padding: 12px 14px; }
.taf-typing span {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--color-gold);
    animation: taf-bounce 1.2s infinite ease-in-out;
}
.taf-typing span:nth-child(2) { animation-delay: 0.15s; }
.taf-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes taf-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-5px); opacity: 1; }
}

/* Quick-reply chips */
.taf-chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 15px;
    background: var(--color-cream);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex: 0 0 auto;
}
.taf-chat-chips:empty { display: none; }
.taf-chip {
    background: #fff;
    border: 1px solid rgba(201, 162, 39, 0.5);
    color: #333;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
}
.taf-chip:hover { background: var(--color-gold); color: var(--color-black); border-color: var(--color-gold); }
.taf-chip:focus-visible { outline: 2px solid var(--color-gold-dark); outline-offset: 2px; }

/* Inline lead form inside the chat */
.taf-chat-leadform { display: grid; gap: 7px; margin-top: 4px; }
.taf-chat-leadform input {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 2px;
    font-size: 0.85rem;
    font-family: var(--font-sans);
}
.taf-chat-leadform input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.16);
}
.taf-chat-leadform button {
    background: var(--color-black);
    color: var(--color-gold);
    border: none;
    padding: 10px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}
.taf-chat-leadform button:hover { background: var(--color-gold); color: var(--color-black); }
.taf-chat-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Input row */
.taf-chat-input {
    display: flex;
    gap: 8px;
    padding: 11px 13px;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.09);
    flex: 0 0 auto;
}
.taf-chat-input input {
    flex: 1 1 auto;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 999px;
    padding: 9px 15px;
    font-size: 0.86rem;
    font-family: var(--font-sans);
}
.taf-chat-input input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}
.taf-chat-input button {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--color-gold-gradient);
    color: var(--color-black);
    cursor: pointer;
    transition: var(--transition);
}
.taf-chat-input button:hover { transform: scale(1.06); }
.taf-chat-input button:focus-visible { outline: 2px solid var(--color-black); outline-offset: 2px; }

.taf-chat-foot {
    margin: 0;
    padding: 8px 15px 11px;
    background: #fff;
    font-size: 0.72rem;
    color: #777;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.taf-chat-foot a { color: var(--color-gold-dark); font-weight: 700; }

/* ============================================================
   3. AEO ANSWER BLOCKS
   A short, quotable, self-contained answer near the top of a page.
   This is the block answer engines and voice assistants lift.
   ============================================================ */

.aeo-answer {
    background: var(--color-cream);
    border-left: 3px solid var(--color-gold);
    padding: 22px 26px;
    margin: 0 0 28px;
    max-width: 68ch;
}
.aeo-answer p { margin: 0; font-size: 1.04rem; line-height: 1.7; color: #2a2a2a; }
.aeo-answer p + p { margin-top: 12px; }
.aeo-answer strong { color: var(--color-black); }

.aeo-facts {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: grid;
    gap: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.aeo-facts li {
    display: grid;
    grid-template-columns: minmax(120px, 30%) 1fr;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    font-size: 0.92rem;
}
.aeo-facts dt, .aeo-facts .k {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #777;
    padding-top: 3px;
}
.aeo-facts .v { color: #222; }
@media (max-width: 575.98px) {
    .aeo-facts li { grid-template-columns: 1fr; gap: 2px; }
}

/* FAQ accordion */
.accordion-luxury { max-width: 820px; }
.accordion-luxury .accordion-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
.accordion-luxury .accordion-button {
    background: transparent;
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--color-black);
    padding: 20px 44px 20px 0;
    box-shadow: none;
}
.accordion-luxury .accordion-button:not(.collapsed) { color: var(--color-gold-dark); background: transparent; }
.accordion-luxury .accordion-button:focus { box-shadow: none; border-color: transparent; }
.accordion-luxury .accordion-button:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }
.accordion-luxury .accordion-button::after {
    background-image: none;
    content: "\002B";
    font-family: system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
    color: var(--color-gold);
    transform: none;
    width: auto; height: auto;
    position: absolute; right: 6px;
}
.accordion-luxury .accordion-button:not(.collapsed)::after { content: "\2212"; }
.accordion-luxury .accordion-body {
    padding: 0 0 22px;
    color: #444;
    font-size: 0.98rem;
    line-height: 1.75;
    max-width: 68ch;
}

/* ============================================================
   4. PAID-SEARCH LANDING PAGE
   ============================================================ */

.lp-hero {
    position: relative;
    background:
        linear-gradient(rgba(10,10,10,0.82), rgba(10,10,10,0.9)),
        url('/assets/images/img3.jpeg') center/cover no-repeat;
    color: #fff;
    padding: 132px 0 64px;
}
.lp-hero .lp-eyebrow {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 18px;
}
.lp-hero h1 {
    font-size: clamp(2.1rem, 5.2vw, 3.6rem);
    color: #fff;
    margin-bottom: 18px;
    text-wrap: balance;
}
.lp-hero h1 .gold { color: var(--color-gold); }
.lp-lede {
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 56ch;
    margin-bottom: 26px;
}

.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }

.lp-btn-call, .lp-btn-book {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 30px;
    font-family: var(--font-sans);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: var(--transition);
}
.lp-btn-call {
    background: var(--color-gold-gradient);
    color: var(--color-black);
    box-shadow: var(--shadow-gold);
}
.lp-btn-call:hover { transform: translateY(-3px); color: var(--color-black); }
.lp-btn-book {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}
.lp-btn-book:hover { border-color: var(--color-gold); color: var(--color-gold); }
.lp-btn-call:focus-visible, .lp-btn-book:focus-visible {
    outline: 2px solid var(--color-gold-light); outline-offset: 3px;
}

.lp-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
}
.lp-trust span { display: inline-flex; align-items: center; gap: 7px; }
.lp-trust i { color: var(--color-gold); }

.lp-price-tag {
    display: inline-block;
    background: rgba(201, 162, 39, 0.14);
    border: 1px solid rgba(201, 162, 39, 0.5);
    color: var(--color-gold-light);
    font-family: var(--font-sans);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 9px 18px;
    margin-bottom: 22px;
}

/* Drive-time strip — removes the "that's too far" objection */
.lp-drivetimes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
}
.lp-drivetimes div {
    padding: 18px 14px;
    text-align: center;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}
.lp-drivetimes div:last-child { border-right: none; }
.lp-drivetimes .city {
    display: block;
    font-family: var(--font-display);
    font-size: 1.02rem;
    color: var(--color-black);
    margin-bottom: 3px;
}
.lp-drivetimes .time {
    display: block;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-gold-dark);
    font-weight: 700;
}

/* Numbered process — the order genuinely matters here */
.lp-steps { counter-reset: lp; display: grid; gap: 0; max-width: 780px; }
.lp-steps li {
    counter-increment: lp;
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    list-style: none;
}
.lp-steps li::before {
    content: counter(lp, decimal-leading-zero);
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-gold);
    line-height: 1;
}
.lp-steps h3 { font-size: 1.1rem; margin-bottom: 5px; }
.lp-steps p { margin: 0; color: #555; }

@media print {
    .taf-sticky, .taf-chat-launcher, .taf-chat-panel { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .taf-sticky, .taf-chat-panel, .taf-msg, .taf-dot, .taf-typing span {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================================
   5. NAV CALL LINK
   ============================================================ */

.nav-call {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.86rem !important;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.nav-call i { font-size: 0.78rem; color: var(--color-gold); }
@media (max-width: 1199.98px) and (min-width: 992px) {
    .nav-call { font-size: 0.78rem !important; }
}

.mobile-contact a { color: rgba(255, 255, 255, 0.72); }
.mobile-contact a:hover { color: var(--color-gold); }
