/* ============================================================
   OnSight LeadGen — Creator section animations
   QR code · Virtual business card · Email signature
   ============================================================ */

.cr-stage { position: relative; width: 100%; height: 420px; }

/* alternate split media side for page rhythm (desktop only) */
.split--flip > :first-child { order: 2; }
.split--flip > :last-child { order: 1; }
@media (max-width: 940px) { .split--flip > :first-child, .split--flip > :last-child { order: 0; } }
.cr-scene { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; opacity: 0; }
.cr-cap { font-size: 12px; font-weight: var(--w-black); letter-spacing: .08em; text-transform: uppercase; color: var(--green-700); background: var(--green-100); padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .cr-scene, .cr-scene * { animation: none !important; } .cr-scene--show { opacity: 1 !important; } .cr-scene { opacity: 0; } }

/* ---- shared QR module grid ---- */
.qr-img { background: #fff; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow-md); padding: 10px; }
.qr-grid { display: grid; width: 100%; height: 100%; gap: 1.5px; }
.qr-cell { border-radius: 1px; }
.qr-cell.on { background: var(--onsight-dark-grey); }

/* ============================================================
   1) QR CODE  (loop 12s) — generate -> sign -> phone scan
   ============================================================ */
.qr-scene--1 { animation: qrS1 12s ease-in-out infinite; }
.qr-scene--2 { animation: qrS2 12s ease-in-out infinite; }
.qr-scene--3 { animation: qrS3 12s ease-in-out infinite; }
@keyframes qrS1 { 0% { opacity: 0; transform: scale(.96); } 4%, 28% { opacity: 1; transform: none; } 33%, 100% { opacity: 0; transform: scale(.98); } }
@keyframes qrS2 { 0%, 33% { opacity: 0; transform: scale(.96); } 38%, 55% { opacity: 1; transform: none; } 60%, 100% { opacity: 0; } }
@keyframes qrS3 { 0%, 60% { opacity: 0; transform: scale(.96); } 65%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* scene 1 — generator */
.qr-gen { position: relative; }
.qr-gen .qr-img { width: 172px; height: 172px; }
.qr-scene--1 .qr-grid { clip-path: inset(0 0 100% 0); animation: qrReveal 12s ease-in-out infinite; }
@keyframes qrReveal { 0%, 4% { clip-path: inset(0 0 100% 0); } 24%, 100% { clip-path: inset(0 0 0 0); } }
.qr-line { position: absolute; left: 12px; right: 12px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--onsight-green), transparent); box-shadow: 0 0 12px 2px rgba(143,190,36,.7); animation: qrLine 12s ease-in-out infinite; }
@keyframes qrLine { 0%, 3% { top: 14px; opacity: 0; } 6% { opacity: 1; } 23% { top: 158px; opacity: 1; } 27%, 100% { opacity: 0; } }

