/* ================================================================
   Project 3 - Humanoide Roboter API - Animated Card Scene
   Scoped under .p3-card-wrapper to avoid global conflicts.
   CI: font from site (Montserrat), colors: #326CE5 / #512BD4 / #0078D4
   ================================================================ */

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

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

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

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

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

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

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

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

.p3-display-title em {
    font-style: normal;
    color: #326CE5;
}

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

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

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

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

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

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

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

/* ── Bottom bar ──────────────────────────────────────────── */
.p3-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #326CE5 30%, #512BD4 60%, transparent);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: center;
}

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