/* YC lives around the map, in the same world coordinates as the regions.
   One decorative layer, below evidence and labels, never catches a gesture. */
.canvas-world {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    user-select: none;
}

.canvas-world *,
.canvas-world *::before,
.canvas-world *::after { pointer-events: none; }

.world-scene {
    position: absolute;
    transform: scale(var(--world-scale, 1));
    transform-origin: center;
    opacity: 0.84;
    transition: opacity 0.3s ease;
}

.world-figure {
    position: absolute;
    inset: 4% 8% 8%;
    width: 84%;
    height: 88%;
    object-fit: contain;
    filter: drop-shadow(0 18px 16px rgba(74, 40, 33, 0.12));
}

.world-ground {
    position: absolute;
    bottom: 7%;
    left: 14%;
    width: 72%;
    height: 18%;
    border-radius: 50%;
    background: radial-gradient(ellipse, color-mix(in srgb, var(--hue) 24%, transparent), transparent 70%);
}

.world-orbit {
    position: absolute;
    left: -3%;
    top: 22%;
    width: 106%;
    height: 58%;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--hue) 40%, transparent);
    transform: rotate(-18deg);
}

.world-orbit::after {
    content: '';
    position: absolute;
    inset: 11% -5%;
    border-radius: inherit;
    border: 1px dashed color-mix(in srgb, var(--hue) 30%, transparent);
    transform: rotate(28deg);
}

.world-orbit i {
    position: absolute;
    left: 13%;
    top: 5%;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, var(--surface-solid), var(--hue));
    box-shadow: 0 5px 9px color-mix(in srgb, var(--hue) 20%, transparent);
}

.world-token {
    position: absolute;
    left: -2%;
    bottom: 18%;
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border: 1px solid color-mix(in srgb, var(--hue) 32%, var(--hairline));
    border-radius: 20px;
    background: var(--surface-solid);
    color: var(--hue-ink);
    box-shadow: 5px 7px 0 color-mix(in srgb, var(--hue) 28%, var(--surface-solid));
    transform: rotate(-12deg);
}

.world-token svg { width: 38px; height: 38px; }
.world-token svg,
.world-spark svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.world-spark {
    position: absolute;
    top: 9%;
    right: 0;
    width: 46px;
    height: 46px;
    color: var(--hue-ink);
    opacity: 0.55;
    transform: rotate(12deg);
}

.world-palm-planet {
    position: absolute;
    top: 26%;
    left: 18%;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #fff0c9, #e4b467 55%, #b17a41);
    box-shadow: 0 12px 20px rgba(177, 122, 65, 0.14);
}

.world-palm-planet::after {
    content: '';
    position: absolute;
    inset: 32% -30%;
    border: 3px solid #eed6a4;
    border-radius: 50%;
    transform: rotate(-18deg);
}

.world-field-kit { position: absolute; inset: 14%; }
.world-plan {
    position: absolute;
    inset: 0 20% 0 0;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--hue) 38%, var(--hairline));
    background: var(--surface-solid);
    color: var(--hue);
    box-shadow: 10px 12px 0 color-mix(in srgb, var(--hue) 18%, var(--surface-solid));
    transform: rotate(-12deg);
}
.world-plan svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1; }
.world-tool {
    position: absolute;
    right: -4%;
    bottom: -4%;
    display: grid;
    place-items: center;
    width: 58%;
    height: 48%;
    border-radius: 24px;
    background: var(--hue-wash);
    border: 2px solid color-mix(in srgb, var(--hue) 45%, transparent);
    color: var(--hue-ink);
    transform: rotate(12deg);
    box-shadow: 6px 10px 0 color-mix(in srgb, var(--hue) 40%, var(--surface-solid));
}
.world-tool svg { width: 52%; height: 52%; fill: none; stroke: currentColor; stroke-width: 1.1; }

.world-route {
    position: absolute;
    inset: 0;
    width: 1px;
    height: 1px;
    overflow: visible;
    color: var(--accent);
    opacity: 0.2;
}

.world-route path {
    fill: none;
    stroke: currentColor;
    stroke-width: 3px;
    stroke-dasharray: 5 14;
    stroke-linecap: round;
}

#canvas-app[data-zoom='far'] .world-scene { opacity: 1; }
#canvas-app[data-zoom='far'] .card:not(.is-dimmed) { opacity: 0.48; }
#canvas-app[data-zoom='near'] .world-route { opacity: 0.1; }
#canvas-app[data-spotlight] .world-scene { opacity: 0.22; }
#canvas-app[data-spotlight='ai'] [data-world-region='ai'],
#canvas-app[data-spotlight='products'] [data-world-region='products'],
#canvas-app[data-spotlight='experience'] [data-world-region='experience'],
#canvas-app[data-spotlight='about'] [data-world-region='about'],
#canvas-app[data-spotlight='contact'] [data-world-region='contact'] { opacity: 1; }

body[data-theme='dark'] .world-figure {
    filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.28));
}

@media (min-width: 1365px) and (prefers-reduced-motion: no-preference) {
    body:not([data-motion='reduced']) .world-figure {
        animation: world-breathe 8s ease-in-out infinite;
        animation-delay: var(--world-delay);
    }
}

@keyframes world-breathe {
    0%, 100% { transform: translateY(0) rotate(-0.7deg); }
    50% { transform: translateY(-5px) rotate(0.7deg); }
}

@media (max-width: 1364px) {
    .world-token { width: 44px; height: 44px; border-radius: 12px; }
    .world-token svg { width: 24px; height: 24px; }
    .world-spark { display: none; }
    #canvas-app:not([data-zoom='far']) .world-scene { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .world-scene { transition: none; }
}
