/* Homepage chat-to-page demonstration. Kept separate from the base stylesheet
   so the animated hero cannot accidentally restyle checkout chat. */
.home-chat-hero {
    padding: clamp(2.5rem, 6vw, 5rem) 0;
    text-align: left;
}

.home-chat-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(400px, 1fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4.5rem);
    max-width: 1220px;
}

.home-chat-copy {
    container-type: inline-size;
}

.home-chat-copy .hero-eyebrow,
.home-chat-copy h1,
.home-chat-copy .hero-sub {
    text-align: left;
}

.home-chat-copy h1 {
    font-size: clamp(2.15rem, 8.8cqi, 3.1rem);
    line-height: 1.02;
    letter-spacing: -2.4px;
    margin: 0 0 1.2rem;
    max-width: none;
}

.home-chat-headline-line {
    display: block;
    white-space: nowrap;
}

.home-chat-word {
    display: inline-grid;
    overflow: hidden;
    vertical-align: baseline;
    justify-items: start;
    line-height: 1.18;
    padding: 0.08em 0.05em 0.22em 0;
    margin: -0.08em 0 -0.1em;
}

.home-chat-word > span {
    grid-area: 1 / 1;
    font-family: "Libre Franklin", Arial, sans-serif;
    font-style: italic;
    line-height: 1.18;
    padding-bottom: 0.08em;
}

.home-chat-word > span.is-out {
    animation: homeChatWordOut 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-chat-word > span.is-in {
    animation: homeChatWordIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-chat-page-highlight {
    position: relative;
    z-index: 1;
    display: inline-block;
    white-space: nowrap;
}

.home-chat-page-highlight::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: -0.07em;
    right: -0.07em;
    bottom: 0.04em;
    height: 42%;
    border-radius: 2px;
    background: var(--tkkt-pink-hi-strong);
    transform: rotate(-0.5deg);
}

@keyframes homeChatWordOut {
    to { transform: translateY(-108%); opacity: 0; }
}

@keyframes homeChatWordIn {
    from { transform: translateY(108%); opacity: 0; }
    to { transform: none; opacity: 1; }
}

.home-chat-copy .hero-sub {
    max-width: 470px;
    margin: 0 0 1.25rem;
    font-size: 1.08rem;
}

.home-chat-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1.15rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.65rem;
    font-family: var(--tkkt-font-mono);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--tkkt-gray-600);
}

.home-chat-trust li {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

.home-chat-trust li::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00a84f;
    flex: none;
}

.home-chat-copy .hero-ctas {
    justify-content: flex-start;
}

.home-chat-copy .hero-login-hint {
    text-align: left;
}

.home-chat-stage {
    height: min(72vh, 650px);
    min-height: 580px;
    border: 1px solid var(--tkkt-gray-200);
    background: var(--tkkt-white);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 18px 55px rgba(17, 17, 17, 0.08);
    pointer-events: none;
    user-select: none;
}

.home-chat-stage-top {
    min-height: 42px;
    padding: 0.65rem 1rem;
    background: var(--tkkt-ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--tkkt-font-mono);
    font-size: 0.62rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.home-chat-stage-top b {
    font-family: var(--tkkt-font-display);
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.home-chat-main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.home-chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: hidden;
    padding: 1.1rem 1rem 0.55rem;
    scrollbar-width: none;
}

.home-chat-messages::-webkit-scrollbar {
    display: none;
}

.home-chat-log {
    display: flex;
    flex-direction: column;
}

.home-chat-message {
    min-width: 0;
    margin-bottom: 1rem;
    animation: homeChatFade 0.25s ease;
}

@keyframes homeChatFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.home-chat-message.is-user {
    align-self: flex-end;
    max-width: 86%;
    padding: 0.6rem 0.8rem;
    background: var(--tkkt-gray-100);
    border: 1px solid var(--tkkt-gray-200);
    font-size: 0.88rem;
    line-height: 1.55;
}

.home-chat-sender {
    margin-bottom: 0.25rem;
    font-family: var(--tkkt-font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--tkkt-gray-400);
}

.home-chat-message-content {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--tkkt-ink);
}

