/* Cinematic Hero Exploded-View Animation styles */
:root {
    --anim-amber: #f59e0b;
    --anim-amber-glow: rgba(245, 158, 11, 0.5);
    --anim-amber-dim: rgba(245, 158, 11, 0.15);
    --anim-glow-color: rgba(245, 158, 11, 0.25);
}

.prt-animation-container {
    position: relative;
    width: 100%;
    max-width: 780px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.9);
    margin-left: auto;
    cursor: grab;
    user-select: none;
}

.prt-animation-container:active {
    cursor: grabbing;
}

.prt-animation-container.prt-active-scrub {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: var(--shadow-lg), 0 0 25px rgba(245, 158, 11, 0.15);
}

@media (max-width: 1024px) {
    .prt-animation-container {
        margin: 0 auto;
    }
}

.prt-animation-canvas {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    z-index: 1;
}

/* Video is the pixel source drawn onto the canvas; kept in the layout (not
   display:none, which can stop decoding) but visually hidden behind it. */
.prt-animation-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

/* LOADER SCREEN */
.prt-animation-loader {
    position: absolute;
    inset: 0;
    background: #040508;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
    font-family: 'Outfit', sans-serif;
}

.prt-animation-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    width: 80%;
    max-width: 320px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-spinner-container {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: var(--space-4);
}

.loader-spinner {
    width: 100%;
    height: 100%;
    border: 2px solid rgba(245, 158, 11, 0.1);
    border-top: 2px solid var(--anim-amber);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-spinner-inner {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 2px solid transparent;
    border-bottom: 2px solid var(--anim-amber);
    border-radius: 50%;
    opacity: 0.6;
    animation: spin-reverse 1.5s linear infinite;
}

.loader-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: var(--space-1);
    text-shadow: 0 0 10px var(--anim-amber-glow);
}

.loader-progress {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--anim-amber);
    margin-bottom: var(--space-2);
}

.loader-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.loader-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    box-shadow: 0 0 8px var(--anim-amber);
    transition: width 0.1s ease;
}

/* HUD OVERLAYS */
.prt-animation-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--space-3);
    box-sizing: border-box;
}

/* Tech Corner Brackets */
.hud-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 1.5px solid var(--anim-amber);
    opacity: 0.45;
    transition: opacity 0.3s ease;
}

.hud-corner.top-left {
    top: 12px;
    left: 12px;
    border-right: none;
    border-bottom: none;
}

.hud-corner.top-right {
    top: 12px;
    right: 12px;
    border-left: none;
    border-bottom: none;
}

.hud-corner.bottom-left {
    bottom: 12px;
    left: 12px;
    border-right: none;
    border-top: none;
}

.hud-corner.bottom-right {
    bottom: 12px;
    right: 12px;
    border-left: none;
    border-top: none;
}

/* Subtle Grid Background Overlay */
.hud-grid-lines {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(245, 158, 11, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 158, 11, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center;
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
}

/* SVG Leader Lines Container */
.hud-svg-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.hud-svg-line {
    stroke: var(--anim-amber);
    stroke-width: 1.5;
    fill: none;
    opacity: 0;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: opacity 0.5s ease;
}

.hud-svg-line.active {
    opacity: 0.8;
    animation: drawLine 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hud-target-dot {
    fill: var(--anim-amber);
    stroke: #000;
    stroke-width: 1.5;
    r: 4;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hud-target-dot.active {
    opacity: 1;
    animation: pulseCircle 1.5s infinite alternate;
}

/* HUD Labels Layout */
.hud-label-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.hud-label {
    position: absolute;
    display: flex;
    flex-direction: column;
    background: rgba(5, 6, 10, 0.85);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.3s;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    max-width: 220px;
}

.hud-label.active {
    opacity: 1;
    transform: translateY(0);
}

.hud-label:hover {
    border-color: var(--anim-amber);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.label-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.label-desc {
    font-size: 0.65rem;
    color: var(--anim-amber);
    font-weight: 500;
    margin-top: 1px;
}

/* RESPONSIVE STATUS INFO FOR MOBILE */
.prt-animation-status-mobile {
    display: none;
    margin-top: var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    font-family: 'Outfit', sans-serif;
    box-shadow: var(--shadow-sm);
}

.prt-animation-status-mobile.visible {
    display: block;
}

.status-mobile-eyebrow {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--anim-amber);
    margin-bottom: 4px;
    font-weight: 700;
}

.status-mobile-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.status-mobile-desc {
    font-size: 0.8rem;
    color: var(--muted);
}

/* ANIMATIONS */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin-reverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes pulseCircle {
    0% {
        r: 3.5;
        stroke-width: 1px;
        filter: drop-shadow(0 0 2px var(--anim-amber-glow));
    }
    100% {
        r: 5.5;
        stroke-width: 2.5px;
        filter: drop-shadow(0 0 8px var(--anim-amber));
    }
}

/* Adjustments when inside the Hero visual container */
.prt-hero-visual {
    overflow: visible; /* Make sure HUD labels can bleed out slightly if needed */
}

/* MOBILE AND TABLET RESPONSIVE TWEAKS */
@media (max-width: 1024px) {
    .hud-label {
        display: none !important; /* Hide floating labels on tablets/mobile to avoid clutter */
    }
    .hud-svg-overlay {
        display: none !important;
    }
    .prt-animation-status-mobile {
        display: block; /* Show status below canvas instead */
    }
}