/* scene 2 — for-sale sign */
.qr-sign { display: flex; flex-direction: column; align-items: center; }
.qr-board { width: 230px; background: #fff; border: 3px solid var(--onsight-green); border-radius: 14px; padding: 16px 16px 14px; text-align: center; box-shadow: var(--shadow-lg); }
.qr-board__top { font-size: 19px; font-weight: var(--w-black); letter-spacing: .06em; color: var(--onsight-green); }
.qr-board__sub { font-size: 10.5px; font-weight: var(--w-black); color: var(--fg-3); text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }
.qr-board .qr-img { width: 104px; height: 104px; margin: 12px auto 7px; box-shadow: none; }
.qr-board__scan { font-size: 10.5px; font-weight: var(--w-black); color: var(--fg-2); display: flex; align-items: center; justify-content: center; gap: 5px; }
.qr-board__scan svg { width: 13px; height: 13px; color: var(--green-700); }
.qr-stand { width: 12px; height: 74px; background: linear-gradient(var(--grey-300), var(--grey-200)); border-radius: 0 0 3px 3px; }
.qr-ground { width: 120px; height: 8px; border-radius: 50%; background: rgba(0,0,0,.08); margin-top: 2px; filter: blur(2px); }
.qr-scene--2 .qr-board { animation: qrPop 12s ease-in-out infinite; }
@keyframes qrPop { 0%, 34% { transform: translateY(14px) scale(.95); } 40%, 100% { transform: none; } }

/* scene 3 — phone scan */
.qr-phone { width: 188px; height: 312px; background: #17181b; border-radius: 28px; padding: 9px; box-shadow: var(--shadow-lg); position: relative; }
.qr-phone__notch { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); width: 54px; height: 6px; border-radius: 4px; background: #000; z-index: 4; }
.qr-screen { width: 100%; height: 100%; background: radial-gradient(120% 90% at 50% 30%, #1d2a1f, #0e1412); border-radius: 20px; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; }
.qr-screen .qr-img { width: 116px; height: 116px; background: #fff; }
.qr-brackets { position: absolute; width: 150px; height: 150px; }
.qr-brackets span { position: absolute; width: 26px; height: 26px; border: 3px solid var(--onsight-green); }
.qr-brackets span:nth-child(1) { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 6px 0 0 0; }
.qr-brackets span:nth-child(2) { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 6px 0 0; }
.qr-brackets span:nth-child(3) { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 6px; }
.qr-brackets span:nth-child(4) { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 6px 0; }
.qr-beam { position: absolute; left: 22px; right: 22px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--onsight-green), transparent); box-shadow: 0 0 14px 3px rgba(143,190,36,.7); animation: qrBeam 12s ease-in-out infinite; opacity: 0; }
@keyframes qrBeam { 0%, 64% { top: 90px; opacity: 0; } 67% { opacity: 1; } 80% { top: 210px; opacity: 1; } 84%, 100% { opacity: 0; } }
.qr-success { position: absolute; inset: 0; background: rgba(14,20,18,.86); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; opacity: 0; animation: qrSucc 12s ease-in-out infinite; }
.qr-success .ck { width: 56px; height: 56px; border-radius: 50%; background: var(--onsight-green); display: flex; align-items: center; justify-content: center; }
.qr-success .ck svg { width: 30px; height: 30px; color: #fff; }
.qr-success .t { color: #fff; font-size: 15px; font-weight: var(--w-black); }
.qr-success .s { color: rgba(255,255,255,.6); font-size: 12px; font-weight: var(--w-semi); margin-top: -6px; }
@keyframes qrSucc { 0%, 84% { opacity: 0; transform: scale(1.04); } 88%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ============================================================
   2) VIRTUAL BUSINESS CARD  (loop 10s)
   ============================================================ */
.vc-scene--1 { animation: vcS1 10s ease-in-out infinite; }
.vc-scene--2 { animation: vcS2 10s ease-in-out infinite; }
@keyframes vcS1 { 0% { opacity: 0; transform: scale(.96); } 4%, 48% { opacity: 1; transform: none; } 54%, 100% { opacity: 0; transform: scale(.98); } }
@keyframes vcS2 { 0%, 52% { opacity: 0; transform: scale(.96) translateX(20px); } 58%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.vc-card { width: 308px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.vc-cover { height: 70px; background: linear-gradient(120deg, var(--green-600), var(--onsight-green)); position: relative; }
.vc-avatar { width: 70px; height: 70px; border-radius: 50%; background: var(--green-100); border: 4px solid #fff; color: var(--green-700); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: var(--w-black); margin: -38px auto 0; position: relative; }
.vc-body { padding: 10px 24px 24px; text-align: center; }
.vc-pop { opacity: 0; transform: translateY(8px); }
.vc-scene--1 .vc-pop { animation: vcPop 10s ease-in-out infinite; }
.vc-pop:nth-child(1) { animation-delay: .2s; } .vc-pop:nth-child(2) { animation-delay: .55s; }
.vc-pop:nth-child(3) { animation-delay: .9s; } .vc-pop:nth-child(4) { animation-delay: 1.25s; }
@keyframes vcPop { 0% { opacity: 0; transform: translateY(8px); } 9%, 100% { opacity: 1; transform: none; } }
.vc-name { font-size: 19px; font-weight: var(--w-black); color: var(--fg-1); }
.vc-title { font-size: 12.5px; font-weight: var(--w-black); letter-spacing: .04em; text-transform: uppercase; color: var(--green-700); margin-top: 3px; }
.vc-rows { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.vc-row { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: var(--w-semi); color: var(--fg-2); background: var(--grey-50); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.vc-row svg { width: 15px; height: 15px; color: var(--green-700); flex: 0 0 auto; }
.vc-share { margin-top: 16px; background: var(--onsight-green); color: var(--on-accent); border-radius: 10px; padding: 11px; font-size: 13.5px; font-weight: var(--w-black); display: flex; align-items: center; justify-content: center; gap: 7px; }
.vc-share svg { width: 16px; height: 16px; }

/* scene 2 — phone with saved contact */
.vc-phone { width: 192px; height: 318px; background: #17181b; border-radius: 28px; padding: 9px; box-shadow: var(--shadow-lg); }
.vc-phone__screen { width: 100%; height: 100%; background: var(--bg-1); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.vc-phone__cover { height: 78px; background: linear-gradient(120deg, var(--green-600), var(--onsight-green)); }
.vc-phone__av { width: 60px; height: 60px; border-radius: 50%; background: var(--green-100); border: 3px solid #fff; color: var(--green-700); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: var(--w-black); margin: -32px auto 0; }
.vc-phone__name { text-align: center; font-size: 16px; font-weight: var(--w-black); color: var(--fg-1); margin-top: 8px; }
.vc-phone__title { text-align: center; font-size: 11px; font-weight: var(--w-black); letter-spacing: .04em; text-transform: uppercase; color: var(--green-700); margin-top: 2px; }
.vc-saved { margin: 16px 18px 0; border-radius: 11px; padding: 12px; text-align: center; font-size: 13px; font-weight: var(--w-black); display: flex; align-items: center; justify-content: center; gap: 7px; background: var(--grey-100); color: var(--fg-2); animation: vcSaved 10s ease-in-out infinite; }
.vc-saved svg { width: 16px; height: 16px; }
@keyframes vcSaved { 0%, 72% { background: var(--grey-100); color: var(--fg-2); } 78%, 100% { background: var(--green-100); color: var(--green-700); } }
.vc-saved .lbl-add { display: inline; } .vc-saved .lbl-done { display: none; }
.vc-saved.is-done .lbl-add { display: none; } .vc-saved.is-done .lbl-done { display: inline; }

/* ============================================================
   3) EMAIL SIGNATURE  (loop 9s) — single compose window
   ============================================================ */
.es2-window { width: 380px; max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.es2-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--grey-50); }
.es2-bar .t { font-size: 12.5px; font-weight: var(--w-black); color: var(--fg-2); }
.es2-meta { padding: 12px 18px; border-bottom: 1px solid var(--line); }
.es2-meta .ln { font-size: 12.5px; font-weight: var(--w-semi); color: var(--fg-3); padding: 4px 0; }
.es2-meta .ln b { color: var(--fg-1); font-weight: var(--w-black); }
.es2-body { padding: 16px 18px; font-size: 13px; font-weight: var(--w-medium); color: var(--fg-2); line-height: 1.5; }
.es2-sig { margin-top: 16px; border-top: 2px solid var(--green-200); padding-top: 14px; display: flex; gap: 13px; align-items: center; }
.es2-sig__av { width: 50px; height: 50px; border-radius: 12px; background: var(--green-100); color: var(--green-700); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: var(--w-black); flex: 0 0 auto; }
.es2-sig__name { font-size: 14px; font-weight: var(--w-black); color: var(--fg-1); }
.es2-sig__title { font-size: 11px; font-weight: var(--w-black); letter-spacing: .04em; text-transform: uppercase; color: var(--green-700); margin-top: 2px; }
.es2-sig__row { display: flex; gap: 12px; margin-top: 7px; }
.es2-sig__row span { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: var(--w-semi); color: var(--fg-3); }
.es2-sig__row svg { width: 12px; height: 12px; color: var(--green-700); }
.es2-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); }
.es2-send { background: var(--onsight-green); color: var(--on-accent); border-radius: 9px; padding: 9px 22px; font-size: 13px; font-weight: var(--w-black); display: inline-flex; align-items: center; gap: 7px; animation: es2Send 9s ease-in-out infinite; }
.es2-send svg { width: 15px; height: 15px; }
@keyframes es2Send { 0%, 70% { transform: none; box-shadow: none; } 76% { transform: scale(.94); } 80%, 86% { transform: scale(1); box-shadow: var(--shadow-green); } 100% { transform: none; } }
.es2-toast { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%) translateY(12px); background: var(--onsight-dark-grey); color: #fff; font-size: 12.5px; font-weight: var(--w-black); padding: 9px 16px; border-radius: 999px; display: flex; align-items: center; gap: 7px; opacity: 0; animation: es2Toast 9s ease-in-out infinite; }
.es2-toast svg { width: 14px; height: 14px; color: var(--green-300); }
@keyframes es2Toast { 0%, 84% { opacity: 0; transform: translateX(-50%) translateY(12px); } 88%, 97% { opacity: 1; transform: translateX(-50%) translateY(0); } 100% { opacity: 0; } }

.es2-build { opacity: 0; transform: translateY(6px); animation: es2Build 9s ease-in-out infinite; }
.es2-build--1 { animation-delay: .3s; } .es2-build--2 { animation-delay: .7s; }
.es2-build--3 { animation-delay: 1.1s; } .es2-build--4 { animation-delay: 1.5s; }
@keyframes es2Build { 0% { opacity: 0; transform: translateY(6px); } 7%, 100% { opacity: 1; transform: none; } }
.es2-caret { display: inline-block; width: 2px; height: 13px; background: var(--onsight-green); margin-left: 2px; vertical-align: middle; animation: es2Caret 1s step-end infinite; }
@keyframes es2Caret { 50% { opacity: 0; } }

@media (max-width: 560px) {
  .cr-stage { height: 380px; }
  .qr-phone, .vc-phone { transform: scale(.9); }
  .es2-window { width: 320px; }
}
