<section id="vividi-echo-sim-section">
<style>
@import url('https://fonts.googleapis.com/css2?family=Fahkwang:wght=300;400;500;600;700;800&display=swap');
#vividi-echo-sim-section {
padding-block: var(--et-spacing-vertical, 80px);
padding-inline: var(--et-spacing-horizontal, 20px);
background-color: var(--et-colors-background, #08080a);
position: relative;
overflow: hidden;
font-family: 'Fahkwang', sans-serif;
color: var(--et-colors-text, #ffffff);
}
#vividi-echo-sim-section::before {
content: "";
position: absolute;
inset: 0;
background: radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.05) 0%, transparent 40%),
radial-gradient(circle at 90% 80%, rgba(241, 223, 138, 0.03) 0%, transparent 50%);
pointer-events: none;
z-index: 1;
}
@media (min-width: 1024px) {
#vividi-echo-sim-section {
padding-block: var(--et-spacing-vertical-lg, 100px);
padding-inline: var(--et-spacing-horizontal-lg, 40px);
}
}
#vividi-echo-sim-section .container {
margin-inline: auto;
max-width: 42rem;
position: relative;
z-index: 10;
}
@media (min-width: 1024px) {
#vividi-echo-sim-section .container {
max-width: 80rem;
}
}
/* Dual Column Layout */
#vividi-echo-sim-section .grid-layout {
display: grid;
grid-template-columns: 1fr;
gap: 48px;
align-items: flex-start;
}
@media (min-width: 1024px) {
#vividi-echo-sim-section .grid-layout {
grid-template-columns: 44% 56%;
gap: 64px;
}
}
/* Left Column Styles */
#vividi-echo-sim-section .content-col {
display: flex;
flex-direction: column;
justify-content: flex-start;
padding-top: 10px;
text-align: center;
}
#vividi-echo-sim-section .subtitle-wrapper {
margin-bottom: 24px;
display: flex;
flex-direction: column;
align-items: center;
}
#vividi-echo-sim-section .subtitle {
font-size: 13px;
font-weight: 700;
letter-spacing: 0.16em;
color: #38bdf8;
text-transform: uppercase;
text-align: center;
}
#vividi-echo-sim-section .subtitle-underline {
width: 48px;
height: 3px;
background-color: var(--active-theme-color, #f1df8a);
margin-top: 10px;
transition: background-color 0.3s ease;
}
#vividi-echo-sim-section .hero-title {
font-size: 36px;
font-weight: 800;
line-height: 1.15;
margin: 0 auto 24px auto;
letter-spacing: -0.02em;
background: linear-gradient(90deg, #ffffff 0%, #3b82f6 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-align: center;
max-width: 42rem;
text-wrap: balance;
}
@media (min-width: 640px) {
#vividi-echo-sim-section .hero-title {
font-size: 48px;
}
}
#vividi-echo-sim-section .badge-claim-text {
font-size: 15px;
font-weight: 600;
letter-spacing: 0.08em;
color: #cbd5e1;
text-transform: uppercase;
margin-bottom: 18px;
line-height: 1.4;
text-align: center;
}
/* ASP logo block */
#vividi-echo-sim-section .asp-block {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 32px;
background: rgba(255, 255, 255, 0.02);
border: 1px solid rgba(255, 255, 255, 0.05);
padding: 12px 16px;
border-radius: 8px;
max-width: 460px;
margin-inline: auto;
}
#vividi-echo-sim-section .asp-logo {
flex-shrink: 0;
color: #ffffff;
opacity: 0.95;
}
#vividi-echo-sim-section .asp-text {
font-size: 11px;
font-weight: 600;
line-height: 1.4;
letter-spacing: 0.06em;
color: #94a3b8;
text-transform: uppercase;
text-align: left;
}
#vividi-echo-sim-section .under-badge-title {
font-size: 18px;
font-weight: 700;
letter-spacing: 0.05em;
color: #ffffff;
text-transform: uppercase;
margin-bottom: 36px;
line-height: 1.4;
text-align: center;
}
@media (min-width: 640px) {
#vividi-echo-sim-section .under-badge-title {
font-size: 21px;
}
}
/* CTA button */
#vividi-echo-sim-section .cta-blue-pill {
display: inline-flex;
align-items: center;
background-color: var(--et-colors-brand, #2563eb);
color: var(--et-colors-background, #ffffff);
text-decoration: none;
font-weight: 700;
font-size: 14px;
letter-spacing: 0.03em;
padding: 14px 28px;
border-radius: var(--et-radius-button, 8px);
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 4px 24px rgba(37, 99, 235, 0.35);
transition: all 0.25s ease;
width: fit-content;
margin-bottom: 14px;
margin-inline: auto;
}
#vividi-echo-sim-section .cta-blue-pill:hover {
background-color: color-mix(in srgb, var(--et-colors-brand, #2563eb) 90%, transparent);
box-shadow: 0 6px 30px rgba(37, 99, 235, 0.55);
transform: translateY(-1px);
}
/* Right Column */
#vividi-echo-sim-section .visualizer-col {
display: flex;
flex-direction: column;
}
#vividi-echo-sim-section .visualizer-caption {
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.16em;
color: var(--active-theme-color, #f1df8a);
font-weight: 700;
margin-bottom: 12px;
display: inline-flex;
align-items: center;
gap: 8px;
transition: color 0.3s ease;
}
#vividi-echo-sim-section .visualizer-caption-dot {
width: 6px;
height: 6px;
background-color: var(--active-theme-color, #f1df8a);
border-radius: 50%;
display: inline-block;
box-shadow: 0 0 8px var(--active-theme-color, #f1df8a);
animation: captionPulse 2s infinite alternate;
transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
@keyframes captionPulse {
0% { opacity: 0.4; transform: scale(0.9); }
100% { opacity: 1; transform: scale(1.1); }
}
#vividi-echo-sim-section .sculpture-card {
position: relative;
width: 100%;
margin-bottom: 24px;
}
#vividi-echo-sim-section .backplate {
position: absolute;
top: 15px;
left: 15px;
right: -15px;
bottom: -15px;
background-color: var(--active-theme-color, #f1df8a);
border-radius: 8px;
z-index: 1;
transition: transform 0.3s ease, background-color 0.4s ease, box-shadow 0.4s ease;
opacity: 0.85;
box-shadow: 0 0 25px var(--active-theme-color, rgba(241, 223, 138, 0.4));
}
@media (min-width: 640px) {
#vividi-echo-sim-section .backplate {
top: 20px;
left: 20px;
right: -20px;
bottom: -20px;
}
}
#vividi-echo-sim-section .visualizer-container {
position: relative;
background-color: var(--et-colors-card-background, #030305);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 8px;
overflow: hidden;
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
aspect-ratio: 16 / 9;
display: block;
z-index: 2;
}
#vividi-echo-sim-section #canvas-aurum-swarm {
display: block;
width: 100%;
height: 100%;
}
#vividi-echo-sim-section .canvas-header {
position: absolute;
top: 16px;
left: 16px;
right: 16px;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 5;
}
#vividi-echo-sim-section .sculpture-title {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.5);
background: rgba(0, 0, 0, 0.6);
padding: 4px 10px;
border-radius: 4px;
backdrop-filter: blur(4px);
}
#vividi-echo-sim-section .echoes-count {
font-size: 11px;
font-weight: 700;
color: var(--active-theme-color, #f1df8a);
background: rgba(0, 0, 0, 0.6);
padding: 4px 10px;
border-radius: 4px;
backdrop-filter: blur(4px);
transition: color 0.3s;
}
#vividi-echo-sim-section .actions-pills {
display: flex;
justify-content: center;
align-items: center;
gap: 12px;
margin-top: -24px;
margin-bottom: 28px;
z-index: 15;
position: relative;
background: rgba(14, 16, 26, 0.85);
border: 1px solid rgba(255, 255, 255, 0.1);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
padding: 10px 14px;
border-radius: 8px;
width: fit-content;
margin-inline: auto;
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
#vividi-echo-sim-section .cta-primary {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
background-color: var(--active-theme-color, #f1df8a);
color: #000000;
text-decoration: none;
font-weight: 800;
font-size: 12px;
letter-spacing: 0.05em;
padding: 12px 24px;
border-radius: var(--et-radius-button, 8px);
border: 1px solid var(--active-theme-color, #f1df8a);
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
text-transform: uppercase;
cursor: pointer;
font-family: inherit;
}
#vividi-echo-sim-section .cta-primary:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 8px 24px var(--active-theme-color, rgba(241, 223, 138, 0.4));
}
#vividi-echo-sim-section .cta-primary:disabled {
background: rgba(255, 255, 255, 0.05);
border-color: rgba(255, 255, 255, 0.08);
color: rgba(255, 255, 255, 0.25);
cursor: not-allowed;
}
#vividi-echo-sim-section .btn-reset {
display: inline-flex;
align-items: center;
justify-content: center;
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.6);
font-weight: 800;
font-size: 11px;
letter-spacing: 0.06em;
padding: 12px 20px;
border-radius: var(--et-radius-button, 8px);
cursor: pointer;
transition: all 0.3s;
text-transform: uppercase;
font-family: inherit;
}
#vividi-echo-sim-section .btn-reset:hover {
border-color: rgba(255, 255, 255, 0.35);
color: #ffffff;
}
#vividi-echo-sim-section .control-card {
background: rgba(14, 15, 23, 0.7);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
border: 1px solid rgba(255, 255, 255, 0.07);
border-radius: 8px;
padding: 24px;
box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
margin-bottom: 24px;
}
@media (min-width: 640px) {
#vividi-echo-sim-section .control-card {
padding: 28px;
}
}
#vividi-echo-sim-section .control-grid {
display: grid;
grid-template-columns: 1fr;
gap: 24px;
}
@media (min-width: 640px) {
#vividi-echo-sim-section .control-grid {
grid-template-columns: 62% 38%;
gap: 28px;
align-items: stretch;
}
}
#vividi-echo-sim-section .steps-side {
display: flex;
flex-direction: column;
}
#vividi-echo-sim-section .preview-side {
display: flex;
flex-direction: column;
border-left: 1px solid rgba(255, 255, 255, 0.06);
padding-left: 0px;
}
@media (min-width: 640px) {
#vividi-echo-sim-section .preview-side {
padding-left: 28px;
}
}
#vividi-echo-sim-section .step-title {
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: rgba(255, 255, 255, 0.45);
font-weight: 700;
margin-bottom: 14px;
display: block;
}
#vividi-echo-sim-section .emotion-pills {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 24px;
}
#vividi-echo-sim-section .emotion-pill {
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.08);
padding: 9px 15px;
font-size: 12.5px;
font-weight: 600;
border-radius: var(--et-radius-button, 8px);
color: rgba(255, 255, 255, 0.7);
cursor: pointer;
font-family: inherit;
transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#vividi-echo-sim-section .emotion-pill:hover {
background: rgba(255, 255, 255, 0.08);
color: #ffffff;
border-color: rgba(255, 255, 255, 0.2);
}
#vividi-echo-sim-section .emotion-pill.active-pill[data-emotion="samotnosc"] {
background: rgba(56, 189, 248, 0.12);
border-color: #38bdf8;
color: #38bdf8;
}
#vividi-echo-sim-section .emotion-pill.active-pill[data-emotion="milosc"] {
background: rgba(244, 63, 94, 0.12);
border-color: #f43f5e;
color: #fda4af;
}
#vividi-echo-sim-section .emotion-pill.active-pill[data-emotion="szczescie"] {
background: rgba(241, 223, 138, 0.12);
border-color: #f1df8a;
color: #f1df8a;
}
#vividi-echo-sim-section .emotion-pill.active-pill[data-emotion="duma"] {
background: rgba(168, 85, 247, 0.12);
border-color: #a855f7;
color: #c084fc;
}
#vividi-echo-sim-section .emotion-pill.active-pill[data-emotion="strach"] {
background: rgba(203, 213, 225, 0.12);
border-color: #cbd5e1;
color: #ffffff;
}
#vividi-echo-sim-section .slider-wrapper {
margin-bottom: 12px;
}
#vividi-echo-sim-section .slider-header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 13px;
margin-bottom: 12px;
}
#vividi-echo-sim-section .intensity-label {
font-weight: 700;
color: var(--active-theme-color, #f1df8a);
transition: color 0.3s ease;
}
#vividi-echo-sim-section .range-input {
-webkit-appearance: none;
width: 100%;
height: 5px;
border-radius: 100px;
background: rgba(255, 255, 255, 0.1);
outline: none;
display: block;
}
#vividi-echo-sim-section .range-input::-webkit-slider-thumb {
-webkit-appearance: none;
width: 18px;
height: 18px;
border-radius: 50%;
background: var(--active-theme-color, #f1df8a);
box-shadow: 0 0 12px var(--active-theme-color, #f1df8a);
cursor: pointer;
transition: background 0.3s, box-shadow 0.3s;
}
#vividi-echo-sim-section .preview-container {
background: rgba(0, 0, 0, 0.25);
border: 1px solid rgba(255, 255, 255, 0.05);
border-radius: 8px;
padding: 20px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
gap: 16px;
flex-grow: 1;
}
#vividi-echo-sim-section .blob-emitter {
width: 96px;
height: 96px;
background: radial-gradient(circle at center, var(--active-theme-glow-rgba, rgba(241, 223, 138, 0.15)) 0%, transparent 70%);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
flex-shrink: 0;
}
#vividi-echo-sim-section .blob-core {
width: 52px;
height: 52px;
background: var(--active-theme-gradient, radial-gradient(circle at 30% 30%, #f1df8a 0%, #cca43b 70%));
border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
box-shadow: 0 0 20px var(--active-theme-color, #f1df8a), inset -2px -2px 6px rgba(0,0,0,0.4);
transition: transform 0.3s ease, box-shadow 0.3s, background 0.3s;
animation: pulseBlob 3.5s infinite alternate ease-in-out;
}
@keyframes pulseBlob {
0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
50% { border-radius: 40% 60% 70% 30% / 50% 60% 45% 55%; }
100% { border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%; }
}
#vividi-echo-sim-section .preview-text {
font-size: 11.5px;
line-height: 1.5;
color: #94a3b8;
}
#vividi-echo-sim-section .preview-text strong {
color: #ffffff;
}
#vividi-echo-sim-section .dynamic-feed-box {
margin-top: 20px;
font-size: 13px;
line-height: 1.6;
color: #94a3b8;
padding: 14px 18px;
background: rgba(14, 15, 23, 0.5);
border-left: 3px solid var(--active-theme-color, #f1df8a);
border-radius: 8px;
border-top: 1px solid rgba(255, 255, 255, 0.04);
border-right: 1px solid rgba(255, 255, 255, 0.04);
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
transition: border-color 0.3s ease;
}
#vividi-echo-sim-section .dynamic-feed-box strong {
color: #ffffff;
}
#vividi-echo-sim-section .dynamic-feed-box .variable-emotion {
color: var(--active-theme-color, #f1df8a);
font-weight: 700;
transition: color 0.3s ease;
}
#vividi-echo-sim-section .flying-spark-sim {
position: fixed;
pointer-events: none;
z-index: 100000;
border-radius: 50%;
background: radial-gradient(circle at 35% 35%, #ffffff 0%, var(--active-theme-color, #f1df8a) 60%, transparent 100%);
box-shadow: 0 0 20px var(--active-theme-color, #f1df8a);
opacity: 0;
transition: opacity 0.15s;
}
#vividi-echo-sim-section .sculpture-card:hover .backplate {
transform: translate(3px, 3px);
}
#vividi-echo-sim-section .last {
margin-bottom: 0 !important;
}
</style>
<div class="container">
<div class="grid-layout">
<!-- Left Column -->
<div class="content-col">
<div class="subtitle-wrapper">
<div class="subtitle">Vividi.ForLife × Vivid Aurum</div>
<div class="subtitle-underline"></div>
</div>
<h2 class="hero-title">
Team building, w który Twoi ludzie naprawdę chcą wejść
</h2>
<div class="badge-claim-text">
Tworzymy Więzi w zespołach za pomocą sztuki <br> dbając o zdrowie emocjonalne <br>
</div>
<!-- ASP Wrocław Logo Block -->
<div class="asp-block">
<svg class="asp-logo" viewBox="0 0 100 100" width="46" height="46" fill="none" stroke="currentColor" stroke-width="2.5" aria-hidden="true">
<path d="M28,50 C38,32 62,32 72,50 C62,68 38,68 28,50 Z" stroke="#ffffff" />
<circle cx="50" cy="50" r="10" stroke="#ffffff" fill="currentColor" fill-opacity="0.1" />
<circle cx="50" cy="50" r="4" fill="#ffffff" />
<path d="M15,15 L85,15" stroke="#ffffff" stroke-linecap="square" />
<path d="M80,10 L85,15 L80,20" stroke="#ffffff" stroke-linecap="square" stroke-linejoin="miter" />
<path d="M85,15 L85,85" stroke="#ffffff" stroke-linecap="square" />
<path d="M80,80 L85,85 L90,80" stroke="#ffffff" stroke-linecap="square" stroke-linejoin="miter" />
<path d="M85,85 L15,85" stroke="#ffffff" stroke-linecap="square" />
<path d="M20,90 L15,85 L20,80" stroke="#ffffff" stroke-linecap="square" stroke-linejoin="miter" />
<path d="M15,85 L15,15" stroke="#ffffff" stroke-linecap="square" />
<path d="M10,20 L15,15 L20,20" stroke="#ffffff" stroke-linecap="square" stroke-linejoin="miter" />
</svg>
<div class="asp-text">
AKADEMIA SZTUK PIĘKNYCH<br>
IM. EUGENIUSZA GEPPERTA<br>
WE WROCŁAWIU
</div>
</div>
<div class="under-badge-title">
<br> NOWY WYMIAR TEAM BUILDINGU Stwórz niezapomniane doświadczenie dla swoich ludzi
</div>
<a class="cta-blue-pill" href="#contact-split-with-pattern-vv015">
<span>Umów pilotaż <span aria-hidden="true">→</span></span>
</a>
</div>
<!-- Right Column -->
<div class="visualizer-col">
<div class="visualizer-caption">
<span class="visualizer-caption-dot"></span>
W ten sposób Twój zespół może wspólnie tworzyć arcydzieło
</div>
<div class="sculpture-card">
<div class="backplate" id="dynamic-backplate"></div>
<div class="visualizer-container" id="receiver-visualizer-container">
<div class="canvas-header">
<span class="sculpture-title">Rzeźba Vivid Aurum</span>
<span class="echoes-count" id="echoes-counter">Dodane Echa: 0/10</span>
</div>
<canvas id="canvas-aurum-swarm"></canvas>
</div>
</div>
<div class="actions-pills">
<button class="cta-primary" id="btn-fire-echo">
Dodaj Echo <span aria-hidden="true">→</span>
</button>
<button class="btn-reset" id="btn-reset-sculpture">Resetuj</button>
</div>
<div class="control-card">
<div class="control-grid">
<div class="steps-side">
<span class="step-title">Krok 1: Wybierz aktualną emocję</span>
<div class="emotion-pills">
<button class="emotion-pill" data-emotion="samotnosc">Samotność</button>
<button class="emotion-pill" data-emotion="milosc">Miłość</button>
<button class="emotion-pill active-pill" data-emotion="szczescie">Szczęście</button>
<button class="emotion-pill" data-emotion="duma">Duma</button>
<button class="emotion-pill" data-emotion="strach">Strach</button>
</div>
<span class="step-title">Krok 2: Określ mierzalną intensywność</span>
<div class="slider-wrapper">
<div class="slider-header">
<span>Intensywność odczuwania</span>
<span class="intensity-label">Poziom: <span class="intensity-val">8/10</span></span>
</div>
<input type="range" min="1" max="10" value="8" class="range-input" id="echo-intensity-range" aria-label="Intensywność emocji">
</div>
</div>
<div class="preview-side">
<span class="step-title">Faza 2: Twoje Echo</span>
<div class="preview-container">
<div class="blob-emitter" id="origin-blob-emitter">
<div class="blob-core" id="origin-blob-core"></div>
</div>
<div class="preview-text" id="blob-preview-desc">
Twoje Echo nastroju to organiczna rzeźba emitująca chłodne, niebieskie światło.
</div>
</div>
</div>
</div>
<div class="dynamic-feed-box last" id="dynamic-log-feed">
Ustaw parametry powyżej, a następnie kliknij <strong>Dodaj Echo</strong> na panelu sterowania, aby uwolnić cząsteczki energii.
</div>
</div>
</div>
</div>
</div>
</section>
<script>
(function() {
var section = document.getElementById('vividi-echo-sim-section');
if (!section) return;
var rangeInput = section.querySelector('#echo-intensity-range');
var intensityVal = section.querySelector('.intensity-val');
var blobCore = section.querySelector('#origin-blob-core');
var emotionButtons = section.querySelectorAll('.emotion-pill');
var btnFireEcho = section.querySelector('#btn-fire-echo');
var btnReset = section.querySelector('#btn-reset-sculpture');
var dynamicLog = section.querySelector('#dynamic-log-feed');
var backplate = section.querySelector('#dynamic-backplate');
var echoesCounter = section.querySelector('#echoes-counter');
var previewDesc = section.querySelector('#blob-preview-desc');
var underline = section.querySelector('.subtitle-underline');
var emotionSettings = {
samotnosc: {
name: "Samotność",
hex: "#38bdf8",
glow: "rgba(56, 189, 248, 0.35)",
gradient: "radial-gradient(circle at 30% 30%, #38bdf8 0%, #0369a1 70%)",
desc: "chłodny, płynny niebieski płomień",
preview: "osobisty ślad emocjonalny stworzony w Vividi.ForLife"
},
milosc: {
name: "Miłość",
hex: "#f43f5e",
glow: "rgba(244, 63, 94, 0.35)",
gradient: "radial-gradient(circle at 30% 30%, #f43f5e 0%, #9f1239 70%)",
desc: "gorący, pulsujący wiśniowy ślad",
preview: "osobisty ślad miłości stworzony w Vividi.ForLife"
},
szczescie: {
name: "Szczęście",
hex: "#f1df8a",
glow: "rgba(241, 223, 138, 0.35)",
gradient: "radial-gradient(circle at 30% 30%, #f1df8a 0%, #cca43b 70%)",
desc: "złotą, jasną smugę czystej energii",
preview: "osobisty ślad radości stworzony w Vividi.ForLife"
},
duma: {
name: "Duma",
hex: "#a855f7",
glow: "rgba(168, 85, 247, 0.35)",
gradient: "radial-gradient(circle at 30% 30%, #a855f7 0%, #6b21a8 70%)",
desc: "głęboki, purpurowy strumień światła",
preview: "osobisty ślad dumy stworzony w Vividi.ForLife"
},
strach: {
name: "Strach",
hex: "#cbd5e1",
glow: "rgba(203, 213, 225, 0.35)",
gradient: "radial-gradient(circle at 30% 30%, #e2e8f0 0%, #475569 70%)",
desc: "lodowatą, srebrzysto-białą chmurę",
preview: "osobisty ślad strachu stworzony w Vividi.ForLife"
}
};
var currentEmotion = "szczescie";
var currentIntensity = 8;
var userEchoes = [];
var canvas = section.querySelector('#canvas-aurum-swarm');
var ctx = canvas.getContext('2d');
var particles = [];
var baseParticleCount = 150;
var animFrame = null;
function HourglassParticle(isUser, config) {
this.isUser = isUser || false;
this.color = config ? config.hex : "rgba(241, 223, 138, 0.8)";
this.intensity = config ? config.intensity : 5;
this.h = Math.random();
if (this.isUser) {
this.h = 0.05 + Math.random() * 0.1;
}
this.angle = Math.random() * Math.PI * 2;
this.pulseSpeed = 0.01 + Math.random() * 0.02;
this.pulsePhase = Math.random() * Math.PI;
this.history = [];
this.maxHistory = this.isUser ? (8 + this.intensity * 2) : 8;
}
HourglassParticle.prototype.update = function(t, w) {
var speed = this.isUser ? 0.0016 : 0.0008;
this.h += speed;
if (this.h > 1.0) {
this.h = 0;
this.history = [];
}
var d = this.h - 0.5;
var baseScale = (w || 600) / 500;
baseScale = Math.max(0.6, Math.min(baseScale, 1.5));
var maxR = 150 * baseScale;
var minR = 15 * baseScale;
this.radius = minR + 4 * (d * d) * (maxR - minR);
var rotSpeed = 0.0015 + (1.0 - Math.abs(d) * 1.5) * 0.0025;
if (this.isUser) {
rotSpeed += (this.intensity / 10) * 0.002;
}
this.angle += rotSpeed;
this.swayX = Math.sin(t * 0.5 + this.h * Math.PI) * (15 * baseScale);
this.swayY = Math.cos(t * 0.4 + this.h * Math.PI) * (6 * baseScale);
var heightY = 220 * baseScale;
this.y3d = (1.0 - this.h) * heightY - (heightY / 2);
};
HourglassParticle.prototype.draw = function(w, h) {
var cx = Math.cos(this.angle) * this.radius + this.swayX;
var cz = Math.sin(this.angle) * this.radius;
var fLen = 250;
var zOffset = 150;
var scale = fLen / (fLen + (cz + zOffset));
var screenX = w / 2 + cx * scale;
var screenY = h / 2 + (this.y3d + this.swayY) * scale;
var size = this.isUser ? 4.5 : (1.5 + Math.random() * 1.0);
var pSize = size * scale;
this.history.push({ x: screenX, y: screenY, scale: scale });
if (this.history.length > this.maxHistory) {
this.history.shift();
}
if (this.history.length > 1) {
ctx.beginPath();
ctx.moveTo(this.history[0].x, this.history[0].y);
for(var i = 1; i < this.history.length; i++) {
ctx.lineTo(this.history[i].x, this.history[i].y);
}
ctx.lineWidth = pSize * 1.5;
ctx.strokeStyle = this.color;
ctx.globalAlpha = this.isUser ? 0.45 : 0.25;
ctx.stroke();
}
ctx.fillStyle = this.isUser ? "#ffffff" : this.color;
ctx.globalAlpha = this.isUser ? 1.0 : 0.9;
ctx.beginPath();
ctx.arc(screenX, screenY, pSize, 0, Math.PI * 2);
ctx.fill();
if (this.isUser) {
ctx.shadowColor = this.color;
ctx.shadowBlur = 10;
ctx.fillStyle = this.color;
ctx.globalAlpha = 0.4;
ctx.beginPath();
ctx.arc(screenX, screenY, pSize * 2.0, 0, Math.PI * 2);
ctx.fill();
ctx.shadowBlur = 0;
}
ctx.globalAlpha = 1.0;
};
function initParticles() {
particles = [];
for (var i = 0; i < baseParticleCount; i++) {
var baseColor = "rgba(255, 255, 255, 0.9)";
if (Math.random() > 0.6) {
baseColor = "rgba(148, 163, 184, 0.85)";
} else if (Math.random() > 0.45) {
baseColor = "rgba(241, 223, 138, 0.85)";
}
particles.push(new HourglassParticle(false, { hex: baseColor }));
}
}
function resize() {
var dpr = window.devicePixelRatio || 1;
var rect = canvas.getBoundingClientRect();
canvas.width = rect.width * dpr;
canvas.height = rect.height * dpr;
ctx.scale(dpr, dpr);
}
function drawLoop() {
var w = canvas.width / (window.devicePixelRatio || 1);
var h = canvas.height / (window.devicePixelRatio || 1);
ctx.clearRect(0, 0, w, h);
var time = Date.now() * 0.001;
for (var i = 0; i < particles.length; i++) {
particles[i].update(time, w);
}
particles.sort(function(a, b) {
var aZ = Math.sin(a.angle) * a.radius;
var bZ = Math.sin(b.angle) * b.radius;
return aZ - bZ;
});
for (var i = 0; i < particles.length; i++) {
particles[i].draw(w, h);
}
animFrame = requestAnimationFrame(drawLoop);
}
function refreshSettings() {
var config = emotionSettings[currentEmotion];
section.style.setProperty('--active-theme-color', config.hex);
section.style.setProperty('--active-theme-glow-rgba', config.glow);
section.style.setProperty('--active-theme-gradient', config.gradient);
intensityVal.textContent = currentIntensity + "/10";
underline.style.backgroundColor = config.hex;
var scaleFactor = 0.6 + (currentIntensity / 10) * 0.7;
blobCore.style.transform = 'scale(' + scaleFactor + ')';
blobCore.style.boxShadow = '0 0 20px ' + config.hex;
previewDesc.textContent = config.preview;
emotionButtons.forEach(function(pill) {
if (pill.getAttribute('data-emotion') === currentEmotion) {
pill.classList.add('active-pill');
} else {
pill.classList.remove('active-pill');
}
});
echoesCounter.textContent = "Dodane Echa: " + userEchoes.length + "/10";
if (userEchoes.length >= 10) {
btnFireEcho.disabled = true;
btnFireEcho.innerHTML = "Wizualizacja Pełna";
} else {
btnFireEcho.disabled = false;
btnFireEcho.innerHTML = 'DODAJ ECHO <span aria-hidden="true">→</span>';
}
}
function fireEcho() {
if (userEchoes.length >= 10) return;
var config = emotionSettings[currentEmotion];
userEchoes.push({
emotion: currentEmotion,
intensity: currentIntensity,
hex: config.hex
});
var emitter = section.querySelector('#origin-blob-emitter').getBoundingClientRect();
var receiver = section.querySelector('#receiver-visualizer-container').getBoundingClientRect();
var startX = emitter.left + emitter.width / 2;
var startY = emitter.top + emitter.height / 2;
var endX = receiver.left + receiver.width / 2;
var endY = receiver.top + receiver.height * 0.8;
blobCore.style.transform = 'scale(0)';
var particleVolume = Math.min(8, Math.round(currentIntensity));
var countFired = 0;
function spawnSpark() {
if (countFired >= particleVolume) {
refreshSettings();
dynamicLog.innerHTML = 'Dodano <span class="variable-emotion">' + config.name + '</span> o intensywności <strong>' + currentIntensity + '/10</strong>. Cząsteczki nastroju zasiliły rzeźbę Vivid Aurum, wnosząc ' + config.desc + '.';
setTimeout(function() {
var scaleFactor = 0.6 + (currentIntensity / 10) * 0.7;
blobCore.style.transform = 'scale(' + scaleFactor + ')';
}, 350);
return;
}
var spark = document.createElement('div');
spark.className = "flying-spark-sim";
spark.style.backgroundColor = config.hex;
spark.style.boxShadow = "0 0 20px " + config.hex + ", 0 0 35px " + config.hex;
spark.style.width = "22px";
spark.style.height = "22px";
spark.style.left = startX + "px";
spark.style.top = startY + "px";
spark.style.opacity = "1";
document.body.appendChild(spark);
var duration = 900;
var startTimestamp = null;
var randomAngle = Math.random() * Math.PI * 2;
var randomRDist = -10 + Math.random() * 20;
function animateSpark(timestamp) {
if (!startTimestamp) startTimestamp = timestamp;
var elapsed = timestamp - startTimestamp;
var progress = Math.min(elapsed / duration, 1);
var curve = -140 - Math.random() * 40;
var curX = startX + (endX - startX) * progress;
var curY = startY + (endY - startY) * progress + Math.sin(progress * Math.PI) * curve;
var size = 22 - (18 * progress);
spark.style.width = size + "px";
spark.style.height = size + "px";
spark.style.left = (curX - size / 2) + "px";
spark.style.top = (curY - size / 2) + "px";
if (progress < 1) {
requestAnimationFrame(animateSpark);
} else {
spark.remove();
var userP = new HourglassParticle(true, { hex: config.hex, intensity: currentIntensity });
userP.angle = randomAngle;
userP.radius += randomRDist;
particles.push(userP);
}
}
requestAnimationFrame(animateSpark);
countFired++;
setTimeout(spawnSpark, 90 + Math.random() * 60);
}
spawnSpark();
}
function resetSimulation() {
userEchoes = [];
particles = particles.filter(function(p) {
return !p.isUser;
});
currentEmotion = "szczescie";
currentIntensity = 8;
rangeInput.value = 8;
dynamicLog.innerHTML = "Wizualizacja została zresetowana. Wybierz emocję i dodaj nowe Echo do rzeźby.";
refreshSettings();
}
emotionButtons.forEach(function(btn) {
btn.addEventListener('click', function() {
if (userEchoes.length >= 10) return;
currentEmotion = btn.getAttribute('data-emotion');
refreshSettings();
});
});
rangeInput.addEventListener('input', function() {
if (userEchoes.length >= 10) return;
currentIntensity = parseInt(rangeInput.value, 10);
refreshSettings();
});
btnFireEcho.addEventListener('click', fireEcho);
btnReset.addEventListener('click', resetSimulation);
resize();
window.addEventListener('resize', resize);
initParticles();
drawLoop();
refreshSettings();
})();
</script>