/* ============================================================
   "Why teams bring in Askpilot" — three reason cards, each with a
   small animation on top. Looping vignettes gated by an
   IntersectionObserver (js/why-askpilot.js); reduced motion shows
   the resolved end-state. Palette + card language match the rest
   of the site (brand blues, green "done", soft card shadow).
   ============================================================ */
#why-askpilot {
    --wy-accent: #4c6cff;
    --wy-accent-2: #6583FF;
    --wy-ok: #10b981;
    --wy-ok-deep: #047857;
    --wy-ink: #0f172a;
    --wy-muted: #6b7280;
    --wy-border: #e5e7eb;
    --wy-soft: #eef1ff;
}

.wy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 860px) {
    .wy-grid { grid-template-columns: repeat(3, 1fr); }
}

.wy-card {
    background: #fff;
    border: 1px solid var(--wy-border);
    border-radius: 22px;
    box-shadow: 0 25px 50px -12px rgba(17, 24, 39, 0.10);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.wy-stage {
    height: 188px;
    background: linear-gradient(180deg, #f4faf7, #ecf6f1);
    border-bottom: 1px solid #e3efe9;
    position: relative;
    overflow: hidden;
}
.wy-body { padding: 26px 26px 30px; }
.wy-card-title { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; color: var(--wy-ink); margin: 0 0 10px; }
.wy-card-desc { font-size: 16px; font-weight: 300; line-height: 1.625; color: #4b5563; margin: 0; }
@media (min-width: 640px) {
    .wy-card-title { font-size: 26px; }
    .wy-card-desc { font-size: 18px; }
}

/* ---------- Card 1 — be present on every call ---------- */
.wy1 { display: flex; align-items: center; justify-content: center; gap: 26px; height: 100%; }
.wy1-person { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.wy1-ava {
    position: relative; width: 60px; height: 60px; border-radius: 50%;
    background: #fff; border: 1px solid #e3e7f3;
    display: flex; align-items: center; justify-content: center; color: var(--wy-accent);
}
.wy1-ava svg { width: 30px; height: 30px; }
.wy1-ring { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--wy-accent-2); opacity: 0; }
.wy-on .wy1-ring { animation: wy1ring 2.4s ease-out infinite; }
.wy-on .wy1-ring.r2 { animation-delay: 0.8s; }
@keyframes wy1ring { 0% { transform: scale(0.8); opacity: 0; } 25% { opacity: 0.6; } 100% { transform: scale(1.25); opacity: 0; } }
.wy1-tag { font-size: 11px; font-weight: 600; color: var(--wy-accent); }
.wy1-pad {
    position: relative; width: 62px; height: 74px; background: #fff; border: 1px solid #e3e7f3; border-radius: 8px;
    box-shadow: 0 6px 16px -10px rgba(17, 24, 39, 0.3); padding: 10px 8px;
    display: flex; flex-direction: column; gap: 7px;
}
.wy-on .wy1-pad { animation: wy1pad 5s ease-in-out infinite; }
.wy1-pad i { height: 4px; border-radius: 2px; background: #e6e9f2; }
.wy1-pad i:nth-child(1) { width: 80%; } .wy1-pad i:nth-child(2) { width: 60%; } .wy1-pad i:nth-child(3) { width: 70%; }
.wy1-strike { position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; background: #ef4444; transform: scaleX(0); transform-origin: left; }
.wy-on .wy1-strike { animation: wy1strike 5s ease-in-out infinite; }
@keyframes wy1pad { 0%, 55% { opacity: 1; transform: none; } 70%, 100% { opacity: 0.25; transform: scale(0.9) rotate(-3deg); } }
@keyframes wy1strike { 0%, 40% { transform: scaleX(0); } 55%, 100% { transform: scaleX(1); } }
.wy1-done {
    position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%) translateY(6px); opacity: 0;
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 9999px;
    border: 1px solid #a7f3d0; background: #ecfdf5; color: var(--wy-ok-deep); font-size: 11.5px; font-weight: 600;
}
.wy1-done svg { width: 11px; height: 11px; }
.wy-on .wy1-done { animation: wy1done 5s ease-in-out infinite; }
@keyframes wy1done {
    0%, 60% { opacity: 0; transform: translateX(-50%) translateY(6px); }
    72%, 94% { opacity: 1; transform: translateX(-50%); }
    100% { opacity: 0; }
}

/* ---------- Card 2 — take calls anywhere ---------- */
.wy2 { display: flex; align-items: center; justify-content: center; height: 100%; position: relative; }
.wy2-phone {
    width: 54px; height: 96px; border-radius: 12px; background: #fff; border: 1px solid #e3e7f3;
    box-shadow: 0 8px 20px -12px rgba(17, 24, 39, 0.3);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.wy2-mobtag { font-size: 9px; font-weight: 600; color: var(--wy-ok-deep); }
.wy2-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wy-ok); }
.wy-on .wy2-dot { animation: wy2pulse 1.1s ease-in-out infinite; }
@keyframes wy2pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); } 50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); } }
.wy2-mini { display: flex; gap: 2px; align-items: flex-end; height: 14px; }
.wy2-mini i { width: 2.5px; background: var(--wy-accent); border-radius: 2px; height: 5px; }
.wy-on .wy2-mini i { animation: wy2bar 0.8s ease-in-out infinite alternate; }
.wy2-mini i:nth-child(2) { animation-delay: 0.15s; } .wy2-mini i:nth-child(3) { animation-delay: 0.3s; } .wy2-mini i:nth-child(4) { animation-delay: 0.05s; }
@keyframes wy2bar { from { height: 4px; } to { height: 14px; } }
.wy2-arc { width: 64px; height: 40px; position: relative; }
.wy2-arc svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wy2-arc path { fill: none; stroke: var(--wy-accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 90; stroke-dashoffset: 90; }
.wy-on .wy2-arc path { animation: wy2draw 3.4s ease-in-out infinite; }
@keyframes wy2draw { 0%, 15% { stroke-dashoffset: 90; } 45%, 80% { stroke-dashoffset: 0; } 95%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.wy2-pc {
    width: 96px; height: 74px; border-radius: 10px; background: #fff; border: 1px solid #e3e7f3;
    box-shadow: 0 8px 20px -12px rgba(17, 24, 39, 0.3); padding: 9px;
    display: flex; flex-direction: column; gap: 6px; position: relative;
}
.wy2-pc .bar { height: 5px; border-radius: 3px; background: var(--wy-soft); box-shadow: inset 0 0 0 1px #dbe3fb; transform: scaleX(0); transform-origin: left; }
.wy-on .wy2-pc .bar { animation: wy2fill 3.4s ease-in-out infinite; }
.wy2-pc .l1 { width: 70%; animation-delay: 0.5s; } .wy2-pc .l2 { width: 90%; animation-delay: 0.85s; } .wy2-pc .l3 { width: 55%; animation-delay: 1.2s; }
@keyframes wy2fill { 0%, 40% { transform: scaleX(0); } 58%, 92% { transform: scaleX(1); } 100% { transform: scaleX(1); } }
.wy2-wait { position: absolute; bottom: -26px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10.5px; font-weight: 600; color: var(--wy-accent); opacity: 0; }
.wy-on .wy2-wait { animation: wy2wait 3.4s ease-in-out infinite; }
@keyframes wy2wait { 0%, 62% { opacity: 0; } 75%, 92% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- Card 4 — every transcript, one search away ---------- */
.wy4 { padding: 20px; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.wy4-search {
    display: flex; align-items: center; gap: 9px; padding: 9px 12px; background: #fff;
    border: 1px solid #e3e7f3; border-radius: 11px; box-shadow: 0 6px 16px -10px rgba(17, 24, 39, 0.25);
}
.wy4-search svg { width: 15px; height: 15px; color: var(--wy-accent); flex: none; }
.wy4-q { font-size: 12.5px; color: var(--wy-ink); white-space: nowrap; overflow: hidden; }
.wy4-caret { display: inline-block; width: 1.5px; height: 14px; background: var(--wy-accent); vertical-align: -2px; margin-left: 1px; }
.wy-on .wy4-caret { animation: wy4blink 0.8s steps(2) infinite; }
@keyframes wy4blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
.wy4-result {
    margin-top: 12px; background: #fff; border: 1px solid #e3e7f3; border-radius: 11px; padding: 10px 12px;
    box-shadow: 0 8px 20px -12px rgba(17, 24, 39, 0.3); opacity: 0; transform: translateY(12px);
}
.wy-on .wy4-result { animation: wy4rise 5.5s ease-in-out infinite; }
@keyframes wy4rise { 0%, 46% { opacity: 0; transform: translateY(12px); } 56%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.wy4-rhead { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.wy4-ava { width: 18px; height: 18px; border-radius: 50%; background: var(--wy-soft); flex: none; }
.wy4-rname { font-size: 11px; font-weight: 600; color: var(--wy-ink); }
.wy4-rmeta { margin-left: auto; font-size: 9.5px; color: var(--wy-muted); }
.wy4-snippet { font-size: 11.5px; line-height: 1.5; color: #4b5563; }
.wy4-hl { background: #fff3c4; border-radius: 3px; padding: 0 2px; color: #1f2937; font-weight: 500; }

/* ---------- reduced motion: resolved static state ---------- */
@media (prefers-reduced-motion: reduce) {
    .wy1-pad { opacity: 0.25; }
    .wy1-strike { transform: scaleX(1); }
    .wy1-done, .wy2-wait { opacity: 1; }
    .wy2-arc path { stroke-dashoffset: 0; }
    .wy2-pc .bar { transform: scaleX(1); }
    .wy4-result { opacity: 1; transform: none; }
    .wy-on .wy1-ring, .wy-on .wy1-pad, .wy-on .wy1-strike, .wy-on .wy1-done,
    .wy-on .wy2-dot, .wy-on .wy2-mini i, .wy-on .wy2-arc path, .wy-on .wy2-pc .bar, .wy-on .wy2-wait,
    .wy-on .wy4-caret, .wy-on .wy4-result { animation: none; }
}
