/* =====================================================================================
   Login page AI Receptionist banner (Pages/Account/_LoginAiBanner.cshtml)
   -------------------------------------------------------------------------------------
   Mobile first, pure HTML/CSS (no banner image), so it stays sharp and readable at every width:
     < 576px   one column: copy, name tag, sample call, full-width button
     576-991   one column, name tag and sample call side by side when they fit
     >= 992    two columns: copy + button on the left, name tag + sample call on the right
   The name tag is sized in em from --k8ai-tag, so one variable scales the whole tag.
   Raleway (OFL) is the www heading face, copied from Kall8.Web.Marketing/wwwroot/fonts.
   ===================================================================================== */

@font-face {
    font-family: 'K8 Raleway';
    font-style: normal;
    font-weight: 500 800;
    font-display: swap;
    src: url('../fonts/raleway-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.k8ai-banner {
    --k8ai-green: #9ab13f;
    --k8ai-green-deep: #87a02a;
    --k8ai-green-light: #b4cc52;
    --k8ai-navy: #1b2331;
    --k8ai-ink: #141b26;
    --k8ai-head: 'K8 Raleway', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --k8ai-tag: clamp(18px, 5.6vw, 24px);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: block;
    color: #d1d5db;
    background-color: var(--k8ai-navy);
    background-image:
        radial-gradient(ellipse 60% 140% at 82% 55%, rgba(154, 177, 63, .17) 0%, rgba(154, 177, 63, 0) 65%),
        linear-gradient(90deg, #141b26 0%, #1b2331 46%, #222b3a 100%);
    font-variant-numeric: lining-nums;
}

/* faint phone-handset pattern */
.k8ai-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath transform='translate(14 14) scale(.8)' d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3Cpath transform='translate(60 58) scale(.62)' d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 96px 96px;
}

/* two thin green arcs behind the visual */
.k8ai-banner::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
    top: 58%;
    right: -38%;
    width: 120vw;
    max-width: 1100px;
    aspect-ratio: 1 / 1;
    transform: translateY(-50%);
    border-radius: 50%;
    border: 1px solid rgba(154, 177, 63, .22);
    outline: 1px solid rgba(154, 177, 63, .12);
    outline-offset: 90px;
}

.k8ai-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "visual" "action";
    row-gap: 1.25rem;
    max-width: 1320px;
    margin: 0 auto;
    padding: 1.25rem 1rem 1.5rem; /* phones: keep the banner short so the sign-in fields stay close to the fold */
}

/* ---- copy ------------------------------------------------------------------------- */
.k8ai-copy { grid-area: copy; min-width: 0; }

.k8ai-banner .k8ai-title {
    margin: 0 0 .5rem;
    font-family: var(--k8ai-head);
    font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.015em;
    color: #fff;
    text-wrap: balance;
}
.k8ai-title-new { color: var(--k8ai-green-light); }

.k8ai-banner .k8ai-lead {
    margin: 0 0 .5rem;
    max-width: 34em;
    font-size: clamp(1rem, .92rem + .4vw, 1.3rem);
    line-height: 1.45;
    color: #e5e7eb;
    text-wrap: pretty;
}

.k8ai-banner .k8ai-price {
    margin: 0;
    font-size: clamp(.95rem, .9rem + .25vw, 1.125rem);
    line-height: 1.4;
    color: #c7ccd4;
}
.k8ai-price strong {
    font-family: var(--k8ai-head);
    font-weight: 800;
    font-size: 1.15em;
    color: #fff;
}
.k8ai-dot { margin: 0 .45em; color: var(--k8ai-green); }

/* ---- button ----------------------------------------------------------------------- */
.k8ai-action { grid-area: action; min-width: 0; }

.k8ai-banner .k8ai-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: .7rem 1.5rem;
    border: 2px solid var(--k8ai-green);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-family: var(--k8ai-head);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.k8ai-banner .k8ai-cta:hover,
.k8ai-banner .k8ai-cta:focus {
    background: var(--k8ai-green);
    border-color: var(--k8ai-green);
    color: var(--k8ai-ink);
    text-decoration: none;
}
.k8ai-banner .k8ai-cta:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---- visual: name tag + sample call ------------------------------------------------ */
.k8ai-visual {
    grid-area: visual;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.25rem 2rem;
}

.k8ai-tag {
    position: relative;
    flex: none;
    width: 13.4em;
    margin: 1.1em 1.25em .5em 1.4em; /* room for the burst (top-left) and the seal (right) */
    font-size: var(--k8ai-tag);
    font-family: var(--k8ai-head);
    background: #fff;
    border-radius: .65em;
    box-shadow: 0 .9em 1.8em rgba(0, 0, 0, .38), 0 .1em .25em rgba(0, 0, 0, .2);
    transform: rotate(-2.5deg);
    animation: k8ai-tag-in .6s .1s cubic-bezier(.2, .7, .2, 1) both;
}

.k8ai-tag-top {
    padding: .5em .8em .38em 2.1em;
    border-radius: .65em .65em 0 0;
    background: linear-gradient(180deg, var(--k8ai-green) 0%, var(--k8ai-green-deep) 100%);
    text-align: center;
}
.k8ai-hello {
    display: block;
    font-size: 1.6em;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .09em;
    color: #fff;
    text-shadow: 0 .04em 0 rgba(0, 0, 0, .18);
}
.k8ai-myname {
    display: block;
    margin-top: .45em;
    font-size: .52em;
    font-weight: 700;
    line-height: 1;
    color: var(--k8ai-navy);
}

