/* "How LinkCollider works" animated explainer.
   The stage is designed at 960x540 and scaled to fit by js/promo.js.
   Elements animate only while their scene has .lcp-run, so every scene restarts cleanly. */

.lcp {
    --lcp-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --lcp-green: #1f9d63;
    --lcp-gold-deep: #a87400;
    position: relative;
    width: 100%;
}

/* Self-contained: the same file serves the old theme, the new theme and the standalone embed page */
.lcp,
.lcp *,
.lcp *::before,
.lcp *::after {
    box-sizing: border-box;
}

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

/* The header "How it works" dialog keeps its player in a template until it is first opened */
template {
    display: none;
}

#modal-lcVideo.lc-dlg.lc-dlg-wide .modal-dialog {
    width: auto;
    max-width: 780px;
}

#modal-lcVideo .lc-dlg-promo {
    padding-bottom: 14px;
}

/* Frame and scaled stage */
.lcp-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--lc-shadow, 0 12px 32px rgba(23, 32, 51, 0.08));
    user-select: none;
    -webkit-user-select: none;
}

.lcp-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 960px;
    height: 540px;
    transform-origin: 0 0;
    font-family: var(--lc-font, "Plus Jakarta Sans", "Open Sans", sans-serif);
    color: var(--lc-ink, #172033);
    line-height: 1.25;
    text-align: left;
    background: linear-gradient(160deg, #ffffff 0%, var(--lc-blue-soft, #e8f1fd) 100%);
}

.lcp-canvas i,
.lcp-canvas em {
    font-style: normal;
}

/* Soft drifting shapes behind every scene */
.lcp-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.5;
    animation: lcp-drift 14s ease-in-out infinite alternate;
}

.lcp-blob-a {
    top: -120px;
    right: -80px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle at 30% 30%, #cfe2fb, rgba(207, 226, 251, 0) 70%);
}

.lcp-blob-b {
    bottom: -140px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle at 60% 40%, #ffefbf, rgba(255, 239, 191, 0) 70%);
    animation-duration: 18s;
}

/* Scenes */
.lcp-scene {
    position: absolute;
    inset: 0;
    z-index: 1;
    padding: 46px 64px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}

.lcp-scene.is-active {
    z-index: 3;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s ease;
}

.lcp-scene.is-leaving {
    z-index: 2;
    visibility: visible;
}

.lcp-intro,
.lcp-outro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    text-align: center;
}

.lcp-outro {
    background: linear-gradient(135deg, #1457c0 0%, #1f6fd6 58%, #3b8cf0 100%);
    color: #fff;
}

/* Entrance animations: hidden until their delay, then settle */
.lcp-run .a-fade { animation: lcp-fade 0.6s var(--lcp-ease) var(--d, 0s) both; }
.lcp-run .a-rise { animation: lcp-rise 0.7s var(--lcp-ease) var(--d, 0s) both; }
.lcp-run .a-pop { animation: lcp-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0s) both; }
.lcp-run .a-slide { animation: lcp-slide 0.7s var(--lcp-ease) var(--d, 0s) both; }

