/* Barevné tokeny – registrované, aby se do neonu přecházelo plynule */
@property --c-text   { syntax: '<color>'; inherits: true; initial-value: #9d4edd; }
@property --c-stonek { syntax: '<color>'; inherits: true; initial-value: #4f7a6a; }
@property --c-list   { syntax: '<color>'; inherits: true; initial-value: #5f8f6f; }
@property --c-kvet   { syntax: '<color>'; inherits: true; initial-value: #9b7fc9; }
@property --c-poupe  { syntax: '<color>'; inherits: true; initial-value: #b48ad6; }
@property --c-stred  { syntax: '<color>'; inherits: true; initial-value: #d9c27a; }

:root {
  --pozadi: #0b0614;
  --c-text: #9d4edd;
  --c-stonek: #4f7a6a;
  --c-list: #5f8f6f;
  --c-kvet: #9b7fc9;
  --c-poupe: #b48ad6;
  --c-stred: #d9c27a;
  --neon-prechod: 2.4s ease;
  transition: --c-text var(--neon-prechod), --c-stonek var(--neon-prechod),
    --c-list var(--neon-prechod), --c-kvet var(--neon-prechod),
    --c-poupe var(--neon-prechod), --c-stred var(--neon-prechod);
}

:root.neon {
  --c-text: #e08cff;
  --c-stonek: #00f0ff;
  --c-list: #9dff3a;
  --c-kvet: #ff2bd6;
  --c-poupe: #ff9a3d;
  --c-stred: #fff36b;
}

html, body { height: 100%; margin: 0; }

body {
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, #1b0e33 0%, var(--pozadi) 70%) var(--pozadi);
}

/* Barevný opar, který se objeví s neonem */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0;
  transition: opacity 3s ease;
  background:
    radial-gradient(circle at 18% 82%, rgb(255 43 214 / .14), transparent 45%),
    radial-gradient(circle at 82% 18%, rgb(0 240 255 / .12), transparent 45%);
}
.neon body::before { opacity: 1; }

.scena { position: fixed; inset: 0; }
.vrstva { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

#zare {
  opacity: 0;
  filter: blur(9px) saturate(1.5);
  transition: opacity var(--neon-prechod);
  will-change: opacity;
}
.neon #zare { opacity: 1; animation: dychani 3.6s ease-in-out 2.4s infinite alternate; }
@keyframes dychani { from { opacity: 1; } to { opacity: .5; } }

/* Nápis a rostliny */
.pismeno { fill: var(--c-text); stroke: var(--c-text); stroke-linejoin: round; }
.stonek  { fill: none; stroke: var(--c-stonek); stroke-linecap: round; }
.list    { fill: var(--c-list); fill-opacity: .35; stroke: var(--c-list); stroke-width: 1.2; stroke-linejoin: round; }
.kvet    { fill: var(--c-kvet); fill-opacity: .55; stroke: var(--c-kvet); stroke-width: 1.2; }
.poupe   { fill: var(--c-poupe); fill-opacity: .6; stroke: var(--c-poupe); stroke-width: 1.2; }
.stred   { fill: var(--c-stred); stroke: none; }

.list, .kvet, .poupe { transform-box: fill-box; }
.list  { transform-origin: 0% 50%; }
.kvet  { transform-origin: 50% 50%; }
.poupe { transform-origin: 50% 100%; }

/* Výchozí stav před animací – jen když běží JS, jinak zůstane vidět hotový nápis */
.js .pismeno, .js .stonek { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .pismeno { fill-opacity: 0; }
.js .list, .js .kvet, .js .poupe { transform: scale(0); }

@media (prefers-reduced-motion: reduce) {
  :root, #zare, body::before { transition: none; }
  .neon #zare { animation: none; }
}