.k8ai-tag-body {
    padding: .55em .7em .62em;
    text-align: center;
}
.k8ai-name {
    display: block;
    font-size: .93em;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.01em;
    color: var(--k8ai-navy);
    white-space: nowrap;
}
.k8ai-name-sub {
    display: block;
    margin-top: .45em;
    font-size: .5em;
    font-weight: 600;
    line-height: 1.2;
    color: #6b7280;
}

.k8ai-burst {
    position: absolute;
    top: -1.35em;
    left: -1.45em;
    width: 3.6em;
    height: 3.6em;
    overflow: visible;
    transform: rotate(-13deg);
    filter: drop-shadow(0 .12em .25em rgba(0, 0, 0, .35));
    animation: k8ai-burst-in .5s .55s cubic-bezier(.3, 1.6, .5, 1) both;
}
.k8ai-burst polygon { fill: var(--k8ai-green-light); stroke: #f4f8e1; stroke-width: 2.5; stroke-linejoin: round; }
.k8ai-burst text { font-family: var(--k8ai-head); font-weight: 800; fill: var(--k8ai-ink); }
.k8ai-burst-new { font-size: 23px; letter-spacing: .5px; }
.k8ai-burst-sub { font-size: 7.2px; letter-spacing: .4px; }

.k8ai-seal {
    position: absolute;
    right: -1.25em;
    bottom: .2em;
    width: 3em;
    height: 3em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: .13em solid var(--k8ai-green);
    background: var(--k8ai-navy);
    box-shadow: 0 .2em .5em rgba(0, 0, 0, .4);
    transform: rotate(-6deg);
}
.k8ai-seal-big {
    font-size: .85em;
    font-weight: 800;
    line-height: 1;
    color: var(--k8ai-green-light);
}
.k8ai-seal-small {
    margin-top: .3em;
    font-size: .3em;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff;
}

.k8ai-chat {
    flex: 1 1 15rem;
    min-width: 0;
    max-width: 21rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    font-size: .875rem;
}
.k8ai-bubble {
    max-width: 92%;
    padding: .55em .9em .65em;
    border-radius: .85em;
    line-height: 1.35;
    box-shadow: 0 .6em 1.4em rgba(0, 0, 0, .28);
}
.k8ai-bubble--caller {
    align-self: flex-start;
    background: #f3f4f6;
    color: #111827;
    border-bottom-left-radius: .25em;
    animation: k8ai-bubble-in .45s .9s ease-out both;
}
.k8ai-bubble--ai {
    align-self: flex-end;
    background: var(--k8ai-green);
    color: var(--k8ai-ink);
    border-bottom-right-radius: .25em;
    animation: k8ai-bubble-in .45s 1.9s ease-out both;
}
.k8ai-who {
    display: block;
    margin-bottom: .2em;
    font-size: .7em;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #4b5563;
}
.k8ai-who .fas { margin-right: .2em; font-size: .95em; }
.k8ai-bubble--ai .k8ai-who { color: #33420a; }

/* ---- breakpoints ------------------------------------------------------------------- */
@media (min-width: 576px) {
    .k8ai-inner { row-gap: 1.5rem; padding: 1.75rem 1.5rem 2rem; }
    .k8ai-chat { gap: .75rem; }
    .k8ai-banner .k8ai-cta { display: inline-flex; width: auto; padding: .7rem 2.25rem; }
    .k8ai-chat { font-size: .9375rem; }
}

@media (min-width: 992px) {
    .k8ai-banner { --k8ai-tag: clamp(18px, 1.85vw, 26px); }
    .k8ai-banner::after { right: -12%; width: 70vw; }
    .k8ai-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
        grid-template-areas: "copy visual" "action visual";
        grid-template-rows: auto auto;
        column-gap: 2rem;
        row-gap: 1.25rem;
        align-items: center;
        padding: 1.75rem 2rem;
    }
    .k8ai-copy { align-self: end; }
    .k8ai-action { align-self: start; }
    .k8ai-visual { flex-wrap: nowrap; justify-content: flex-end; gap: clamp(1rem, 2.4vw, 2.75rem); }
    .k8ai-chat { flex: 0 1 19rem; }
}

@media (min-width: 1400px) {
    .k8ai-inner { padding: 2rem 2.5rem; }
}

/* ---- motion ------------------------------------------------------------------------ */
@keyframes k8ai-tag-in {
    from { opacity: 0; transform: rotate(-9deg) scale(.92); }
    to { opacity: 1; transform: rotate(-2.5deg); }
}
@keyframes k8ai-burst-in {
    from { opacity: 0; transform: rotate(-40deg) scale(.4); }
    to { opacity: 1; transform: rotate(-13deg); }
}
@keyframes k8ai-bubble-in {
    from { opacity: 0; transform: translateY(.6em); }
    to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .k8ai-banner *, .k8ai-banner *::before, .k8ai-banner *::after { animation: none !important; transition: none !important; }
}