.home-chat-caret {
    display: inline-block;
    width: 0.42em;
    height: 0.9em;
    margin-left: 0.1em;
    vertical-align: text-bottom;
    background: var(--tkkt-ink);
    animation: homeChatCaret 1s steps(2, start) infinite;
}

@keyframes homeChatCaret {
    to { visibility: hidden; }
}

.home-chat-thinking {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.home-chat-thinking-dots {
    display: flex;
    gap: 4px;
    padding: 0.55rem 0.7rem;
    background: var(--tkkt-gray-100);
}

.home-chat-thinking-dots span {
    width: 7px;
    height: 7px;
    background: var(--tkkt-gray-400);
    animation: homeChatThinking 1.2s ease-in-out infinite;
}

.home-chat-thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.home-chat-thinking-dots span:nth-child(3) { animation-delay: 0.3s; }

.home-chat-thinking-label {
    font-family: var(--tkkt-font-mono);
    font-size: 0.64rem;
    color: var(--tkkt-gray-400);
}

@keyframes homeChatThinking {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.home-chat-page {
    margin: 0.25rem 0 1rem;
    animation: homeChatPageIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes homeChatPageIn {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to { opacity: 1; transform: none; }
}

.home-chat-build-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.45rem;
    font-family: var(--tkkt-font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tkkt-gray-500);
}

.home-chat-build-main {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
}

.home-chat-build-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tkkt-pink);
    box-shadow: 0 0 0 0 rgba(255, 46, 170, 0.35);
    animation: homeChatBuildPulse 1.25s ease-out infinite;
}

.home-chat-build-status.is-ready {
    color: var(--tkkt-ink);
}

.home-chat-build-status.is-ready .home-chat-build-dot {
    background: #00a84f;
    animation: none;
}

.home-chat-build-status.is-ready .home-chat-build-dot::after {
    content: "";
    display: block;
    width: 4px;
    height: 2px;
    border-left: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
    transform: translate(2px, 2px) rotate(-45deg);
}

.home-chat-build-step {
    color: var(--tkkt-gray-400);
    text-align: right;
}

@keyframes homeChatBuildPulse {
    70% { box-shadow: 0 0 0 7px rgba(255, 46, 170, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 46, 170, 0); }
}

.home-chat-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--tkkt-gray-200);
    box-shadow: 0 10px 28px rgba(17, 17, 17, 0.08);
}

.home-chat-build-part {
    opacity: 0.2;
    transform: translateY(7px);
    filter: grayscale(0.65);
    transition: opacity 0.34s ease, transform 0.34s ease, filter 0.34s ease;
}

.home-chat-build-part.is-built {
    opacity: 1;
    transform: none;
    filter: none;
}

.home-chat-build-part.is-building {
    animation: homeChatPartConfirm 0.65s ease;
}

@keyframes homeChatPartConfirm {
    45% { box-shadow: inset 4px 0 0 var(--tkkt-pink); }
    100% { box-shadow: inset 0 0 0 transparent; }
}

.home-chat-card-hero {
    position: relative;
    min-height: 150px;
    overflow: hidden;
    color: #fff;
}

.home-chat-card-art {
    position: absolute;
    inset: 0;
}

.home-chat-card-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.28) 0.6px, transparent 0.7px);
    background-size: 3px 3px;
    opacity: 0.35;
}

.home-chat-card-ghost {
    position: absolute;
    right: -0.08em;
    top: -0.18em;
    font-family: var(--tkkt-font-display);
    font-size: 5.2rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -5px;
    line-height: 0.78;
    opacity: 0.16;
    text-transform: lowercase;
    user-select: none;
}

