/* ================================================================
   Project 2 - Azure Event Middleware - Animated Card Scene
   Scoped under .p2-card-wrapper to avoid global conflicts.
   CI: font from site (Montserrat), colors: #7c3aed / #06b6d4 / #10b981
   ================================================================ */

/* ── Theme tokens (light default) ───────────────────────────── */
.p2-card-wrapper {
    --p2-scene-bg:    #f4f0fc;
    --p2-dot:         rgba(0, 0, 0, 0.07);
    --p2-title-color: rgba(17, 17, 17, 0.9);
    --p2-caption-color: rgba(17, 17, 17, 0.72);
}

/* ── Dark mode overrides ────────────────────────────────────── */
.theme-dark .p2-card-wrapper {
    --p2-scene-bg:    #07080f;
    --p2-dot:         rgba(255, 255, 255, 0.04);
    --p2-title-color: rgba(255, 255, 255, 0.9);
    --p2-caption-color: rgba(255, 255, 255, 0.35);
}
@media (prefers-color-scheme: dark) {
    html:not(.theme-light) .p2-card-wrapper {
        --p2-scene-bg:    #07080f;
        --p2-dot:         rgba(255, 255, 255, 0.04);
        --p2-title-color: rgba(255, 255, 255, 0.9);
        --p2-caption-color: rgba(255, 255, 255, 0.35);
    }
}

.p2-card-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background:
        radial-gradient(circle, var(--p2-dot) 1px, transparent 1px) 0 0 / 28px 28px,
        var(--p2-scene-bg);
}

/* Inner scene always 1280×720; JS scales via --p2-scale */
.p2-scene-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 1280px;
    height: 720px;
    transform: scale(var(--p2-scale, 0.25));
    transform-origin: top left;
    font-family: 'Montserrat', sans-serif;
}

#p2-bg {
    position: absolute;
    inset: 0;
}

/* ── Scene layout ─────────────────────────────────────────── */
.p2-scene {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ── Title block ─────────────────────────────────────────── */
.p2-title-block {
    text-align: center;
    margin-bottom: 64px;
    opacity: 0;
}

.p2-display-title {
    font-weight: 700;
    font-size: 52px;
    line-height: 1;
    color: var(--p2-title-color);
    letter-spacing: -0.03em;
    margin: 0;
}

.p2-display-title em {
    font-style: normal;
    color: #7c3aed;
}

/* ── Icons row ───────────────────────────────────────────── */
.p2-icons-row {
    display: flex;
    align-items: center;
}

.p2-icon-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    opacity: 0;
}

.p2-icon-ring {
    position: relative;
    width: 200px;
    height: 200px;
}

/* Orbit rings SVG - fills the whole ring div */
.p2-icon-ring .p2-orbits {
    position: absolute;
    inset: 0;
    width: 200px;
    height: 200px;
}

/* Icon SVG - centered inside the ring */
.p2-icon-ring svg.p2-icon-svg {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 90px;
    height: 90px;
}

.p2-icon-caption {
    font-size: 26px;
    font-weight: 600;
    color: var(--p2-caption-color);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Arrow connectors ────────────────────────────────────── */
.p2-arrow-connector {
    width: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -20px;
    opacity: 0;
}

/* ── Bottom bar ──────────────────────────────────────────── */
.p2-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #7c3aed 35%, #a78bfa 65%, transparent);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: center;
}

/* ── Reduced-motion: skip all animations ─────────────────── */
@media (prefers-reduced-motion: reduce) {
    .p2-title-block,
    .p2-icon-node,
    .p2-arrow-connector,
    .p2-bottom-bar {
        opacity: 1 !important;
        transform: none !important;
    }
}
