/* backend/trupe-hero-anim.css
   Animated header + hero background and the real TRUPE app screens in phone frames. */

/* Header: slow moving colour glow + light sweep */
body #site-header {
    background-size: 220% 100%, 220% 100%, 100% 100%;
    animation: tpHeaderGlow 14s ease-in-out infinite alternate;
    overflow: hidden;
}
@keyframes tpHeaderGlow {
    0%   { background-position: 0% 0%, 100% 0%, 0 0; }
    100% { background-position: 100% 0%, 0% 0%, 0 0; }
}
body #site-header::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: -40%;
    width: 30%;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.10) 50%, transparent 100%);
    transform: skewX(-20deg);
    animation: tpSweep 7s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}
@keyframes tpSweep {
    0%, 55% { left: -40%; }
    100% { left: 130%; }
}

/* Hero: animated light beams */
.tp-beams { position: absolute; inset: 0; overflow: hidden; }
.tp-beams span {
    position: absolute;
    top: -40%;
    width: 2px;
    height: 70%;
    background: linear-gradient(180deg, transparent, rgba(251, 191, 36, 0.55), transparent);
    opacity: 0;
    animation: tpBeam 7s linear infinite;
}
.tp-beams span:nth-child(1) { left: 18%; animation-delay: 0s; }
.tp-beams span:nth-child(2) { left: 52%; animation-delay: 2.4s; background: linear-gradient(180deg, transparent, rgba(34, 197, 94, 0.5), transparent); }
.tp-beams span:nth-child(3) { left: 80%; animation-delay: 4.6s; background: linear-gradient(180deg, transparent, rgba(147, 197, 253, 0.55), transparent); }
@keyframes tpBeam {
    0% { transform: translateY(0) rotate(18deg); opacity: 0; }
    15% { opacity: 1; }
    60% { opacity: 0.8; }
    100% { transform: translateY(260%) rotate(18deg); opacity: 0; }
}

/* Hero: rising glowing particles */
.tp-particles { position: absolute; inset: 0; overflow: hidden; }
.tp-particles span {
    position: absolute;
    bottom: -20px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 12px 2px rgba(251, 191, 36, 0.7);
    opacity: 0;
    animation: tpRise 12s linear infinite;
}
.tp-particles span:nth-child(3n)   { background: #22c55e; box-shadow: 0 0 12px 2px rgba(34, 197, 94, 0.7); }
.tp-particles span:nth-child(3n+1) { background: #fff; box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.6); width: 4px; height: 4px; }
.tp-particles span:nth-child(1)  { left: 4%;  animation-delay: 0s;   animation-duration: 11s; }
.tp-particles span:nth-child(2)  { left: 11%; animation-delay: 3s;   animation-duration: 14s; }
.tp-particles span:nth-child(3)  { left: 19%; animation-delay: 6s;   animation-duration: 10s; }
.tp-particles span:nth-child(4)  { left: 27%; animation-delay: 1.5s; animation-duration: 13s; }
.tp-particles span:nth-child(5)  { left: 35%; animation-delay: 8s;   animation-duration: 12s; }
.tp-particles span:nth-child(6)  { left: 43%; animation-delay: 4.5s; animation-duration: 15s; }
.tp-particles span:nth-child(7)  { left: 51%; animation-delay: 2s;   animation-duration: 11s; }
.tp-particles span:nth-child(8)  { left: 59%; animation-delay: 9s;   animation-duration: 13s; }
.tp-particles span:nth-child(9)  { left: 66%; animation-delay: 5s;   animation-duration: 10s; }
.tp-particles span:nth-child(10) { left: 73%; animation-delay: 7s;   animation-duration: 14s; }
.tp-particles span:nth-child(11) { left: 80%; animation-delay: 0.8s; animation-duration: 12s; }
.tp-particles span:nth-child(12) { left: 87%; animation-delay: 6.5s; animation-duration: 11s; }
.tp-particles span:nth-child(13) { left: 93%; animation-delay: 3.8s; animation-duration: 13s; }
.tp-particles span:nth-child(14) { left: 97%; animation-delay: 10s;  animation-duration: 15s; }
@keyframes tpRise {
    0%   { transform: translate(0, 0) scale(0.6); opacity: 0; }
    10%  { opacity: 0.9; }
    50%  { transform: translate(24px, -48vh) scale(1); }
    90%  { opacity: 0.7; }
    100% { transform: translate(-12px, -95vh) scale(0.5); opacity: 0; }
}

/* Real app screens in phone frames */
body .tp-phones {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}
.tp-orbit-ring {
    position: absolute;
    width: 460px; height: 460px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(247, 132, 30, 0), rgba(247, 132, 30, 0.6), rgba(34, 197, 94, 0.5), rgba(29, 78, 216, 0.55), rgba(247, 132, 30, 0));
    -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%, #000 64.5%, transparent 65.5%);
    mask: radial-gradient(circle, transparent 62%, #000 63%, #000 64.5%, transparent 65.5%);
    animation: tpSpin 18s linear infinite;
}
.tp-phones::before {
    content: "";
    position: absolute;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247, 132, 30, 0.38) 0%, rgba(29, 78, 216, 0.18) 45%, transparent 70%);
    filter: blur(24px);
}
.tp-phone {
    position: absolute;
    width: 262px;
    aspect-ratio: 390 / 844;
    padding: 10px;
    border-radius: 42px;
    background: linear-gradient(145deg, #2a3350 0%, #0b1022 45%, #1c2440 100%);
    box-shadow:
        0 0 0 1.5px rgba(255, 255, 255, 0.14),
        inset 0 0 0 2px rgba(0, 0, 0, 0.6),
        0 50px 90px -25px rgba(0, 0, 0, 0.75);
}
.tp-phone img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 33px;
}
.tp-phone-front {
    z-index: 3;
    animation: tpFloatFront 6s ease-in-out infinite;
    box-shadow:
        0 0 0 1.5px rgba(255, 255, 255, 0.16),
        inset 0 0 0 2px rgba(0, 0, 0, 0.6),
        0 50px 90px -25px rgba(0, 0, 0, 0.8),
        0 0 70px -10px rgba(247, 132, 30, 0.45);
}
.tp-phone-back {
    z-index: 2;
    width: 230px;
    filter: brightness(0.86);
    animation: tpFloatBack 7s ease-in-out infinite;
}
.tp-phone-notch {
    position: absolute;
    top: 18px; left: 50%;
    width: 78px; height: 20px;
    transform: translateX(-50%);
    border-radius: 99px;
    background: #05070f;
    z-index: 2;
}
@keyframes tpFloatFront {
    0%, 100% { transform: translate(-14px, 0) rotate(-2deg); }
    50% { transform: translate(-14px, -16px) rotate(-1deg); }
}
@keyframes tpFloatBack {
    0%, 100% { transform: translate(136px, 18px) rotate(9deg); }
    50% { transform: translate(136px, 4px) rotate(7deg); }
}

