/* ============================================================
   Font CLS fix: a fallback font with Arial glyphs scaled to
   Inter's exact metrics. While Inter downloads, text renders in
   this fallback at (almost) identical size, so the swap causes
   ~zero layout shift. Values are the standard Inter<->Arial
   overrides used by fontaine / next-font.
   ============================================================ */
@font-face {
    font-family: 'Inter Fallback';
    src: local('Arial');
    size-adjust: 107.4%;
    ascent-override: 90.2%;
    descent-override: 22.48%;
    line-gap-override: 0%;
}

:root {
    --font-sans: "Inter", "Inter Fallback", sans-serif;
}

/* Utility clone: final.css is a purged static build and lacks this class.
   Matches Tailwind's cyan-700 exactly (used for a11y contrast fixes). */
.text-cyan-700 {
    color: #0e7490;
}

/* ============================================================
   TelBuddy Motion — lightweight, SEO-safe animations
   - Transform/opacity only (GPU-friendly, no layout shift)
   - Scroll reveals are gated on html.tb-motion (added by JS);
     without JS everything is fully visible for crawlers.
   - prefers-reduced-motion disables everything.
   ============================================================ */

/* ---------- Floating SMS bubbles (decorative, aria-hidden) ---------- */
.tb-sms-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 15;
}

.tb-bubble {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .22);
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(.92);
    animation: tb-bubble-drift var(--dur, 14s) ease-in-out var(--delay, 0s) infinite;
    will-change: transform, opacity;
}

/* incoming message look */
.tb-bubble--in {
    background: rgba(255, 255, 255, .95);
    color: #0f172a;
    border: 1px solid rgba(226, 232, 240, .9);
    border-bottom-left-radius: 5px;
}

/* outgoing message look */
.tb-bubble--out {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    border-bottom-right-radius: 5px;
}

@keyframes tb-bubble-drift {
    0%   { opacity: 0; transform: translate3d(0, 26px, 0) scale(.92); }
    10%  { opacity: var(--op, .92); }
    50%  { transform: translate3d(var(--dx, 12px), -16px, 0) scale(1); }
    88%  { opacity: var(--op, .92); }
    100% { opacity: 0; transform: translate3d(0, -48px, 0) scale(.95); }
}

/* Phones: hide the floating bubbles entirely so they never overlap hero text.
   They're decorative, so no content is lost. Ticker + gradient + pulse stay. */
@media (max-width: 767px) {
    .tb-sms-layer { display: none !important; }
    .tb-bubble { display: none !important; }
}

/* typing indicator dots */
.tb-dots {
    display: inline-flex;
    gap: 4px;
}

.tb-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .4;
    animation: tb-dot 1.2s ease-in-out infinite;
}

.tb-dots span:nth-child(2) { animation-delay: .2s; }
.tb-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes tb-dot {
    0%, 60%, 100% { opacity: .35; transform: translateY(0); }
    30%           { opacity: 1;   transform: translateY(-3px); }
}

/* ---------- SMS ticker (marquee strip) ---------- */
.tb-ticker {
    overflow: hidden;
    position: relative;
}

.tb-ticker-track {
    display: flex;
    width: max-content;
    animation: tb-ticker 40s linear infinite;
    will-change: transform;
}

.tb-ticker:hover .tb-ticker-track { animation-play-state: paused; }

.tb-ticker-group {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 14px;
}

.tb-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

@keyframes tb-ticker {
    to { transform: translate3d(-50%, 0, 0); }
}

/* ---------- Scroll reveal (JS-gated; no JS = fully visible) ---------- */
html.tb-motion .tb-reveal {
    opacity: 0;
    transform: translateY(26px);
    /* box-shadow/border/background kept so card hover effects still transition */
    transition: opacity .7s ease, transform .7s cubic-bezier(.16, 1, .3, 1),
                box-shadow .3s ease, border-color .3s ease, background-color .3s ease;
}

html.tb-motion .tb-reveal.tb-in {
    opacity: 1;
    transform: none;
}

html.tb-motion .tb-d1 { transition-delay: .08s; }
html.tb-motion .tb-d2 { transition-delay: .16s; }
html.tb-motion .tb-d3 { transition-delay: .24s; }
html.tb-motion .tb-d4 { transition-delay: .32s; }
html.tb-motion .tb-d5 { transition-delay: .40s; }

/* ---------- Mockup console lines type in one by one ---------- */
html.tb-motion .tb-reveal .tb-lines p { opacity: 0; }

html.tb-motion .tb-reveal.tb-in .tb-lines p {
    animation: tb-line .45s ease forwards;
}

html.tb-motion .tb-reveal.tb-in .tb-lines p:nth-child(1) { animation-delay: .25s; }
html.tb-motion .tb-reveal.tb-in .tb-lines p:nth-child(2) { animation-delay: .65s; }
html.tb-motion .tb-reveal.tb-in .tb-lines p:nth-child(3) { animation-delay: 1.05s; }
html.tb-motion .tb-reveal.tb-in .tb-lines p:nth-child(4) { animation-delay: 1.45s; }
html.tb-motion .tb-reveal.tb-in .tb-lines p:nth-child(5) { animation-delay: 1.85s; }
html.tb-motion .tb-reveal.tb-in .tb-lines p:nth-child(6) { animation-delay: 2.25s; }
html.tb-motion .tb-reveal.tb-in .tb-lines p:nth-child(7) { animation-delay: 2.65s; }