@keyframes lcp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lcp-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes lcp-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes lcp-slide { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
@keyframes lcp-drift { from { transform: translate(0, 0); } to { transform: translate(40px, 26px); } }

/* Shared type */
.lcp-kicker {
    display: inline-block;
    padding: 7px 18px;
    border-radius: 999px;
    background: var(--lc-gold-soft, #fff6dc);
    color: var(--lcp-gold-deep);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lcp-title {
    margin-top: 14px;
    font-size: 46px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.lcp-hero {
    font-size: 62px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
}

.lcp-hero em {
    color: var(--lc-blue, #1f6fd6);
}

.lcp-sub {
    margin-top: 14px;
    font-size: 27px;
    color: var(--lc-muted, #5c6b80);
}

.lcp-outro .lcp-sub {
    color: rgba(255, 255, 255, 0.92);
}

.lcp-note {
    position: absolute;
    right: 64px;
    bottom: 26px;
    left: 64px;
    font-size: 21px;
    color: var(--lc-muted, #5c6b80);
}

.lcp-logo-card {
    display: inline-flex;
    align-items: center;
    margin-bottom: 26px;
    padding: 14px 26px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(23, 32, 51, 0.12);
}

.lcp-logo-card img {
    display: block;
    width: auto;
    max-width: none;
}

.lcp-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

.lcp-chip-ok { background: #e3f6ec; color: var(--lcp-green); }
.lcp-chip-gold { background: var(--lc-gold-soft, #fff6dc); color: var(--lcp-gold-deep); }
.lcp-chip-blue { background: var(--lc-blue-soft, #e8f1fd); color: var(--lc-blue-deep, #1457c0); }

/* Intro: platform icons */
.lcp-plats {
    display: flex;
    gap: 16px;
    margin-top: 40px;
}

.lcp-plat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 22px rgba(23, 32, 51, 0.12);
    color: var(--c);
    font-size: 32px;
}

/* Step 1: add your page */
.lcp-form {
    position: relative;
    max-width: 700px;
    margin-top: 28px;
    padding: 22px 28px 26px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--lc-shadow, 0 12px 32px rgba(23, 32, 51, 0.08));
}

.lcp-label {
    margin-bottom: 12px;
    font-size: 21px;
    font-weight: 600;
    color: var(--lc-muted, #5c6b80);
}

.lcp-field {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 10px 10px 20px;
    border: 2px solid var(--lc-blue, #1f6fd6);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 0 0 5px rgba(31, 111, 214, 0.12);
}

.lcp-field-ico {
    font-size: 28px;
    color: var(--lc-blue, #1f6fd6);
}

.lcp-input {
    display: flex;
    flex: 1;
    align-items: center;
    min-height: 44px;
    font-size: 30px;
    font-weight: 600;
}

.lcp-caret {
    width: 3px;
    height: 34px;
    margin-left: 3px;
    background: var(--lc-blue, #1f6fd6);
    animation: lcp-blink 1s steps(1) infinite;
}

.lcp-add {
    padding: 12px 32px;
    border-radius: 10px;
    background: var(--lc-blue, #1f6fd6);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
}

.lcp-run .lcp-press { animation: lcp-press 0.4s ease var(--d, 3.1s) both; }

.lcp-cursor {
    position: absolute;
    right: 56px;
    bottom: 22px;
    font-size: 40px;
    color: var(--lc-ink, #172033);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));
    opacity: 0;
}

.lcp-run .lcp-cursor { animation: lcp-cursor 1.1s var(--lcp-ease) var(--d, 2.2s) both; }

.lcp-added {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 700px;
    margin-top: 18px;
    padding: 16px 24px;
    border-radius: 18px;
    background: #fff;
    border: 2px solid #bfe8d2;
    box-shadow: var(--lc-shadow, 0 12px 32px rgba(23, 32, 51, 0.08));
}

.lcp-added-ico {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--lc-blue-soft, #e8f1fd);
    color: var(--lc-blue, #1f6fd6);
    font-size: 26px;
}

.lcp-added-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.lcp-added-copy strong {
    font-size: 27px;
}

.lcp-added-copy small {
    font-size: 20px;
    color: var(--lc-muted, #5c6b80);
}

@keyframes lcp-blink { 50% { opacity: 0; } }
@keyframes lcp-press {
    0%, 100% { transform: scale(1); }
    45% { transform: scale(0.9); background: var(--lc-blue-deep, #1457c0); }
}
@keyframes lcp-cursor {
    0% { opacity: 0; transform: translate(120px, 80px); }
    25% { opacity: 1; }
    75% { opacity: 1; transform: translate(0, 0); }
    90% { opacity: 1; transform: translate(0, 0) scale(0.9); }
    100% { opacity: 0; transform: translate(0, 0) scale(0.9); }
}

/* Step 2: earn points */
.lcp-earn {
    display: flex;
    align-items: center;
    gap: 36px;
    margin-top: 22px;
}

.lcp-tasks {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
}

.lcp-task {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--lc-shadow, 0 12px 32px rgba(23, 32, 51, 0.08));
}

.lcp-run .lcp-task { animation: lcp-slide 0.7s var(--lcp-ease) var(--d, 0s) both, lcp-done 0.6s ease var(--t, 2s) both; }

.lcp-task-ico {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f4f6fb;
    color: var(--c);
    font-size: 26px;
}

.lcp-task-name {
    flex: 1;
    font-size: 26px;
    font-weight: 600;
}

.lcp-coin {
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #ffe28a 0%, #e2a30a 62%, #c68a05 100%);
    box-shadow: 0 0 0 10px rgba(226, 163, 10, 0.18), 0 18px 36px rgba(168, 116, 0, 0.3);
    color: #fff;
    text-shadow: 0 2px 6px rgba(120, 78, 0, 0.35);
}

.lcp-coin-num {
    font-size: 88px;
    font-weight: 800;
    line-height: 1;
}

.lcp-coin-label {
    margin-top: 4px;
    font-size: 26px;
    font-weight: 700;
}

.lcp-coin-num.bump { animation: lcp-bump 0.45s ease; }

.lcp-pill {
    position: absolute;
    right: 64px;
    bottom: 26px;
    left: 64px;
    padding: 12px 24px;
    border-radius: 16px;
    background: var(--lc-blue-soft, #e8f1fd);
    color: var(--lc-blue-deep, #1457c0);
    font-size: 25px;
    text-align: center;
}

.lcp-pill i {
    margin-right: 6px;
}

@keyframes lcp-done {
    from { border-color: transparent; }
    to { border-color: #bfe8d2; }
}
@keyframes lcp-bump {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.22); }
}

/* Step 3: dashboard */
.lcp-dash {
    margin-top: 20px;
    padding: 18px 26px 20px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--lc-shadow, 0 12px 32px rgba(23, 32, 51, 0.08));
}

.lcp-dash-head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lcp-dash-head strong {
    flex: 1;
    font-size: 28px;
}

.lcp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.lcp-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 18px;
    border-radius: 16px;
    background: #f4f6fb;
}

.lcp-stat i {
    font-size: 26px;
    color: var(--c);
}

.lcp-stat b {
    margin-top: 4px;
    font-size: 46px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.lcp-stat span {
    font-size: 20px;
    font-weight: 600;
    color: var(--lc-muted, #5c6b80);
}

.lcp-crowd {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.lcp-crowd-label {
    margin-right: 8px;
    font-size: 21px;
    font-weight: 600;
    color: var(--lc-muted, #5c6b80);
}

.lcp-av {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--c);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(23, 32, 51, 0.18);
    color: #fff;
    font-size: 18px;
}

.lcp-av-more {
    background: var(--lc-blue-soft, #e8f1fd);
    color: var(--lc-blue-deep, #1457c0);
    font-size: 24px;
    font-weight: 700;
}

/* Why it works */
.lcp-feats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.lcp-feat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 26px 24px 28px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--lc-shadow, 0 12px 32px rgba(23, 32, 51, 0.08));
}

.lcp-feat-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    border-radius: 18px;
    background: var(--lc-blue-soft, #e8f1fd);
    color: var(--lc-blue, #1f6fd6);
    font-size: 30px;
}

.lcp-feat strong {
    font-size: 27px;
    line-height: 1.15;
}

.lcp-feat > span:last-child {
    font-size: 21px;
    line-height: 1.35;
    color: var(--lc-muted, #5c6b80);
}

/* Call to action */
.lcp-outro .lcp-hero {
    color: #fff;
}

.lcp-cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 36px;
    padding: 18px 40px;
    border-radius: 999px;
    background: var(--lc-gold, #e2a30a);
    color: #172033;
    font-size: 30px;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.lcp-run .lcp-cta { animation: lcp-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d, 0s) both, lcp-pulse 1.8s ease-in-out 2.2s infinite; }

.lcp-tagline {
    margin-top: 26px;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
}

@keyframes lcp-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22), 0 0 0 0 rgba(255, 255, 255, 0.45); }
    50% { transform: scale(1.04); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22), 0 0 0 16px rgba(255, 255, 255, 0); }
}

/* Big play / replay button shown when paused by the visitor or finished */
.lcp-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    border: 0;
    background: rgba(23, 32, 51, 0.28);
    cursor: pointer;
}

.lcp-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--lc-blue, #1f6fd6);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 32px;
    transition: transform 0.18s ease;
}

.lcp-overlay span i {
    position: relative;
    left: 3px;
}

.lcp-overlay.is-replay span i {
    left: 0;
}

.lcp-overlay:hover span,
.lcp-overlay:focus span {
    transform: scale(1.08);
}

.lcp.is-userpaused .lcp-overlay,
.lcp.is-ended .lcp-overlay {
    display: flex;
}

/* Controls */
.lcp-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.lcp-ctl {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--lc-blue-soft, #e8f1fd);
    color: var(--lc-blue-deep, #1457c0);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.lcp-ctl:hover,
.lcp-ctl:focus {
    background: var(--lc-blue, #1f6fd6);
    color: #fff;
}

/* Sound is off until the visitor asks for it (browsers block autoplaying audio anyway) */
.lcp-sound.is-on,
.lcp.is-sound-on .lcp-sound {
    background: var(--lc-blue, #1f6fd6);
    color: #fff;
}

.lcp-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 18px rgba(23, 32, 51, 0.16);
    color: var(--lc-blue-deep, #1457c0);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    animation: lcp-hint 2.4s ease-in-out infinite;
}

.lcp-hint:hover,
.lcp-hint:focus {
    background: var(--lc-blue, #1f6fd6);
    color: #fff;
}

.lcp.has-sound-choice .lcp-hint,
.lcp.is-sound-on .lcp-hint {
    display: none;
}

@keyframes lcp-hint {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.lcp-segs {
    display: flex;
    flex: 1;
    gap: 6px;
}

.lcp-seg {
    position: relative;
    height: 28px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.lcp-seg::before {
    content: "";
    position: absolute;
    top: 11px;
    right: 0;
    left: 0;
    height: 6px;
    border-radius: 3px;
    background: #d9e2f1;
}

.lcp-seg span {
    position: absolute;
    top: 11px;
    left: 0;
    height: 6px;
    border-radius: 3px;
    background: var(--lc-blue, #1f6fd6);
    width: 0;
}

.lcp-seg:hover::before,
.lcp-seg:focus::before {
    background: #bccbe3;
}

.lcp-seg.is-current::before {
    box-shadow: 0 0 0 2px rgba(31, 111, 214, 0.25);
}

/* Caption under the player, real text so it stays readable on small screens */
.lcp-caption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-top: 6px;
    min-height: 48px;
}

.lcp-cap-copy {
    font-size: 15px;
    line-height: 1.4;
    color: var(--lc-muted, #5c6b80);
}

.lcp-cap-step {
    display: inline-block;
    margin-right: 6px;
    font-weight: 700;
    color: var(--lc-ink, #172033);
}

.lcp-cap-link {
    flex: none;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

/* Hero "See how it works" lands here */
#how-it-works {
    scroll-margin-top: 90px;
}

/* Pause everything (animations and the drifting shapes) when not playing */
.lcp.is-paused .lcp-canvas *,
.lcp.is-paused .lcp-canvas {
    animation-play-state: paused !important;
}

@media (max-width: 575px) {
    /* Smaller, tucked into the corner so it never covers the headline */
    .lcp-hint {
        top: 6px;
        right: 6px;
        gap: 6px;
        padding: 5px 10px;
        font-size: 12px;
    }

    .lcp-cap-copy,
    .lcp-cap-link {
        font-size: 14px;
    }

    .lcp-caption {
        flex-direction: column;
        gap: 6px;
    }
}

/* Reduced motion: no movement, scenes show their finished state */
.lcp-reduced .lcp-canvas *,
.lcp-reduced .lcp-canvas {
    animation: none !important;
}

.lcp-reduced .lcp-scene {
    transition: none;
}

.lcp-reduced .lcp-cursor {
    display: none;
}

.lcp-reduced .lcp-hint {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .lcp-canvas *,
    .lcp-canvas {
        animation: none !important;
    }

    .lcp-scene {
        transition: none;
    }

    .lcp-cursor {
        display: none;
    }
}