/* Floating info chips */
.tp-float-chip {
    position: absolute;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    color: #0b1640;
    box-shadow: 0 18px 36px -12px rgba(0, 0, 0, 0.5);
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
}
.tp-float-chip small { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: 0.6px; color: #6b7699; }
.tp-float-chip strong { font-size: 13.5px; font-weight: 800; }
.tp-chip-icon {
    width: 34px; height: 34px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    background: linear-gradient(135deg, #fbbf24, #f7841e);
}
.tp-chip-wallet .tp-chip-icon { background: linear-gradient(135deg, #22c55e, #15913b); }
.tp-chip-wallet strong { color: #15913b; }
.tp-chip-prime { top: 300px; left: -70px; animation: tpChip 5s ease-in-out infinite; }
.tp-chip-wallet { bottom: 80px; right: -14px; animation: tpChip 6s ease-in-out infinite -2s; }
.tp-chip-live {
    top: 40px; right: 0;
    padding: 7px 13px;
    border-radius: 99px;
    gap: 7px;
    animation: tpChip 4.5s ease-in-out infinite -1s;
}
.tp-live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 1.8s infinite;
}
@keyframes tpChip {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (max-width: 1260px) {
    body .tp-phones { min-height: 580px; margin-top: 10px; }
}
@media (max-width: 768px) {
    body .tp-phones { min-height: 560px; transform: scale(0.8); margin: -40px 0 -60px; }
}
@media (max-width: 440px) {
    body .tp-phones { transform: scale(0.68); margin: -90px -60px -100px; }
}
@media (prefers-reduced-motion: reduce) {
    body #site-header, body #site-header::before,
    .tp-beams span, .tp-particles span, .tp-orbit-ring,
    .tp-phone-front, .tp-phone-back, .tp-float-chip { animation: none !important; }
    .tp-particles, .tp-beams { display: none; }
    .tp-phone-front { transform: translate(-14px, 0) rotate(-2deg); }
    .tp-phone-back { transform: translate(136px, 18px) rotate(9deg); }
}