@keyframes tb-line {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Animated hero gradient text (always on) ---------- */
.tb-gradient-anim {
    background-size: 200% auto;
    animation: tb-gradient 6s linear infinite;
}

@keyframes tb-gradient {
    to { background-position: 200% center; }
}

/* ---------- Gentle CTA pulse (always on) ---------- */
.tb-cta-pulse {
    animation: tb-pulse 2.8s ease-in-out infinite;
}

@keyframes tb-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.03); }
}

/* ---------- Reduced motion ----------
   Ambient motion (floating bubbles, ticker, gradient shimmer, CTA pulse) is
   intentionally kept ON for all users at the site owner's request. We still make
   the scroll-reveal and console type-in effects safe so no content is ever
   hidden — nothing here starts at opacity 0 or shifts layout. */
@media (prefers-reduced-motion: reduce) {
    html.tb-motion .tb-reveal.tb-in .tb-lines p {
        animation: none !important;
    }

    html.tb-motion .tb-reveal,
    html.tb-motion .tb-reveal .tb-lines p {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ============================================================
   "One Login. Every Business." strip (pricing page).
   Self-contained component CSS — does NOT rely on Tailwind
   responsive utilities, since final.css is a static purged
   build with no rebuild step (e.g. sm:grid-cols-3 is absent).
   ============================================================ */
.mbiz {
    position: relative;
    overflow: hidden;
    background: #020617;
    border-radius: 1.5rem;
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.mbiz__glow {
    position: absolute;
    top: -4rem;
    right: -4rem;
    width: 16rem;
    height: 16rem;
    background: #4f46e5;
    opacity: .18;
    filter: blur(80px);
    border-radius: 9999px;
    pointer-events: none;
}
.mbiz__head {
    position: relative;
    z-index: 1;
    text-align: center;
}
.mbiz__badge {
    display: inline-block;
    padding: .25rem .75rem;
    border-radius: 9999px;
    background: rgba(99, 102, 241, .1);
    border: 1px solid rgba(99, 102, 241, .3);
    color: #a5b4fc;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    margin-bottom: .5rem;
}
.mbiz__title {
    margin: 0;
    color: #fff;
    font-size: 1.375rem;
    font-weight: 900;
    letter-spacing: -.02em;
    line-height: 1.15;
}
.mbiz__items {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    flex: 1;
}
.mbiz__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .25rem;
    padding: 1rem .5rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
}
.mbiz__items .mbiz__item:first-child {
    border-top: 0;
}
.mbiz__emoji {
    font-size: 1.5rem;
    line-height: 1;
}
.mbiz__item strong {
    color: #fff;
    font-size: .875rem;
}
.mbiz__sub {
    color: #94a3b8;
    font-size: .75rem;
}

@media (min-width: 1024px) {
    .mbiz {
        flex-direction: row;
        align-items: center;
        padding: 1.5rem 2.5rem;
        gap: 2rem;
    }
    .mbiz__head {
        text-align: left;
        width: 15rem;
        flex: none;
    }
    .mbiz__items {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
    }
    .mbiz__item {
        border-top: 0;
        border-left: 1px solid rgba(255, 255, 255, .08);
        padding: .25rem 1.5rem;
    }
    .mbiz__items .mbiz__item:first-child {
        border-left: 0;
    }
}

/* ============================================================
   BYOT cost-comparison strip (pricing page). Self-contained CSS.
   ============================================================ */
.byot {
    max-width: 960px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}
.byot__head { text-align: center; margin-bottom: 22px; }
.byot__eyebrow {
    display: inline-block;
    color: #4f46e5;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: 11px;
    margin-bottom: 8px;
}
.byot__title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: -.02em;
    color: #0f172a;
    margin: 0;
}
.byot__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.byot__col {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 22px;
}
.byot__col--them { background: #f8fafc; }
.byot__col--us {
    background: linear-gradient(135deg, #eef2ff, #faf5ff);
    border-color: #c7d2fe;
}
.byot__label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 6px;
}
.byot__col--them .byot__label { color: #94a3b8; }
.byot__col--us .byot__label { color: #4f46e5; }
.byot__price { font-size: 1.9rem; font-weight: 900; color: #0f172a; line-height: 1.1; }
.byot__price small { font-size: .8rem; font-weight: 600; color: #64748b; }
.byot__note { font-size: .9rem; color: #475569; margin-top: 8px; line-height: 1.5; }
.byot__foot {
    text-align: center;
    font-size: .82rem;
    color: #94a3b8;
    margin-top: 18px;
    line-height: 1.5;
}
@media (min-width: 760px) {
    .byot__grid { grid-template-columns: 1fr 1fr; }
}