.home-chat-card-hero.is-night .home-chat-card-art {
    background:
        radial-gradient(120% 80% at 10% 90%, #ff2eaa 0%, transparent 55%),
        linear-gradient(135deg, #111 0%, #3a1024 48%, #c94b7b 100%);
}

.home-chat-card-hero.is-day .home-chat-card-art {
    background:
        radial-gradient(90% 70% at 90% 10%, #ffe08a 0%, transparent 50%),
        linear-gradient(160deg, #c45c26 0%, #e8a23a 45%, #f3d39a 100%);
}

.home-chat-card-hero.is-event .home-chat-card-art {
    background:
        radial-gradient(100% 80% at 0% 0%, #7dcea0 0%, transparent 46%),
        linear-gradient(145deg, #10261a 0%, #1f5c40 55%, #3d8c6e 100%);
}

.home-chat-card-hero.is-party .home-chat-card-art {
    background:
        radial-gradient(80% 70% at 80% 80%, #ff2eaa 0%, transparent 50%),
        linear-gradient(125deg, #ff2eaa 0%, #1a1a1a 58%, #111 100%);
}

.home-chat-card-overlay {
    position: relative;
    z-index: 1;
    min-height: 150px;
    padding: 2.3rem 0.9rem 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.25rem;
    background: linear-gradient(180deg, transparent 10%, rgba(0,0,0,0.78) 100%);
}

.home-chat-card-eyebrow {
    margin: 0;
    font-family: var(--tkkt-font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
}

.home-chat-card-title {
    margin: 0;
    font-family: var(--tkkt-font-display);
    font-size: 1.18rem;
    font-weight: 900;
    letter-spacing: -0.8px;
    line-height: 1.05;
}

.home-chat-card-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem 0.85rem;
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--tkkt-gray-200);
}

.home-chat-card-fact {
    display: flex;
    align-items: center;
    gap: 0.32rem;
    font-size: 0.72rem;
    color: var(--tkkt-ink);
}

.home-chat-card-fact svg {
    width: 13px;
    height: 13px;
    flex: none;
    color: var(--tkkt-gray-500);
}

.home-chat-card-body {
    padding: 0.1rem 0.9rem 0.85rem;
}

.home-chat-card-tickets {
    margin-bottom: 0.65rem;
}

.home-chat-ticket {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--tkkt-gray-200);
}

.home-chat-ticket-name {
    font-size: 0.78rem;
    font-weight: 700;
}

.home-chat-ticket-meta {
    margin-top: 0.08rem;
    font-size: 0.64rem;
    color: var(--tkkt-gray-500);
}

.home-chat-ticket-price {
    position: relative;
    z-index: 1;
    display: inline;
    font-family: var(--tkkt-font-display);
    font-weight: 900;
    letter-spacing: -0.4px;
}

.home-chat-ticket-price::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: -3px;
    right: -3px;
    bottom: 0;
    height: 48%;
    border-radius: 2px;
    background: var(--tkkt-green-hi);
    transform: rotate(-0.3deg);
}

.home-chat-card-cta {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 0;
    background: var(--tkkt-ink);
    color: #fff;
    font-family: var(--tkkt-font-display);
    font-size: 0.8rem;
    font-weight: 800;
}

.home-chat-card-note {
    margin: 0.42rem 0 0;
    font-size: 0.66rem;
    color: var(--tkkt-gray-500);
}

.home-chat-share {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.55rem;
    border: 1px solid var(--tkkt-gray-200);
    background: var(--tkkt-paper);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.home-chat-share.is-visible {
    opacity: 1;
    transform: none;
}

.home-chat-share-url {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--tkkt-font-mono);
    font-size: 0.6rem;
    color: var(--tkkt-gray-600);
}

.home-chat-share-copy {
    min-width: 68px;
    padding: 0.4rem 0.5rem;
    border: 0;
    background: var(--tkkt-ink);
    color: #fff;
    font-family: var(--tkkt-font-display);
    font-size: 0.65rem;
    font-weight: 800;
    transition: background 0.2s ease, transform 0.2s ease;
}

.home-chat-share-copy.is-copied {
    background: #07853f;
    transform: scale(0.96);
}

.home-chat-composer {
    padding: 0.7rem 0.8rem 0.8rem;
    border-top: 1px solid var(--tkkt-gray-200);
}

.home-chat-input-wrap {
    display: flex;
    align-items: flex-end;
    gap: 0.3rem;
    padding: 0.24rem;
    border: 1px solid var(--tkkt-gray-300);
}

.home-chat-input-wrap.is-typing {
    border-color: var(--tkkt-pink);
    outline: 1px solid var(--tkkt-pink);
}

.home-chat-input-wrap textarea {
    min-height: 40px;
    max-height: 78px;
    flex: 1;
    resize: none;
    border: 0;
    outline: 0;
    padding: 0.48rem 0.35rem;
    background: transparent;
    color: var(--tkkt-ink);
    font-family: var(--tkkt-font-display);
    font-size: 0.85rem;
    line-height: 1.42;
}

.home-chat-input-wrap button {
    height: 40px;
    padding: 0 0.8rem;
    border: 0;
    background: var(--tkkt-ink);
    color: #fff;
    font-family: var(--tkkt-font-display);
    font-size: 0.75rem;
    font-weight: 700;
}

.home-chat-input-wrap button:disabled {
    background: var(--tkkt-gray-200);
    color: var(--tkkt-gray-600);
}

.home-chat-composer p {
    margin: 0.4rem 0 0;
    font-family: var(--tkkt-font-mono);
    font-size: 0.59rem;
    color: var(--tkkt-gray-400);
}

@media (max-width: 940px) {
    .home-chat-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 720px;
    }

    .home-chat-copy .hero-eyebrow,
    .home-chat-copy h1,
    .home-chat-copy .hero-sub,
    .home-chat-copy .hero-login-hint {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .home-chat-copy .hero-ctas,
    .home-chat-trust {
        justify-content: center;
    }

    .home-chat-stage {
        width: min(100%, 660px);
        height: min(72svh, 650px);
        min-height: 560px;
        margin: 0 auto;
    }
}

@media (max-width: 560px) {
    .home-chat-hero {
        padding: 2.35rem 0 2rem;
    }

    .home-chat-grid {
        padding-left: 0;
        padding-right: 0;
    }

    .home-chat-copy {
        padding: 0 var(--tkkt-space-lg);
    }

    .home-chat-copy h1 {
        font-size: clamp(1.95rem, 9.8vw, 2.65rem);
        line-height: 1.08;
        letter-spacing: -1.9px;
        margin-bottom: 1rem;
    }

    .home-chat-copy .hero-sub {
        padding: 0 0.3rem;
        margin-bottom: 1rem;
        font-size: 0.98rem;
        line-height: 1.6;
    }

    .home-chat-trust {
        display: grid;
        justify-content: center;
        gap: 0.4rem;
        margin-bottom: 1.35rem;
        text-align: left;
    }

    .home-chat-copy .hero-ctas .btn {
        width: min(100%, 320px);
        max-width: none;
    }

    .home-chat-stage {
        width: calc(100% - 1.5rem);
        height: 610px;
        min-height: 610px;
        margin-left: 0.75rem;
        margin-right: 0.75rem;
        border: 1px solid var(--tkkt-gray-200);
        box-shadow: 0 12px 32px rgba(17, 17, 17, 0.07);
    }

    .home-chat-messages {
        padding: 0.85rem 0.7rem 0.45rem;
    }

    .home-chat-message.is-user {
        max-width: 92%;
    }

    .home-chat-card-hero,
    .home-chat-card-overlay {
        min-height: 138px;
    }

    .home-chat-card-ghost {
        font-size: 4.5rem;
    }

    .home-chat-card-facts {
        gap: 0.42rem 0.7rem;
    }

    .home-chat-share-url {
        font-size: 0.56rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-chat-word > span.is-out,
    .home-chat-word > span.is-in,
    .home-chat-message,
    .home-chat-page,
    .home-chat-thinking-dots span,
    .home-chat-build-dot,
    .home-chat-build-part.is-building,
    .home-chat-caret {
        animation: none;
    }

    .home-chat-build-part,
    .home-chat-share {
        transition: none;
    }
}
